1 |
- import{aT as r,ac as x,al as w,a$ as E,ae as C,_ as y,d as b,w as n,a0 as B,r as f,o as D,G as P,C as R,j as L,l as h}from"./index.js";import{h as S}from"./index.f3438816.js";import{u as I}from"./use-page-search.f7bc460e.js";import{u as k}from"./use-page-modal.5cf2c59f.js";const{VITE_PROXY_DOMAIN_REAL:W,VITE_PROXY_USER_REAL:q}=x(),l=q+"/admin/",M=e=>r.request("post",`${l}execstatadd`,{data:{...e,type:4}}),N=e=>r.request("post",`${l}execstatlist`,{data:{...e,type:4}}),Y=e=>r.request("post",`${l}execstatus`,{data:e}),$=e=>r.request("post",`${l}execstatactioninfo`,{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","min-width":"80px",cellRenderer:({row:e,props:i})=>w(E,{size:i.size,type:String(e.status)==="1"?"success":"danger"},{default:()=>String(e.status)==="1"?"\u542F\u7528":"\u7981\u7528"})},{label:"\u521B\u5EFA\u4EBA",prop:"apply_name","min-width":"80px"},{label:"\u521B\u5EFA\u65F6\u95F4",prop:"addtime","min-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:N,httpAdd:M,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"}]},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:[]}]},T=b({__name:"index",setup(e){const i="warehouseeReport",c=n(F),_=n(null),p=n([]),d=n([]);async function m(t){const a=[],{code:o,data:s}=t==1?await $({}):await S({page:1,size:1e4});return o===0&&(t==1?s:s.list).forEach(u=>{const v={value:t==1?u.action:u.companyNo,label:(t==1,u.name)};a.push(v)}),a}const A={pageSearchHook:()=>I(void 0,void 0,g),pageModalHook:t=>k({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 a=p.value.find(({value:o})=>o===t.action);return{...t,name:a?a.label:""}},(t,a)=>{const o=f("PageContainer"),s=f("PageAuth");return D(),P(s,{pageName:i},{default:R(()=>[L(o,{hooks:A,contentConfig:h(O),"search-config":h(g),"modal-config":c.value,"get-modal-ref":u=>_.value=u},null,8,["contentConfig","search-config","modal-config","get-modal-ref"])]),_:1})}}});var X=y(T,[["__file","C:/Users/Administrator/Desktop/projects/purchase-vue3/src/views/reportForm/warehouseeReport/index.vue"]]);export{X as default};
|