import{_ as y,d as S,m,cl as k,cU as b,d1 as B,w as R,r as f,o as p,A as d,x as g,u as n,D as w,H as N,a as P}from"./index.e80c366d.js";import{s as A,c as E,a as F}from"./content.config.ca0ae2ab.js";import{h as H}from"./export.6f50dc45.js";import{i as T}from"./isBeyondTime.85391023.js";import{u as I}from"./use-page-search.e3e95470.js";import{u as D,a as U}from"./useBusinessQuery.00e2ea8d.js";import"./createRequset.60472412.js";import"./xlsx.ed122d16.js";import"./lodash.92db800d.js";const V="goodSaleHot",q=S({__name:"business",setup(L){const c=m(null),a=k(!1),{hasPermissionWithCode:C}=b(V),u=B(),{searchConfig:r}=D({sourceConfig:A,queryField:"companyNo"}),l=m(r),{contentConfig:_}=U({sourceConfig:E,apis:{httpList:F.list}}),h={pageSearchHook:()=>I(void 0,void 0,r)};R(()=>u.level,e=>{const{formItems:t}=l.value,o=t.findIndex(({field:i})=>i==="depart_id"),{itemid:s=""}=u.info||{};Number(e)===2&&(l.value.formItems[o].defaultValue=s)},{immediate:!0});const v={onSuccess:()=>a.value=!1,onStart:()=>a.value=!0,onFail:()=>a.value=!1};async function x(){const e=c.value.getBasicParams()||{},{start_date:t,end_date:o}=e;T({start:t,end:o,len:30})||await H({isAdmin:!1,name:"\u4EA7\u54C1\u70ED\u9500\u6392\u884C\u699C.xlsx",fileType:"aplication/x-msexecl",url:"/purchease/sale/goodSaleHotListExport",...v,params:e})}return(e,t)=>{const o=f("el-button"),s=f("PageContainer");return p(),d(s,{hooks:h,getContentRef:i=>c.value=i,"content-config":n(_),"search-config":n(r),lockKey:"companyNo"},{content_header:g(()=>[n(C)("18")?(p(),d(o,{key:0,icon:n(w)("arrow-up-line"),onClick:x,size:"small",type:"primary"},{default:g(()=>[N("\u5BFC\u51FA")]),_:1},8,["icon"])):P("v-if",!0)]),_:1},8,["getContentRef","content-config","search-config"])}}});var Q=y(q,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/time/goodSaleHot/components/business.vue"]]);export{Q as default};
