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