index.419a3950.js 2.7 KB

1
  1. import{_ as N,d as V,E as i,aI as k,A,a7 as g,x as s,aA as R,o as y,c as I,y as o,K as t,b as f,O as M,N as O,u as m,a as q,aK as L,L as S,W as D}from"./index.743f0c80.js";import{C as T}from"./tragelog.16ac9d74.js";import{h as U,c as j}from"./index.3e0ba0b3.js";import z from"./capital-modal.402e2665.js";import{B as H}from"./basic-descriptions.e56bd542.js";const K={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"}]},P=f("h1",{"text-xl":"","font-bold":"","mb-2":""},"\u521B\u5EFA\u9000\u6B3E\u7533\u8BF7",-1),W={flex:"","justify-end":"","w-full":"","mb-2":""},G=D("\u9009\u62E9"),J={flex:"","w-full":"","justify-end":""},Q=D("\u4FDD\u5B58"),X=V({__name:"index",setup(Y){const _=i(null),d=i(null),c=i(null),B=k(),{push:x}=A(),p=i(!1),l=g({logNo:"",type:"",return_reason:""}),E=g({...K});async function F(r){p.value=!0;const{code:e,message:u,data:a}=await U({logNo:r});B({code:e,message:u,handler:function(){d.value=a,l.logNo=a.logNo,c.value.validateField("logNo")}}),p.value=!1}function C(){c.value.validate(async r=>{if(!r)return;const{code:e,message:u}=await j(l);B({code:e,message:u,handler:()=>x("/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(),I(S,null,[P,o(m(L),{rules:E,model:l,ref_key:"formRef",ref:c,size:"small","label-width":"100px"},{default:t(()=>[o(a,{label:"\u8D44\u91D1\u8BA4\u9886",prop:"logNo"},{default:t(()=>[f("div",W,[o(u,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>_.value.onDisplay())},{default:t(()=>[G]),_:1})]),d.value?M((y(),O(m(H),{key:0,"w-full":"",data:d.value,"col-number":2,columns:m(T)},null,8,["data","columns"])),[[w,p.value]]):q("v-if",!0)]),_:1}),o(a,{label:"\u7533\u8BF7\u7C7B\u578B",prop:"type"},{default:t(()=>[o(b,{modelValue:l.type,"onUpdate:modelValue":e[1]||(e[1]=n=>l.type=n),placeholder:"\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B","w-380px":""},{default:t(()=>[o(v,{value:"1",label:"\u9000\u6B3E"}),o(v,{value:"2",label:"\u89E3\u9664\u8D44\u91D1\u8BA4\u9886"})]),_:1},8,["modelValue"])]),_:1}),o(a,{label:"\u9000\u6B3E\u539F\u56E0",prop:"return_reason","w-480px":""},{default:t(()=>[o(h,{modelValue:l.return_reason,"onUpdate:modelValue":e[2]||(e[2]=n=>l.return_reason=n),placeholder:"\u8BF7\u8F93\u5165\u9000\u6B3E\u539F\u56E0"},null,8,["modelValue"])]),_:1}),f("div",J,[o(u,{type:"primary",onClick:C},{default:t(()=>[Q]),_:1})])]),_:1},8,["rules","model"]),o(z,{ref_key:"capitalModalRef",ref:_,onOnAddOrder:e[3]||(e[3]=({logNo:n})=>F(n))},null,512)],64)}}});var te=N(X,[["__file","D:/work/accout-vue3-ui/src/views/InvoiceSales/refund/components/create-refund/index.vue"]]);export{te as default};