import{ch as r,a5 as y,af as E,ce as x,cA as b,a7 as C,_ as v,d as w,n as l,S as B,r as f,o as N,A as D,y as L,h as P,i as h,cC as S}from"./index.js";import{h as I}from"./index.9e6aefa2.js";import{u as q}from"./use-page-modal.13b99c3b.js";const{VITE_PROXY_DOMAIN_REAL:U,VITE_PROXY_USER_REAL:R}=y(),i=R+"/admin/",k=e=>r.request("post",`${i}execadd`,{data:e}),M=e=>r.request("post",`${i}execlist`,{data:e}),Y=e=>r.request("post",`${i}execstatus`,{data:e}),$=e=>r.request("post",`${i}execaction`,{data:e}),H=[{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:"\u72B6\u6001",prop:"status",width:"80px",cellRenderer:({row:e,props:u})=>E(x,{size:u.size,type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{label:"\u4E1A\u52A1\u516C\u53F8",prop:"companyName",minWidth:"180px",...b("companyNo","companyName","\u4E1A\u52A1\u516C\u53F8\u7F16\u7801")},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name",width:"80px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime",width:"140px",formatter:({addtime:e})=>C(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:100,slot:"operation"}],O={title:"\u53EF\u7533\u8BF7\u62A5\u8868",superUserNoAction:!1,showCreate:e=>e,showStatus:e=>e,columns:H,apis:{httpList:M,httpAdd:k,httpStatus:Y}},g={colLayout:{xl:3,lg:4,md:6,sm:8,xs:12},formItems:[{field:"status",type:"select",placeholder:"\u72B6\u6001",options:[{value:"0",label:"\u7981\u7528"},{value:"1",label:"\u542F\u7528"}]},{field:"name",type:"input",placeholder:"\u62A5\u8868\u540D\u79F0"}]},A={title:"\u53EF\u7533\u8BF7\u62A5\u8868",colLayout:{span:24},itemStyle:{},formItems:[{field:"name",type:"input",label:"\u62A5\u8868\u540D\u79F0",labelWidth:"120px",placeholder:"\u62A5\u8868\u540D\u79F0",rules:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u62A5\u8868\u540D\u79F0"}],otherOptions:{disabled:!0}},{field:"action",type:"select",label:"\u62A5\u8868\u9009\u9879",labelWidth:"120px",placeholder:"\u62A5\u8868\u9009\u9879",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u62A5\u8868\u9009\u9879"}],options:[]},{field:"companyNo",type:"select",label:"\u4E1A\u52A1\u516C\u53F8",labelWidth:"120px",placeholder:"\u4E1A\u52A1\u516C\u53F8",rules:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E1A\u52A1\u516C\u53F8"}],options:[]}]},W="reportApply",z=w({__name:"index",setup(e){const u=l(A),F=l(null),c=l([]),p=l([]);async function d(t){const a=Number(t)===1?$:I,{code:o,data:s}=await a({page:1,size:1e3});return Number(o)!==0?void 0:((t===1?s:s.list)||[]).map(n=>({value:t===1?n.action:n.companyNo,label:t===1?n.name:n.company_name}))}const _={pageSearchHook:()=>S(void 0,void 0,g),pageModalHook:t=>q({pageContentRef:t})};return B(async()=>{c.value=await d(1),p.value=await d(2),u.value.formItems[1].options=c.value,u.value.formItems[2].options=p.value}),A.onDataChange=function(t){const a=c.value.find(({value:o})=>o===t.action);return{...t,name:a?a.label:""}},(t,a)=>{const o=f("PageContainer"),s=f("PageAuth");return N(),D(s,{pageName:W},{default:L(()=>[P(o,{hooks:_,contentConfig:h(O),"search-config":h(g),"modal-config":u.value,"get-modal-ref":m=>F.value=m},null,8,["contentConfig","search-config","modal-config","get-modal-ref"])]),_:1})}}});var X=v(z,[["__file","D:/work/jiesuan/settle-vue3/src/views/reportForm/reportApply/index.vue"]]);export{X as default};
