1 |
- import{_ as R,d as k,x as t,ah as I,r as m,o as D,c as P,l as u,D as n,m as c,G as x,a as A,h as V,M as O,aQ as w,aZ as M,dI as b}from"./index.js";import{R as T}from"./index.8ad79f80.js";import U from"./choose-modal.f3d543.js";import"./orderRecord.4d98a397.js";import"./porder.9a85976d.js";import"./date-range.4010f801.js";const j={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"}]},q={"w-full":""},L={class:"flex w-full justify-end"},G=k({__name:"choose-form",emits:["create"],setup(H,{emit:C}){const d=t(null),_=t(null),v=t(null),e=t({payNo:"",pay_fee:""}),y=t(!1),h=t(!1),l=I(()=>y.value||h.value),B=()=>_.value.onDisplay();function N(){var E;const p=(E=v.value)==null?void 0:E.getOpenInvInfo(),{data:o={},orderArr:a=[]}=p,{payNo:r}=o,f=a.map(({currentTotal:i,sequenceNo:F})=>({rela_fee:i,sequenceNo:F}));if(f.length===0&&!l.value){M.warning("\u81F3\u5C11\u9009\u62E9\u4E00\u6761\u91C7\u8D2D\u5355");return}let s={};l.value?s={payNo:e.value.payNo,pay_fee:e.value.pay_fee}:s={cgdNos:f,payNo:r},d.value.validate(i=>i&&C("create",s,l.value))}function g(p={}){const{payNo:o,is_comon:a}=p,r=o.slice(3,9);y.value=Number(r)<Number(b),h.value=a=="1",e.value.payNo=o}return(p,o)=>{const a=m("ElFormItem"),r=m("ElInput"),f=m("ElButton");return D(),P("div",q,[u(c(w),{ref_key:"formRef",ref:d,model:e.value,rules:c(j)},{default:n(()=>[u(a,{label:"\u8BA2\u5355\u5BF9\u8D26",prop:"payNo"},{default:n(()=>[u(c(T),{ref_key:"reconciliationRef",ref:v,isPurchPay:"",id:e.value.payNo,readonly:!!e.value.payNo,cover:!0,onChoose:B,isChoosePurchaseOrder:!c(l)},null,8,["id","readonly","isChoosePurchaseOrder"])]),_:1}),c(l)?(D(),x(a,{key:0,label:"\u4ED8\u6B3E\u91D1\u989D",prop:"pay_fee"},{default:n(()=>[u(r,{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})):A("v-if",!0),u(a,null,{default:n(()=>[V("div",L,[u(f,{type:"primary",onClick:N},{default:n(()=>[O("\u4FDD\u5B58")]),_:1})])]),_:1})]),_:1},8,["model","rules"]),u(U,{ref_key:"chooseModalRef",ref:_,onChoose:g},null,512)])}}});var K=R(G,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/purchase/purchPay/component/choose-form.vue"]]);export{K as default};
|