index.dfc982fd.js 5.7 KB

1
  1. import{_ as $,d as j,w as _,n as q,b3 as z,aL as G,r as d,o as F,G as f,C as l,l as k,u as s,M as A,a as E,J as b,aY as m}from"./index.fd765376.js";import{e as M,f as H,c as J}from"./index.8444c556.js";import{s as v,p as B,i as S,t as Y}from"./_options.cdd82887.js";import{a as h,r as P}from"./columnRenderHelper.d64097c5.js";import{h as K}from"./status.0f05917e.js";import{u as Q}from"./use-page-search.414f397e.js";import{h as X}from"./export.6a5cb026.js";import{u as D,w as Z}from"./xlsx.ed122d16.js";const uu=[{type:"selection",width:40,align:"center"},{label:"\u5BF9\u8D26\u7F16\u7801",prop:"payNo",width:150,align:"left"},{label:"\u5BF9\u8D26\u603B\u989D",prop:"total_fee",width:110,align:"total_fee"},{label:"\u72B6\u6001",prop:"status",width:140,transform:e=>{var u;return((u=v.find(a=>e===a.value))==null?void 0:u.label)||"--"},...h(v)},{label:"\u4ED8\u6B3E\u72B6\u6001",prop:"pay_status",width:80,transform:e=>{var u;return((u=B.find(a=>e===a.value))==null?void 0:u.label)||"--"},...h(B,"pay_status")},{label:"\u56DE\u7968\u72B6\u6001",prop:"inv_status",width:80,transform:e=>{var u;return((u=B.find(a=>e===a.value))==null?void 0:u.label)||"--"},...h(S,"inv_status")},{label:"\u4F9B\u5E94\u5546\u7AEF",prop:"has_account",width:80,...h(K,"has_account")},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",minWidth:160,align:"left",...P("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",minWidth:180,align:"left",...P("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"},{label:"\u64CD\u4F5C",fixed:"right",width:135,slot:"operation"}],eu={title:"\u8BA2\u5355\u5BF9\u8D26",columns:uu,apis:{httpList:M,httpAdd:!0,httpDelete:H},superUserNoAction:!0,showDelete:()=>!1,payProps:{prop:"payNo",type:"1"},returnProps:{prop:"payNo",type:"2"},showPayTagFn:({status:e},u)=>String(e)==="2"&&u.includes("013"),showReturnTagFn:({status:e},u)=>String(e)==="2"&&u.includes("014")},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:"supplierNo",type:"supplier-query"},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",span:4,options:v},{field:"status",type:"select",placeholder:"\u6807\u7B7E\u72B6\u6001",span:4,options:Y},{field:"pay_status",type:"select",placeholder:"\u4ED8\u6B3E\u72B6\u6001",options:B},{field:"inv_status",type:"select",placeholder:"\u56DE\u7968\u72B6\u6001",options:S},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u7801"}]}}]},tu={\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:""},ou=j({__name:"index",setup(e){const u="orderRecord",a="/purchase/orderRecordDetail",r=_([]),i=_(!1),{push:w}=q(),N=_(null),{run:R}=z({success:()=>N.value.onSearch()}),{hasPermissionWithCode:g}=G("orderRecord"),T={pageSearchHook:()=>Q(void 0,void 0,x)},O=n=>{R(J({payNo:n,status:"4"}))},I={content:{create:()=>w(a),preview:({payNo:n})=>w(`${a}?id=${n}`)}};async function L(){if(r.value.length===0){m.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(r.value.length>1){m.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await X({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>i.value=!0,onSuccess:()=>i.value=!1,onFail:()=>i.value=!1,params:{payNo:r.value[0].payNo}})}function U(){if(r.value.length===0){m.error("\u81F3\u5C11\u52FE\u9009\u4E00\u6761\u5BF9\u8D26\u5355");return}const n=[];for(const{status:y,payNo:c,supplierNo:C,supplierName:o,companyNo:V,companyName:W}of r.value)if(String(y)!=="2"){m.error(`\u5BF9\u8D26\u5355 ${c},\u672A\u901A\u8FC7\u5BA1\u6838`);return}else n.push({...tu,\u4E70\u65B9\u516C\u53F8\u7F16\u7801:V,\u4E70\u65B9\u516C\u53F8\u540D\u79F0:W,\u5356\u65B9\u516C\u53F8\u7F16\u7801:C,\u5356\u65B9\u516C\u53F8\u540D\u79F0:o,\u5BF9\u8D26\u7F16\u7801:c});const t=D.book_new(),p=D.json_to_sheet(n);D.book_append_sheet(t,p,"sheet"),Z(t,"\u6279\u91CF\u7533\u8BF7\u5F00\u7968\u6A21\u677F.xlsx",{bookType:"xlsx"})}return(n,t)=>{const p=d("ElButton"),y=d("ElTooltip"),c=d("PageContainer"),C=d("PageAuth");return F(),f(C,{pageName:u},{default:l(()=>[k(c,{hooks:T,events:I,contentConfig:s(eu),"search-config":s(x),"get-content-ref":o=>N.value=o,onContentSelectChange:t[2]||(t[2]=o=>r.value=o)},{content_header:l(()=>[s(g)("038")?(F(),f(p,{key:0,size:"small",loading:i.value,onClick:t[0]||(t[0]=()=>L())},{default:l(()=>[A(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):E("v-if",!0),s(g)("031")?(F(),f(p,{key:1,size:"small",icon:s(b)("arrow-down-line"),onClick:t[1]||(t[1]=()=>U())},{default:l(()=>[A("\u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F")]),_:1},8,["icon"])):E("v-if",!0)]),content_action:l(o=>[k(y,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:l(()=>[(String(o.status)==="1"||String(o.status)==="2")&&s(g)("006")?(F(),f(p,{key:0,type:"primary",link:"",text:"",icon:s(b)("refresh-right"),onClick:()=>O(o.payNo)},null,8,["icon","onClick"])):E("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var du=$(ou,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/orderRecord/index.vue"]]);export{du as default};