index.a00c70.js 5.9 KB

12345678
  1. import{d6 as L,dJ as M,cs as d,bb as v,dK as W,dL as G,aZ as i,dM as V,cr as N,_ as q,d as z,x as _,ai as H,p as J,bc as Y,aM as $,r as f,o as m,G as h,D as l,l as b,m as r,M as j,a as E,J as K,bd as Z,c8 as Q,cx as X,dI as ee}from"./index.js";import{s as D,p as B,i as P,t as ue}from"./_options.cdd82887.js";import{h as te}from"./export.fc82d641.js";import"./xlsx.ed122d16.js";const ae=[{type:"selection",width:40,align:"center",fixed:"left"},{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:"\u4E1A\u52A1\u7C7B\u578B",width:90,...d(N,"is_comon")},{label:"\u5BF9\u8D26\u5355\u72B6\u6001",prop:"status",width:140,transform:e=>{var u;return((u=D.find(t=>e===t.value))==null?void 0:u.label)||"--"},...d(D)},{label:"\u4ED8\u6B3E\u72B6\u6001",prop:"pay_status",width:80,transform:e=>{var u;return((u=B.find(t=>e===t.value))==null?void 0:u.label)||"--"},...d(B,"pay_status")},{label:"\u56DE\u7968\u72B6\u6001",prop:"inv_status",width:80,transform:e=>{var u;return((u=B.find(t=>e===t.value))==null?void 0:u.label)||"--"},...d(P,"inv_status")},{label:"\u91C7\u8D2D\u5355\u6807\u7B7E\u91D1\u989D\u5408\u8BA1",width:"160px",children:[{label:"\u4ED8\u6B3E",prop:"cgd_pay_tag_total"},{label:"\u56DE\u7968",prop:"cgd_inv_tag_total"}]},{label:"\u5BF9\u8D26\u5355\u6807\u7B7E\u91D1\u989D",width:"160px",children:[{label:"\u4ED8\u6B3E",prop:"pay_tag_fee"},{label:"\u56DE\u7968",prop:"inv_tag_fee"}]},{label:"\u5356\u51FA\u65B9\u516C\u53F8",prop:"supplierName",minWidth:160,align:"left",...v("supplierNo","supplierName","\u5356\u51FA\u65B9\u516C\u53F8:")},{label:"\u4E70\u5165\u65B9\u516C\u53F8",prop:"companyName",minWidth:180,align:"left",...v("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:205,slot:"operation"}];function A(e){return e.is_comon!="1"&&!W(G(e.payNo))?(i.warning("\u91C7\u8D2D\u8BA2\u5355\u6216\u6E90\u5934\u8BA2\u5355\u521B\u5EFA\u65F6\u95F4\u5728"+V()+"\u540E\u7684\u4E0D\u5141\u8BB8\u6DFB\u52A0\u6807\u7B7E"),!1):!0}const oe={title:"\u8BA2\u5355\u5BF9\u8D26",columns:ae,apis:{httpList:L,httpAdd:!0,httpDelete:M},superUserNoAction:!0,showDelete:()=>!1,payProps:{prop:"payNo",type:"1",callback:A},returnProps:{prop:"payNo",type:"2",callback:A},showPayTagFn:({status:e,pay_status:u,is_comon:t},a)=>String(e)==="2"&&String(u)!=="3"&&a.includes("013"),showReturnTagFn:({status:e,inv_status:u,is_comon:t},a)=>String(e)==="2"&&String(u)!=="3"&&a.includes("014"),showUnPayTagFn:({status:e,is_comon:u},t)=>String(e)==="2"&&t.includes("055"),showUnReturnTagFn:({status:e,is_comon:u},t)=>String(e)==="2"&&t.includes("056")},w={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:"is_comon",type:"select",placeholder:"\u4E1A\u52A1\u7C7B\u578B",span:4,options:N},{field:"status",type:"select",placeholder:"\u5BA1\u6838\u72B6\u6001",span:4,options:D},{field:"tag_id",type:"select",placeholder:"\u6807\u7B7E\u72B6\u6001",span:4,options:ue},{field:"pay_status",type:"select",span:4,placeholder:"\u4ED8\u6B3E\u72B6\u6001",options:B},{field:"inv_status",type:"select",placeholder:"\u56DE\u7968\u72B6\u6001",options:P},{field:"group",type_field:"group_type",type:"input_group",otherOptions:{inputGroupOptions:[{value:"payNo",label:"\u5BF9\u8D26\u7F16\u7801"}]}}]},ne=z({__name:"index",setup(e){const u="orderRecord",t="/purchase/orderRecordDetail",a=_(!1),p=_([]),{isSuperUser:S}=H(),{push:F}=J(),y=_(null),{run:x}=Y({success:()=>{i.success("\u64A4\u9500\u5BF9\u8D26\u6210\u529F"),y.value.onSearch()}}),{hasPermissionWithCode:C}=$("orderRecord"),k={pageSearchHook:()=>Z(void 0,void 0,w)},T=(s={})=>{const{payNo:o}=s;if("pay_tag_id"in s&&Number(s.pay_tag_id)!==0){i.warning("\u8BF7\u5148\u89E3\u9664\u4ED8\u6B3E\u6807\u7B7E\u518D\u64A4\u9500\u5BF9\u8D26\u5355");return}const c=o.slice(3,9),g=Number(c)<ee;x(g?Q({payNo:o,status:"4"}):X({payNo:o,status:"4"}))},R={content:{create:()=>F(t),preview:({payNo:s})=>F(`${t}?id=${s}`)}};async function O(){if(p.value.length===0){i.warning("\u8BF7\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}if(p.value.length>1){i.warning("\u53EA\u80FD\u9009\u62E9\u4E00\u6761\u5BF9\u8D26\u5355");return}await te({url:"paycgdexport",name:"\u5BF9\u8D26\u5355\u660E\u7EC6\u8868",onStart:()=>a.value=!0,onSuccess:()=>a.value=!1,onFail:()=>a.value=!1,params:{payNo:p.value[0].payNo}})}return(s,o)=>{const c=f("ElButton"),g=f("ElTooltip"),U=f("PageContainer"),I=f("PageAuth");return m(),h(I,{pageName:u},{default:l(()=>[b(U,{hooks:k,events:R,contentConfig:r(oe),"search-config":r(w),"get-content-ref":n=>y.value=n,onContentSelectChange:o[1]||(o[1]=n=>p.value=n)},{content_header:l(()=>[r(C)("038")?(m(),h(c,{key:0,size:"small",loading:a.value,onClick:o[0]||(o[0]=()=>O())},{default:l(()=>[j(" \u5BF9\u8D26\u5355\u660E\u7EC6\u5BFC\u51FA ")]),_:1},8,["loading"])):E("v-if",!0),E(` <ElButton\r
  2. size="small"\r
  3. v-if="hasPermissionWithCode('031')"\r
  4. :icon="useRenderIcon('arrow-down-line')"\r
  5. @click="() => onDownloadTemplate()"\r
  6. >\r
  7. \u6279\u91CF\u4E0B\u8F7D\u5F00\u7968\u6A21\u677F\r
  8. </ElButton> `)]),content_action:l(n=>[b(g,{placement:"top",content:"\u64A4\u9500\u5BF9\u8D26\u7533\u8BF7"},{default:l(()=>[(String(n.status)==="1"||String(n.status)==="2")&&r(C)("022")&&String(n.is_comon)!=="1"&&!r(S)?(m(),h(c,{key:0,type:"primary",link:"",text:"",icon:r(K)("refresh-right"),onClick:()=>T(n)},null,8,["icon","onClick"])):E("v-if",!0)]),_:2},1024)]),_:1},8,["contentConfig","search-config","get-content-ref"])]),_:1})}}});var pe=q(ne,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/orderRecord/index.vue"]]);export{pe as default};