import{_ as v,d as B,n as t,r as f,o as h,c as F,h as u,y as a,i as r,e as C,H as N,cd as g,cm as R}from"./index.js";import{R as k}from"./index.6004c99e.js";import w from"./choose-modal.6b967f.js";import"./orderRecord.92bbc10f.js";import"./porder.827c74bc.js";const x={pay_fee:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D"}],payNo:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4ED8\u6B3E\u8BA2\u5355"}]},V={"w-full":""},I={class:"flex w-full justify-end"},b=B({__name:"choose-form",emits:["create"],setup(M,{emit:c}){const d=c,i=t(null),m=t(null),p=t(null),e=t({payNo:"",pay_fee:""}),_=()=>m.value.onDisplay();function y(){const{detail:l}=p.value;if(Number(e.value.pay_fee)>Number(l==null?void 0:l.wpay_fee))return R.error("\u4ED8\u6B3E\u91D1\u989D\u4E0D\u80FD\u8D85\u8FC7\u672A\u4ED8\u6B3E\u91D1\u989D");i.value.validate(o=>o&&d("create",r(e)))}return(l,o)=>{const n=f("ElFormItem"),D=f("ElInput"),E=f("ElButton");return h(),F("div",V,[u(r(g),{ref_key:"formRef",ref:i,model:e.value,rules:r(x)},{default:a(()=>[u(n,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:a(()=>[u(r(k),{ref_key:"reconciliationRef",ref:p,isPurchPay:"",id:e.value.payNo,readonly:!!e.value.payNo,onChoose:_},null,8,["id","readonly"])]),_:1}),u(n,{label:"\u4ED8\u6B3E\u91D1\u989D",prop:"pay_fee"},{default:a(()=>[u(D,{modelValue:e.value.pay_fee,"onUpdate:modelValue":o[0]||(o[0]=s=>e.value.pay_fee=s),placeholder:"\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D"},null,8,["modelValue"])]),_:1}),u(n,null,{default:a(()=>[C("div",I,[u(E,{type:"primary",onClick:y},{default:a(()=>o[2]||(o[2]=[N("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["model","rules"]),u(w,{ref_key:"chooseModalRef",ref:m,onChoose:o[1]||(o[1]=s=>e.value.payNo=s)},null,512)])}}});var S=v(b,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/supplierPay/component/choose-form.vue"]]);export{S as default};
