1 |
- import{ac as D,aZ as F,_ as b,d as x,n as z,w as Y,a4 as M,r as k,o as i,G as c,C as l,j as r,l as e,a_ as f,aR as C,J as h,a as y,b3 as P,az as S}from"./index.js";import{u as I}from"./use-page-search.c6b00ede.js";import{a as w,b as N}from"./index.6c1a1b93.js";import{a as O}from"./columnRenderHelper.ea97af9d.js";const g=[{value:"0",label:"\u672A\u5C01\u5E10",type:"info"},{value:"1",label:"\u5F85\u5BA1\u6279",type:"warning"},{value:"2",label:"\u5C01\u8D26\u5B8C\u6210",type:"success"},{value:"3",label:"\u5C01\u8D26\u9A73\u56DE",type:"warning"},{value:"4",label:"\u5C01\u8D26\u5931\u8D25",type:"danger"}],R=[{label:"\u5C01\u5E10\u7F16\u53F7",prop:"fzCode",minWidth:150},{label:"\u8BB0\u5E10\u6708\u4EFD",prop:"fz_date",minWidth:70},{label:"\u4E1A\u52A1\u516C\u53F8\u540D\u79F0",minWidth:160,...O(u=>u.company_code,u=>u.company_name,"\u4E1A\u52A1\u516C\u53F8\u7EB3\u7A0E\u53F7:")},{label:"\u72B6\u6001",width:100,cellRenderer({row:u}){var n;return D(F,{type:((n=g.find(a=>a.value==u.status))==null?void 0:n.type)||"--",size:"small"},{default:()=>{var a;return((a=g.find(o=>o.value==u.status))==null?void 0:a.label)||"--"}})}},{label:"\u5C01\u88C5\u64CD\u4F5C\u4EBA",prop:"apply_name",minWidth:100},{label:"\u5C01\u88C5\u65F6\u95F4",prop:"create_time",minWidth:120},{label:"\u64CD\u4F5C",fixed:"right",slot:"operation",width:160}],W={columns:R,title:"\u5546\u54C1\u7BA1\u7406",permissions:["007"],companyProp:"company_code",apis:{httpList:(u={})=>{let{fz_date:n,...a}=u;return Array.isArray(n)&&n.length===0&&(n=""),w({fz_date:n,...a})},httpAdd:!0}},A={formItems:[{field:"fz_date",type:"date_picker",span:7,otherOptions:{type:"month",placeholder:"\u8BB0\u8D26\u6708\u4EFD",valueFormat:"YYYY-MM",format:"YYYY-MM"}},{field:"status",type:"select",placeholder:"\u72B6\u6001",options:g}]},$="productManager",L=x({__name:"index",setup(u){const n=z(),a=Y(null),{isSuperUser:o}=M(),B={pageSearchHook:()=>I(void 0,void 0,A)},E={content:{preview:m=>n.push(`/invoiceInOut/summaryDetail?data=${JSON.stringify(m)}`)}};async function p(m,v){var d;try{await P.alert("\u662F\u5426\u786E\u8BA4\u5BA1\u6838","\u63D0\u793A",{type:"warning",confirmButtonText:"\u786E\u8BA4",cancelButtonText:"\u53D6\u6D88",showCancelButton:!0});const s=await N({id:m,status:v});s.code==0?(d=a.value)==null||d.onSearch():S.warning(s.message)}catch(s){console.error("\u72B6\u6001\u53D8\u66F4\u5931\u8D25:",s)}}return(m,v)=>{const d=k("PageContainer"),s=k("PageAuth");return i(),c(s,{pageName:$},{default:l(()=>[r(d,{hooks:B,events:E,searchConfig:e(A),contentConfig:e(W),"get-content-ref":t=>a.value=t},{content_action:l(t=>[t.status=="1"&&!e(o)?(i(),c(e(f),{key:0,content:"\u5BA1\u6279\u901A\u8FC7",placement:"top"},{default:l(()=>[r(e(C),{link:"",size:"small",type:"primary",onClick:_=>p(t.id,"2"),icon:e(h)("checkbox-circle-line")},null,8,["onClick","icon"])]),_:2},1024)):y("v-if",!0),t.status=="1"&&!e(o)?(i(),c(e(f),{key:1,content:"\u6539\u4E3A\u672A\u5C01\u8D26",placement:"top"},{default:l(()=>[r(e(C),{link:"",size:"small",type:"primary",onClick:_=>p(t.id,"0"),icon:e(h)("close-circle-line")},null,8,["onClick","icon"])]),_:2},1024)):y("v-if",!0),t.status=="2"&&!e(o)?(i(),c(e(f),{key:2,content:"\u89E3\u9664\u5C01\u8D26",placement:"top"},{default:l(()=>[r(e(C),{link:"",size:"small",type:"primary",onClick:_=>p(t.id,"0"),icon:e(h)("link")},null,8,["onClick","icon"])]),_:2},1024)):y("v-if",!0),t.status=="0"&&!e(o)?(i(),c(e(f),{key:3,content:"\u6539\u4E3A\u5F85\u5BA1\u6279",placement:"top"},{default:l(()=>[r(e(C),{link:"",size:"small",type:"primary",onClick:_=>p(t.id,"1"),icon:e(h)("compass")},null,8,["onClick","icon"])]),_:2},1024)):y("v-if",!0)]),_:1},8,["searchConfig","contentConfig","get-content-ref"])]),_:1})}}});var J=b(L,[["__file","C:/Users/89793/Desktop/projects/ticket-system/src/views/invoiceInOut/summary/index.vue"]]);export{J as default};
|