import{_ as V,d as R,x as l,aO as O,p as M,Z as q,r as g,aD as I,o as x,c as U,l as t,D as r,h as c,M as D,H as j,G as y,m as d,aN as A,a as F,aQ as H,F as S,cC as T}from"./index.js";import z from"./capital-modal.bd1163.js";import{b as G}from"./index.dc77ce34.js";import{O as L}from"./inv-open.a495ad22.js";import{I as Q}from"./index.bf16817a.js";import Z from"./red-dialog.5c0ebd.js";import"./configs.ae46c65e.js";import"./index.288fc1c2.js";const J=c("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u7968\u7533\u8BF7",-1),K={flex:"","justify-end":"","w-full":"","mb-2":""},P=c("div",{"mt-5":""},null,-1),W={flex:"","w-full":"","justify-end":""},X=R({__name:"index",setup(Y){const p=l(""),h=l(""),k=l(null),C=l(null),f=l(null),v=l(null),w=O(),{push:b}=M(),_=l(!1),a=q({invNo:"",return_reason:"",remark:""}),N={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 B({invNo:s,inv_number:e,open_date:o}){_.value=!0,p.value=e,h.value=o;const{code:u,message:i,data:m}=await T({invNo:s});w({code:u,message:i,handler:function(){f.value=m,a.invNo=m.invNo,v.value.validateField("logNo")}}),_.value=!1}function E(){v.value.validate(async s=>{if(!s)return;const{code:e,message:o}=await G(a);w({code:e,message:o,handler:()=>b("/InvoiceSales/returnTicket")})})}return(s,e)=>{const o=g("el-button"),u=g("el-form-item"),i=g("el-input"),m=I("loading");return x(),U(S,null,[J,t(d(H),{rules:N,model:a,ref_key:"formRef",ref:v,size:"small","label-width":"100px"},{default:r(()=>[t(u,{label:"\u53D1\u7968",prop:"invNo"},{default:r(()=>[c("div",K,[t(o,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>k.value.onDisplay())},{default:r(()=>[D("\u9009\u62E9")]),_:1})]),f.value?j((x(),y(d(A),{key:0,"w-full":"",data:f.value,"col-number":2,columns:d(L)},null,8,["data","columns"])),[[m,_.value]]):F("v-if",!0)]),_:1}),D(" n "),p.value?(x(),y(d(Q),{key:0,"mt-5":"","inv-number":p.value,type:"sale"},null,8,["inv-number"])):F("v-if",!0),P,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}),c("div",W,[t(o,{type:"primary",onClick:E},{default:r(()=>[D("\u4FDD\u5B58")]),_:1})])]),_:1},8,["model"]),t(z,{ref_key:"capitalModalRef",ref:k,onOnAddOrder:e[3]||(e[3]=n=>B(n))},null,512),t(Z,{ref_key:"redDialog",ref:C},null,512)],64)}}});var ne=V(X,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/returnTicket/components/create-return-ticket/index.vue"]]);export{ne as default};