related-order.a98e2ca1.js 2.5 KB

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