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