1 |
- import{_ as Va,__tla as Ca}from"./ContentWrap-694014d4.js";import{_ as Ta,__tla as Sa}from"./index-c8f58bd0.js";import{d as Ua,Y as Da,K as Ma,h as za,u as Ea,r as c,ay as Pa,l as ja,Q as Na,o as s,v as m,w as o,c as y,a as t,F as C,q as T,P as x,g as n,f as r,R as Ra,e8 as Ya,dG as Ka,x as P,n as S,a4 as oa,t as I,aS as La,e2 as Fa,at as Ha,W as Xa,X as qa,aT as Ba,C as Aa,V as Ga,j as Ja,y as Qa,z as Wa,A as Za,ba as $a,B as Oa,E as at,i as tt,D as et,p as lt,k as rt,_ as ot,__tla as _t}from"./index-11e4820e.js";import{E as st,__tla as nt}from"./el-card-919c14be.js";import{__tla as ut}from"./index-4203485c.js";import{h as ct,d as it}from"./tree-0af4953a.js";import{P as _a}from"./constants-40f13f5e.js";import{i as mt,h as pt,j as dt,e as yt,__tla as ft}from"./spu-6512fa25.js";import{h as ht,__tla as vt}from"./index-63b1dc70.js";import{g as gt,__tla as bt}from"./category-1517c494.js";import wt,{__tla as xt}from"./index-962da1ec.js";import{u as It,__tla as kt}from"./useMessage-06ddf735.js";import{__tla as Vt}from"./ContentWrap.vue_vue_type_script_setup_true_lang-11f85821.js";import{__tla as Ct}from"./index-dd73c59d.js";import{__tla as Tt}from"./el-image-viewer-c4f5814f.js";import{__tla as St}from"./SPuUploadImg-7c6bd56b.js";import{__tla as Ut}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-8854a0f2.js";import{__tla as Dt}from"./tagsView-4d7a359f.js";import{__tla as Mt}from"./InfoForm-22c23d54.js";import{__tla as zt}from"./UploadImgs-0c26a9a3.js";import{__tla as Et}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-fafbf7e3.js";import{__tla as Pt}from"./brand-6f3f160b.js";import{__tla as jt}from"./formRules-a3633e47.js";import{__tla as Nt}from"./DescriptionForm-28f3a0e1.js";import{__tla as Rt}from"./Editor-0f5cadc2.js";import{__tla as Yt}from"./OtherForm-b1be3184.js";import{__tla as Kt}from"./SkuForm-8fc43ee5.js";import{__tla as Lt}from"./index-ef554548.js";import{__tla as Ft}from"./SkuList-6b80ba7b.js";import{__tla as Ht}from"./el-image-17e8bc54.js";import{__tla as Xt}from"./UploadImg-a1807be8.js";import{__tla as qt}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-bab9318f.js";import{__tla as Bt}from"./ProductAttributes-f024aca6.js";import{__tla as At}from"./el-text-ff6dcf4e.js";import{__tla as Gt}from"./property-9c164d16.js";import{__tla as Jt}from"./ProductPropertyAddForm-051de3c9.js";import{__tla as Qt}from"./Dialog-bbfaf85c.js";import{__tla as Wt}from"./DeliveryForm-f226e0e5.js";import{__tla as Zt}from"./index-c5bb7afe.js";import{__tla as $t}from"./dict-4072dcec.js";import{__tla as Ot}from"./Service-d6b8d510.js";import{__tla as ae}from"./index-85087f4c.js";import{__tla as te}from"./AfterSale-0daefdbb.js";import{__tla as ee}from"./Comment-29a0879b.js";let sa,le=Promise.all([(()=>{try{return Ca}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return _t}catch{}})(),(()=>{try{return nt}catch{}})(),(()=>{try{return ut}catch{}})(),(()=>{try{return ft}catch{}})(),(()=>{try{return vt}catch{}})(),(()=>{try{return bt}catch{}})(),(()=>{try{return xt}catch{}})(),(()=>{try{return kt}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return Ct}catch{}})(),(()=>{try{return Tt}catch{}})(),(()=>{try{return St}catch{}})(),(()=>{try{return Ut}catch{}})(),(()=>{try{return Dt}catch{}})(),(()=>{try{return Mt}catch{}})(),(()=>{try{return zt}catch{}})(),(()=>{try{return Et}catch{}})(),(()=>{try{return Pt}catch{}})(),(()=>{try{return jt}catch{}})(),(()=>{try{return Nt}catch{}})(),(()=>{try{return Rt}catch{}})(),(()=>{try{return Yt}catch{}})(),(()=>{try{return Kt}catch{}})(),(()=>{try{return Lt}catch{}})(),(()=>{try{return Ft}catch{}})(),(()=>{try{return Ht}catch{}})(),(()=>{try{return Xt}catch{}})(),(()=>{try{return qt}catch{}})(),(()=>{try{return Bt}catch{}})(),(()=>{try{return At}catch{}})(),(()=>{try{return Gt}catch{}})(),(()=>{try{return Jt}catch{}})(),(()=>{try{return Qt}catch{}})(),(()=>{try{return Wt}catch{}})(),(()=>{try{return Zt}catch{}})(),(()=>{try{return $t}catch{}})(),(()=>{try{return Ot}catch{}})(),(()=>{try{return ae}catch{}})(),(()=>{try{return te}catch{}})(),(()=>{try{return ee}catch{}})()]).then(async()=>{let j,N,R,Y,K,L,F,H,X,q,B,A;j={key:0,class:"search"},N={style:{"text-align":"right"},class:"search-input"},R={class:"searchMore"},Y={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},K=["title"],L=["onClick"],F={style:{display:"flex","align-items":"center"}},H={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"}},X=["src"],q={style:{"line-height":"25px"}},B={key:1},A=[(u=>(lt("data-v-b78c7ed6"),u=u(),rt(),u))(()=>n("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u54C1",-1))],sa=ot(Ua({name:"ProductSpu",__name:"index",props:{merchantId:{type:Number,default:void 0},userId:{type:Number,default:void 0},isDetail:{type:Boolean,default:!1}},setup(u){const na=Da(),k=Ma(()=>na.getMobile),p=u;It(),za();const{push:ua}=Ea(),U=c(!1);c(!1);const G=c(0),f=c([]),h=c([{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}]),e=c({pageNo:1,pageSize:10,tabType:"",name:"",categoryId:void 0,createTime:void 0,shopId:void 0}),ca=c(),v=c(!1),ia=()=>{v.value=!v.value},ma=()=>{v.value=!1},d=async()=>{U.value=!0,p.merchantId&&(e.value.merchantId=p.merchantId);try{let _;p.userId?(console.log(p.userId),e.value.userId=p.userId,_=await mt(e.value)):_=await pt(e.value),_.list.forEach(l=>{l.showSetting=!1}),f.value=_.list,G.value=_.total}finally{U.value=!1,v.value=!1,J()}},pa=_=>{e.value.tabType=_.paneName,d()},J=async()=>{const _=c({...e.value});let l;p.merchantId?(_.value.merId=p.merchantId,l=await dt(_.value)):l=await yt(_.value),h.value[0].count=0;for(let i in l)(i<=1||i==="4")&&(h.value[0].count+=l[i]),h.value[Number(i)+1].count=l[i]},V=()=>{d()},da=()=>{e.value.categoryId=void 0,e.value.createTime=void 0,e.value.name="",e.value.tabType="",e.value.shopId=void 0,V()},D=c(),Q=(_,l,i,M)=>{D.value.open(_,l,i,M)},W=c();Pa(()=>{d()});let Z=c([]);return ja(async()=>{await(async()=>{U.value=!0;const l=await ht();Z.value=l})(),await J(),await d();const _=await gt({});W.value=ct(_,"id","parentId")}),(_,l)=>{const i=Xa,M=qa,$=Ba,g=Aa,ya=Ga,O=Ja,aa=Qa,ta=Wa,b=Za,fa=$a,ha=Oa,ea=at,la=tt,va=et,ga=st,ba=Ta,wa=Va,xa=Na("hasPermi");return s(),m(wa,{style:{},class:"container"},{default:o(()=>[u.userId?x("",!0):(s(),y("div",j,[t(k)?x("",!0):(s(),m(M,{key:0,modelValue:t(e).tabType,"onUpdate:modelValue":l[0]||(l[0]=a=>t(e).tabType=a),onTabClick:pa,class:"parent-tabs"},{default:o(()=>[(s(!0),y(C,null,T(t(h),a=>(s(),m(i,{key:a.type,label:a.name+"("+a.count+")",name:a.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),n("div",N,[r(ya,{modelValue:t(e).name,"onUpdate:modelValue":l[1]||(l[1]=a=>t(e).name=a),placeholder:"\u641C\u7D22\u5546\u54C1\u540D\u79F0",onKeyup:Ra(V,["enter"]),class:"!w-240px"},{suffix:o(()=>[r($,{class:"el-input__icon",onClick:V,style:{cursor:"pointer"}},{default:o(()=>[r(t(Ya))]),_:1})]),append:o(()=>[r(g,{icon:t(Ka),onClick:ia},null,8,["icon"])]),_:1},8,["modelValue"]),t(k)||u.isDetail||u.merchantId?x("",!0):P((s(),m(g,{key:0,onClick:l[2]||(l[2]=a=>Q("create","",0)),class:"ml-5px"},{default:o(()=>[r(O,{class:"mr-5px",icon:"ep:plus"}),S(" \u65B0\u589E ")]),_:1})),[[xa,["product:spu:create"]]])])])),P(n("div",R,[r(va,{ref_key:"queryFormRef",ref:ca,inline:!0,model:t(e),class:"-mb-15px","label-width":"68px"},{default:o(()=>[u.merchantId||u.userId?x("",!0):(s(),m(b,{key:0,label:"\u5E97\u94FA\u540D\u79F0"},{default:o(()=>[r(ta,{modelValue:t(e).shopId,"onUpdate:modelValue":l[3]||(l[3]=a=>t(e).shopId=a),placeholder:"\u8BF7\u9009\u62E9",filterable:""},{default:o(()=>[(s(!0),y(C,null,T(t(Z),a=>(s(),m(aa,{key:a.id,label:a.name,value:a.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})),r(b,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:o(()=>[r(fa,{modelValue:t(e).categoryId,"onUpdate:modelValue":l[4]||(l[4]=a=>t(e).categoryId=a),options:t(W),props:t(it),clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options","props"])]),_:1}),r(b,{label:"\u5546\u54C1\u72B6\u6001",prop:""},{default:o(()=>[r(ta,{modelValue:t(e).tabType,"onUpdate:modelValue":l[5]||(l[5]=a=>t(e).tabType=a),placeholder:"\u5168\u90E8"},{default:o(()=>[(s(!0),y(C,null,T(t(h),a=>(s(),m(aa,{key:a.type,label:a.name,value:a.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(b,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[r(ha,{style:{"margin-right":"unset",width:"auto !important"},modelValue:t(e).createTime,"onUpdate:modelValue":l[6]||(l[6]=a=>t(e).createTime=a),"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}),r(la,null,{default:o(()=>[r(ea,null,{default:o(()=>[r(b,null,{default:o(()=>[r(g,{onClick:ma},{default:o(()=>[S(" \u6536\u8D77 ")]),_:1}),r(g,{onClick:da},{default:o(()=>[S(" \u91CD\u7F6E ")]),_:1}),r(g,{onClick:V,plain:"",type:"primary"},{default:o(()=>[r(O,{class:"mr-5px",icon:"ep:search"}),S(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[oa,t(v)]]),r(la,null,{default:o(()=>[(s(!0),y(C,null,T(t(f),(a,z)=>(s(),m(ea,{class:"card",key:z,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:E=>function(w){f.value[w].showSetting=!0}(z),onMouseout:E=>function(w){f.value[w].showSetting=!1}(z)},{default:o(()=>[r(ga,{onClick:E=>((w,ra,Ia)=>{const ka=ra.id;k.value?ua({name:"ProductSpuMobileDetail",params:{id:ka}}):D.value.open(w,ra,Ia)})("view",a,t(_a).RECYCLE.status,t(e).tabType)},{default:o(()=>[n("div",Y,[n("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:a.name},I(a.name),9,K),P(n("div",{onClick:La(E=>Q("update",a,t(_a).RECYCLE.status,t(e).tabType),["stop"]),class:"setting"},[r($,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[r(t(Fa))]),_:1})],8,L),[[oa,a.showSetting&&!t(k)&&!u.merchantId&&!u.userId]])]),n("div",F,[n("div",H,[n("img",{src:a.picUrl,style:{width:"100%",height:"100%","object-fit":"cover","object-position":"center"}},null,8,X)]),n("div",q,[n("p",null,"\xA5"+I(t(Ha)(a.price)),1),n("p",null,"\u9500\u91CF:"+I(a.salesCount),1),n("p",null,"\u5E93\u5B58:"+I(a.stock),1),n("p",null,"\u72B6\u6001:"+I(a.status==1?"\u4E0A\u67B6":"\u4E0B\u67B6"),1)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),t(f).length==0?(s(),y("div",B,[...A])):x("",!0),r(ba,{limit:t(e).pageSize,"onUpdate:limit":l[7]||(l[7]=a=>t(e).pageSize=a),page:t(e).pageNo,"onUpdate:page":l[8]||(l[8]=a=>t(e).pageNo=a),total:t(G),onPagination:d},null,8,["limit","page","total"]),r(wt,{ref_key:"formRef",ref:D,onSuccess:d},null,512)]),_:1})}}}),[["__scopeId","data-v-b78c7ed6"],["__file","/Users/RuHu.Xu/Desktop/mall-newfeifan-zx-admin/src/views/mall/product/spu/index.vue"]])});export{le as __tla,sa as default};
|