InfoForm-81f0d4d5.js 14 KB

12345
  1. <<<<<<<< HEAD:dist/assets/InfoForm-f8684276.js
  2. import{d as E,ag as K,Y as M,K as w,r as h,e as T,L as Y,l as Z,o as c,v as _,w as e,a,Z as B,D as G,f as l,c as A,q as H,F as J,P as U,O as F,b9 as Q,V as W,A as X,E as $,y as ll,z as el,i as al,ba as tl,_ as sl,__tla as dl}from"./index-d75b4e4d.js";import{_ as rl,__tla as ol}from"./UploadImgs-48d7ec25.js";import{h as ul,d as pl}from"./tree-0af4953a.js";import{g as nl,__tla as il}from"./category-457bfcfd.js";import{g as cl,__tla as ml}from"./brand-2f5be7f5.js";import{u as _l,__tla as fl}from"./useMessage-ba892ac2.js";import{r as m,__tla as yl}from"./formRules-8d09b686.js";import{__tla as bl}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-9eeee79a.js";import{__tla as Vl}from"./el-image-viewer-b9e519ff.js";let z,wl=Promise.all([(()=>{try{return dl}catch{}})(),(()=>{try{return ol}catch{}})(),(()=>{try{return il}catch{}})(),(()=>{try{return ml}catch{}})(),(()=>{try{return fl}catch{}})(),(()=>{try{return yl}catch{}})(),(()=>{try{return bl}catch{}})(),(()=>{try{return Vl}catch{}})()]).then(async()=>{let v;v={key:1},z=sl(E({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:K.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:C,emit:j}){const L=M(),P=w(()=>L.getMobile),I=i,O=_l(),f=h(),d=T({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0,specType:!1,salesCount:0,status:0,producerArea:"",spuType:void 0}),R=T({name:[m],categoryId:[m],keyword:[m],introduction:[m],sliderPicUrls:[m],brandId:[m],spuType:[m],producerArea:[m]}),y=w(()=>d.specType?"\u591A\u89C4\u683C":"\u5355\u89C4\u683C"),b=w(()=>{switch(d.status){case 0:return"\u4E0B\u67B6";case 1:return"\u4E0A\u67B6";case-1:return"\u56DE\u6536\u7AD9"}});Y(()=>I.propFormData,u=>{var t;u&&(Q(d,u),d.sliderPicUrls=(t=u.sliderPicUrls)==null?void 0:t.map(p=>({url:p})))},{immediate:!0});const N=j;C({validate:async()=>{var u;if(f)try{await((u=a(f))==null?void 0:u.validate()),Object.assign(I.propFormData,d)}catch(t){throw O.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),N("update:activeName","info"),t}}});const g=h([]),D=h([]);return Z(async()=>{const u=await nl({});D.value=ul(u,"id"),g.value=await cl()}),(u,t)=>{const p=W,r=X,o=$,V=ll,k=el,n=al,S=tl,x=rl,q=G;return c(),_(q,{ref_key:"formRef",ref:f,model:a(d),rules:a(R),class:B({view:i.isDetail,"mobile-card":a(P)}),"label-width":"120px",disabled:i.isDetail},{default:e(()=>[l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[l(p,{modelValue:a(d).name,"onUpdate:modelValue":t[0]||(t[0]=s=>a(d).name=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",maxlength:"64","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u54C1\u724C",prop:"brandId"},{default:e(()=>[l(k,{modelValue:a(d).brandId,"onUpdate:modelValue":t[1]||(t[1]=s=>a(d).brandId=s),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u54C1\u724C",class:"w-80"},{default:e(()=>[(c(!0),A(J,null,H(a(g),s=>(c(),_(V,{key:s.id,label:s.name,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u4EA7\u5730",prop:"producerArea"},{default:e(()=>[l(p,{modelValue:a(d).producerArea,"onUpdate:modelValue":t[2]||(t[2]=s=>a(d).producerArea=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u4EA7\u5730",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u7C7B\u578B",prop:"spuType"},{default:e(()=>[l(k,{modelValue:a(d).spuType,"onUpdate:modelValue":t[3]||(t[3]=s=>a(d).spuType=s),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",class:"w-80"},{default:e(()=>[l(V,{label:"\u5B9E\u4F53\u5546\u54C1",value:1}),l(V,{label:"\u865A\u62DF\u5546\u54C1",value:0})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u5173\u952E\u5B57",prop:"keyword"},{default:e(()=>[l(p,{modelValue:a(d).keyword,"onUpdate:modelValue":t[4]||(t[4]=s=>a(d).keyword=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5173\u952E\u5B57",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:e(()=>[l(S,{modelValue:a(d).categoryId,"onUpdate:modelValue":t[5]||(t[5]=s=>a(d).categoryId=s),options:a(D),props:a(pl),class:"w-80",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:""},null,8,["modelValue","options","props"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[i.isDetail?(c(),_(r,{key:0,label:"\u9500\u91CF",prop:"salesCount"},{default:e(()=>[l(p,{modelValue:a(d).salesCount,"onUpdate:modelValue":t[6]||(t[6]=s=>a(d).salesCount=s),class:"w-80!"},null,8,["modelValue"])]),_:1})):U("",!0)]),_:1}),l(o,{span:12},{default:e(()=>[i.isDetail?(c(),_(r,{key:0,label:"\u89C4\u683C",prop:"specType"},{default:e(()=>[l(p,{modelValue:a(y),"onUpdate:modelValue":t[7]||(t[7]=s=>F(y)?y.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})):U("",!0)]),_:1})]),_:1}),i.isDetail?(c(),_(n,{key:0},{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u72B6\u6001",prop:"categoryStatus"},{default:e(()=>[l(p,{modelValue:a(b),"onUpdate:modelValue":t[8]||(t[8]=s=>F(b)?b.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):U("",!0),l(n,null,{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u5546\u54C1\u7B80\u4ECB",prop:"introduction"},{default:e(()=>[l(p,{modelValue:a(d).introduction,"onUpdate:modelValue":t[9]||(t[9]=s=>a(d).introduction=s),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}),a(P)?(c(),A("div",v,[l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{style:{border:"none"},label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"businessLicensePicture"})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{prop:"sliderPicUrls",class:"sliderPicUrls"},{default:e(()=>[l(x,{modelValue:a(d).sliderPicUrls,"onUpdate:modelValue":t[10]||(t[10]=s=>a(d).sliderPicUrls=s),limit:5,disabled:i.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})])):(c(),_(n,{key:2},{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:e(()=>[l(x,{modelValue:a(d).sliderPicUrls,"onUpdate:modelValue":t[11]||(t[11]=s=>a(d).sliderPicUrls=s),limit:5,disabled:i.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{wl as __tla,z as default};
  3. ========
  4. import{d as E,ag as K,Y as M,K as w,r as h,e as T,L as Y,l as Z,o as c,v as _,w as e,a,Z as B,D as G,f as l,c as A,q as H,F as J,P as U,O as F,b9 as Q,V as W,A as X,E as $,y as ll,z as el,i as al,ba as tl,_ as sl,__tla as dl}from"./index-c9fff140.js";import{_ as rl,__tla as ol}from"./UploadImgs-7b431ad2.js";import{h as ul,d as pl}from"./tree-0af4953a.js";import{g as nl,__tla as il}from"./category-b1918135.js";import{g as cl,__tla as ml}from"./brand-2581be8d.js";import{u as _l,__tla as fl}from"./useMessage-5d45d53a.js";import{r as m,__tla as yl}from"./formRules-3c737673.js";import{__tla as bl}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-41301250.js";import{__tla as Vl}from"./el-image-viewer-0aee2692.js";let z,wl=Promise.all([(()=>{try{return dl}catch{}})(),(()=>{try{return ol}catch{}})(),(()=>{try{return il}catch{}})(),(()=>{try{return ml}catch{}})(),(()=>{try{return fl}catch{}})(),(()=>{try{return yl}catch{}})(),(()=>{try{return bl}catch{}})(),(()=>{try{return Vl}catch{}})()]).then(async()=>{let v;v={key:1},z=sl(E({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:K.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:C,emit:j}){const O=M(),P=w(()=>O.getMobile),I=i,R=_l(),f=h(),d=T({name:"",categoryId:void 0,keyword:"",sliderPicUrls:[],introduction:"",brandId:void 0,specType:!1,salesCount:0,status:0,producerArea:"",spuType:void 0}),q=T({name:[m],categoryId:[m],keyword:[m],introduction:[m],sliderPicUrls:[m],brandId:[m],spuType:[m],producerArea:[m]}),y=w(()=>d.specType?"\u591A\u89C4\u683C":"\u5355\u89C4\u683C"),b=w(()=>{switch(d.status){case 0:return"\u4E0B\u67B6";case 1:return"\u4E0A\u67B6";case-1:return"\u56DE\u6536\u7AD9"}});Y(()=>I.propFormData,u=>{var t;u&&(Q(d,u),d.sliderPicUrls=(t=u.sliderPicUrls)==null?void 0:t.map(p=>({url:p})))},{immediate:!0});const L=j;C({validate:async()=>{var u;if(f)try{await((u=a(f))==null?void 0:u.validate()),Object.assign(I.propFormData,d)}catch(t){throw R.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),L("update:activeName","info"),t}}});const g=h([]),D=h([]);return Z(async()=>{const u=await nl({});D.value=ul(u,"id"),g.value=await cl()}),(u,t)=>{const p=W,r=X,o=$,V=ll,k=el,n=al,N=tl,x=rl,S=G;return c(),_(S,{ref_key:"formRef",ref:f,model:a(d),rules:a(q),class:B({view:i.isDetail,"mobile-card":a(P)}),"label-width":"120px",disabled:i.isDetail},{default:e(()=>[l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u540D\u79F0",prop:"name"},{default:e(()=>[l(p,{modelValue:a(d).name,"onUpdate:modelValue":t[0]||(t[0]=s=>a(d).name=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0",maxlength:"64","show-word-limit":!0,clearable:!0,class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u54C1\u724C",prop:"brandId"},{default:e(()=>[l(k,{modelValue:a(d).brandId,"onUpdate:modelValue":t[1]||(t[1]=s=>a(d).brandId=s),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u54C1\u724C",class:"w-80"},{default:e(()=>[(c(!0),A(J,null,H(a(g),s=>(c(),_(V,{key:s.id,label:s.name,value:s.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u4EA7\u5730",prop:"producerArea"},{default:e(()=>[l(p,{modelValue:a(d).producerArea,"onUpdate:modelValue":t[2]||(t[2]=s=>a(d).producerArea=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u4EA7\u5730",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u7C7B\u578B",prop:"spuType"},{default:e(()=>[l(k,{modelValue:a(d).spuType,"onUpdate:modelValue":t[3]||(t[3]=s=>a(d).spuType=s),placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u7C7B\u578B",class:"w-80"},{default:e(()=>[l(V,{label:"\u5B9E\u4F53\u5546\u54C1",value:1}),l(V,{label:"\u865A\u62DF\u5546\u54C1",value:0})]),_:1},8,["modelValue"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u5173\u952E\u5B57",prop:"keyword"},{default:e(()=>[l(p,{modelValue:a(d).keyword,"onUpdate:modelValue":t[4]||(t[4]=s=>a(d).keyword=s),placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u5173\u952E\u5B57",class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1}),l(o,{span:12},{default:e(()=>[l(r,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:e(()=>[l(N,{modelValue:a(d).categoryId,"onUpdate:modelValue":t[5]||(t[5]=s=>a(d).categoryId=s),options:a(D),props:a(pl),class:"w-80",clearable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",filterable:""},null,8,["modelValue","options","props"])]),_:1})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[i.isDetail?(c(),_(r,{key:0,label:"\u9500\u91CF",prop:"salesCount"},{default:e(()=>[l(p,{modelValue:a(d).salesCount,"onUpdate:modelValue":t[6]||(t[6]=s=>a(d).salesCount=s),class:"w-80!"},null,8,["modelValue"])]),_:1})):U("",!0)]),_:1}),l(o,{span:12},{default:e(()=>[i.isDetail?(c(),_(r,{key:0,label:"\u89C4\u683C",prop:"specType"},{default:e(()=>[l(p,{modelValue:a(y),"onUpdate:modelValue":t[7]||(t[7]=s=>F(y)?y.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})):U("",!0)]),_:1})]),_:1}),i.isDetail?(c(),_(n,{key:0},{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u72B6\u6001",prop:"categoryStatus"},{default:e(()=>[l(p,{modelValue:a(b),"onUpdate:modelValue":t[8]||(t[8]=s=>F(b)?b.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):U("",!0),l(n,null,{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u5546\u54C1\u7B80\u4ECB",prop:"introduction"},{default:e(()=>[l(p,{modelValue:a(d).introduction,"onUpdate:modelValue":t[9]||(t[9]=s=>a(d).introduction=s),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}),a(P)?(c(),A("div",v,[l(n,null,{default:e(()=>[l(o,{span:12},{default:e(()=>[l(r,{style:{border:"none"},label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"businessLicensePicture"})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{prop:"sliderPicUrls",class:"sliderPicUrls"},{default:e(()=>[l(x,{modelValue:a(d).sliderPicUrls,"onUpdate:modelValue":t[10]||(t[10]=s=>a(d).sliderPicUrls=s),limit:5,disabled:i.isDetail},null,8,["modelValue","disabled"])]),_:1})]),_:1})]),_:1})])):(c(),_(n,{key:2},{default:e(()=>[l(o,{span:24},{default:e(()=>[l(r,{label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"sliderPicUrls"},{default:e(()=>[l(x,{modelValue:a(d).sliderPicUrls,"onUpdate:modelValue":t[11]||(t[11]=s=>a(d).sliderPicUrls=s),limit:5,disabled:i.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{wl as __tla,z as default};
  5. >>>>>>>> 2589804fb89eb98fd6498c1ee41a354dcce32af3:dist/assets/InfoForm-81f0d4d5.js