import{af as d,ce as f,cg as w,_ as P,d as j,d3 as z,aa as c,ct as O,w as V,r as n,aw as H,B as G,i as F,o as m,c as y,h as u,y as v,H as B,a as h,A as R,ca as $,G as E}from"./index.js";import{p as I,i as J}from"./orderRecord.92bbc10f.js";import{h as D}from"./index.f78c594b.js";const K=[{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"}],A=[{field:"payNo",label:"\u5BF9\u8D26\u5355\u53F7",span:6},{field:"status",label:"\u5BF9\u8D26\u72B6\u6001",render(l){return d(f,null,{default:()=>{var e;return(e=K.find(i=>i.value===String(l)))==null?void 0:e.label}})}},{field:"apply_name",label:"\u7533\u8BF7\u4EBA",span:6},{field:"addtime",label:"\u521B\u5EFA\u65F6\u95F4",span:6},{field:"supplierName",label:"\u7269\u6D41\u4F9B\u5E94\u5546",span:12,render:(l,{supplierNo:e})=>w(l,"\u7269\u6D41\u4F9B\u5E94\u5546\u7F16\u7801 : "+e,270)},{field:"companyName",label:"\u4E1A\u52A1\u516C\u53F8",span:12,render:(l,{companyNo:e})=>w(l,"\u4E1A\u52A1\u516C\u53F8\u7F16\u7801 : "+e,270)},{field:"pay_status",label:"\u4ED8\u6B3E\u72B6\u6001",render(l){return d(f,null,{default:()=>{var e;return(e=I.find(i=>i.value===String(l)))==null?void 0:e.label}})}},{field:"apay_fee",label:"\u5DF2\u4ED8\u6B3E"},{field:"pay_fee",label:"\u4ED8\u6B3E\u4E2D"},{field:"wpay_fee",label:"\u672A\u4ED8\u6B3E"},{field:"inv_status",label:"\u5F00\u7968\u72B6\u6001",render(l){return d(f,null,{default:()=>{var e;return(e=J.find(i=>i.value===String(l)))==null?void 0:e.label}})}},{field:"ainv_fee",label:"\u5DF2\u5F00\u7968"},{field:"inv_fee",label:"\u5F00\u7968\u4E2D"},{field:"winv_fee",label:"\u672A\u5F00\u7968"},{field:"total_fee",label:"\u5BF9\u8D26\u603B\u989D"},{field:"pay_type",label:"\u4F9B\u5E94\u5546\u652F\u4ED8\u65B9\u5F0F"},{field:"remark",span:12,label:"\u5907\u6CE8"}],L={style:{width:"100%"}},M={key:0,class:"flex justify-end"},Q=j({__name:"index",props:{showTicketColumn:{type:Boolean,required:!1},data:{type:Object,required:!0},isPurchPay:{type:Boolean,required:!1},readonly:{type:Boolean,required:!0},request:{type:Boolean,required:!0},choose:{type:Boolean,required:!0},payNo:{type:String,required:!0}},emits:["choose"],setup(l,{expose:e,emit:i}){const x=i,t=l,g=["inv_tag_fee","inv_status","ainv_fee","winv_fee","inv_fee","remark"],{run:_,loading:C,data:b}=z({initalData:{}}),r=c(()=>t.request?b.value:t.data||{}),N=c(()=>!t.isPurchPay||t.showTicketColumn?A:A.filter(o=>!g.includes(o.field))),k=c(()=>{if(!r.value.cgdlist)return"0.00";const o=r.value.cgdlist.reduce((s,p)=>Number(O(s,p.post_fee)).toFixed(2),0);return Number.isNaN(o)?0:o});return V(()=>t.payNo,()=>{if(!t.payNo)return b.value={};_(D({payNo:t.payNo}))},{immediate:!0}),e({refresh:()=>_(D({payNo:t.payNo}))}),(o,s)=>{const p=n("el-button"),T=n("el-tag"),a=n("ElTableColumn"),q=n("ElTable"),S=H("loading");return G((m(),y("div",L,[!o.readonly||o.choose?(m(),y("div",M,[u(p,{text:"",size:"small",type:"primary",onClick:s[0]||(s[0]=U=>x("choose"))},{default:v(()=>s[1]||(s[1]=[B("\u9009\u62E9")])),_:1})])):h("v-if",!0),o.readonly?(m(),R(F($),{key:1,data:r.value,columns:N.value},null,8,["data","columns"])):h("v-if",!0),u(T,{class:"mt-[5px] mb-[5px]",type:"warning",size:"small"},{default:v(()=>[B(" \u5171\u8BA1 "+E(r.value.cgdlist?r.value.cgdlist.length:0)+" \u4E2A\u8BA2\u5355, \u5171\u8BA1 "+E(k.value)+" \u5143 ",1)]),_:1}),u(q,{size:"small",border:"",data:r.value.cgdlist,"max-height":"450px"},{default:v(()=>[u(a,{type:"index",label:"\u5E8F\u53F7","min-width":"55","show-overflow-tooltip":""}),u(a,{prop:"TrackCode",label:"\u53D1\u8D27\u8FD0\u5355\u7F16\u53F7","min-width":"150px","show-overflow-tooltip":""}),u(a,{prop:"outChildCode",label:"\u53D1\u8D27\u5DE5\u5355\u7F16\u53F7","min-width":"160px","show-overflow-tooltip":""}),u(a,{prop:"orderCode",label:"\u9500\u552E\u8BA2\u5355\u7F16\u53F7","min-width":"150px","show-overflow-tooltip":""}),u(a,{prop:"companyName",label:"\u4E1A\u52A1\u516C\u53F8","min-width":"180px","show-overflow-tooltip":""}),u(a,{prop:"supplierName",label:"\u7269\u6D41\u4F9B\u5E94\u5546","min-width":"180px","show-overflow-tooltip":""}),u(a,{prop:"post_fee","min-width":"100px",label:"\u7269\u6D41\u8D39\u7528","show-overflow-tooltip":""}),u(a,{prop:"remark",label:"\u5907\u6CE8","min-width":"120px","show-overflow-tooltip":""}),u(a,{prop:"apply_name",label:"\u521B\u5EFA\u4EBA","min-width":"120px","show-overflow-tooltip":""}),u(a,{prop:"create_time",label:"\u521B\u5EFA\u65F6\u95F4","min-width":"140px","show-overflow-tooltip":""})]),_:1},8,["data"])])),[[S,F(C)]])}}});var Z=P(Q,[["__file","D:/work/jiesuan/settle-vue3/src/views/supplierOrder/descriptions/index.vue"]]);export{Z as default};
