index.4e7b5292.js 4.4 KB

1
  1. import{_ as S,d as R,w as c,n as T,b5 as O,aX as I,r as i,o as d,G as f,C as o,l as E,u as a,M as U,a as y,J as V,aQ as v}from"./index.37dc4dc0.js";import{e as W,f as q,h as G}from"./index.f0377b23.js";import{r as _}from"./columnRenderHelper.d1d4cea8.js";import{k as M}from"./status.73dc9f3e.js";import{u as $}from"./use-page-search.ca39a066.js";import{h as j}from"./export.680d6749.js";import"./xlsx.ed122d16.js";const h=[{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=h.find(n=>t===n.value))==null?void 0:e.label)||"--"},..._(h)},{label:"\u4F9B\u5E94\u5546\u7AEF",prop:"has_account",width:80,..._(M,"has_account")},{label:"\u5356\u51FA\u65B9\u516C\u53F8\u7F16\u7801",prop:"supplierNo",width:150,align:"left"},{label:"\u5356\u51FA\u65B9\u516C\u53F8\u540D\u79F0",prop:"supplierName",minWidth:160,align:"left"},{label:"\u4E70\u5165\u65B9\u516C\u53F8\u7F16\u7801",prop:"companyNo",width:150,align:"left"},{label:"\u4E70\u5165\u65B9\u516C\u53F8\u540D\u79F0",prop:"companyName",minWidth:180,align:"left"},{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:W,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:h},{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"}]}}]},L=R({__name:"index",setup(t){const e="orderRecord",n="/purchase/orderRecordDetail",l=c([]),s=c(!1),{push:m}=T(),g=c(null),{run:C}=O({success:()=>g.value.onSearch()}),{hasPermissionWithCode:F}=I("orderRecord"),b={pageSearchHook:()=>$(void 0,void 0,D)},A=r=>{C(G({payNo:r,status:"4"}))},w={content:{create:()=>m(n),preview:({payNo:r})=>m(`${n}?id=${r}`)}};async function N(){if(l.value.length===0){v.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(l.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:()=>s.value=!0,onSuccess:()=>s.value=!1,onFail:()=>s.value=!1,params:{payNo:l.value[0].payNo}})}return(r,p)=>{const B=i("ElButton"),P=i("ElTooltip"),k=i("PageContainer"),x=i("PageAuth");return d(),f(x,{pageName:e},{default:o(()=>[E(k,{hooks:b,events:w,contentConfig:a(J),"search-config":a(D),"get-content-ref":u=>g.value=u,onContentSelectChange:p[1]||(p[1]=u=>l.value=u)},{content_header:o(()=>[a(F)("038")?(d(),f(B,{key:0,size:"small",loading:s.value,onClick:p[0]||(p[0]=()=>N())},{default:o(()=>[U(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):y("v-if",!0)]),content_action:o(u=>[E(P,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:o(()=>[(String(u.status)==="1"||String(u.status)==="2")&&a(F)("006")?(d(),f(B,{key:0,type:"primary",link:"",text:"",icon:a(V)("refresh-right"),onClick:()=>A(u.payNo)},null,8,["icon","onClick"])):y("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var te=S(L,[["__file","/Users/apple/Desktop/CompanyProjects/accout-vue3-ui/src/views/purchase/orderRecord/index.vue"]]);export{te as default};