index.f129d4a3.js 4.3 KB

1
  1. import{_ as R,d as T,w as c,n as O,b2 as I,bs as W,r as i,o as d,G as f,C as o,l as E,u as a,M as L,a as y,J as U,aW as v}from"./index.0bc83371.js";import{e as V,f as q,h as G}from"./index.a6946a3d.js";import{a as _,r as C}from"./columnRenderHelper.08879900.js";import{m as M}from"./status.d6b2a53d.js";import{u as $}from"./use-page-search.58c51153.js";import{h as j}from"./export.f4344923.js";import"./xlsx.ed122d16.js";const m=[{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\u5BF9\u8D26"}],z=[{value:"1",label:"\u56DE\u7968\u6807\u7B7E"},{value:"2",label:"\u4ED8\u6B3E\u6807\u7B7E"},{value:"3",label:"\u4ED8\u6B3E\u56DE\u7968\u6700\u5C11\u6709\u4E00\u4E2A"},{value:"4",label:"\u4ED8\u6B3E\u56DE\u7968\u90FD\u6709"}],H=[{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:t=>{var e;return((e=m.find(n=>t===n.value))==null?void 0:e.label)||"--"},..._(m)},{label:"\u4F9B\u5E94\u5546\u7AEF",prop:"has_account",width:80,..._(M,"has_account")},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",minWidth:160,align:"left",...C("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",minWidth:180,align:"left",...C("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"}],J={title:"\u8BA2\u5355\u5BF9\u8D26",columns:H,apis:{httpList:V,httpAdd:!0,httpDelete:q},superUserNoAction:!0,showDelete:()=>!1,payProps:{prop:"payNo",type:"1"},returnProps:{prop:"payNo",type:"2"},showPayTagFn:({status:t},e)=>String(t)==="2"&&e.includes("013"),showReturnTagFn:({status:t},e)=>String(t)==="2"&&e.includes("014")},D={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:m},{field:"status",type:"select",placeholder:"\u6807\u7B7E\u72B6\u6001",span:4,options:z},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u7801"}]}}]},K=T({__name:"index",setup(t){const e="orderRecord",n="/purchase/orderRecordDetail",s=c([]),l=c(!1),{push:h}=O(),g=c(null),{run:b}=I({success:()=>g.value.onSearch()}),{hasPermissionWithCode:B}=W("orderRecord"),A={pageSearchHook:()=>$(void 0,void 0,D)},N=r=>{b(G({payNo:r,status:"4"}))},w={content:{create:()=>h(n),preview:({payNo:r})=>h(`${n}?id=${r}`)}};async function P(){if(s.value.length===0){v.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(s.value.length>1){v.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await j({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>l.value=!0,onSuccess:()=>l.value=!1,onFail:()=>l.value=!1,params:{payNo:s.value[0].payNo}})}return(r,p)=>{const F=i("ElButton"),k=i("ElTooltip"),x=i("PageContainer"),S=i("PageAuth");return d(),f(S,{pageName:e},{default:o(()=>[E(x,{hooks:A,events:w,contentConfig:a(J),"search-config":a(D),"get-content-ref":u=>g.value=u,onContentSelectChange:p[1]||(p[1]=u=>s.value=u)},{content_header:o(()=>[a(B)("038")?(d(),f(F,{key:0,size:"small",loading:l.value,onClick:p[0]||(p[0]=()=>P())},{default:o(()=>[L(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):y("v-if",!0)]),content_action:o(u=>[E(k,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:o(()=>[(String(u.status)==="1"||String(u.status)==="2")&&a(B)("006")?(d(),f(F,{key:0,type:"primary",link:"",text:"",icon:a(U)("refresh-right"),onClick:()=>N(u.payNo)},null,8,["icon","onClick"])):y("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var oe=R(K,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/orderRecord/index.vue"]]);export{oe as default};