1 |
- import{d as E,ag as K,Y as M,K as w,r as h,e as I,L as Y,l as Z,o as m,v as _,w as l,a as t,Z as q,D as B,f as e,O as x,P as f,c as G,aR as H,V as J,A as Q,E as W,i as X,y as $,z as ee,aS as le,_ as ae,__tla as te}from"./index-270ba082.js";import{_ as se,__tla as oe}from"./UploadImgs-325a6f74.js";import{h as re,d as de}from"./tree-0af4953a.js";import{g as ue,__tla as pe}from"./category-0a7afd86.js";import{g as ie,__tla as ne}from"./brand-1e1a6c9b.js";import{u as ce,__tla as me}from"./useMessage-736d2f04.js";import{r as c,__tla as _e}from"./formRules-a763f1cd.js";import{__tla as fe}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-d76e6204.js";import{__tla as ye}from"./el-image-viewer-46a3cdf1.js";let T,Ve=Promise.all([(()=>{try{return te}catch{}})(),(()=>{try{return oe}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return ne}catch{}})(),(()=>{try{return me}catch{}})(),(()=>{try{return _e}catch{}})(),(()=>{try{return fe}catch{}})(),(()=>{try{return ye}catch{}})()]).then(async()=>{let U;U={key:1},T=ae(E({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:K.bool.def(!1)},emits:["update:activeName"],setup(u,{expose:A,emit:F}){const N=M(),v=w(()=>N.getMobile),D=u,z=ce(),y=h(),s=I({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0,specType:!1,salesCount:0,status:0,producerArea:"",spuType:void 0,shopName:""}),C=I({name:[c],categoryId:[c],keyword:[c],introduction:[c],sliderPicUrls:[c],brandId:[c],spuType:[c],producerArea:[c]}),V=w(()=>s.specType?"\u591A\u89C4\u683C":"\u5355\u89C4\u683C"),b=w(()=>{switch(s.status){case 0:return"\u4E0B\u67B6";case 1:return"\u4E0A\u67B6";case-1:return"\u56DE\u6536\u7AD9"}});Y(()=>D.propFormData,i=>{var a;i&&(H(s,i),s.sliderPicUrls=(a=i.sliderPicUrls)==null?void 0:a.map(p=>({url:p})))},{immediate:!0});const R=F;A({validate:async()=>{var i;if(y)try{await((i=t(y))==null?void 0:i.validate()),Object.assign(D.propFormData,s)}catch(a){throw z.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),R("update:activeName","info"),a}}});const j=h([]),P=h([]);return Z(async()=>{const i=await ue({});P.value=re(i,"id"),j.value=await ie()}),(i,a)=>{const p=J,r=Q,d=W,n=X,g=$,O=ee,S=le,k=se,L=B;return m(),_(L,{ref_key:"formRef",ref:y,model:t(s),rules:t(C),class:q({view:u.isDetail,"mobile-card":t(v)}),"label-width":"120px",disabled:u.isDetail},{default:l(()=>[e(n,null,{default:l(()=>[e(d,{span:u.isDetail?12:24},{default:l(()=>[e(r,{label:"\u540D\u79F0",prop:"name"},{default:l(()=>[e(p,{modelValue:t(s).name,"onUpdate:modelValue":a[0]||(a[0]=o=>t(s).name=o),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",maxlength:"64","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1},8,["span"]),u.isDetail?(m(),_(d,{key:0,span:12},{default:l(()=>[e(r,{label:"\u72B6\u6001",prop:"categoryStatus"},{default:l(()=>[e(p,{modelValue:t(b),"onUpdate:modelValue":a[1]||(a[1]=o=>x(b)?b.value=o:null),class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})):f("",!0)]),_:1}),e(n,null,{default:l(()=>[e(d,{span:12},{default:l(()=>[e(r,{label:"\u4EA7\u5730",prop:"producerArea"},{default:l(()=>[e(p,{modelValue:t(s).producerArea,"onUpdate:modelValue":a[2]||(a[2]=o=>t(s).producerArea=o),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u4EA7\u5730",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(r,{label:"\u5546\u54C1\u7C7B\u578B",prop:"spuType"},{default:l(()=>[e(O,{modelValue:t(s).spuType,"onUpdate:modelValue":a[3]||(a[3]=o=>t(s).spuType=o),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",class:"w-80"},{default:l(()=>[e(g,{label:"\u5B9E\u4F53\u5546\u54C1",value:1}),e(g,{label:"\u865A\u62DF\u5546\u54C1",value:0})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(n,null,{default:l(()=>[e(d,{span:12},{default:l(()=>[e(r,{label:"\u5546\u54C1\u5173\u952E\u5B57",prop:"keyword"},{default:l(()=>[e(p,{modelValue:t(s).keyword,"onUpdate:modelValue":a[4]||(a[4]=o=>t(s).keyword=o),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5173\u952E\u5B57",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),e(d,{span:12},{default:l(()=>[e(r,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:l(()=>[e(S,{modelValue:t(s).categoryId,"onUpdate:modelValue":a[5]||(a[5]=o=>t(s).categoryId=o),options:t(P),props:t(de),class:"w-80",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:""},null,8,["modelValue","options","props"])]),_:1})]),_:1})]),_:1}),u.isDetail?(m(),_(n,{key:0},{default:l(()=>[e(d,{span:12},{default:l(()=>[u.isDetail?(m(),_(r,{key:0,label:"\u9500\u91CF",prop:"salesCount"},{default:l(()=>[e(p,{modelValue:t(s).salesCount,"onUpdate:modelValue":a[6]||(a[6]=o=>t(s).salesCount=o),class:"w-80!"},null,8,["modelValue"])]),_:1})):f("",!0)]),_:1}),e(d,{span:12},{default:l(()=>[u.isDetail?(m(),_(r,{key:0,label:"\u89C4\u683C",prop:"specType"},{default:l(()=>[e(p,{modelValue:t(V),"onUpdate:modelValue":a[7]||(a[7]=o=>x(V)?V.value=o:null),class:"w-80!"},null,8,["modelValue"])]),_:1})):f("",!0)]),_:1})]),_:1})):f("",!0),e(n,null,{default:l(()=>[e(d,{span:24},{default:l(()=>[e(r,{label:"\u6240\u5C5E\u5E97\u94FA",prop:"shopName"},{default:l(()=>[e(p,{modelValue:t(s).shopName,"onUpdate:modelValue":a[8]||(a[8]=o=>t(s).shopName=o),class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),e(n,null,{default:l(()=>[e(d,{span:24},{default:l(()=>[e(r,{label:"\u5546\u54C1\u7B80\u4ECB",prop:"introduction"},{default:l(()=>[e(p,{modelValue:t(s).introduction,"onUpdate:modelValue":a[9]||(a[9]=o=>t(s).introduction=o),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",type:"textarea",autosize:{minRows:2,maxRows:2},maxlength:"128","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1}),t(v)?(m(),G("div",U,[e(n,null,{default:l(()=>[e(d,{span:12},{default:l(()=>[e(r,{style:{border:"none"},label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"businessLicensePicture"})]),_:1})]),_:1}),e(n,null,{default:l(()=>[e(d,{span:24},{default:l(()=>[e(r,{prop:"sliderPicUrls",class:"sliderPicUrls"},{default:l(()=>[e(k,{modelValue:t(s).sliderPicUrls,"onUpdate:modelValue":a[10]||(a[10]=o=>t(s).sliderPicUrls=o),limit:5,disabled:u.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})])):(m(),_(n,{key:2},{default:l(()=>[e(d,{span:24},{default:l(()=>[e(r,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:l(()=>[e(k,{modelValue:t(s).sliderPicUrls,"onUpdate:modelValue":a[11]||(a[11]=o=>t(s).sliderPicUrls=o),limit:5,disabled:u.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1}))]),_:1},8,["model","rules","class","disabled"])}}}),[["__scopeId","data-v-64c95680"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/form/InfoForm.vue"]])});export{Ve as __tla,T as default};
|