1 |
- import{ah as x,_ as P,d as k,A as W,E as C,aZ as S,x as m,o as f,N as B,K as p,y as R,u as n,a as E,R as O,W as v,aS as F}from"./index.1417328f.js";import{u as h,w as T}from"./xlsx.ed122d16.js";import{d as Y,e as j}from"./index.08fe6875.js";import{r as H}from"./columnRenderHelper.dfb155e8.js";import{u as I}from"./use-page-search.7e7b4728.js";import{h as M}from"./export.0c2421ad.js";const U={\u5356\u65B9\u516C\u53F8\u7F16\u7801:"",\u5BF9\u8D26\u7F16\u53F7:"",\u53D1\u7968\u7C7B\u578B:"",\u53D1\u7968\u4EE3\u7801:"",\u53D1\u7968\u53F7\u7801:"",\u53D1\u7968\u7A0E\u524D\u91D1\u989D:"",\u5F00\u7968\u65E5\u671F:"","\u6821\u9A8C\u7801(\u7535\u5B50\u7968\u5FC5\u586B,\u5168\u7535\u7968\u4E0D\u9700\u8981)":""},g=[{value:"1",label:"\u4E70\u65B9\u516C\u53F8\u4E1A\u52A1\u5BA1\u6838"},{value:"2",label:"\u5BA1\u6838\u6210\u529F"},{value:"3",label:"\u4E70\u5BB6\u9A73\u56DE"},{value:"4",label:"\u5DF2\u64A4\u9500\u7533\u8BF7"}],V=[{type:"selection",align:"left"},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u5BF9\u8D26\u7F16\u53F7",prop:"payNo",minWidth:180,align:"left"},{label:"\u72B6\u6001",prop:"status",minWidth:120,transform:e=>{var o;return((o=g.find(l=>e===l.value))==null?void 0:o.label)||"--"},...H(g)},{label:"\u603B\u989D\u6B3E",prop:"total_fee",minWidth:110,align:"total_fee"},{label:"\u5356\u65B9\u516C\u53F8\u7F16\u53F7",prop:"supplierNo",minWidth:180,align:"left"},{label:"\u5356\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",minWidth:180,align:"left"},{label:"\u4E70\u65B9\u516C\u53F8\u7F16\u53F7",prop:"companyNo",minWidth:180,align:"left"},{label:"\u4E70\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",minWidth:180,align:"left"},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",minWidth:70,align:"left"},{label:"\u7533\u8BF7\u65F6\u95F4",minWidth:180,prop:"addtime",formatter:({addtime:e})=>x(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],$={title:"\u8BA2\u5355\u5BF9\u8D26",columns:V,deleteProp:"payNo",apis:{httpList:Y,httpDelete:j,httpAdd:!0},companyProp:"supplierNo",superUserNoAction:!0,delTooltip:"\u662F\u5426\u64A4\u56DE\u8BA2\u5355\u5BF9\u8D26\u7533\u8BF7?",showDelete:({status:e})=>Number(e)!==3},_={formItems:[{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u53F7"}]}},{field:"companyNo",type:"business-query"},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:g},{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"startTime",endProp:"endTime",startPlaceholder:"\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u7ED3\u675F\u65E5\u671F"}}]},q=v(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA "),z=v("\u4E0B\u8F7D\u6279\u91CF\u5F00\u7968\u6A21\u677F"),G=k({__name:"index",setup(e){const o="supplyOrderRecord",l="/supply/supplyOrderRecordDetail",{push:D}=W(),t=C([]),s=C(!1),{hasPermissionWithCode:y}=S(o),A={pageSearchHook:()=>I(void 0,void 0,_)},b={content:{preview:({payNo:a})=>D(`${l}?id=${a}`),create:()=>D(l)}};function N(){if(t.value.length===0){F.error("\u81F3\u5C11\u52FE\u9009\u4E00\u6761\u5BF9\u8D26\u5355");return}const a=[];for(const{status:d,payNo:i,supplierNo:c}of t.value)if(String(d)!=="2"){F.error(`\u5BF9\u8D26\u5355 ${i},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else a.push({...U,\u5356\u65B9\u516C\u53F8\u7F16\u7801:c,\u5BF9\u8D26\u7F16\u53F7:i});const u=h.book_new(),r=h.json_to_sheet(a);h.book_append_sheet(u,r,"sheet"),T(u,"\u6279\u91CF\u5F00\u7968\u7533\u8BF7\u6A21\u677F.xlsx",{bookType:"xlsx"})}async function w(){if(t.value.length===0){F.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(t.value.length>1){F.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await M({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>s.value=!0,onSuccess:()=>s.value=!1,onFail:()=>s.value=!1,params:{payNo:t.value[0].payNo}})}return(a,u)=>{const r=m("ElButton"),d=m("PageContainer"),i=m("PageAuth");return f(),B(i,{pageName:o},{default:p(()=>[R(d,{hooks:A,events:b,contentConfig:n($),"search-config":n(_),onContentSelectChange:u[2]||(u[2]=c=>t.value=c)},{content_header:p(()=>[n(y)("038")?(f(),B(r,{key:0,type:"small",loading:s.value,onClick:u[0]||(u[0]=()=>w())},{default:p(()=>[q]),_:1},8,["loading"])):E("v-if",!0),n(y)("031")?(f(),B(r,{key:1,size:"small",icon:n(O)("arrow-down-line"),onClick:u[1]||(u[1]=()=>N())},{default:p(()=>[z]),_:1},8,["icon"])):E("v-if",!0)]),_:1},8,["contentConfig","search-config"])]),_:1})}}});var uu=P(G,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/supply/orderRecord/index.vue"]]);export{uu as default};
|