1 |
- import{d as C,af as D,X as I,J as F,r as c,e as S,K as x,o as O,q as j,w as s,a,Y as U,C as N,f as r,b9 as P,bb as k,z as q,__tla as z}from"./index-2eab2d23.js";import{u as B,__tla as J}from"./useMessage-171aa63e.js";import{r as n,__tla as K}from"./formRules-228bd511.js";import{_ as M}from"./_plugin-vue_export-helper-1b428a4d.js";let _,R=Promise.all([(()=>{try{return z}catch{}})(),(()=>{try{return J}catch{}})(),(()=>{try{return K}catch{}})()]).then(async()=>{_=M(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 b=I(),h=F(()=>b.getMobile),g=B(),p=u,i=c(),e=c({sort:0,giveIntegral:0,virtualSalesCount:0}),V=S({sort:[n],giveIntegral:[n],virtualSalesCount:[n]});x(()=>p.propFormData,l=>{l&&P(e.value,l)},{immediate:!0});const w=v;return f({validate:async()=>{var l;if(i)try{await((l=a(i))==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"),w("update:activeName","other"),t}}}),(l,t)=>{const d=k,m=q,y=N;return O(),j(y,{ref_key:"formRef",ref:i,model:a(e),rules:a(V),class:U([{view:u.isDetail,"mobile-card":a(h)},"noBorder"]),"label-width":"120px",disabled:u.isDetail},{default:s(()=>[r(m,{label:"\u5546\u54C1\u6392\u5E8F",prop:"sort"},{default:s(()=>[r(d,{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\u79EF\u5206",prop:"giveIntegral"},{default:s(()=>[r(d,{modelValue:a(e).giveIntegral,"onUpdate:modelValue":t[1]||(t[1]=o=>a(e).giveIntegral=o),min:0,placeholder:"\u8BF7\u8F93\u5165\u8D60\u9001\u79EF\u5206",class:"w-80!"},null,8,["modelValue"])]),_:1}),r(m,{label:"\u865A\u62DF\u9500\u91CF",prop:"virtualSalesCount"},{default:s(()=>[r(d,{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-64e8ec1a"]])});export{R as __tla,_ as default};
|