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 w,O as M,N as x,u as l,a as y,aK as O,L as U,W as D}from"./index.743f0c80.js";import{B as j}from"./basic-descriptions.e56bd542.js";import{d as z}from"./index.8212cab4.js";import{O as H}from"./inv-open.a0819b58.js";import{C as K}from"./capital-modal.1d528897.js";import{I as L}from"./index.5fbf2896.js";import"./tootip.48acd346.js";import"./status.868e86c0.js";import"./invoice.7fa18a6d.js";const S={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"}]},T={class:"flex justify-end w-full mb-2"},A=D("\u9009\u62E9"),W=w("div",{"mt-5":""},null,-1),G={flex:"","w-full":"","justify-end":""},J=D("\u4FDD\u5B58"),P=V({__name:"return-form",emits:["create"],setup(Q,{emit:F}){const c=o(""),k=o(""),E=o(null),p=o(null),f=o(null),C=b(),v=o(!1),t=R({invNo:"",return_reason:"",remark:""});async function h({invNo:s,inv_number:e,open_date:i}){v.value=!0,c.value=e,k.value=i;const{code:u,message:m,data:d}=await z({invNo:s});C({code:u,message:m,handler:function(){p.value=d,t.invNo=d.invNo,f.value.validateField("logNo")}}),v.value=!1}function B(){f.value.validate(async s=>{!s||F("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(S),size:"small","label-width":"100px"},{default:r(()=>[a(u,{label:"\u53D1\u7968",prop:"invNo"},{default:r(()=>[w("div",T,[a(i,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>E.value.onDisplay())},{default:r(()=>[A]),_:1})]),p.value?M((g(),x(l(j),{key:0,"w-full":"",data:p.value,columns:l(H)},null,8,["data","columns"])),[[d,v.value]]):y("v-if",!0)]),_:1}),c.value?(g(),x(l(L),{key:0,"inv-number":c.value,type:"sale"},null,8,["inv-number"])):y("v-if",!0),W,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}),w("div",G,[a(i,{type:"primary",onClick:B},{default:r(()=>[J]),_:1})])]),_:1},8,["model","rules"]),a(K,{ref_key:"capitalModalRef",ref:E,onChoose:e[3]||(e[3]=n=>h(n))},null,512)],64)}}});var le=N(P,[["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/returnTicket/components/return-form.vue"]]);export{le as default};
|