1 |
- import{aC as r,a2 as x,a3 as y,aE as C,Z as b,_ as v,d as w,w as n,aT as B,r as g,o as N,G as D,C as L,l as P,u as h}from"./index.1d5f2f42.js";import{h as I}from"./index.2f459bd1.js";import{r as S}from"./columnRenderHelper.b302b7f4.js";import{u as q}from"./use-page-search.5b2e253c.js";import{u as R}from"./use-page-modal.2492035a.js";const{VITE_PROXY_DOMAIN_REAL:G,VITE_PROXY_USER_REAL:k}=x(),l=k+"/admin/",M=e=>r.request("post",`${l}execadd`,{data:e}),Y=e=>r.request("post",`${l}execlist`,{data:e}),$=e=>r.request("post",`${l}execstatus`,{data:e}),H=e=>r.request("post",`${l}execaction`,{data:e}),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:"\u72B6\u6001",prop:"status",width:"80px",cellRenderer:({row:e,props:i})=>y(C,{size:i.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",...S("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})=>b(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:100,slot:"operation"}],T={title:"\u53EF\u7533\u8BF7\u62A5\u8868",superUserNoAction:!1,showCreate:e=>e,showStatus:e=>e,columns:O,apis:{httpList:Y,httpAdd:M,httpStatus:$}},A={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"}]},F={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=w({__name:"index",setup(e){const i="reportApply",c=n(F),_=n(null),p=n([]),d=n([]);async function m(t){const u=Number(t)===1?H:I,{code:a,data:o}=await u({page:1,size:1e3});return Number(a)!==0?void 0:((t===1?o:o.list)||[]).map(s=>({value:t===1?s.action:s.companyNo,label:t===1?s.name:s.company_name}))}const E={pageSearchHook:()=>q(void 0,void 0,A),pageModalHook:t=>R({pageContentRef:t})};return B(async()=>{p.value=await m(1),d.value=await m(2),c.value.formItems[1].options=p.value,c.value.formItems[2].options=d.value}),F.onDataChange=function(t){const u=p.value.find(({value:a})=>a===t.action);return{...t,name:u?u.label:""}},(t,u)=>{const a=g("PageContainer"),o=g("PageAuth");return N(),D(o,{pageName:i},{default:L(()=>[P(a,{hooks:E,contentConfig:h(T),"search-config":h(A),"modal-config":c.value,"get-modal-ref":f=>_.value=f},null,8,["contentConfig","search-config","modal-config","get-modal-ref"])]),_:1})}}});var Z=v(W,[["__file","D:/work/rep-v3/report-v3/src/views/reportForm/reportApply/index.vue"]]);export{Z as default};
|