import{_ as D,d as x,n as r,cB as N,w as R,r as i,o as _,c as F,h as o,y as a,e as m,H as v,i as t,A as V,ca as I,a as b,cd as j}from"./index.js";import A from"./choose-modal.12950e.js";import{c as M}from"./_rules.ceda6160.js";import{t as T}from"./ticketReturn.e53d6b17.js";import"./porder.827c74bc.js";import{h as g}from"./index.c502b05a.js";import"./_details.7fd25590.js";import"./index.41007914.js";const H={"w-full":""},O={class:"w-full flex justify-end"},U={class:"w-full"},q={class:"flex w-full justify-end"},z=x({__name:"return-form",emits:["create"],setup(G,{emit:h}){const y=h,c=r(null),d=r(null),l=r({hpNo:"",InvCode:"",reason:""}),{run:k,data:f}=N({initalData:{}}),w=()=>d.value.onDisplay();function C(){c.value.validate(s=>s&&y("create",t(l)))}return R(()=>l.value.hpNo,s=>k(g({hpNo:s}))),(s,e)=>{const p=i("ElButton"),n=i("ElFormItem"),E=i("ElInput");return _(),F("div",H,[o(t(j),{ref_key:"formRef",ref:c,"label-width":"100px",model:l.value,rules:t(M)},{default:a(()=>[o(n,{label:"\u5356\u51FA\u53D1\u7968\u5173\u8054\u7BA1\u7406",prop:"hpNo","label-width":"150px"},{default:a(()=>[m("div",O,[o(p,{type:"primary",link:"",onClick:w},{default:a(()=>e[2]||(e[2]=[v(" \u9009\u62E9 ")])),_:1})]),m("div",U,[Object.keys(t(f)).length>0?(_(),V(t(I),{key:0,columns:t(T),data:t(f)},null,8,["columns","data"])):b("v-if",!0)])]),_:1}),o(n,{label:"\u89E3\u9664\u539F\u56E0",prop:"reason"},{default:a(()=>[o(E,{modelValue:l.value.reason,"onUpdate:modelValue":e[0]||(e[0]=u=>l.value.reason=u)},null,8,["modelValue"])]),_:1}),o(n,null,{default:a(()=>[m("div",q,[o(p,{type:"primary",onClick:C},{default:a(()=>e[3]||(e[3]=[v("\u4FDD\u5B58")])),_:1})])]),_:1})]),_:1},8,["model","rules"]),o(A,{ref_key:"chooseModalRef",ref:d,onChoose:e[1]||(e[1]=({hpNo:u,InvCode:B})=>l.value={hpNo:u,InvCode:B})},null,512)])}}});var Y=D(z,[["__file","D:/work/jiesuan/settle-vue3/src/views/supplyNew/unInvoiceRelation/components/return-form.vue"]]);export{Y as default};
