related-order.8a8975b2.js 2.6 KB

1
  1. import{_ as q,d as E,w as v,ag as j,r as i,o as u,c as y,b as D,u as n,G as p,C as s,M as m,a as k,l as c,F as z,D as L,bw as O,L as T,aY as U}from"./index.42bf163d.js";import{o as I,a as R}from"./configs.5baa5cc8.js";import{I as G}from"./global.9ad647c8.js";import P from"./sales-modal.a305df8c.js";import"./index.6a10cd14.js";import"./status.d6b2a53d.js";import"./date-range.26f9b7e9.js";const H={flex:"","justify-between":"","items-center":""},W=D("h1",{"my-4":""},"\u6DFB\u52A0\u5173\u8054\u8BA2\u5355:",-1),X={key:0,flex:"","justify-end":"","mt-3":""},Y=E({__name:"related-order",props:{readonly:{type:Boolean,required:!1}},emits:["create-btn-click"],setup(g,{emit:N}){const w=g,r=v([]),b=j(()=>!w.readonly),l=v({}),B=v(null);function A(e){e.forEach(a=>{const{sequenceNo:t,wpay_fee:_}=a;l.value[t]||(l.value[t]=_,r.value.push(a))})}function F(){const e=[];if(Object.keys(l.value).forEach(t=>e.push({sequenceNo:t,trad_fee:l.value[t]})),!e.length)return U.error("\u8BF7\u6DFB\u52A0\u5173\u8054\u8BA2\u5355");N("create-btn-click",e)}function V(e){delete l.value[e],r.value=r.value.filter(a=>a.sequenceNo!==e)}return(e,a)=>{const t=i("el-button"),_=i("el-input"),x=i("el-tag"),h=i("el-table-column"),S=i("el-table");return u(),y("div",null,[D("div",H,[W,n(b)?(u(),p(t,{key:0,type:"primary",size:"small",onClick:a[0]||(a[0]=()=>B.value.onDisplay(n(r.value)))},{default:s(()=>[m("\u6DFB\u52A0 ")]),_:1})):k("v-if",!0)]),c(S,{data:r.value,size:"small"},{default:s(()=>[(u(!0),y(z,null,L(n(I),(o,C)=>(u(),p(h,{key:C,label:o.label,prop:o.prop,width:o.width,"show-overflow-tooltip":""},{default:s(({row:f})=>[o.label==="\u6B64\u6B21\u8BA4\u9886"?(u(),p(_,O({key:0,size:"small",placeholder:"\u6B64\u6B21\u8BA4\u9886\u91D1\u989D",modelValue:l.value[f.sequenceNo],"onUpdate:modelValue":d=>l.value[f.sequenceNo]=d},n(G)),null,16,["modelValue","onUpdate:modelValue"])):o.prop==="status"?(u(),p(x,{key:1},{default:s(()=>{var d;return[m(T((d=n(R).find(M=>String(f.status)===M.value))==null?void 0:d.label),1)]}),_:2},1024)):k("v-if",!0)]),_:2},1032,["label","prop","width"]))),128)),c(h,{label:"\u64CD\u4F5C"},{default:s(({row:o})=>[c(t,{type:"danger",link:"",onClick:C=>V(o.sequenceNo)},{default:s(()=>[m("\u5220\u9664")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),n(b)?(u(),y("div",X,[c(t,{type:"primary",size:"small",onClick:F},{default:s(()=>[m("\u4FDD\u5B58")]),_:1})])):k("v-if",!0),c(P,{ref_key:"saleModalRef",ref:B,onSaveClickButton:A},null,512)])}}});var ae=q(Y,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/basic-claim/related-order.vue"]]);export{ae as default};