related-order.941b2d60.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 j,M as z,W as _,aS as L,b4 as O,T as U}from"./index.1417328f.js";import{o as I,a as P}from"./configs.511ce139.js";import{I as R}from"./global.9ad647c8.js";import W from"./sales-modal.5f0b30c6.js";import"./index.644f3a37.js";import"./status.727086c1.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 x(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 L.error("\u8BF7\u6DFB\u52A0\u5173\u8054\u8BA2\u5355");A("create-btn-click",e)}function w(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(j,null,z(n(I),(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,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(R)),null,16,["modelValue","onUpdate:modelValue"])):o.prop==="status"?(s(),p(F,{key:1},{default:u(()=>{var d;return[_(U((d=n(P).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=>w(o.sequenceNo)},{default:u(()=>[X]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"]),n(b)?(s(),y("div",$,[i(t,{type:"primary",size:"small",onClick:V},{default:u(()=>[J]),_:1})])):k("v-if",!0),i(W,{ref_key:"saleModalRef",ref:h,onSaveClickButton:x},null,512)])}}});var oe=M(Q,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/capitalClaim/components/basic-claim/related-order.vue"]]);export{oe as default};