index-e36b830e.js 8.7 KB

1
  1. import{_ as me}from"./ContentWrap.vue_vue_type_script_setup_true_lang-e908c5dd.js";import{_ as ce}from"./index.vue_vue_type_script_setup_true_lang-6fb625ff.js";import{d as de,b as ye,e as fe,z as ve,u as he,r as u,f as ge,az as be,x as _e,Q as ke,o as r,j as y,w as i,k as s,a as t,c,F as U,A as D,l as b,i as o,R as xe,e7 as we,dF as Ie,B as E,m as w,a4 as K,t as _,b8 as Ce,dI as Te,aY as Ve,W as Se,X as Me,aN as Ue,q as De,V as Ee,_ as Pe,aU as ze,G as Ye,C as Ne,D as Fe,p as Re,s as je,H as He,E as qe}from"./index-df709923.js";import{E as Be}from"./el-card-91c2276d.js";import{I as Ke}from"./ImageCard-ec4b959a.js";import{h as Le,d as Ae}from"./tree-fd3a041e.js";import{d as L}from"./constants-e43f22dd.js";import{h as Ge,e as Je}from"./spu-bd0a0feb.js";import{g as Qe}from"./category-d6126e80.js";import We from"./index-484b0ba0.js";import{u as Xe}from"./useMessage-89e9d1aa.js";import{_ as Ze}from"./_plugin-vue_export-helper-1b428a4d.js";import"./index-c8bd5ba7.js";import"./SPuUploadImg-8bef2528.js";import"./SPuUploadImg.vue_vue_type_style_index_0_scoped_5dfa4534_lang-2a8cd6e4.js";import"./index-54511734.js";import"./el-image-viewer-90ad41b7.js";import"./InfoForm-5a0fe4a0.js";import"./UploadImgs-248b9428.js";import"./UploadImgs.vue_vue_type_style_index_0_scoped_bad238b9_lang-5cadf78a.js";import"./brand-e1ea0a4e.js";import"./formRules-392c4b03.js";import"./DescriptionForm-ee6f021f.js";import"./style.css_vue_type_style_index_0_src_true_lang-721caac6.js";import"./OtherForm-32e476ed.js";import"./SkuForm-14472bcf.js";import"./index-a422c2fb.js";import"./SkuList.vue_vue_type_script_setup_true_lang-feb0025f.js";import"./el-image-29d644a2.js";import"./UploadImg-15376c0d.js";import"./UploadFile.vue_vue_type_style_index_0_scoped_a9e67aa2_lang-2736ca2c.js";import"./PcComponents.css_vue_type_style_index_0_src_ad579a09_scoped_ad579a09_lang-1b1c3834.js";import"./ProductAttributes.vue_vue_type_script_setup_true_lang-14272e1b.js";import"./el-text-282afb9f.js";import"./property-5a066fc3.js";import"./ProductPropertyAddForm.vue_vue_type_script_setup_true_lang-ecc0bfc7.js";import"./Dialog-2f8bd685.js";import"./MobileSkuList-1fc1d29f.js";import"./DeliveryForm-f68a2837.js";import"./index-a193b0c0.js";import"./dict-017bf708.js";import"./Service-3c977fa5.js";import"./index-69e91744.js";import"./AfterSale-80d3bf6e.js";import"./index-d0bb183a.js";import"./Comment-bd38999c.js";import"./Apply-bfbf4b37.js";import"./formatTime-c6262bd7.js";const $e={class:"search"},Oe={style:{"text-align":"right"},class:"search-input"},ea={class:"searchMore"},aa={style:{display:"flex","justify-content":"space-between","align-items":"center","margin-bottom":"5px"}},ta=["title"],la=["onClick"],oa={class:"flex items-center"},ia={key:0,class:"points-red"},pa={key:1,class:"points-green"},ra={class:"ml-3px"},sa={key:0},na=Ze(de({name:"ProductSpu",__name:"index",props:{merchantId:{type:Number,default:0},isDetail:{type:Boolean,default:!1}},setup(A){const G=ye(),I=fe(()=>G.getMobile),k=A;Xe(),ve();const{push:J}=he(),P=u(!1);u(!1);const z=u(0),f=u([]),m=ge([{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=u({pageNo:1,pageSize:10,tabType:"",merchantId:0,name:"",categoryId:void 0,createTime:void 0}),Q=u(),v=u(!1),W=()=>{v.value=!v.value},X=()=>{v.value=!1},d=async()=>{P.value=!0,l.value.tabType==="-1"?l.value.checkStatus=0:l.value.checkStatus=1,k.merchantId&&(l.value.merchantId=k.merchantId);try{const p=await Ge(l.value);p.list.forEach(a=>{a.showSetting=!1}),f.value=p.list,z.value=p.total}finally{P.value=!1,v.value=!1,Y()}},Z=p=>{l.value.tabType=p.paneName,d()},Y=async()=>{const p=u({...l.value});k.merchantId&&(p.value.merId=k.merchantId);const a=await Je(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]},x=()=>{d()},$=()=>{l.value.categoryId=void 0,l.value.createTime=void 0,l.value.name="",l.value.tabType="",l.value.checkStatus=1,x()},C=u(),N=(p,a,n,T)=>{C.value.open(p,a,n,T)},F=u();return be(()=>{d()}),_e(async()=>{await Y(),await d();const p=await Qe({});F.value=Le(p,"id","parentId")}),(p,a)=>{const n=Se,T=Me,R=Ue,h=De,O=Ee,j=Pe,ee=ze,V=Ye,ae=Ne,te=Fe,le=Re,H=je,oe=He,ie=Be,pe=qe,re=ce,se=me,q=ke("hasPermi");return r(),y(se,{style:{},class:"container"},{default:i(()=>[s("div",$e,[t(I)?b("",!0):(r(),y(T,{key:0,modelValue:t(l).tabType,"onUpdate:modelValue":a[0]||(a[0]=e=>t(l).tabType=e),onTabClick:Z,class:"parent-tabs"},{default:i(()=>[(r(!0),c(U,null,D(t(m),e=>(r(),y(n,{key:e.type,label:e.name+"("+e.count+")",name:e.type},null,8,["label","name"]))),128))]),_:1},8,["modelValue"])),s("div",Oe,[o(O,{modelValue:t(l).name,"onUpdate:modelValue":a[1]||(a[1]=e=>t(l).name=e),placeholder:"\u5546\u54C1\u540D\u79F0",onKeyup:xe(x,["enter"]),class:"!w-240px"},{suffix:i(()=>[o(R,{class:"el-input__icon",onClick:x,style:{cursor:"pointer"}},{default:i(()=>[o(t(we))]),_:1})]),append:i(()=>[o(h,{icon:t(Ie),onClick:W},null,8,["icon"])]),_:1},8,["modelValue"]),t(I)?b("",!0):E((r(),y(h,{key:0,onClick:a[2]||(a[2]=e=>N("create","",0)),class:"ml-5px"},{default:i(()=>[o(j,{class:"mr-5px",icon:"ep:plus"}),a[8]||(a[8]=w(" \u65B0\u589E "))]),_:1})),[[q,["product:spu:create"]]])])]),E(s("div",ea,[o(oe,{ref_key:"queryFormRef",ref:Q,inline:!0,model:t(l),class:"-mb-15px","label-width":"80px"},{default:i(()=>[o(V,{label:"\u5546\u54C1\u5206\u7C7B",prop:"categoryId"},{default:i(()=>[o(ee,{modelValue:t(l).categoryId,"onUpdate:modelValue":a[3]||(a[3]=e=>t(l).categoryId=e),options:t(F),props:t(Ae),clearable:"",filterable:"",placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B"},null,8,["modelValue","options","props"])]),_:1}),o(V,{label:"\u5546\u54C1\u72B6\u6001",prop:""},{default:i(()=>[o(te,{modelValue:t(l).tabType,"onUpdate:modelValue":a[4]||(a[4]=e=>t(l).tabType=e),placeholder:"\u5168\u90E8"},{default:i(()=>[(r(!0),c(U,null,D(t(m),e=>(r(),y(ae,{key:e.type,label:e.name,value:e.type},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),o(V,{label:"\u521B\u5EFA\u65F6\u95F4",prop:"createTime"},{default:i(()=>[o(le,{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(H,{class:"pb-20px flex justify-end"},{default:i(()=>[o(h,{onClick:X},{default:i(()=>a[9]||(a[9]=[w(" \u6536\u8D77 ")])),_:1}),o(h,{onClick:$},{default:i(()=>a[10]||(a[10]=[w(" \u91CD\u7F6E ")])),_:1}),o(h,{onClick:x,plain:"",type:"primary"},{default:i(()=>[o(j,{class:"mr-5px",icon:"ep:search"}),a[11]||(a[11]=w(" \u641C\u7D22 "))]),_:1})]),_:1})]),_:1},8,["model"])],512),[[K,t(v)]]),o(H,null,{default:i(()=>[(r(!0),c(U,null,D(t(f),(e,S)=>(r(),y(pe,{class:"card",key:S,span:7,xl:7,lg:7,md:7,sm:24,xs:24,onMouseover:M=>function(g){f.value[g].showSetting=!0}(S),onMouseout:M=>function(g){f.value[g].showSetting=!1}(S)},{default:i(()=>[o(ie,{onClick:M=>((g,B,ne)=>{const ue=B.id;I.value?J({name:"ProductSpuMobileDetail",params:{id:ue}}):C.value.open(g,B,ne)})("view",e,t(L).RECYCLE.status,t(l).tabType)},{default:i(()=>[s("div",aa,[s("p",{style:{width:"100%","white-space":"nowrap","text-overflow":"ellipsis",overflow:"hidden","font-size":"16px",color:"#000"},title:e.name},_(e.name),9,ta),E((r(),c("div",{onClick:Ce(M=>N("update",e,t(L).RECYCLE.status,t(l).tabType),["stop"]),class:"setting"},[o(R,{size:"20",color:"rgb(220 223 231)"},{default:i(()=>[o(t(Te))]),_:1})],8,la)),[[K,e.showSetting&&e.checkStatus],[q,["product:spu:update"]]])]),o(Ke,{url:e.picUrl,width:178,height:100},{label:i(()=>[s("div",oa,[e.areaId===1?(r(),c("div",ia)):b("",!0),e.areaId===2?(r(),c("div",pa)):b("",!0),s("span",ra,_(e.highPrecision?(e.highPrecisionPrice/100).toFixed(6):t(Ve)(e.price)),1)]),s("p",null,"\u9500\u91CF:"+_(e.salesCount),1),s("p",null,"\u5E93\u5B58:"+_(e.stock),1),s("p",null,"\u72B6\u6001:"+_(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(f).length==0?(r(),c("div",sa,a[12]||(a[12]=[s("p",{style:{"text-align":"center","margin-top":"100px"}},"\u6682\u65E0\u5546\u54C1",-1)]))):b("",!0),o(re,{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(z),onPagination:d},null,8,["limit","page","total"]),o(We,{ref_key:"formRef",ref:C,onSuccess:d},null,512)]),_:1})}}}),[["__scopeId","data-v-235f8086"]]);export{na as default};