import{ch as s,a5 as k,af as g,ce as h,a7 as w,_ as D,d as S,n as _,p as R,r as n,o as y,A as C,y as d,h as B,i as m,D as P,a as M,cC as I}from"./index.js";import{u as H}from"./use-page-modal.13b99c3b.js";const{VITE_PROXY_DOMAIN_REAL:G,VITE_PROXY_USER_REAL:L}=k(),l=L+"/admin/",Y=e=>s.request("post",`${l}execstatlogadd`,{data:{...e,type:5}}),q=e=>s.request("post",`${l}execstatloglist`,{data:{...e,type:5}}),z=e=>s.request("post",`${l}execlogdel`,{data:{...e}}),N=e=>s.request("post",`${l}execstatall`,{data:{...e,type:4}}),A=[{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:""}],O=[{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})=>g(h,{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:r}=A.find(f=>String(e.status)===f.value);return g(h,{size:t.size,type:u},{default:()=>r})}},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",formatter:({addtime:e})=>w(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],V={title:"\u62A5\u8868\u7533\u8BF7\u8BB0\u5F55",columns:O,showDelete:e=>String(e.status)=="1"||String(e.status)==="3",apis:{httpList:q,httpAdd:Y,httpDelete:z}},F={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u6267\u884C\u72B6\u6001",options:A},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"},{field:"apply_name",type:"input",placeholder:"\u7533\u8BF7\u4EBA"}]},$={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}}]},T="warehouseRecords",j=S({__name:"index",setup(e){const t=_($),u=_([]);async function r(){const a=[],{code:c,data:i}=await N({});c===0&&i.forEach(o=>{const p={value:o.id,label:o.name,disabled:String(o.status)=="0"};a.push(p)}),u.value=a,t.value.formItems[0].options=u.value}const b={pageSearchHook:function(){return I(void 0,void 0,F)},pageModalHook:function(a){return H({pageContentRef:a,confirmCallback:({create_timer:c})=>({})})}};return R(()=>r()),(a,c)=>{const i=n("ElButton"),o=n("el-link"),p=n("PageContainer"),v=n("PageAuth");return y(),C(v,{pageName:T},{default:d(()=>[B(p,{hooks:b,"content-config":m(V),"search-config":m(F),"modal-config":t.value},{content_action:d(({status:E,down_url:x})=>[String(E)==="2"?(y(),C(o,{key:0,href:x,target:"_blank",underline:!1},{default:d(()=>[B(i,{link:"",size:"small",type:"primary",icon:m(P)("download-line")},null,8,["icon"])]),_:2},1032,["href"])):M("v-if",!0)]),_:1},8,["content-config","search-config","modal-config"])]),_:1})}}});var J=D(j,[["__file","D:/work/jiesuan/settle-vue3/src/views/reportForm/warehouseRecords/index.vue"]]);export{J as default};
