import{u as y,i as w,r as l,h as x,o as T,e as u}from"./vendor-39c32a1b.js";import{n as L,$ as p,L as P}from"./index-8fa791df.js";import{L as C}from"./LJPagiNation-9eafdb4a.js";import{I as k}from"./constant-206eb609.js";import{L as S}from"./LJWWData-ae7c7c4b.js";/* empty css                                                                     *//* empty css                                                                 */const H="/png/img_xinzgl-3-9dc57d6a.png";const z={__name:"commissionPlanListView",setup(_){const t=y(),e=w({company:p.getters.company,"fields!":"commission_rule",limit:10,offset:0,del_flag:0,ordering:"-id"}),a=l(0),s=l(1);let i=l([]);const d=l(x(()=>p.getters.appMainHeight-32-52-87-45-35)),c=l(!0),m=l(!0),f=k;T(()=>{c.value=!0,o()});function o(){c.value=!0,HTTP.get("get_commission_salary_files",e).then(n=>{a.value=n.data.count,i.value=n.data.results,i.value.length>0?m.value=!0:m.value=!1}).finally(()=>{setTimeout(()=>c.value=!1,500)})}function g(n){e.limit=n,o()}function v(n){s.value=n,e.offset=(n-1)*e.limit,o()}function h(n="",r="add"){t.push({path:"/finances/financesHome/commissionPlanCEViews",query:{id:n?n.id:"",type:r}})}function b(n){u.exports.MessageBox.confirm("\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6A21\u677F\u5417\uFF0C\u5220\u9664\u540E\u4E0D\u53EF\u6062\u590D\uFF01","\u63D0\u793A",{type:"warning"}).then(()=>{HTTP.patch("commission",{id:n.id,del_flag:1}).then(r=>{r.code===0?(u.exports.Message({type:"success",message:"\u5220\u9664\u6210\u529F"}),o()):u.exports.Message({type:"error",message:r.msg})})}).catch(r=>{})}return{__sfc:!0,router:t,filter:e,total:a,currentPage:s,tableData:i,tabelHeigth:d,loading:c,showTip:m,planType:f,getList:o,handleSizeChange:g,handleCurrentChange:v,addTemplate:h,deleteTemplate:b,LJTableHeader:P,LJPagiNation:C,LJWWData:S}}};var N=function(){var t=this,e=t._self._c,a=t._self._setupProxy;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:a.loading,expression:"loading"}],staticClass:"clue-times"},[e(a.LJTableHeader,{attrs:{search:!1,dropdown:!1}},[e("template",{slot:"right"},[e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:62403,expression:"62403"}],attrs:{type:"primary"},on:{click:a.addTemplate}},[t._v("\u65B0\u589E\u63D0\u6210\u65B9\u6848")])],1)],2),e("div",{staticClass:"table-list"},[a.showTip?e("el-table",{staticStyle:{width:"100%"},attrs:{data:a.tableData,height:a.tabelHeigth,"header-cell-style":{background:"#F6FAFF"}}},[e("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),e("el-table-column",{attrs:{prop:"name",label:"\u65B9\u6848\u540D\u79F0",width:"150"}}),e("el-table-column",{attrs:{prop:"name",label:"\u63D0\u6210\u8303\u56F4"},scopedSlots:t._u([{key:"default",fn:function({row:s}){return[s.is_self?e("span",[t._v("\u672C\u4EBA")]):s.member_name_list.length>0?e("span",[e(a.LJWWData,{staticStyle:{display:"inline-block"},attrs:{type:2,openid:s.member_name_list[0]}}),s.member_name_list.length>1?e("span",[t._v(" \u7B49"+t._s(s.member_name_list.length)+"\u4EBA ")]):t._e()],1):t._e()]}}],null,!1,1958956752)}),e("el-table-column",{attrs:{prop:"name",label:"\u4E1A\u7EE9\u6307\u6807",width:"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" "+t._s(a.planType[s.row.achievement_rule])+" ")]}}],null,!1,3559073510)}),e("el-table-column",{attrs:{prop:"name",label:"\u63D0\u6210\u6BD4\u4F8B",width:"120"},scopedSlots:t._u([{key:"default",fn:function(s){return[t._v(" "+t._s(s.row.commission_type===1?"\u9636\u68AF\u63D0\u6210":"\u7EDF\u4E00\u63D0\u6210")+" ")]}}],null,!1,804128152)}),e("el-table-column",{attrs:{prop:"address",label:"\u64CD\u4F5C",align:"center",width:"160"},scopedSlots:t._u([{key:"default",fn:function(s){return[e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:62402,expression:"62402"}],attrs:{type:"text"},on:{click:function(i){return a.addTemplate(s.row,"detail")}}},[t._v("\u67E5\u770B ")]),e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:62404,expression:"62404"}],attrs:{type:"text"},on:{click:function(i){return a.addTemplate(s.row,"edit")}}},[t._v("\u7F16\u8F91 ")]),e("el-button",{directives:[{name:"permission",rawName:"v-permission",value:62405,expression:"62405"}],attrs:{type:"text"},on:{click:function(i){return a.deleteTemplate(s.row)}}},[t._v("\u5220\u9664 ")])]}}],null,!1,485394785)})],1):e("div",{staticClass:"guide"},[e("img",{attrs:{src:H,alt:""}}),e("div",{staticStyle:{"margin-top":"15px","font-size":"16px",color:"#919398"}},[t._v(" \u516C\u53F8\u6240\u6709\u7684\u63D0\u6210\u65B9\u6848\u90FD\u5728\u8FD9\u91CC ")])])],1),a.showTip?e(a.LJPagiNation,{attrs:{"current-page":a.currentPage,"page-size":a.filter.limit,total:a.total},on:{"size-change":a.handleSizeChange,"current-change":a.handleCurrentChange}}):t._e()],1)},$=[],J=L(z,N,$,!1,null,"4ff34eeb",null,null);const R=J.exports;export{R as default};
