index.b27c5306.js 2.8 KB

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