import k from"./capital-modal.819bd662.js";import{B as V}from"./basic-descriptions.43c3a1ff.js";import{b as w,c as N}from"./index.b903a898.js";import{u as A}from"./use-response-handle.e6cae34f.js";import{q,B as d,x as R,a4 as M,r as n,as as U,o as F,n as H,t as u,H as a,p as f,L as I,K as L,v as c,P as O,aD as S,I as T,S as E}from"./index.d8ce26ef.js";import{C as j}from"./tragelog.c677ba3b.js";const z=f("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u6B3E\u7533\u8BF7",-1),P={flex:"","justify-end":"","w-full":"","mb-2":""},K=E("\u9009\u62E9"),G={flex:"","w-full":"","justify-end":""},J=E("\u4FDD\u5B58"),ue=q({__name:"index",setup(Q){const _=d(null),i=d(null),m=d(null),B=A(),{push:C}=R(),p=d(!1),l=M({logNo:"",type:"",return_reason:"",remark:""}),y={logNo:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E00\u7B14\u8D44\u91D1"}],type:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B"}],return_reason:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u9000\u6B3E\u539F\u56E0"}],remark:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u5907\u6CE8"}]};async function D(s){p.value=!0;const{code:e,message:r,data:t}=await w({logNo:s});B({code:e,message:r,handler:function(){i.value=t,l.logNo=t.logNo,m.value.validateField("logNo")}}),p.value=!1}function b(){m.value.validate(async s=>{if(!s)return;const{code:e,message:r}=await N(l);B({code:e,message:r,handler:()=>C("/InvoiceSales/refund")})})}return(s,e)=>{const r=n("el-button"),t=n("el-form-item"),g=n("el-option"),x=n("el-select"),v=n("el-input"),h=U("loading");return F(),H(T,null,[z,u(c(S),{rules:y,model:l,ref_key:"formRef",ref:m,size:"small","label-width":"100px"},{default:a(()=>[u(t,{label:"\u8D44\u91D1\u8BA4\u9886",prop:"logNo"},{default:a(()=>[f("div",P,[u(r,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>_.value.onDisplay())},{default:a(()=>[K]),_:1})]),i.value?I((F(),L(c(V),{key:0,"w-full":"",data:i.value,"col-number":2,columns:c(j)},null,8,["data","columns"])),[[h,p.value]]):O("",!0)]),_:1}),u(t,{label:"\u7533\u8BF7\u7C7B\u578B",prop:"type"},{default:a(()=>[u(x,{modelValue:l.type,"onUpdate:modelValue":e[1]||(e[1]=o=>l.type=o),placeholder:"\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B","w-380px":""},{default:a(()=>[u(g,{value:"1",label:"\u9000\u6B3E"}),u(g,{value:"2",label:"\u89E3\u9664\u8D44\u91D1\u8BA4\u9886"})]),_:1},8,["modelValue"])]),_:1}),u(t,{label:"\u9000\u6B3E\u539F\u56E0",prop:"return_reason","w-480px":""},{default:a(()=>[u(v,{modelValue:l.return_reason,"onUpdate:modelValue":e[2]||(e[2]=o=>l.return_reason=o),placeholder:"\u8BF7\u8F93\u5165\u9000\u6B3E\u539F\u56E0"},null,8,["modelValue"])]),_:1}),u(t,{label:"\u5907\u6CE8",prop:"remark","w-480px":""},{default:a(()=>[u(v,{modelValue:l.remark,"onUpdate:modelValue":e[3]||(e[3]=o=>l.remark=o),placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8"},null,8,["modelValue"])]),_:1}),f("div",G,[u(r,{type:"primary",onClick:b},{default:a(()=>[J]),_:1})])]),_:1},8,["model"]),u(k,{ref_key:"capitalModalRef",ref:_,onOnAddOrder:e[4]||(e[4]=({logNo:o})=>D(o))},null,512)],64)}}});export{ue as default};
