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