import{a3 as m,aE as f,Z as A,_ as E,d as x,w as g,x as w,r as l,o as h,G as _,C as p,l as y,u as d,J as D,a as S}from"./index.1d5f2f42.js";import{h as M,a as P,b as R,c as H}from"./index.c2accbd6.js";import{u as z}from"./use-page-search.5b2e253c.js";import{u as I}from"./use-page-modal.2492035a.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:n}=B.find(s=>String(e.status)===s.value);return m(f,{size:t.size,type:u},{default:()=>n})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",formatter:({addtime:e})=>A(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}}]},V=x({__name:"index",setup(e){const t="warehouseRecords",u=g(Y),n=g([]);async function s(){const o=[],{code:r,data:i}=await H({});r===0&&i.forEach(a=>{const c={value:a.id,label:a.name,disabled:String(a.status)=="0"};o.push(c)}),n.value=o,u.value.formItems[0].options=n.value}const b={pageSearchHook:function(){return z(void 0,void 0,C)},pageModalHook:function(o){return I({pageContentRef:o,confirmCallback:({create_timer:r})=>({})})}};return w(()=>s()),(o,r)=>{const i=l("ElButton"),a=l("el-link"),c=l("PageContainer"),F=l("PageAuth");return h(),_(F,{pageName:t},{default:p(()=>[y(c,{hooks:b,"content-config":d(N),"search-config":d(C),"modal-config":u.value},{content_action:p(({status:v,down_url:k})=>[String(v)==="2"?(h(),_(a,{key:0,href:k,target:"_blank",underline:!1},{default:p(()=>[y(i,{link:"",size:"small",type:"primary",icon:d(D)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):S("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var W=E(V,[["__file","D:/work/rep-v3/report-v3/src/views/reportCollection/stock/components/reportRecord/index.vue"]]);export{W as default};
