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