related-order.1aab7920.js 2.5 KB

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