return-form.b4e58e4f.js 2.9 KB

1
  1. import{_ as N,d as V,E as o,a6 as b,a7 as R,x as _,aA as I,o as g,c as q,y as a,K as r,b as E,O as M,N as w,u as l,a as x,aE as O,L as U,W as C}from"./index.1417328f.js";import{B as j}from"./basic-descriptions.cadaf928.js";import{d as z}from"./index.cc00443d.js";import{O as H}from"./inv-open.516190c3.js";import{C as L}from"./capital-modal.331cc5c5.js";import{I as S}from"./index.68c806ba.js";import"./tootip.8c37fa8a.js";import"./status.727086c1.js";import"./invoice.d2c04353.js";const T={invNo:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E00\u5F20\u53D1\u7968"}],return_reason:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u9000\u8D27\u539F\u56E0"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]},A={class:"flex justify-end w-full mb-2"},K=C("\u9009\u62E9"),P=E("div",{"mt-5":""},null,-1),W={flex:"","w-full":"","justify-end":""},G=C("\u4FDD\u5B58"),J=V({__name:"return-form",emits:["create"],setup(Q,{emit:D}){const p=o(""),F=o(""),y=o(null),c=o(null),f=o(null),k=b(),v=o(!1),t=R({invNo:"",return_reason:"",remark:""});async function h({invNo:s,inv_number:e,open_date:i}){v.value=!0,p.value=e,F.value=i;const{code:u,message:m,data:d}=await z({invNo:s});k({code:u,message:m,handler:function(){c.value=d,t.invNo=d.invNo,f.value.validateField("logNo")}}),v.value=!1}function B(){f.value.validate(async s=>{!s||D("create",l(t))})}return(s,e)=>{const i=_("ElButton"),u=_("ElFormItem"),m=_("ElInput"),d=I("loading");return g(),q(U,null,[a(l(O),{ref_key:"formRef",ref:f,model:t,rules:l(T),size:"small","label-width":"100px"},{default:r(()=>[a(u,{label:"\u53D1\u7968",prop:"invNo"},{default:r(()=>[E("div",A,[a(i,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>y.value.onDisplay())},{default:r(()=>[K]),_:1})]),c.value?M((g(),w(l(j),{key:0,"w-full":"",data:c.value,columns:l(H)},null,8,["data","columns"])),[[d,v.value]]):x("v-if",!0)]),_:1}),p.value?(g(),w(l(S),{key:0,"inv-number":p.value,type:"sale"},null,8,["inv-number"])):x("v-if",!0),P,a(u,{label:"\u9000\u7968\u539F\u56E0",prop:"return_reason","w-480px":""},{default:r(()=>[a(m,{type:"textarea",rows:6,maxlength:"2000",max:"","w-300px":"",modelValue:t.return_reason,"onUpdate:modelValue":e[1]||(e[1]=n=>t.return_reason=n),"show-word-limit":""},null,8,["modelValue"])]),_:1}),a(u,{label:"\u5907\u6CE8",prop:"remark","w-480px":""},{default:r(()=>[a(m,{type:"textarea",rows:6,maxlength:"2000",modelValue:t.remark,"onUpdate:modelValue":e[2]||(e[2]=n=>t.remark=n),placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u5907\u6CE8","show-word-limit":""},null,8,["modelValue"])]),_:1}),E("div",W,[a(i,{type:"primary",onClick:B},{default:r(()=>[G]),_:1})])]),_:1},8,["model","rules"]),a(L,{ref_key:"capitalModalRef",ref:y,onChoose:e[3]||(e[3]=n=>h(n))},null,512)],64)}}});var le=N(J,[["__file","/Users/apple/Desktop/Company Projects/accout-vue3-ui/src/views/InvoiceSales/returnTicket/components/return-form.vue"]]);export{le as default};