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