index-29cf4464.js 10 KB

1
  1. import{_ as Ct,__tla as It}from"./ContentWrap.vue_vue_type_script_setup_true_lang-5a63038a.js";import{_ as Vt,__tla as Tt}from"./index.vue_vue_type_script_setup_true_lang-5730b053.js";import{d as St,X as Mt,J as Ut,h as Dt,u as Et,r as s,ax as Pt,k as zt,P as jt,o as c,q as p,w as o,g as _,a,c as C,F as U,n as D,O as E,f as e,Q as Nt,e3 as Yt,e4 as Rt,v as P,m as I,a3 as et,t as g,aR as Ft,dZ as Ht,as as Wt,V as qt,W as Bt,aS as Lt,B as Xt,U as Zt,_ as At,ba as Gt,z as Jt,x as Kt,y as Ot,A as Qt,E as $t,i as ta,C as aa,p as ea,j as la,__tla as ra}from"./index-2eab2d23.js";import{E as oa,__tla as _a}from"./el-card-c558f0ec.js";import{__tla as na}from"./index-d3f876ab.js";import{h as sa,d as ca}from"./tree-fd3a041e.js";import{P as lt}from"./constants-40f13f5e.js";import{f as ia,b as ua,__tla as ma}from"./spu-73047b60.js";import{g as pa,__tla as da}from"./category-c573377b.js";import ya,{__tla as fa}from"./index-82c1797f.js";import{u as ha,__tla as va}from"./useMessage-171aa63e.js";import{_ as ga}from"./_plugin-vue_export-helper-1b428a4d.js";import{__tla as ba}from"./index-cc63c3c4.js";import{__tla as xa}from"./el-image-viewer-5d14bc77.js";import{__tla as wa}from"./SPuUploadImg-4b5016f1.js";import{__tla as ka}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-4db00aa5.js";import{__tla as Ca}from"./tagsView-fd4f3d23.js";import{__tla as Ia}from"./InfoForm-7faea2d0.js";import{__tla as Va}from"./UploadImgs-88de5939.js";import{__tla as Ta}from"./UploadImgs.vue_vue_type_style_index_0_scoped_0ff04634_lang-20f165d6.js";import{__tla as Sa}from"./brand-f2788f28.js";import{__tla as Ma}from"./formRules-228bd511.js";import{__tla as Ua}from"./DescriptionForm-7e64fe15.js";import{__tla as Da}from"./style.css_vue_type_style_index_0_src_true_lang-2706eaa9.js";import{__tla as Ea}from"./OtherForm-f34a583e.js";import{__tla as Pa}from"./SkuForm-4d15ae27.js";import{__tla as za}from"./index-6bdb8877.js";import{__tla as ja}from"./SkuList.vue_vue_type_script_setup_true_lang-d7f9bf43.js";import{__tla as Na}from"./el-image-2171f3ff.js";import{__tla as Ya}from"./UploadImg-90fe71c2.js";import{__tla as Ra}from"./UploadFile.vue_vue_type_style_index_0_scoped_2570c8e9_lang-df9c704a.js";import{__tla as Fa}from"./ProductAttributes.vue_vue_type_script_setup_true_lang-ac3c1619.js";import{__tla as Ha}from"./el-text-b1163e3d.js";import{__tla as Wa}from"./property-64c4a36d.js";import{__tla as qa}from"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-a3ddb9c8.js";import{__tla as Ba}from"./Dialog-c2716df6.js";import{__tla as La}from"./DeliveryForm-b244d671.js";import{__tla as Xa}from"./index-8bc1e5b3.js";import{__tla as Za}from"./dict-1ad71b6f.js";import{__tla as Aa}from"./Service-39db17d3.js";import{__tla as Ga}from"./index-3562b2a3.js";import{__tla as Ja}from"./AfterSale-82845424.js";import{__tla as Ka}from"./Comment-0718ca3a.js";let rt,Oa=Promise.all([(()=>{try{return It}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return ra}catch{}})(),(()=>{try{return _a}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return ma}catch{}})(),(()=>{try{return da}catch{}})(),(()=>{try{return fa}catch{}})(),(()=>{try{return va}catch{}})(),(()=>{try{return ba}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Ka}catch{}})()]).then(async()=>{let z,j,N,Y,R,F,H,W,q,B,L,X;z={class:"search"},j={style:{"text-align":"right"},class:"search-input"},N={class:"searchMore"},Y={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},R=["title"],F=["onClick"],H={style:{display:"flex","align-items":"center"}},W={style:{width:"178px",height:"100px","margin-right":"10px",border:"1px solid rgb(220 223 231)","border-radius":"5px",display:"flex","align-items":"center","justify-content":"center",overflow:"hidden"}},q=["src"],B={style:{"line-height":"25px"}},L={key:0},X=[(u=>(ea("data-v-b6c206b5"),u=u(),la(),u))(()=>_("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u54C1",-1))],rt=ga(St({name:"ProductSpu",__name:"index",props:{merchantId:{type:Number,default:0},isDetail:{type:Boolean,default:!1}},setup(u){const ot=Mt(),b=Ut(()=>ot.getMobile),x=u;ha(),Dt();const{push:_t}=Et(),Z=s(!1);s(!1);const A=s(0),d=s([]),y=s([{name:"\u5168\u90E8",type:"",count:0},{name:"\u51FA\u552E\u4E2D",type:0,count:0},{name:"\u4ED3\u5E93\u4E2D",type:1,count:0},{name:"\u5DF2\u552E\u7F44",type:2,count:0},{name:"\u8B66\u6212\u5E93\u5B58",type:3,count:0},{name:"\u56DE\u6536\u7AD9",type:4,count:0}]),l=s({pageNo:1,pageSize:10,tabType:"",name:"",categoryId:void 0,createTime:void 0}),nt=s(),f=s(!1),st=()=>{f.value=!f.value},ct=()=>{f.value=!1},m=async()=>{Z.value=!0,x.merchantId&&(l.value.merchantId=x.merchantId);try{const n=await ia(l.value);n.list.forEach(r=>{r.showSetting=!1}),d.value=n.list,A.value=n.total}finally{Z.value=!1,f.value=!1,G()}},it=n=>{l.value.tabType=n.paneName,m()},G=async()=>{const n=s({});x.merchantId&&(n.value.merId=x.merchantId);const r=await ua(n.value);y.value[0].count=0;for(let i in r)(i<=1||i==="4")&&(y.value[0].count+=r[i]),y.value[Number(i)+1].count=r[i]},w=()=>{m()},ut=()=>{l.value.categoryId=void 0,l.value.createTime=void 0,l.value.name="",l.value.tabType="",w()},V=s(),J=(n,r,i,T)=>{V.value.open(n,r,i,T)},K=s();return Pt(()=>{m()}),zt(async()=>{await G(),await m();const n=await pa({});K.value=sa(n,"id","parentId")}),(n,r)=>{const i=qt,T=Bt,O=Lt,h=Xt,mt=Zt,Q=At,pt=Gt,k=Jt,dt=Kt,yt=Ot,ft=Qt,$=$t,tt=ta,ht=aa,vt=oa,gt=Vt,bt=Ct,xt=jt("hasPermi");return c(),p(bt,{style:{},class:"container"},{default:o(()=>[_("div",z,[a(b)?E("",!0):(c(),p(T,{key:0,modelValue:a(l).tabType,"onUpdate:modelValue":r[0]||(r[0]=t=>a(l).tabType=t),onTabClick:it,class:"parent-tabs"},{default:o(()=>[(c(!0),C(U,null,D(a(y),t=>(c(),p(i,{key:t.type,label:t.name+"("+t.count+")",name:t.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),_("div",j,[e(mt,{modelValue:a(l).name,"onUpdate:modelValue":r[1]||(r[1]=t=>a(l).name=t),placeholder:"\u641C\u7D22\u5546\u54C1\u540D\u79F0",onKeyup:Nt(w,["enter"]),class:"!w-240px"},{suffix:o(()=>[e(O,{class:"el-input__icon",onClick:w,style:{cursor:"pointer"}},{default:o(()=>[e(a(Yt))]),_:1})]),append:o(()=>[e(h,{icon:a(Rt),onClick:st},null,8,["icon"])]),_:1},8,["modelValue"]),a(b)||u.isDetail||u.merchantId?E("",!0):P((c(),p(h,{key:0,onClick:r[2]||(r[2]=t=>J("create","",0)),class:"ml-5px"},{default:o(()=>[e(Q,{class:"mr-5px",icon:"ep:plus"}),I(" \u65B0\u589E ")]),_:1})),[[xt,["product:spu:create"]]])])]),P(_("div",N,[e(ht,{ref_key:"queryFormRef",ref:nt,inline:!0,model:a(l),class:"-mb-15px","label-width":"68px"},{default:o(()=>[e(k,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:o(()=>[e(pt,{modelValue:a(l).categoryId,"onUpdate:modelValue":r[3]||(r[3]=t=>a(l).categoryId=t),options:a(K),props:a(ca),clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options","props"])]),_:1}),e(k,{label:"\u5546\u54C1\u72B6\u6001",prop:""},{default:o(()=>[e(yt,{modelValue:a(l).tabType,"onUpdate:modelValue":r[4]||(r[4]=t=>a(l).tabType=t),placeholder:"\u5168\u90E8"},{default:o(()=>[(c(!0),C(U,null,D(a(y),t=>(c(),p(dt,{key:t.type,label:t.name,value:t.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(k,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[e(ft,{style:{"margin-right":"unset",width:"auto !important"},modelValue:a(l).createTime,"onUpdate:modelValue":r[5]||(r[5]=t=>a(l).createTime=t),"default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],"end-placeholder":"\u7ED3\u675F\u65E5\u671F","start-placeholder":"\u5F00\u59CB\u65E5\u671F",type:"daterange","value-format":"YYYY-MM-DD HH:mm:ss"},null,8,["modelValue","default-time"])]),_:1}),e(tt,null,{default:o(()=>[e($,null,{default:o(()=>[e(k,null,{default:o(()=>[e(h,{onClick:ct},{default:o(()=>[I(" \u6536\u8D77 ")]),_:1}),e(h,{onClick:ut},{default:o(()=>[I(" \u91CD\u7F6E ")]),_:1}),e(h,{onClick:w,plain:"",type:"primary"},{default:o(()=>[e(Q,{class:"mr-5px",icon:"ep:search"}),I(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[et,a(f)]]),e(tt,null,{default:o(()=>[(c(!0),C(U,null,D(a(d),(t,S)=>(c(),p($,{class:"card",key:S,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:M=>function(v){d.value[v].showSetting=!0}(S),onMouseout:M=>function(v){d.value[v].showSetting=!1}(S)},{default:o(()=>[e(vt,{onClick:M=>((v,at,wt)=>{const kt=at.id;b.value?_t({name:"ProductSpuMobileDetail",params:{id:kt}}):V.value.open(v,at,wt)})("view",t,a(lt).RECYCLE.status,a(l).tabType)},{default:o(()=>[_("div",Y,[_("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:t.name},g(t.name),9,R),P(_("div",{onClick:Ft(M=>J("update",t,a(lt).RECYCLE.status,a(l).tabType),["stop"]),class:"setting"},[e(O,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[e(a(Ht))]),_:1})],8,F),[[et,t.showSetting&&!a(b)&&!u.merchantId]])]),_("div",H,[_("div",W,[_("img",{src:t.picUrl,style:{width:"100%",height:"100%","object-fit":"cover","object-position":"center"}},null,8,q)]),_("div",B,[_("p",null,"\xA5"+g(a(Wt)(t.price)),1),_("p",null,"\u9500\u91CF:"+g(t.salesCount),1),_("p",null,"\u5E93\u5B58:"+g(t.stock),1),_("p",null,"\u72B6\u6001:"+g(t.status==1?"\u4E0A\u67B6":"\u4E0B\u67B6"),1)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),a(d).length==0?(c(),C("div",L,X)):E("",!0),e(gt,{limit:a(l).pageSize,"onUpdate:limit":r[6]||(r[6]=t=>a(l).pageSize=t),page:a(l).pageNo,"onUpdate:page":r[7]||(r[7]=t=>a(l).pageNo=t),total:a(A),onPagination:m},null,8,["limit","page","total"]),e(ya,{ref_key:"formRef",ref:V,onSuccess:m},null,512)]),_:1})}}}),[["__scopeId","data-v-b6c206b5"]])});export{Oa as __tla,rt as default};