index.4f96bcdc.js 2.8 KB

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