import{_ as R,d as O,n as l,cb as h,k as q,Q as A,r as g,aw as I,o as x,c as M,e as d,h as t,y as r,H as k,B as j,A as y,i as p,ca as H,a as F,cd as S,F as T,e0 as U}from"./index.js";import z from"./capital-modal.1ba5c1.js";import{b as L}from"./index.eed3ef73.js";import{O as Q}from"./inv-open.b2ee78c0.js";import{I as G}from"./index.c443965f.js";import J from"./red-dialog.7f1322.js";import"./configs.ae46c65e.js";import"./index.e9c3d7c7.js";const K={flex:"","justify-end":"","w-full":"","mb-2":""},P={flex:"","w-full":"","justify-end":""},W=O({__name:"index",setup(X){const f=l(""),b=l(""),w=l(null),B=l(null),v=l(null),c=l(null),D=h(),{push:C}=q(),_=l(!1),a=A({invNo:"",return_reason:"",remark:""}),E={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"}]};async function N({invNo:s,inv_number:e,open_date:o}){_.value=!0,f.value=e,b.value=o;const{code:u,message:i,data:m}=await U({invNo:s});D({code:u,message:i,handler:function(){v.value=m,a.invNo=m.invNo,c.value.validateField("logNo")}}),_.value=!1}function V(){c.value.validate(async s=>{if(!s)return;const{code:e,message:o}=await L(a);D({code:e,message:o,handler:()=>C("/InvoiceSales/returnTicket")})})}return(s,e)=>{const o=g("el-button"),u=g("el-form-item"),i=g("el-input"),m=I("loading");return x(),M(T,null,[e[8]||(e[8]=d("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u7968\u7533\u8BF7",-1)),t(p(S),{rules:E,model:a,ref_key:"formRef",ref:c,size:"small","label-width":"100px"},{default:r(()=>[t(u,{label:"\u53D1\u7968",prop:"invNo"},{default:r(()=>[d("div",K,[t(o,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>w.value.onDisplay())},{default:r(()=>e[4]||(e[4]=[k("\u9009\u62E9")])),_:1})]),v.value?j((x(),y(p(H),{key:0,"w-full":"",data:v.value,"col-number":2,columns:p(Q)},null,8,["data","columns"])),[[m,_.value]]):F("v-if",!0)]),_:1}),e[6]||(e[6]=k(" n ")),f.value?(x(),y(p(G),{key:0,"mt-5":"","inv-number":f.value,type:"sale"},null,8,["inv-number"])):F("v-if",!0),e[7]||(e[7]=d("div",{"mt-5":""},null,-1)),t(u,{label:"\u9000\u7968\u539F\u56E0",prop:"return_reason","w-480px":""},{default:r(()=>[t(i,{type:"textarea",rows:6,maxlength:"2000",max:"","w-300px":"",modelValue:a.return_reason,"onUpdate:modelValue":e[1]||(e[1]=n=>a.return_reason=n),"show-word-limit":""},null,8,["modelValue"])]),_:1}),t(u,{label:"\u5907\u6CE8",prop:"remark","w-480px":""},{default:r(()=>[t(i,{type:"textarea",rows:6,maxlength:"2000",modelValue:a.remark,"onUpdate:modelValue":e[2]||(e[2]=n=>a.remark=n),placeholder:"\u8BF7\u8F93\u5165\u53D1\u7968\u5907\u6CE8","show-word-limit":""},null,8,["modelValue"])]),_:1}),d("div",P,[t(o,{type:"primary",onClick:V},{default:r(()=>e[5]||(e[5]=[k("\u4FDD\u5B58")])),_:1})])]),_:1},8,["model"]),t(z,{ref_key:"capitalModalRef",ref:w,onOnAddOrder:e[3]||(e[3]=n=>N(n))},null,512),t(J,{ref_key:"redDialog",ref:B},null,512)],64)}}});var re=R(W,[["__file","D:/work/jiesuan/settle-vue3/src/views/InvoiceSales/returnTicket/components/create-return-ticket/index.vue"]]);export{re as default};
