import y from"./order-table.13fee2cf.js";import{c as B}from"./configs.40b3dcc9.js";import{q as E,B as p,a4 as F,r,o as v,n as N,t as e,H as a,v as s,bi as b,I as C,p as h,S as x,aF as V}from"./index.10c3f8e5.js";import"./index.44c8546a.js";import"./add-order-modal.fd2b5df8.js";import"./use-response-handle.23bba72b.js";import"./basic-purchase.5bb63e11.js";import"./status.7319085b.js";const g=h("h1",{"text-xl":"","font-bold":"","py-2":""},"\u65B0\u5EFA\u91C7\u8D2D\u4ED8\u6B3E\u7533\u8BF7",-1),k=x("\u4FDD\u5B58"),T=E({__name:"index",emits:["createPayment"],setup(P,{emit:_}){const l=p(null),m=p("0"),t=F({payNo:"",pay_fee:""});function f({payNo:o,wpay_fee:u}){t.payNo=o,m.value=u,l.value.validateField("payNo")}function i(){if(Number(t.pay_fee)>Number(m.value))return V.error("\u4ED8\u6B3E\u91D1\u989D\u4E0D\u80FD\u8D85\u8FC7\u672A\u4ED8\u6B3E\u91D1\u989D");l.value.validate(o=>o&&_("createPayment",t))}return(o,u)=>{const n=r("el-form-item"),c=r("el-input"),d=r("el-button");return v(),N(C,null,[g,e(s(b),{ref_key:"formRef",ref:l,model:t,rules:s(B)},{default:a(()=>[e(n,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:a(()=>[e(y,{onChangePaymentDetail:f})]),_:1}),e(n,{label:"\u4ED8\u6B3E\u91D1\u989D",prop:"pay_fee"},{default:a(()=>[e(c,{placeholder:"\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D",modelValue:t.pay_fee,"onUpdate:modelValue":u[0]||(u[0]=D=>t.pay_fee=D)},null,8,["modelValue"])]),_:1}),e(n,{"pl-20":""},{default:a(()=>[e(d,{type:"primary",onClick:i},{default:a(()=>[k]),_:1})]),_:1})]),_:1},8,["model","rules"])],64)}}});export{T as default};
