index.496e5a.js 4.5 KB

1
  1. import{_ as L,d as N,x as F,W as U,cl as M,y as Y,ad as S,$ as P,r as c,o as m,c as _,l as t,D as n,h as x,F as D,E as B,M as g,L as b,m as f,aZ as v}from"./index.js";import I from"./company-select.143962.js";import{h as V}from"./export.fc82d641.js";import"./index.684ecd6b.js";import"./xlsx.ed122d16.js";var $=[{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 R={class:"main"},W={style:{width:"100%","text-align":"center"}},j={style:{width:"1200px","text-align":"left",display:"inline-block",margin:"14vh 2vh 0 0"}},q={name:"commission"},H=N({...q,setup(T){const s=F($),d=F(O),{currentCompany:E}=U(),h=F([]),u=M({currentLine:-1,loading:!1});async function w(a,i){const e=E.value.companyNo;if(!e){v.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8!");return}a.time.length===2?await V({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 A(a,i){const e=E.value.companyNo,{supplierNo:p}=a;if(!e){v.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8!");return}if(e===p){v.warning("\u5356\u65B9\u516C\u53F8\u4E0E\u4E1A\u52A1\u516C\u53F8\u4E0D\u80FD\u4E00\u81F4!");return}a.time.length===2?await V({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:p}}):v.warning("\u8BF7\u9009\u62E9\u65F6\u95F4\u533A\u95F4!")}return Y(()=>{const a=S().getMenuActions("commission");h.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=""})}),P(()=>{}),(a,i)=>{const e=c("el-col"),p=c("el-date-picker"),y=c("el-button"),C=c("el-row"),k=c("PagePower");return m(),_("div",R,[t(k,{"is-show":h.value.some(l=>l==="001")},{default:n(()=>[x("div",W,[x("div",j,[(m(!0),_(D,null,B(s.value,(l,o)=>(m(),_("div",{key:l.value+o,style:{padding:"10px 20px"}},[t(C,{style:{width:"100%"}},{default:n(()=>[t(e,{span:7,class:"tr",style:{padding:"0 30px 0 0","line-height":"32px"}},{default:n(()=>[g(b(l.label),1)]),_:2},1024),t(e,{span:8},{default:n(()=>[t(p,{modelValue:l.time,"onUpdate:modelValue":r=>l.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),t(e,{span:3},{default:n(()=>[t(y,{type:"primary",loading:f(u).currentLine===o&&f(u).loading,onClick:r=>w(l,o)},{default:n(()=>[g(" \u5BFC\u51FA ")]),_:2},1032,["loading","onClick"])]),_:2},1024)]),_:2},1024)]))),128)),(m(!0),_(D,null,B(d.value,(l,o)=>(m(),_("div",{key:l.value+o,style:{padding:"10px 20px"}},[t(C,{style:{width:"100%"}},{default:n(()=>[t(e,{span:7,class:"tr",style:{padding:"0 30px 0 0","line-height":"32px"}},{default:n(()=>[g(b(l.label),1)]),_:2},1024),t(e,{span:8},{default:n(()=>[t(p,{modelValue:l.time,"onUpdate:modelValue":r=>l.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),t(e,{span:6},{default:n(()=>[t(I,{modelValue:l.supplierNo,"onUpdate:modelValue":r=>l.supplierNo=r},null,8,["modelValue","onUpdate:modelValue"])]),_:2},1024),t(e,{span:3},{default:n(()=>[t(y,{type:"primary",loading:f(u).currentLine===o+s.value.length&&f(u).loading,onClick:r=>A(l,o+s.value.length)},{default:n(()=>[g(" \u5BFC\u51FA ")]),_:2},1032,["loading","onClick"])]),_:2},1024)]),_:2},1024)]))),128))])])]),_:1},8,["is-show"])])}}});var Q=L(H,[["__scopeId","data-v-772d5bee"],["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/parameter/commission/index.vue"]]);export{Q as default};