1 |
- import{_ as kt,__tla as Ct}from"./ContentWrap-3b35ebb8.js";import{_ as Tt,__tla as Vt}from"./index-2c8b4efb.js";import{d as St,Y as Dt,K as Mt,h as zt,u as Et,r as s,ay as Ut,l as Pt,Q as jt,o as c,v as d,w as o,c as b,a,F as z,q as E,P as C,g as n,f as r,R as Nt,e6 as Yt,dE as Rt,x as U,n as T,a4 as et,t as x,aS as Ht,e0 as Ft,at as Kt,W as Qt,X as qt,aT as Bt,C as Lt,V as At,j as Jt,ba as Wt,A as Xt,y as Zt,z as $t,B as Gt,E as Ot,i as ta,D as aa,p as ea,k as la,_ as ra,__tla as oa}from"./index-89fa41f9.js";import{E as _a,__tla as na}from"./el-card-fccba201.js";import{__tla as sa}from"./index-b3af54ea.js";import{h as ca,d as ua}from"./tree-0af4953a.js";import{P as lt}from"./constants-40f13f5e.js";import{i as ia,h as ma,j as pa,e as da,__tla as ya}from"./spu-7cbbdc27.js";import{g as fa,__tla as ha}from"./category-d127d5f2.js";import va,{__tla as ga}from"./index-b7c94dd1.js";import{u as ba,__tla as xa}from"./useMessage-fcfad84c.js";import{__tla as wa}from"./ContentWrap.vue_vue_type_script_setup_true_lang-50710b25.js";import{__tla as Ia}from"./index-0eb42f11.js";import{__tla as ka}from"./el-image-viewer-e38f9782.js";import{__tla as Ca}from"./SPuUploadImg-957be6de.js";import{__tla as Ta}from"./SPuUploadImg.vue_vue_type_style_index_0_scoped_ba706063_lang-e9ea7b56.js";import{__tla as Va}from"./tagsView-61ac48b8.js";import{__tla as Sa}from"./InfoForm-226d89b6.js";import{__tla as Da}from"./UploadImgs-1a5dce53.js";import{__tla as Ma}from"./UploadImgs.vue_vue_type_style_index_0_scoped_9d666400_lang-04281f84.js";import{__tla as za}from"./brand-d703560d.js";import{__tla as Ea}from"./formRules-646bc8c6.js";import{__tla as Ua}from"./DescriptionForm-f1705a09.js";import{__tla as Pa}from"./Editor-e4651bd8.js";import{__tla as ja}from"./OtherForm-efd1236a.js";import{__tla as Na}from"./SkuForm-fcb0fddf.js";import{__tla as Ya}from"./index-57e22788.js";import{__tla as Ra}from"./SkuList-263d9e50.js";import{__tla as Ha}from"./el-image-d51e6233.js";import{__tla as Fa}from"./UploadImg-68daee7d.js";import{__tla as Ka}from"./UploadFile.vue_vue_type_style_index_0_scoped_436eca1b_lang-a5cf96aa.js";import{__tla as Qa}from"./ProductAttributes-1245af69.js";import{__tla as qa}from"./el-text-cb74cff1.js";import{__tla as Ba}from"./property-ea96a8a4.js";import{__tla as La}from"./ProductPropertyAddForm-e1f9ffbe.js";import{__tla as Aa}from"./Dialog-890fafd8.js";import{__tla as Ja}from"./DeliveryForm-393723ee.js";import{__tla as Wa}from"./index-de20f1a9.js";import{__tla as Xa}from"./dict-dca1abd1.js";import{__tla as Za}from"./Service-b8ebc3ea.js";import{__tla as $a}from"./index-794ba0dc.js";import{__tla as Ga}from"./AfterSale-7cb05997.js";import{__tla as Oa}from"./index-1b5135b0.js";import{__tla as te}from"./Comment-950c143c.js";let rt,ae=Promise.all([(()=>{try{return Ct}catch{}})(),(()=>{try{return Vt}catch{}})(),(()=>{try{return oa}catch{}})(),(()=>{try{return na}catch{}})(),(()=>{try{return sa}catch{}})(),(()=>{try{return ya}catch{}})(),(()=>{try{return ha}catch{}})(),(()=>{try{return ga}catch{}})(),(()=>{try{return xa}catch{}})(),(()=>{try{return wa}catch{}})(),(()=>{try{return Ia}catch{}})(),(()=>{try{return ka}catch{}})(),(()=>{try{return Ca}catch{}})(),(()=>{try{return Ta}catch{}})(),(()=>{try{return Va}catch{}})(),(()=>{try{return Sa}catch{}})(),(()=>{try{return Da}catch{}})(),(()=>{try{return Ma}catch{}})(),(()=>{try{return za}catch{}})(),(()=>{try{return Ea}catch{}})(),(()=>{try{return Ua}catch{}})(),(()=>{try{return Pa}catch{}})(),(()=>{try{return ja}catch{}})(),(()=>{try{return Na}catch{}})(),(()=>{try{return Ya}catch{}})(),(()=>{try{return Ra}catch{}})(),(()=>{try{return Ha}catch{}})(),(()=>{try{return Fa}catch{}})(),(()=>{try{return Ka}catch{}})(),(()=>{try{return Qa}catch{}})(),(()=>{try{return qa}catch{}})(),(()=>{try{return Ba}catch{}})(),(()=>{try{return La}catch{}})(),(()=>{try{return Aa}catch{}})(),(()=>{try{return Ja}catch{}})(),(()=>{try{return Wa}catch{}})(),(()=>{try{return Xa}catch{}})(),(()=>{try{return Za}catch{}})(),(()=>{try{return $a}catch{}})(),(()=>{try{return Ga}catch{}})(),(()=>{try{return Oa}catch{}})(),(()=>{try{return te}catch{}})()]).then(async()=>{let P,j,N,Y,R,H,F,K,Q,q,B,L;P={key:0,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"],H=["onClick"],F={style:{display:"flex","align-items":"center"}},K={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"],q={style:{"line-height":"25px"}},B={key:1},L=[(u=>(ea("data-v-b78c7ed6"),u=u(),la(),u))(()=>n("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u54C1",-1))],rt=ra(St({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 ot=Dt(),w=Mt(()=>ot.getMobile),m=u;ba(),zt();const{push:_t}=Et(),A=s(!1);s(!1);const J=s(0),y=s([]),f=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}]),e=s({pageNo:1,pageSize:10,tabType:"",name:"",categoryId:void 0,createTime:void 0}),nt=s(),h=s(!1),st=()=>{h.value=!h.value},ct=()=>{h.value=!1},p=async()=>{A.value=!0,m.merchantId&&(e.value.merchantId=m.merchantId);try{let _;m.userId?(console.log(m.userId),e.value.userId=m.userId,_=await ia(e.value)):_=await ma(e.value),_.list.forEach(l=>{l.showSetting=!1}),y.value=_.list,J.value=_.total}finally{A.value=!1,h.value=!1,W()}},ut=_=>{e.value.tabType=_.paneName,p()},W=async()=>{const _=s({});let l;m.merchantId?(_.value.merId=m.merchantId,l=await pa(_.value)):l=await da(_.value),f.value[0].count=0;for(let i in l)(i<=1||i==="4")&&(f.value[0].count+=l[i]),f.value[Number(i)+1].count=l[i]},I=()=>{p()},it=()=>{e.value.categoryId=void 0,e.value.createTime=void 0,e.value.name="",e.value.tabType="",I()},V=s(),X=(_,l,i,S)=>{V.value.open(_,l,i,S)},Z=s();return Ut(()=>{p()}),Pt(async()=>{await W(),await p();const _=await fa({});Z.value=ca(_,"id","parentId")}),(_,l)=>{const i=Qt,S=qt,$=Bt,v=Lt,mt=At,G=Jt,pt=Wt,k=Xt,dt=Zt,yt=$t,ft=Gt,O=Ot,tt=ta,ht=aa,vt=_a,gt=Tt,bt=kt,xt=jt("hasPermi");return c(),d(bt,{style:{},class:"container"},{default:o(()=>[u.userId?C("",!0):(c(),b("div",P,[a(w)?C("",!0):(c(),d(S,{key:0,modelValue:a(e).tabType,"onUpdate:modelValue":l[0]||(l[0]=t=>a(e).tabType=t),onTabClick:ut,class:"parent-tabs"},{default:o(()=>[(c(!0),b(z,null,E(a(f),t=>(c(),d(i,{key:t.type,label:t.name+"("+t.count+")",name:t.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),n("div",j,[r(mt,{modelValue:a(e).name,"onUpdate:modelValue":l[1]||(l[1]=t=>a(e).name=t),placeholder:"\u641C\u7D22\u5546\u54C1\u540D\u79F0",onKeyup:Nt(I,["enter"]),class:"!w-240px"},{suffix:o(()=>[r($,{class:"el-input__icon",onClick:I,style:{cursor:"pointer"}},{default:o(()=>[r(a(Yt))]),_:1})]),append:o(()=>[r(v,{icon:a(Rt),onClick:st},null,8,["icon"])]),_:1},8,["modelValue"]),a(w)||u.isDetail||u.merchantId?C("",!0):U((c(),d(v,{key:0,onClick:l[2]||(l[2]=t=>X("create","",0)),class:"ml-5px"},{default:o(()=>[r(G,{class:"mr-5px",icon:"ep:plus"}),T(" \u65B0\u589E ")]),_:1})),[[xt,["product:spu:create"]]])])])),U(n("div",N,[r(ht,{ref_key:"queryFormRef",ref:nt,inline:!0,model:a(e),class:"-mb-15px","label-width":"68px"},{default:o(()=>[r(k,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:o(()=>[r(pt,{modelValue:a(e).categoryId,"onUpdate:modelValue":l[3]||(l[3]=t=>a(e).categoryId=t),options:a(Z),props:a(ua),clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options","props"])]),_:1}),r(k,{label:"\u5546\u54C1\u72B6\u6001",prop:""},{default:o(()=>[r(yt,{modelValue:a(e).tabType,"onUpdate:modelValue":l[4]||(l[4]=t=>a(e).tabType=t),placeholder:"\u5168\u90E8"},{default:o(()=>[(c(!0),b(z,null,E(a(f),t=>(c(),d(dt,{key:t.type,label:t.name,value:t.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),r(k,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:o(()=>[r(ft,{style:{"margin-right":"unset",width:"auto !important"},modelValue:a(e).createTime,"onUpdate:modelValue":l[5]||(l[5]=t=>a(e).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}),r(tt,null,{default:o(()=>[r(O,null,{default:o(()=>[r(k,null,{default:o(()=>[r(v,{onClick:ct},{default:o(()=>[T(" \u6536\u8D77 ")]),_:1}),r(v,{onClick:it},{default:o(()=>[T(" \u91CD\u7F6E ")]),_:1}),r(v,{onClick:I,plain:"",type:"primary"},{default:o(()=>[r(G,{class:"mr-5px",icon:"ep:search"}),T(" \u641C\u7D22 ")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])],512),[[et,a(h)]]),r(tt,null,{default:o(()=>[(c(!0),b(z,null,E(a(y),(t,D)=>(c(),d(O,{class:"card",key:D,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:M=>function(g){y.value[g].showSetting=!0}(D),onMouseout:M=>function(g){y.value[g].showSetting=!1}(D)},{default:o(()=>[r(vt,{onClick:M=>((g,at,wt)=>{const It=at.id;w.value?_t({name:"ProductSpuMobileDetail",params:{id:It}}):V.value.open(g,at,wt)})("view",t,a(lt).RECYCLE.status,a(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:t.name},x(t.name),9,R),U(n("div",{onClick:Ht(M=>X("update",t,a(lt).RECYCLE.status,a(e).tabType),["stop"]),class:"setting"},[r($,{size:"20",color:"rgb(220 223 231)"},{default:o(()=>[r(a(Ft))]),_:1})],8,H),[[et,t.showSetting&&!a(w)&&!u.merchantId&&!u.userId]])]),n("div",F,[n("div",K,[n("img",{src:t.picUrl,style:{width:"100%",height:"100%","object-fit":"cover","object-position":"center"}},null,8,Q)]),n("div",q,[n("p",null,"\xA5"+x(a(Kt)(t.price)),1),n("p",null,"\u9500\u91CF:"+x(t.salesCount),1),n("p",null,"\u5E93\u5B58:"+x(t.stock),1),n("p",null,"\u72B6\u6001:"+x(t.status==1?"\u4E0A\u67B6":"\u4E0B\u67B6"),1)])])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),a(y).length==0?(c(),b("div",B,[...L])):C("",!0),r(gt,{limit:a(e).pageSize,"onUpdate:limit":l[6]||(l[6]=t=>a(e).pageSize=t),page:a(e).pageNo,"onUpdate:page":l[7]||(l[7]=t=>a(e).pageNo=t),total:a(J),onPagination:p},null,8,["limit","page","total"]),r(va,{ref_key:"formRef",ref:V,onSuccess:p},null,512)]),_:1})}}}),[["__scopeId","data-v-b78c7ed6"],["__file","D:/zx/mall-newfeifan-zx-admin/src/views/mall/product/spu/index.vue"]])});export{ae as __tla,rt as default};
|