import{Z as m,cp as f,S as k,_ as E,d as x,m as g,n as D,r as n,o as h,A as _,x as i,h as y,u as p,D as S,a as w}from"./index.e80c366d.js";import{h as M,a as P,b as R,c as H}from"./index.27359f76.js";import{u as z}from"./use-page-search.e3e95470.js";import{u as I}from"./use-page-modal.2afc964f.js";const B=[{value:"1",label:"\u5F85\u6267\u884C",type:"warning"},{value:"2",label:"\u6267\u884C\u5B8C\u6210",type:"success"},{value:"3",label:"\u6267\u884C\u5931\u8D25",type:"error"},{value:"4",label:"\u6267\u884C\u4E2D",type:""}],L=[{type:"selection",width:40,align:"center",hide:({checkList:e})=>!e.includes("\u52FE\u9009\u5217")},{label:"\u5E8F\u53F7",type:"index",width:70,hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u62A5\u8868\u540D\u79F0",prop:"name"},{label:"\u6267\u884C\u7C7B\u578B",prop:"type",cellRenderer:({row:e,props:t})=>m(f,{size:t.size,type:String(e.type)==="1"?"":"success"},{default:()=>"\u7ACB\u5373\u6267\u884C"})},{label:"\u72B6\u6001",prop:"status",cellRenderer:({row:e,props:t})=>{const{type:u,label:l}=B.find(d=>String(e.status)===d.value);return m(f,{size:t.size,type:u},{default:()=>l})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",formatter:({addtime:e})=>k(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],N={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:L,showDelete:e=>String(e.status)=="1"||String(e.status)==="3",apis:{httpList:M,httpAdd:P,httpDelete:R}},C={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:B},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},Y={title:"\u62A5\u8868\u7533\u8BF7",colLayout:{span:24},itemStyle:{},formItems:[{field:"id",type:"select",label:"\u62A5\u8868",labelWidth:"120px",placeholder:"\u8BF7\u9009\u62E9\u62A5\u8868",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868"}],options:[],otherOptions:{disabled:!0}}]},j="warehouseRecords",V=x({__name:"index",setup(e){const t=g(Y),u=g([]);async function l(){const o=[],{code:s,data:r}=await H({});s===0&&r.forEach(a=>{const c={value:a.id,label:a.name,disabled:String(a.status)=="0"};o.push(c)}),u.value=o,t.value.formItems[0].options=u.value}const b={pageSearchHook:function(){return z(void 0,void 0,C)},pageModalHook:function(o){return I({pageContentRef:o,confirmCallback:({create_timer:s})=>({})})}};return D(()=>l()),(o,s)=>{const r=n("ElButton"),a=n("el-link"),c=n("PageContainer"),F=n("PageAuth");return h(),_(F,{pageName:j},{default:i(()=>[y(c,{hooks:b,"content-config":p(N),"search-config":p(C),"modal-config":t.value},{content_action:i(({status:v,down_url:A})=>[String(v)==="2"?(h(),_(a,{key:0,href:A,target:"_blank",underline:!1},{default:i(()=>[y(r,{link:"",size:"small",type:"primary",icon:p(S)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):w("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var Z=E(V,[["__file","C:/Users/63107/Desktop/projects/report-v3/src/views/reportCollection/stock/components/reportRecord/index.vue"]]);export{Z as default};
