all.7c2a0bdb.js 2.2 KB

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