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