import{_ as E,d as v,w as l,r as p,o as B,c as h,l as o,C as a,u as t,b as F,M as C,aR as N,aY as R}from"./index.1d1a5ecb.js";import{R as g}from"./index.15c50815.js";import k from"./choose-modal.73a96a95.js";import"./index.3b07317f.js";import"./basic-descriptions.1879b0f8.js";import"./tootip.76f6bcc3.js";import"./porder.0bfb4ddc.js";import"./status.d6b2a53d.js";import"./date-range.04fa85c1.js";const w={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"}]},x={"w-full":""},V={class:"flex w-full justify-end"},b=v({__name:"choose-form",emits:["create"],setup(M,{emit:i}){const c=l(null),f=l(null),m=l(null),e=l({payNo:"",pay_fee:""}),d=()=>f.value.onDisplay();function _(){const{detail:r}=m.value;if(Number(e.value.pay_fee)>Number(r==null?void 0:r.wpay_fee))return R.error("\u4ED8\u6B3E\u91D1\u989D\u4E0D\u80FD\u8D85\u8FC7\u672A\u4ED8\u6B3E\u91D1\u989D");c.value.validate(u=>u&&i("create",t(e)))}return(r,u)=>{const s=p("ElFormItem"),D=p("ElInput"),y=p("ElButton");return B(),h("div",x,[o(t(N),{ref_key:"formRef",ref:c,model:e.value,rules:t(w)},{default:a(()=>[o(s,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:a(()=>[o(t(g),{ref_key:"reconciliationRef",ref:m,isPurchPay:"",id:e.value.payNo,readonly:!!e.value.payNo,onChoose:d},null,8,["id","readonly"])]),_:1}),o(s,{label:"\u4ED8\u6B3E\u91D1\u989D",prop:"pay_fee"},{default:a(()=>[o(D,{modelValue:e.value.pay_fee,"onUpdate:modelValue":u[0]||(u[0]=n=>e.value.pay_fee=n),placeholder:"\u8BF7\u8F93\u5165\u4ED8\u6B3E\u91D1\u989D"},null,8,["modelValue"])]),_:1}),o(s,null,{default:a(()=>[F("div",V,[o(y,{type:"primary",onClick:_},{default:a(()=>[C("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model","rules"]),o(k,{ref_key:"chooseModalRef",ref:f,onChoose:u[1]||(u[1]=n=>e.value.payNo=n)},null,512)])}}});var G=E(b,[["__file","C:/Users/63107/Desktop/projects/accout-vue3-ui/src/views/purchase/purchPay/component/choose-form.vue"]]);export{G as default};
