1 |
- import{_ as k,d as L,E as f,a5 as N,a7 as M,F as S,ag as U,a8 as Y,x as p,o as m,c as _,y as l,K as n,b as C,L as x,M as b,W as g,T as B,aS as v}from"./index.743f0c80.js";import P from"./company-select.8eb9f02a.js";import{h as D}from"./export.155240ef.js";import"./index.e866db4a.js";import"./xlsx.ed122d16.js";var I=[{value:"710",label:"\u56DE\u6B3E\u6838\u9500\u660E\u7EC6\u8868",time:"",end:"",url:"ole"},{value:"711",label:"\u56DE\u7968\u660E\u7EC6\u8868",time:"",end:"",url:"ie"},{value:"712",label:"\u7ECF\u8425\u5206\u6790\u62A5\u8868",time:"",end:"",url:"ae"},{value:"713",label:"\u6536\u5165\u6210\u672C\u660E\u7EC6\u8868",time:"",url:"oie"},{value:"714",label:"\u5E94\u6536\u53F0\u8D26\u8868",time:"",end:"",url:"sbe"},{value:"715",label:"\u7528\u53CB\u9500\u7968\u8868",time:"",end:"",url:"pie"}];const O=[{url:"pe",value:"716",label:"\u8BA2\u5355\u5BF9\u8D26\u6C47\u603B\u8868",time:"",end:""},{url:"cm",value:"716",label:"\u91C7\u8D2D\u7BA1\u7406\u8868",time:"",end:""}];const T={class:"main"},W={style:{width:"100%","text-align":"center"}},$={style:{width:"1200px","text-align":"left",display:"inline-block",margin:"14vh 2vh 0 0"}},q=g(" \u5BFC\u51FA "),H=g(" \u5BFC\u51FA "),K={name:"commission"},R=L({...K,setup(j){const s=f(I),d=f(O),{currentCompany:F}=N(),E=f([]),u=M({currentLine:-1,loading:!1});async function V(a,i){const e=F.value.companyNo;if(!e){v.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8!");return}a.time.length===2?await D({url:a.url,name:a.label,onStart:()=>{u.currentLine=i,u.loading=!0},onSuccess:()=>{u.currentLine=-1,u.loading=!1},onFail:()=>{u.currentLine=-1,u.loading=!1},params:{start:a.time[0],company:e,end:a.time[1]}}):v.warning("\u8BF7\u9009\u62E9\u65F6\u95F4\u533A\u95F4!")}async function w(a,i){const e=F.value.companyNo,{supplierNo:c}=a;if(!e){v.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8!");return}if(e===c){v.warning("\u5356\u65B9\u516C\u53F8\u4E0E\u4E1A\u52A1\u516C\u53F8\u4E0D\u80FD\u4E00\u81F4!");return}a.time.length===2?await D({url:a.url,name:a.label,onStart:()=>{u.currentLine=i,u.loading=!0},onSuccess:()=>{u.currentLine=-1,u.loading=!1},onFail:()=>{u.currentLine=-1,u.loading=!1},params:{start:a.time[0],companyNo:e,end:a.time[1],supplierNo:c}}):v.warning("\u8BF7\u9009\u62E9\u65F6\u95F4\u533A\u95F4!")}return S(()=>{const a=U().getMenuActions("commission");E.value=a,s.value.forEach((i,e)=>{s.value[e].time="",s.value[e].end=""}),d.value.forEach((i,e)=>{d.value[e].time="",d.value[e].end="",d.value[e].supplierNo=""})}),Y(()=>{}),(a,i)=>{const e=p("el-col"),c=p("el-date-picker"),h=p("el-button"),y=p("el-row"),A=p("PagePower");return m(),_("div",T,[l(A,{"is-show":E.value.some(t=>t==="001")},{default:n(()=>[C("div",W,[C("div",$,[(m(!0),_(x,null,b(s.value,(t,o)=>(m(),_("div",{key:t.value+o,style:{padding:"10px 20px"}},[l(y,{style:{width:"100%"}},{default:n(()=>[l(e,{span:7,class:"tr",style:{padding:"0 30px 0 0","line-height":"32px"}},{default:n(()=>[g(B(t.label),1)]),_:2},1024),l(e,{span:8},{default:n(()=>[l(c,{modelValue:t.time,"onUpdate:modelValue":r=>t.time=r,type:"daterange","range-separator":"\u81F3","value-format":"YYYY-MM-DD","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),l(e,{span:3},{default:n(()=>[l(h,{type:"primary",loading:u.currentLine===o&&u.loading,onClick:r=>V(t,o)},{default:n(()=>[q]),_:2},1032,["loading","onClick"])]),_:2},1024)]),_:2},1024)]))),128)),(m(!0),_(x,null,b(d.value,(t,o)=>(m(),_("div",{key:t.value+o,style:{padding:"10px 20px"}},[l(y,{style:{width:"100%"}},{default:n(()=>[l(e,{span:7,class:"tr",style:{padding:"0 30px 0 0","line-height":"32px"}},{default:n(()=>[g(B(t.label),1)]),_:2},1024),l(e,{span:8},{default:n(()=>[l(c,{modelValue:t.time,"onUpdate:modelValue":r=>t.time=r,type:"daterange","range-separator":"\u81F3","value-format":"YYYY-MM-DD","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F"},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),l(e,{span:6},{default:n(()=>[l(P,{modelValue:t.supplierNo,"onUpdate:modelValue":r=>t.supplierNo=r},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),l(e,{span:3},{default:n(()=>[l(h,{type:"primary",loading:u.currentLine===o+s.value.length&&u.loading,onClick:r=>w(t,o+s.value.length)},{default:n(()=>[H]),_:2},1032,["loading","onClick"])]),_:2},1024)]),_:2},1024)]))),128))])])]),_:1},8,["is-show"])])}}});var Z=k(R,[["__scopeId","data-v-772d5bee"],["__file","D:/work/accout-vue3-ui/src/views/parameter/commission/index.vue"]]);export{Z as default};
|