index.45cbcb55.js 7.2 KB

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