1 |
- import{_ as S,d as P,cp as I,m as A,cs as $,cl as T,Q as U,w as W,r as E,o as F,A as b,x as p,u as g,h,H as c,G as R,a as C,S as y}from"./index.56449854.js";import{a as M,s as B}from"./apis.3d789891.js";import{a,d as V}from"./calc.f00124e1.js";import{u as j}from"./use-page-search.59eb5443.js";import{f as z}from"./export.a2ce61c0.js";import"./createRequset.56e9fc42.js";import"./xlsx.ed122d16.js";const H=[{label:"\u4E1A\u52A1\u516C\u53F8",prop:"depart",cellRenderer({row:e}){return e.depart==="\u603B\u8BA1"?e.depart:e.depart.split("@")[1]}},{label:"\u5E94\u6536\u8D26\u6B3E",prop:"wpay_fee",cellRenderer({row:e}){return Number(e.wpay_fee).toFixed(2)}},{label:"\u5DF2\u5F00\u7968",prop:"ainv_fee",cellRenderer({row:e}){return Number(e.ainv_fee).toFixed(2)}},{label:"\u5DF2\u56DE\u6B3E",prop:"apay_fee",cellRenderer({row:e}){return Number(e.apay_fee).toFixed(2)}},{label:"\u5DF2\u5F00\u7968-\u5DF2\u56DE\u6B3E",prop:"ainv_apay_fee",cellRenderer({row:e}){return Number(e.ainv_apay_fee).toFixed(2)}},{label:"\u672A\u5F00\u7968",prop:"winv_fee",cellRenderer({row:e}){return Number(e.winv_fee).toFixed(2)}},{label:"\u5F85\u5F00\u7968",prop:"inv_fee",cellRenderer({row:e}){return Number(e.inv_fee).toFixed(2)}},{label:"\u5DF2\u53D1\u8D27\u672A\u5F00\u7968",prop:"winv_asend_fee",cellRenderer({row:e}){return Number(e.winv_asend_fee).toFixed(2)}},{label:"\u672A\u53D1\u8D27",prop:"wpay_send_fee",cellRenderer({row:e}){return Number(e.wpay_send_fee).toFixed(2)}},{label:"\u8D8560\u5929\u5DF2\u53D1\u8D27\u672A\u5F00\u7968",prop:"winv_two_month",cellRenderer({row:e}){return Number(e.winv_two_month).toFixed(2)}},{label:"\u8D85180\u5929\u5E94\u6536\u8D26\u6B3E",prop:"wpay_six_month",cellRenderer({row:e}){return Number(e.wpay_six_month).toFixed(2)}}],Y={columns:H,responseCode:0,root:!0,handleData(e=[]){return new Promise(m=>{const u=e[0].map(({depart:s})=>s).map(s=>e.map(t=>t.find(n=>n.depart===s)).reduce((t,n)=>({depart:n.depart,wpay_fee:Number(a(n.wpay_fee,t.wpay_fee)).toFixed(2),wpay_ainv_fee:Number(a(n.wpay_ainv_fee,t.wpay_ainv_fee)).toFixed(2),ainv_fee:Number(a(n.ainv_fee,t.ainv_fee)).toFixed(2),apay_fee:Number(a(n.apay_fee,t.apay_fee)).toFixed(2),ainv_apay_fee:Number(a(n.ainv_apay_fee,t.ainv_apay_fee)).toFixed(2),wpay_send_fee:Number(a(n.wpay_send_fee,t.wpay_send_fee)).toFixed(2),winv_fee:Number(a(n.winv_fee,t.winv_fee)).toFixed(2),inv_fee:Number(a(n.inv_fee,t.inv_fee)).toFixed(2),winv_asend_fee:Number(a(n.winv_asend_fee,t.winv_asend_fee)).toFixed(2),winv_two_month:Number(a(n.winv_two_month,t.winv_two_month)).toFixed(2),wpay_six_month:Number(a(n.wpay_six_month,t.wpay_six_month)).toFixed(2)}),{depart:"",companyName:"",wpay_fee:0,wpay_ainv_fee:0,ainv_fee:0,apay_fee:0,ainv_apay_fee:0,wpay_send_fee:0,winv_fee:0,inv_fee:0,winv_asend_fee:0,winv_two_month:0,wpay_six_month:0}));m(u)})},superUserNoAction:!1,apis:{httpList:M.list}};function i(e){return e==="NaN"||Number(e)===0?"0":e<1e3&&e>0||e<0&&e>-1e3?e:V(e,1e4).toFixed(2)+"W"}const L=[{label:"\u4E1A\u52A1\u516C\u53F8",prop:"depart",cellRenderer({row:e}){return e.depart==="\u603B\u8BA1"?e.depart:e.depart.split("@")[1]}},{label:"\u5E94\u6536\u8D26\u6B3E",prop:"wpay_fee",controller:!0,cellRenderer({row:e}){return i(e.wpay_fee)}},{label:"\u5DF2\u5F00\u7968",prop:"ainv_fee",controller:!0,cellRenderer({row:e}){return i(e.ainv_fee)}},{label:"\u5DF2\u56DE\u6B3E",prop:"apay_fee",controller:!0,cellRenderer({row:e}){return i(e.apay_fee)}},{label:"\u5DF2\u5F00\u7968-\u5DF2\u56DE\u6B3E",prop:"ainv_apay_fee",controller:!0,cellRenderer({row:e}){return i(e.ainv_apay_fee)}},{label:"\u672A\u5F00\u7968",prop:"winv_fee",controller:!0,cellRenderer({row:e}){return i(e.winv_fee)}},{label:"\u5F85\u5F00\u7968",prop:"inv_fee",controller:!0,cellRenderer({row:e}){return i(e.inv_fee)}},{label:"\u5DF2\u53D1\u8D27\u672A\u5F00\u7968",prop:"winv_asend_fee",controller:!0,cellRenderer({row:e}){return i(e.winv_asend_fee)}},{label:"\u672A\u53D1\u8D27",prop:"wpay_send_fee",controller:!0,cellRenderer({row:e}){return i(e.wpay_send_fee)}},{label:"\u8D8560\u5929\u5DF2\u53D1\u8D27\u672A\u5F00\u7968",prop:"winv_two_month",controller:!0,cellRenderer({row:e}){return i(e.winv_two_month)}},{label:"\u8D85180\u5929\u5E94\u6536\u8D26\u6B3E",prop:"wpay_six_month",controller:!0,cellRenderer({row:e}){return i(e.wpay_six_month)}}],k={columns:L,responseCode:0,root:!0,handleData(e=[]){return new Promise(m=>{const u=e[0].map(({depart:s})=>s).map(s=>e.map(t=>t.find(n=>n.depart===s)).reduce((t,n)=>({depart:n.depart,wpay_fee:Number(a(n.wpay_fee,t.wpay_fee)).toFixed(2),wpay_ainv_fee:Number(a(n.wpay_ainv_fee,t.wpay_ainv_fee)).toFixed(2),ainv_fee:Number(a(n.ainv_fee,t.ainv_fee)).toFixed(2),apay_fee:Number(a(n.apay_fee,t.apay_fee)).toFixed(2),ainv_apay_fee:Number(a(n.ainv_apay_fee,t.ainv_apay_fee)).toFixed(2),wpay_send_fee:Number(a(n.wpay_send_fee,t.wpay_send_fee)).toFixed(2),winv_fee:Number(a(n.winv_fee,t.winv_fee)).toFixed(2),inv_fee:Number(a(n.inv_fee,t.inv_fee)).toFixed(2),winv_asend_fee:Number(a(n.winv_asend_fee,t.winv_asend_fee)).toFixed(2),winv_two_month:Number(a(n.winv_two_month,t.winv_two_month)).toFixed(2),wpay_six_month:Number(a(n.wpay_six_month,t.wpay_six_month)).toFixed(2)}),{depart:"",companyName:"",wpay_fee:0,wpay_ainv_fee:0,ainv_fee:0,apay_fee:0,ainv_apay_fee:0,wpay_send_fee:0,winv_fee:0,inv_fee:0,winv_asend_fee:0,winv_two_month:0,wpay_six_month:0}));m(u)})},superUserNoAction:!1,apis:{httpList:M.list}},N="receivableWanyu",G=P({__name:"summary",setup(e){const{hasPermissionWithCode:m}=I(N),d=A(null),x=$(),u=T(1),s=U(()=>u.value===1?k:Y);async function D(){const l=d.value.getData();z({columns:k.columns,name:"\u4E07\u5B87\u5E94\u6536(\u4E1A\u52A1\u516C\u53F8).xlsx",data:l})}const t={pageSearchHook:()=>j(l=>{const{date:o,...r}=l,f=y(o).format("YYYY-MM-DD"),w=y(o).daysInMonth(),_=y(f).subtract(-(w-1),"days").format("YYYY-MM-DD");return{result:{start:f+" 00:00:00",end:_+" 23:59:59",plat_type:"1",dz_type:"2",...r},deleteProps:["date"]}},l=>{const{date:o,depart_id:r}=l,f=y(o).format("YYYY-MM-DD"),w=y(o).daysInMonth(),_=y(f).subtract(-(w-1),"days").format("YYYY-MM-DD");return{result:{start:f+" 00:00:00",end:_+" 23:59:59",plat_type:"1",dz_type:"2",depart_id:r},deleteProps:["date"]}},B)},n=A(B);return W(()=>x.level,l=>{const{formItems:o}=n.value;o.findIndex(({field:r})=>r==="depart_id"),x.info},{immediate:!0}),(l,o)=>{const r=E("el-button"),f=E("page-container"),w=E("page-auth");return F(),b(w,{"page-name":N},{default:p(()=>[u.value===0?(F(),b(f,{key:0,hooks:t,"page-name":N,"get-content-ref":_=>d.value=_,"content-config":g(Y)},{content_header:p(()=>[h(r,{onClick:o[0]||(o[0]=_=>u.value=u.value===1?0:1)},{default:p(()=>[c(R(u.value===1?"\u663E\u793A\u5177\u4F53\u91D1\u989D":"\u663E\u793A\u4E07\u5143\u4EE5\u4E0A"),1)]),_:1}),h(r,{onClick:o[1]||(o[1]=_=>{var v;return(v=d.value)==null?void 0:v.onSearch()})},{default:p(()=>[c("\u5237\u65B0")]),_:1}),g(m)("9")?(F(),b(r,{key:0,type:"primary",onClick:D},{default:p(()=>[c("\u5BFC\u51FA")]),_:1})):C("v-if",!0)]),_:1},8,["get-content-ref","content-config"])):(F(),b(f,{key:1,hooks:t,"page-name":N,"get-content-ref":_=>d.value=_,"content-config":s.value},{content_header:p(()=>[h(r,{onClick:o[2]||(o[2]=_=>u.value=u.value===1?0:1)},{default:p(()=>[c(R(u.value===1?"\u663E\u793A\u5177\u4F53\u91D1\u989D":"\u663E\u793A\u4E07\u5143\u4EE5\u4E0A"),1)]),_:1}),h(r,{onClick:o[3]||(o[3]=_=>{var v;return(v=d.value)==null?void 0:v.onSearch()})},{default:p(()=>[c("\u5237\u65B0")]),_:1}),g(m)("9")?(F(),b(r,{key:0,type:"primary",onClick:D},{default:p(()=>[c("\u5BFC\u51FA")]),_:1})):C("v-if",!0)]),_:1},8,["get-content-ref","content-config"]))]),_:1})}}});var ee=S(G,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/receivableWanyu/components/summary.vue"]]);export{ee as default};
|