index.ec4e497f.js 6.4 KB

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