index-c1b5ce92.js 9.3 KB

1
  1. import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-f3ab50e7.js";import{_ as de}from"./index.vue_vue_type_script_setup_true_lang-24521fcb.js";import{d as ce,y as ye,e as ve,u as fe,r as s,x as he,b as be,o as r,A as v,B as i,c as y,a as t,F as T,P as U,E as g,C as u,f as o,dC as ge,aA as Ie,a2 as _e,l as G,v as J,G as A,D as x,aB as ke,aC as we,dD as xe,H as Ve,n as Ce,a7 as Se,a8 as Te,aD as Ue,L as Me,a6 as De,Q as Pe,R as Ee,S as Ne,b0 as Ye,K as ze,_ as Ae,M as Fe,U as Re,J as je}from"./index-39d329c4.js";import{E as Be}from"./el-card-5cc80b8a.js";import{h as He,d as Le}from"./tree-fd3a041e.js";import{P as K}from"./constants-c811e5ff.js";import{I as qe}from"./ImageCard-f40b19b2.js";import{b as Ge,c as Je,d as Ke}from"./spu-42eb31d6.js";import{g as Oe}from"./index-256096f6.js";import{g as Qe}from"./category-c00e0426.js";import We from"./index-aecdcd72.js";import{u as Xe}from"./useMessage-47346882.js";import{_ as $e}from"./_plugin-vue_export-helper-1b428a4d.js";import"./index-e66b1f22.js";import"./SPuUploadImg-9f0e4322.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-94e6c5c2.js";import"./index-0c406c8d.js";import"./el-image-viewer-b66eac2e.js";import"./tagsView-58b1e0b4.js";import"./InfoForm-d9a495ce.js";import"./UploadImgs-07e5001f.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-86ec22fb.js";import"./brand-1652160e.js";import"./formRules-28b76147.js";import"./DescriptionForm-585c3dff.js";import"./style.css_vue_type_style_index_0_src_true_lang-1943bea4.js";import"./OtherForm-83aabced.js";import"./SkuForm-a1225c0e.js";import"./index-427d19a8.js";import"./SkuList.vue_vue_type_script_setup_true_lang-b3fce1b7.js";import"./el-image-7f18c10a.js";import"./UploadImg-e9385982.js";import"./UploadFile.vue_vue_type_style_index_0_scoped_a9e67aa2_lang-3dfd3bb9.js";import"./ProductAttributes.vue_vue_type_script_setup_true_lang-ce724c10.js";import"./el-text-df6ae3a1.js";import"./property-6fe07e5d.js";import"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-b7f52f1b.js";import"./Dialog-6a91c005.js";import"./DeliveryForm-83f1fc30.js";import"./index-5cb7d45f.js";import"./dict-0856c143.js";import"./Service-274f1ff0.js";import"./index-d1c9b307.js";import"./AfterSale-90d6e284.js";import"./Comment-63c94789.js";import"./Apply-a6dab1e4.js";import"./formatTime-4c4af720.js";import"./permission-dcb08c6d.js";const Ze={key:0,class:"search"},ea={style:{"text-align":"right"},class:"search-input"},aa={class:"searchMore"},ta={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},la=["title"],oa=["onClick"],ia={class:"flex items-center"},ra={key:0,class:"points-red"},pa={key:1,class:"points-green"},na={class:"ml-3px"},sa={key:1},ua=$e(ce({name:"ProductSpu",__name:"index",props:{merchantId:{type:Number,default:void 0},userId:{type:Number,default:void 0},isDetail:{type:Boolean,default:!1}},setup(f){const O=ye(),M=ve(()=>O.getMobile),h=f;Xe(),Ve();const{push:Q}=fe(),D=s(!1);s(!1);const P=s(0),I=s([]),W=s(178),m=he([{name:"\u5F85\u5BA1\u6838",type:"-1",count:0},{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:"-1",name:"",categoryId:void 0,createTime:void 0,shopId:void 0,checkStatus:1}),X=s(),_=s(!1),$=()=>{_.value=!_.value},Z=()=>{_.value=!1},b=async()=>{D.value=!0,l.value.tabType==="-1"?l.value.checkStatus=0:l.value.checkStatus=1,h.merchantId&&(l.value.merchantId=h.merchantId);try{let p;h.userId?(l.value.userId=h.userId,p=await Ge(l.value)):p=await Je(l.value),p.list.forEach(a=>{a.showSetting=!1}),I.value=p.list,P.value=p.total}finally{D.value=!1,_.value=!1,F()}},ee=p=>{l.value.tabType=p.paneName,b()},F=async()=>{const p=s({...l.value});h.merchantId&&(p.value.merId=h.merchantId);const a=await Ke(p.value);for(let n in m)m[n].type==="-1"?m[n].count=a[-1]:m[n].type===""?m[n].count=a[0]+a[1]+a[4]:m[n].count=a[m[n].type]},V=()=>{b()},ae=()=>{l.value.categoryId=void 0,l.value.createTime=void 0,l.value.name="",l.value.tabType="",l.value.shopId=void 0,V()},E=s(),R=s();let j=s([]);return be(async()=>{await(async()=>{D.value=!0;const a=await Oe();j.value=a})(),await F(),await b().then(()=>{P.value===0&&(l.value.tabType="",b())});const p=await Qe({});R.value=He(p,"id","parentId"),Ce(()=>{const a=document.querySelectorAll(".card-img");let n=1/0;a.forEach(N=>{const k=N.clientWidth;k<n&&(n=k)}),n!==1/0&&(W.value=n)})}),(p,a)=>{const n=Se,N=Te,k=Ue,C=Me,te=De,B=Pe,H=Ee,S=Ne,le=Ye,oe=ze,ie=Ae,L=Fe,re=Re,pe=Be,ne=je,se=de,ue=me;return r(),v(ue,{style:{},class:"container"},{default:i(()=>[f.userId?g("",!0):(r(),y("div",Ze,[t(M)?g("",!0):(r(),v(N,{key:0,modelValue:t(l).tabType,"onUpdate:modelValue":a[0]||(a[0]=e=>t(l).tabType=e),onTabClick:ee,class:"parent-tabs"},{default:i(()=>[(r(!0),y(T,null,U(t(m),e=>(r(),v(n,{key:e.type,label:e.name+"("+e.count+")",name:e.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),u("div",ea,[o(te,{modelValue:t(l).name,"onUpdate:modelValue":a[1]||(a[1]=e=>t(l).name=e),placeholder:"\u5546\u54C1\u540D\u79F0",onKeyup:_e(V,["enter"]),class:"!w-240px"},{suffix:i(()=>[o(k,{class:"el-input__icon",onClick:V,style:{cursor:"pointer"}},{default:i(()=>[o(t(ge))]),_:1})]),append:i(()=>[o(C,{icon:t(Ie),onClick:$},null,8,["icon"])]),_:1},8,["modelValue"])])])),G(u("div",aa,[o(re,{ref_key:"queryFormRef",ref:X,inline:!0,model:t(l),class:"-mb-15px","label-width":"80px"},{default:i(()=>[f.merchantId||f.userId?g("",!0):(r(),v(S,{key:0,label:"\u5E97\u94FA\u540D\u79F0"},{default:i(()=>[o(H,{modelValue:t(l).shopId,"onUpdate:modelValue":a[2]||(a[2]=e=>t(l).shopId=e),placeholder:"\u8BF7\u9009\u62E9",filterable:""},{default:i(()=>[(r(!0),y(T,null,U(t(j),e=>(r(),v(B,{key:e.id,label:e.name,value:e.id},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1})),o(S,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:i(()=>[o(le,{modelValue:t(l).categoryId,"onUpdate:modelValue":a[3]||(a[3]=e=>t(l).categoryId=e),options:t(R),props:t(Le),clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options","props"])]),_:1}),o(S,{label:"\u5546\u54C1\u72B6\u6001",prop:""},{default:i(()=>[o(H,{modelValue:t(l).tabType,"onUpdate:modelValue":a[4]||(a[4]=e=>t(l).tabType=e),placeholder:"\u5168\u90E8"},{default:i(()=>[(r(!0),y(T,null,U(t(m),e=>(r(),v(B,{key:e.type,label:e.name,value:e.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(S,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:i(()=>[o(oe,{style:{"margin-right":"unset",width:"auto !important"},modelValue:t(l).createTime,"onUpdate:modelValue":a[5]||(a[5]=e=>t(l).createTime=e),"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}),o(L,{class:"pb-20px flex justify-end"},{default:i(()=>[o(C,{onClick:Z},{default:i(()=>a[8]||(a[8]=[A(" \u6536\u8D77 ")])),_:1}),o(C,{onClick:ae},{default:i(()=>a[9]||(a[9]=[A(" \u91CD\u7F6E ")])),_:1}),o(C,{onClick:V,plain:"",type:"primary"},{default:i(()=>[o(ie,{class:"mr-5px",icon:"ep:search"}),a[10]||(a[10]=A(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1},8,["model"])],512),[[J,t(_)]]),o(L,null,{default:i(()=>[(r(!0),y(T,null,U(t(I),(e,Y)=>(r(),v(ne,{class:"card",key:Y,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:z=>function(d){I.value[d].showSetting=!0}(Y),onMouseout:z=>function(d){I.value[d].showSetting=!1}(Y)},{default:i(()=>[o(pe,{onClick:z=>{return d="view",c=e,w=t(K).RECYCLE.status,t(l).tabType,void(M.value?Q({name:"ProductSpuMobileDetail",params:{id:c.id,applyMemberUserId:c.applyMemberUserId,checkStatus:c.checkStatus}}):E.value.open(d,c,w));var d,c,w}},{default:i(()=>[u("div",ta,[u("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},x(e.name),9,la),G(u("div",{onClick:ke(z=>{return d="update",c=e,w=t(K).RECYCLE.status,q=t(l).tabType,void E.value.open(d,c,w,q);var d,c,w,q},["stop"]),class:"setting"},[o(k,{size:"20",color:"rgb(220 223 231)"},{default:i(()=>[o(t(we))]),_:1})],8,oa),[[J,e.showSetting&&!t(M)&&!f.merchantId&&!f.userId]])]),o(qe,{url:e.picUrl,width:178,height:100},{label:i(()=>[u("div",ia,[e.areaId===1?(r(),y("div",ra)):g("",!0),e.areaId===2?(r(),y("div",pa)):g("",!0),u("span",na,x(e.highPrecision?(e.highPrecisionPrice/100).toFixed(6):t(xe)(e.price)),1)]),u("p",null,"\u9500\u91CF:"+x(e.salesCount),1),u("p",null,"\u5E93\u5B58:"+x(e.stock),1),u("p",null,"\u72B6\u6001:"+x(e.checkStatus?e.status==1?"\u4E0A\u67B6":"\u4E0B\u67B6":"\u5BA1\u6838\u4E2D"),1)]),_:2},1032,["url"])]),_:2},1032,["onClick"])]),_:2},1032,["onMouseover","onMouseout"]))),128))]),_:1}),t(I).length==0?(r(),y("div",sa,a[11]||(a[11]=[u("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u54C1",-1)]))):g("",!0),o(se,{limit:t(l).pageSize,"onUpdate:limit":a[6]||(a[6]=e=>t(l).pageSize=e),page:t(l).pageNo,"onUpdate:page":a[7]||(a[7]=e=>t(l).pageNo=e),total:t(P),onPagination:b},null,8,["limit","page","total"]),o(We,{ref_key:"formRef",ref:E,onSuccess:b},null,512)]),_:1})}}}),[["__scopeId","data-v-f3535f5e"]]);export{ua as default};