import E from"./capital-modal.717c45b6.js";import{B as N}from"./basic-descriptions.43c3a1ff.js";import{I as b}from"./index.4b54201b.js";import{q as h,B as n,x as V,a4 as w,r as c,as as R,o as F,n as q,t as a,H as l,p as f,L as O,K as M,v as m,P as H,aD as I,I as U,S as D}from"./index.d8ce26ef.js";import{b as j}from"./index.b38c0e7a.js";import{u as z}from"./use-response-handle.e6cae34f.js";import{O as A}from"./inv-open.f70179a7.js";import L from"./red-dialog.11be475a.js";import"./configs.2961a790.js";import"./index.70af0e5c.js";const S=f("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u7968\u7533\u8BF7",-1),K={flex:"","justify-end":"","w-full":"","mb-2":""},P=D("\u9009\u62E9"),T={flex:"","w-full":"","justify-end":""},$=D("\u4FDD\u5B58"),le=h({__name:"index",setup(G){const _=n(null),v=n(null),u=n(null),d=n(null),B=z();V();const p=n(!1),o=w({invNo:"",return_reason:"",remark:""}),k={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 y(s){p.value=!0;const{code:e,message:i,data:t}=await j({invNo:s});B({code:e,message:i,handler:function(){u.value=t,o.invNo=t.invNo,d.value.validateField("logNo")}}),p.value=!1}function x(){d.value.validate(async s=>{if(!s)return;const{invNo:e}=u.value;return v.value.onDisplay(e)})}return(s,e)=>{const i=c("el-button"),t=c("el-form-item"),g=c("el-input"),C=R("loading");return F(),q(U,null,[S,a(m(I),{rules:k,model:o,ref_key:"formRef",ref:d,size:"small","label-width":"100px"},{default:l(()=>[a(t,{label:"\u53D1\u7968",prop:"invNo"},{default:l(()=>[f("div",K,[a(i,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>_.value.onDisplay())},{default:l(()=>[P]),_:1})]),u.value?O((F(),M(m(N),{key:0,"w-full":"",data:u.value,"col-number":2,columns:m(A)},null,8,["data","columns"])),[[C,p.value]]):H("",!0),a(m(b),{"mt-5":"","invoice-data":u.value},null,8,["invoice-data"])]),_:1}),a(t,{label:"\u9000\u7968\u539F\u56E0",prop:"return_reason","w-480px":""},{default:l(()=>[a(g,{modelValue:o.return_reason,"onUpdate:modelValue":e[1]||(e[1]=r=>o.return_reason=r),placeholder:"\u8BF7\u8F93\u5165\u9000\u7968\u539F\u56E0"},null,8,["modelValue"])]),_:1}),a(t,{label:"\u5907\u6CE8",prop:"remark","w-480px":""},{default:l(()=>[a(g,{modelValue:o.remark,"onUpdate:modelValue":e[2]||(e[2]=r=>o.remark=r),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),f("div",T,[a(i,{type:"primary",onClick:x},{default:l(()=>[$]),_:1})])]),_:1},8,["model"]),a(E,{ref_key:"capitalModalRef",ref:_,onOnAddOrder:e[3]||(e[3]=({invNo:r})=>y(r))},null,512),a(L,{ref_key:"redDialog",ref:v},null,512)],64)}}});export{le as default};
