1 |
- import{ae as H,_ as U,d as V,n as $,w as g,aL as q,b3 as G,r as d,o as F,G as m,C as r,l as N,u as n,M as w,a as C,J as A,aY as f}from"./index.56c69f5a.js";import{u as _,w as z}from"./xlsx.ed122d16.js";import{e as J,g as K,d as Q}from"./index.2e257471.js";import{a as B,r as k}from"./columnRenderHelper.6c05b86e.js";import{F as P,o as S}from"./status.2df4810d.js";import{u as X}from"./use-page-search.27df6d7f.js";import{h as Z}from"./export.61b14108.js";const uu={\u4E70\u65B9\u516C\u53F8\u7F16\u7801:"",\u4E70\u65B9\u516C\u53F8\u540D\u79F0:"",\u5356\u65B9\u516C\u53F8\u7F16\u7801:"",\u5356\u65B9\u516C\u53F8\u540D\u79F0:"",\u5BF9\u8D26\u7F16\u7801:"",\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:""},E=[{value:"1",label:"\u5F85\u4ED8\u6B3E"},{value:"2",label:"\u90E8\u5206\u4ED8\u6B3E"},{value:"3",label:"\u5DF2\u4ED8\u6B3E"}],R=[{value:"1",label:"\u5F85\u56DE\u7968"},{value:"2",label:"\u90E8\u5206\u56DE\u7968"},{value:"3",label:"\u5DF2\u56DE\u7968"}],eu=[{type:"selection",width:40,align:"center"},{label:"\u5E8F\u53F7",type:"index",minWidth:60,align:"left",hide:({checkList:e})=>!e.includes("\u5E8F\u53F7\u5217")},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",width:150,align:"left"},{label:"\u603B\u989D\u6B3E",prop:"total_fee",width:110,align:"total_fee"},{label:"\u72B6\u6001",prop:"status",width:140,...B(P)},{label:"\u4E1A\u52A1\u7C7B\u578B",width:95,...B(S,"is_comon")},{label:"\u4ED8\u6B3E\u72B6\u6001",prop:"pay_status",width:80,transform:e=>{var o;return((o=E.find(s=>e===s.value))==null?void 0:o.label)||"--"},...B(E,"pay_status")},{label:"\u56DE\u7968\u72B6\u6001",prop:"inv_status",width:80,transform:e=>{var o;return((o=E.find(s=>e===s.value))==null?void 0:o.label)||"--"},...B(R,"inv_status")},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",minWidth:180,align:"left",...k("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyNo",minWidth:180,align:"left",...k("companyNo","companyName","\u4E70\u5165\u65B9\u516C\u53F8:")},{label:"\u7533\u8BF7\u4EBA",prop:"apply_name",width:70,align:"left"},{label:"\u7533\u8BF7\u65F6\u95F4",width:140,prop:"addtime",formatter:({addtime:e})=>H(e).format("YYYY-MM-DD HH:mm:ss")},{label:"\u64CD\u4F5C",fixed:"right",width:80,slot:"operation"}],tu={title:"\u8BA2\u5355\u5BF9\u8D26",columns:eu,deleteProp:"payNo",apis:{httpList:J,httpDelete:K,httpAdd:!0},companyProp:"supplierNo",superUserNoAction:!0,listNoRelation:!0,showDelete:({status:e})=>!1},x={formItems:[{field:"timer",type:"date_picker",otherOptions:{type:"daterange",startProp:"startTime",endProp:"endTime",startPlaceholder:"\u5F00\u59CB\u65E5\u671F",endPlaceholder:"\u7ED3\u675F\u65E5\u671F"}},{field:"companyNo",type:"business-query"},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",options:P},{field:"pay_status",type:"select",placeholder:"\u4ED8\u6B3E\u72B6\u6001",options:E},{field:"inv_status",type:"select",placeholder:"\u56DE\u7968\u72B6\u6001",options:R},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u7801"}]}},{field:"is_comon",type:"select",placeholder:"\u4E1A\u52A1\u7C7B\u578B",span:4,options:S}]},ou=V({__name:"index",setup(e){const o="supplyOrderRecord",s="/supply/supplyOrderRecordDetail",{push:v}=$(),l=g([]),p=g(!1),{hasPermissionWithCode:h}=q(o),O={pageSearchHook:()=>X(void 0,void 0,x)},T={content:{preview:({payNo:a})=>v(`${s}?id=${a}`),create:()=>v(s)}},b=g(null),{run:Y}=G({success:()=>b.value.onSearch()});function I(){if(l.value.length===0){f.error("\u81F3\u5C11\u52FE\u9009\u4E00\u6761\u5BF9\u8D26\u5355");return}const a=[];for(const{status:y,payNo:c,supplierNo:D,supplierName:u,companyNo:W,companyName:j}of l.value)if(String(y)!=="2"){f.error(`\u5BF9\u8D26\u5355 ${c},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else a.push({...uu,\u4E70\u65B9\u516C\u53F8\u7F16\u7801:W,\u4E70\u65B9\u516C\u53F8\u540D\u79F0:j,\u5356\u65B9\u516C\u53F8\u7F16\u7801:D,\u5356\u65B9\u516C\u53F8\u540D\u79F0:u,\u5BF9\u8D26\u7F16\u7801:c});const t=_.book_new(),i=_.json_to_sheet(a);_.book_append_sheet(t,i,"sheet"),z(t,"\u6279\u91CF\u7533\u8BF7\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}async function L(){if(l.value.length===0){f.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(l.value.length>1){f.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await Z({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>p.value=!0,onSuccess:()=>p.value=!1,onFail:()=>p.value=!1,params:{payNo:l.value[0].payNo}})}const M=a=>{Y(Q({payNo:a,status:"4"}))};return(a,t)=>{const i=d("ElButton"),y=d("ElTooltip"),c=d("PageContainer"),D=d("PageAuth");return F(),m(D,{pageName:o},{default:r(()=>[N(c,{hooks:O,events:T,contentConfig:n(tu),"search-config":n(x),"get-content-ref":u=>b.value=u,onContentSelectChange:t[2]||(t[2]=u=>l.value=u)},{content_header:r(()=>[n(h)("038")?(F(),m(i,{key:0,type:"small",loading:p.value,onClick:t[0]||(t[0]=()=>L())},{default:r(()=>[w(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):C("v-if",!0),n(h)("031")?(F(),m(i,{key:1,size:"small",icon:n(A)("arrow-down-line"),onClick:t[1]||(t[1]=()=>I())},{default:r(()=>[w("\u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F")]),_:1},8,["icon"])):C("v-if",!0)]),content_action:r(u=>[N(y,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:r(()=>[(String(u.status)==="1"||String(u.status)==="2")&&n(h)("006")&&String(u.is_comon)==="0"?(F(),m(i,{key:0,type:"primary",link:"",text:"",icon:n(A)("refresh-right"),onClick:()=>M(u.payNo)},null,8,["icon","onClick"])):C("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var cu=U(ou,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/supply/orderRecord/index.vue"]]);export{cu as default};
|