1 |
- import{d as C,ar as D,y as I,e as x,r as c,x as F,w as S,o as O,C as U,A as s,a,ac as j,V as P,f as r,dy as N,bP as k,U as A,__tla as B}from"./index-6e0fa573.js";import{u as M,__tla as R}from"./useMessage-7f978edc.js";import{r as n,__tla as q}from"./formRules-fc997671.js";import{_ as z}from"./_plugin-vue_export-helper-1b428a4d.js";let _,E=Promise.all([(()=>{try{return B}catch{}})(),(()=>{try{return R}catch{}})(),(()=>{try{return q}catch{}})()]).then(async()=>{_=z(C({name:"ProductOtherForm",__name:"OtherForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:D.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:f,emit:v}){const h=I(),b=x(()=>h.getMobile),g=M(),p=u,d=c(),e=c({sort:0,giveIntegral:0,virtualSalesCount:0}),V=F({sort:[n],giveIntegral:[n],virtualSalesCount:[n]});S(()=>p.propFormData,l=>{l&&N(e.value,l)},{immediate:!0});const y=v;return f({validate:async()=>{var l;if(d)try{await((l=a(d))==null?void 0:l.validate()),Object.assign(p.propFormData,e.value)}catch(t){throw g.error("\u3010\u5176\u5B83\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),y("update:activeName","other"),t}}}),(l,t)=>{const i=k,m=A,w=P;return O(),U(w,{ref_key:"formRef",ref:d,model:a(e),rules:a(V),class:j([{view:u.isDetail,"mobile-card":a(b)},"noBorder"]),"label-width":"120px",disabled:u.isDetail},{default:s(()=>[r(m,{label:"\u5546\u54C1\u6392\u5E8F",prop:"sort"},{default:s(()=>[r(i,{modelValue:a(e).sort,"onUpdate:modelValue":t[0]||(t[0]=o=>a(e).sort=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u6392\u5E8F",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(m,{label:"\u8D60\u9001\u4F63\u91D1",prop:"giveIntegral"},{default:s(()=>[r(i,{modelValue:a(e).giveIntegral,"onUpdate:modelValue":t[1]||(t[1]=o=>a(e).giveIntegral=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u8D60\u9001\u4F63\u91D1",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(m,{label:"\u865A\u62DF\u9500\u91CF",prop:"virtualSalesCount"},{default:s(()=>[r(i,{modelValue:a(e).virtualSalesCount,"onUpdate:modelValue":t[2]||(t[2]=o=>a(e).virtualSalesCount=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u865A\u62DF\u9500\u91CF",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1},8,["model","rules","class","disabled"])}}}),[["__scopeId","data-v-5f355ee2"]])});export{E as __tla,_ as default};
|