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