import{d as q,ah as E,Z as K,K as w,r as h,e as T,L as Q,l as W,o as c,v as _,w as e,a,$ as Z,D as $,f as l,c as A,q as B,F as G,Q as U,P as F,b9 as H,W as J,A as X,E as Y,y as ll,z as el,i as al,ba as tl,_ as sl,__tla as dl}from"./index-1890d71e.js";import{_ as ol,__tla as rl}from"./UploadImgs-e51ec9fa.js";import{h as ul,d as pl}from"./tree-0af4953a.js";import{g as nl,__tla as il}from"./category-8eb9787d.js";import{g as cl,__tla as ml}from"./brand-812b47d4.js";import{u as _l,__tla as fl}from"./useMessage-5ce03ec6.js";import{r as m,__tla as bl}from"./formRules-849a0436.js";import{__tla as yl}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-799596eb.js";import{__tla as Vl}from"./el-image-viewer-a0672a70.js";let z,wl=Promise.all([(()=>{try{return dl}catch{}})(),(()=>{try{return rl}catch{}})(),(()=>{try{return il}catch{}})(),(()=>{try{return ml}catch{}})(),(()=>{try{return fl}catch{}})(),(()=>{try{return bl}catch{}})(),(()=>{try{return yl}catch{}})(),(()=>{try{return Vl}catch{}})()]).then(async()=>{let v;v={key:1},z=sl(q({name:"ProductSpuInfoForm",__name:"InfoForm",props:{propFormData:{type:Object,default:()=>{}},isDetail:E.bool.def(!1)},emits:["update:activeName"],setup(i,{expose:C,emit:j}){const R=K(),P=w(()=>R.getMobile),g=i,L=_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}),M=T({name:[m],categoryId:[m],keyword:[m],introduction:[m],sliderPicUrls:[m],brandId:[m],spuType:[m],producerArea:[m]}),b=w(()=>d.specType?"\u591A\u89C4\u683C":"\u5355\u89C4\u683C"),y=w(()=>{switch(d.status){case 0:return"\u4E0B\u67B6";case 1:return"\u4E0A\u67B6";case-1:return"\u56DE\u6536\u7AD9"}});Q(()=>g.propFormData,u=>{var t;u&&(H(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(g.propFormData,d)}catch(t){throw L.error("\u3010\u57FA\u7840\u8BBE\u7F6E\u3011\u4E0D\u5B8C\u5584\uFF0C\u8BF7\u586B\u5199\u76F8\u5173\u4FE1\u606F"),N("update:activeName","info"),t}}});const I=h([]),D=h([]);return W(async()=>{const u=await nl({});D.value=ul(u,"id"),I.value=await cl()}),(u,t)=>{const p=J,o=X,r=Y,V=ll,k=el,n=al,O=tl,x=ol,S=$;return c(),_(S,{ref_key:"formRef",ref:f,model:a(d),rules:a(M),class:Z({view:i.isDetail,"mobile-card":a(P)}),"label-width":"120px",disabled:i.isDetail},{default:e(()=>[l(n,null,{default:e(()=>[l(r,{span:12},{default:e(()=>[l(o,{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(r,{span:12},{default:e(()=>[l(o,{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(G,null,B(a(I),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(r,{span:12},{default:e(()=>[l(o,{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(r,{span:12},{default:e(()=>[l(o,{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(r,{span:12},{default:e(()=>[l(o,{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(r,{span:12},{default:e(()=>[l(o,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:e(()=>[l(O,{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(r,{span:12},{default:e(()=>[i.isDetail?(c(),_(o,{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(r,{span:12},{default:e(()=>[i.isDetail?(c(),_(o,{key:0,label:"\u89C4\u683C",prop:"specType"},{default:e(()=>[l(p,{modelValue:a(b),"onUpdate:modelValue":t[7]||(t[7]=s=>F(b)?b.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})):U("",!0)]),_:1})]),_:1}),i.isDetail?(c(),_(n,{key:0},{default:e(()=>[l(r,{span:24},{default:e(()=>[l(o,{label:"\u72B6\u6001",prop:"categoryStatus"},{default:e(()=>[l(p,{modelValue:a(y),"onUpdate:modelValue":t[8]||(t[8]=s=>F(y)?y.value=s:null),class:"w-80!"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1})):U("",!0),l(n,null,{default:e(()=>[l(r,{span:24},{default:e(()=>[l(o,{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(r,{span:12},{default:e(()=>[l(o,{style:{border:"none"},label:"\u5546\u54C1\u8F6E\u64AD\u56FE",prop:"businessLicensePicture"})]),_:1})]),_:1}),l(n,null,{default:e(()=>[l(r,{span:24},{default:e(()=>[l(o,{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(r,{span:24},{default:e(()=>[l(o,{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:/zhongxing/mall-newfeifan-zx-business/src/views/mall/product/spu/form/InfoForm.vue"]])});export{wl as __tla,z as default};