refund-form.3a27ef.js 2.7 KB

12345
  1. import{_ as R,d as h,x as i,aO as O,Z as B,r as c,aD as V,o as p,c as A,l as a,D as o,h as D,M as g,H as M,G as F,m as t,aN as C,a as _,aQ as U,F as j}from"./index.js";import{C as q}from"./tragelog.647eeacd.js";import{h as H}from"./index.c268fd9f.js";import L from"./capital-modal.4ec694.js";import{O as S}from"./sale.ca731a82.js";const T={logNo:[{required:!0,trigger:"change",message:"\u8BF7\u9009\u62E9\u4E00\u7B14\u8D44\u91D1"}],return_reason:[{required:!0,trigger:"change",message:"\u8BF7\u8F93\u5165\u9000\u6B3E\u539F\u56E0"}]},z={flex:"","justify-end":"","w-full":"","mb-2":""},I={flex:"","w-full":"","justify-end":""},G=h({__name:"refund-form",emits:["create"],setup(P,{emit:y}){const v=i(null),l=i(null),d=i(null),E=O(),m=i(!1),N=B({...T}),r=B({logNo:"",type:"2",return_reason:""});async function x(n){m.value=!0;const{code:e,message:s,data:u}=await H({logNo:n});E({code:e,message:s,handler:function(){l.value=u,r.logNo=u.logNo,d.value.validateField("logNo")}}),m.value=!1}function b(){d.value.validate(async n=>{!n||y("create",t(r))})}return(n,e)=>{const s=c("el-button"),u=c("el-form-item"),k=c("el-input"),w=V("loading");return p(),A(j,null,[a(t(U),{rules:N,model:r,ref_key:"formRef",ref:d,size:"small","label-width":"100px"},{default:o(()=>[a(u,{label:"\u8D44\u91D1\u8BA4\u9886",prop:"logNo"},{default:o(()=>[D("div",z,[a(s,{size:"small",type:"primary",onClick:e[0]||(e[0]=()=>v.value.onDisplay())},{default:o(()=>[g("\u9009\u62E9")]),_:1})]),l.value?M((p(),F(t(C),{key:0,"w-full":"",data:l.value,"col-number":2,columns:t(q)},null,8,["data","columns"])),[[w,m.value]]):_("v-if",!0)]),_:1}),l.value?(p(),F(u,{key:0,label:"\u5173\u8054\u8BA2\u5355\u4FE1\u606F"},{default:o(()=>[a(t(C),{columns:t(S),data:l.value.orderinfo?l.value.orderinfo:{}},null,8,["columns","data"])]),_:1})):_("v-if",!0),_(` <el-form-item label="\u7533\u8BF7\u7C7B\u578B" prop="type">\r
  2. <el-select v-model="formData.type" placeholder="\u8BF7\u9009\u62E9\u7533\u8BF7\u7C7B\u578B" w-380px>\r
  3. <el-option value="2" label="\u89E3\u9664\u8D44\u91D1\u8BA4\u9886" />\r
  4. </el-select>\r
  5. </el-form-item> `),a(u,{label:"\u9000\u6B3E\u539F\u56E0",prop:"return_reason","w-480px":""},{default:o(()=>[a(k,{modelValue:r.return_reason,"onUpdate:modelValue":e[1]||(e[1]=f=>r.return_reason=f),placeholder:"\u8BF7\u8F93\u5165\u9000\u6B3E\u539F\u56E0"},null,8,["modelValue"])]),_:1}),D("div",I,[a(s,{type:"primary",onClick:b},{default:o(()=>[g("\u4FDD\u5B58")]),_:1})])]),_:1},8,["rules","model"]),a(L,{ref_key:"capitalModalRef",ref:v,onOnAddOrder:e[2]||(e[2]=({logNo:f})=>x(f))},null,512)],64)}}});var X=R(G,[["__file","C:/Users/89793/Desktop/projects/settle-vue3/src/views/InvoiceSales/refund/components/refund-form.vue"]]);export{X as default};