index.a3758fe0.js 2.6 KB

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