all.3cdb0ae8.js 2.1 KB

1
  1. import{_ as x,d as D,cp as M,m as f,cs as b,w as I,r as m,o as _,A as g,x as u,h as k,u as p,D as B,H as N,a as P,S as s}from"./index.56449854.js";import{s as h,c as y}from"./content.config.6d90a57e.js";import{u as w}from"./use-page-search.59eb5443.js";import{i as E}from"./isBeyondTime.b16fe52f.js";import{f as S}from"./export.a2ce61c0.js";import"./createRequset.56e9fc42.js";import"./calc.f00124e1.js";import"./xlsx.ed122d16.js";const d="receivable",A=D({__name:"all",setup(R){const{hasPermissionWithCode:Y}=M(d),i=f(null),l=b(),v={pageSearchHook:()=>w(a=>{const{date:e,...t}=a,o=s(e).format("YYYY-MM-DD"),n=s(e).daysInMonth(),r=s(o).subtract(-(n-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",dz_type:"1",...t},deleteProps:["date"]}},a=>{const{date:e,depart_id:t}=a,o=s(e).format("YYYY-MM-DD"),n=s(e).daysInMonth(),r=s(o).subtract(-(n-1),"days").format("YYYY-MM-DD");return{result:{start:o+" 00:00:00",end:r+" 23:59:59",plat_type:"1",dz_type:"1",depart_id:t},deleteProps:["date"]}},h)},c=f(h);I(()=>l.level,a=>{const{formItems:e}=c.value,t=e.findIndex(({field:n})=>n==="depart_id"),{itemid:o=""}=l.info||{};Number(a)===2&&(c.value.formItems[t].disabled=Number(a)===2,c.value.formItems[t].defaultValue=o)},{immediate:!0});async function C(){const a=i.value.getBasicParams()||{},{start:e,end:t}=a;if(E({start:e,end:t,len:30}))return;const n=i.value.getData();S({columns:y.columns,name:"\u5E94\u6536\u8D26\u6B3E\u6C47\u603B.xlsx",data:n})}return(a,e)=>{const t=m("el-button"),o=m("page-container"),n=m("page-auth");return _(),g(n,{"page-name":d},{default:u(()=>[k(o,{hooks:v,"page-name":d,"get-content-ref":r=>i.value=r,"content-config":p(y),"search-config":c.value},{content_header:u(()=>[p(Y)("9")?(_(),g(t,{key:0,onClick:C,size:"small",icon:p(B)("arrow-up-line"),type:"primary"},{default:u(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):P("v-if",!0)]),_:1},8,["get-content-ref","content-config","search-config"])]),_:1})}}});var q=x(A,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/receivable/components/all.vue"]]);export{q as default};