import{o as S,b as j}from"./configs.fcc4c95f.js";import q from"./sales-modal.620cd7d4.js";import{q as w,B as i,a2 as z,r as n,o as a,n as _,p as h,v as c,K as d,H as s,P as m,t as f,I as v,J as L,S as y,aF as R,O as U}from"./index.10c3f8e5.js";import"./index.36946cea.js";import"./use-response-handle.23bba72b.js";const H={flex:"","justify-between":"","items-center":""},I=h("h1",{"my-4":""},"\u5173\u8054\u8BA2\u5355:",-1),J=y("\u6DFB\u52A0"),K={key:0,flex:"","justify-end":"","mt-3":""},P=y("\u4FDD\u5B58"),X=w({__name:"related-order",props:{readonly:{type:Boolean}},emits:["create-btn-click"],setup(C,{emit:D}){const V=C,B=i([]),o=i({}),b=z(()=>!V.readonly),k=i(null);function A(e){B.value=e,e.forEach(({sequenceNo:l,wpay_fee:t})=>o.value[l]=t)}function F(){const e=[];if(Object.keys(o.value).forEach(t=>e.push({sequenceNo:t,trad_fee:o.value[t]})),!e.length)return R.error("\u8BF7\u6DFB\u52A0\u5173\u8054\u8BA2\u5355");D("create-btn-click",e)}return(e,l)=>{const t=n("el-button"),g=n("el-input"),x=n("el-tag"),N=n("el-table-column"),E=n("el-table");return a(),_(v,null,[h("div",H,[I,c(b)?(a(),d(t,{key:0,type:"primary",onClick:l[0]||(l[0]=()=>k.value.onDisplay())},{default:s(()=>[J]),_:1})):m("",!0)]),f(E,{data:B.value,size:"small"},{default:s(()=>[(a(!0),_(v,null,L(c(S),(u,M)=>(a(),d(N,{key:M,label:u.label,prop:u.prop,"show-overflow-tooltip":""},{default:s(({row:p})=>[u.label==="\u6B64\u6B21\u8BA4\u9886"?(a(),d(g,{key:0,size:"small",placeholder:"\u6B64\u6B21\u8BA4\u9886\u91D1\u989D",modelValue:o.value[p.sequenceNo],"onUpdate:modelValue":r=>o.value[p.sequenceNo]=r},null,8,["modelValue","onUpdate:modelValue"])):u.prop==="status"?(a(),d(x,{key:1},{default:s(()=>{var r;return[y(U((r=c(j).find(O=>p.status===O.value))==null?void 0:r.label),1)]}),_:2},1024)):m("",!0)]),_:2},1032,["label","prop"]))),128))]),_:1},8,["data"]),c(b)?(a(),_("div",K,[f(t,{type:"primary",onClick:F},{default:s(()=>[P]),_:1})])):m("",!0),f(q,{ref_key:"saleModalRef",ref:k,onSaveClickButton:A},null,512)],64)}}});export{X as default};
