1 |
- import{_ as v,d as b,m as f,cp as x,cs as D,w as B,r as l,o as _,A as y,x as g,u as r,D as k,H as I,a as N,ce as E,S as a}from"./index.56449854.js";import{s as P,c as w,a as F}from"./content.config.5859b0ae.js";import{f as R}from"./export.a2ce61c0.js";import{i as S}from"./isBeyondTime.b16fe52f.js";import{u as A}from"./use-page-search.59eb5443.js";import{u as T,a as z}from"./useBusinessQuery.7bd11851.js";import"./createRequset.56e9fc42.js";import"./calc.f00124e1.js";import"./xlsx.ed122d16.js";import"./lodash.0da4bba2.js";const V="companyNo",j="receivableMain",H=b({__name:"business",setup(K){const c=f(null),{hasPermissionWithCode:C}=x(j),p=D(),{searchConfig:i}=T({sourceConfig:P,queryField:"companyNo"}),u=f(i),{contentConfig:d}=z({sourceConfig:w,apis:{httpList:F.list}}),h={pageSearchHook:()=>A(e=>{const{date:t,...o}=e,n=a(t).format("YYYY-MM-DD"),s=a(t).daysInMonth(),m=a(n).subtract(-(s-1),"days").format("YYYY-MM-DD");return{result:{start:n+" 00:00:00",end:m+" 23:59:59",plat_type:"1",dz_type:"2",...o},deleteProps:["date"]}},e=>{const{date:t,companyNo:o,depart_id:n}=e,s=a(t).format("YYYY-MM-DD"),m=a(t).daysInMonth(),M=a(s).subtract(-(m-1),"days").format("YYYY-MM-DD");return{result:{start:s+" 00:00:00",end:M+" 23:59:59",companyNo:o,plat_type:"1",dz_type:"2",depart_id:n},deleteProps:["date"]}},i)};B(()=>p.level,e=>{const{formItems:t}=u.value,o=t.findIndex(({field:s})=>s==="depart_id"),{itemid:n=""}=p.info||{};Number(e)===2&&(u.value.formItems[o].disabled=Number(e)===2,u.value.formItems[o].defaultValue=n)},{immediate:!0});async function Y(){const e=c.value.getBasicParams()||{},{start:t,end:o}=e;if(!e[V]){E.warning("\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8");return}if(S({end:o,start:t,len:30}))return;const s=c.value.getData();R({columns:d.columns,name:"\u5E94\u6536\u8D26\u6B3E\u6C47\u603B.xlsx",data:s})}return(e,t)=>{const o=l("el-button"),n=l("PageContainer");return _(),y(n,{hooks:h,getContentRef:s=>c.value=s,"content-config":r(d),"search-config":r(i),lockKey:"companyNo"},{content_header:g(()=>[r(C)("18")?(_(),y(o,{key:0,icon:r(k)("arrow-up-line"),onClick:Y,size:"small",type:"primary"},{default:g(()=>[I("\u5BFC\u51FA")]),_:1},8,["icon"])):N("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Z=v(H,[["__file","C:/Users/89793/Desktop/projects/report-v3/src/views/time/receivableMain/components/business.vue"]]);export{Z as default};
|