2024-05-16 10:05:14 +08:00
|
|
|
import{S as J,k as E,C as W,D as X,w as Y,F as Z,d as ee,f as te,O as ae,b as le,t as oe,Q as ue,v as ne,G as se,R as re}from"./element-plus.8c800afc.js";import{d as ie,r as d,M as de,o as r,c as f,U as t,L as l,aa as pe,R as m,T as me,a9 as ce,K as _,S as I,Q as y,a as A}from"./@vue.18505fe0.js";import{a as _e,p as ve,s as fe,u as ye,b as we}from"./add.a8553da5.js";import{a as ge,d as ke}from"./index.2398c167.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.ef95d8c0.js";import"./axios.77245e3c.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.be6e4bb5.js";import"./vue-router.886c5f5a.js";import"./pinia.a969beab.js";import"./css-color-function.6061d63f.js";import"./color.1580a89c.js";import"./clone.4ed29f58.js";import"./color-convert.755d189f.js";import"./color-name.e7a4e1d3.js";import"./color-string.e356f5de.js";import"./balanced-match.d2a36341.js";import"./ms.564e106c.js";import"./nprogress.b29ee5e2.js";import"./vue-clipboard3.15c43b43.js";import"./clipboard.4a3580c9.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";const Ee={"element-loading-text":"\u52A0\u8F7D\u4E2D",class:"my-shop"},he={key:0,style:{color:"#ff4a00"}},Ce={key:1},be={key:2},Be={class:"dialog-footer"},Ve=ie({__name:"index",setup(Fe){const h=d([]),w=ge(),u=d({page:1,limit:15,type:1,keyword:"",staff_id:w.userInfo.service.service_id}),g=d(!1),C=d(0),b=d([]),B=()=>{ve(w.userInfo.service.mer_id).then(o=>{b.value=o.data})};B();const s=(o=!1)=>{g.value=!0,o&&B(),fe(w.userInfo.service.mer_id,u.value).then(a=>{h.value=a.data.list,C.value=a.data.count,g.value=!1})};s();const S=o=>{u.value.page=o,s()},$=o=>{u.value.page=o,s()},U=o=>{u.value.page=o,s()},v=d(!1),i=d({}),T=o=>{i.value=o,v.value=!0},L=()=>{let o={attr:i.value.attr||[],attrValue:i.value.attrValue,mer_cate_id:i.value.merCateId||[],spec_type:i.value.spec_type,is_stock:1};ye(i.value.product_id,o).then(a=>{E({message:a.message,type:"success"}),v.value=!1,s()}).catch(a=>{E({message:a,type:"error"})})},N=d("1"),z=o=>{u.value.type=o,u.value.page=1,s()},R=o=>{we(w.userInfo.service.mer_id,o.product_id,{status:o.is_show?1:0}).then(a=>{E.success(a.message),s(!0)})},V=d(null),F=(o="add",a)=>{V.value.show(o,a)};return(o,a)=>{const M=W,k=X,c=Y,K=Z,P=ee,Q=te,n=ae,x=le,j=oe,D=ue,G=J,O=ne,q=se,H=re;return de((r(),f("div",Ee,[t(K,{inline:!0},{default:l(()=>[t(k,{label:"\u5173\u952E\u5B57:"},{default:l(()=>[t(M,{modelValue:u.value.keyword,"onUpdate:modelValue":a[0]||(a[0]=e=>u.value.keyword=e),placeholder:"\u8BF7\u8F93\u5165\u5173\u952E\u5B57\u641C\u7D22",style:{width:"20rem"},clearable:"",onClear:a[1]||(a[1]=e=>s(!0)),onKeydown:a[2]||(a[2]=pe(e=>s(!0),["enter"]))},null,8,["modelValue"])]),_:1}),t(k,null,{default:l(()=>[t(c,{type:"primary",onClick:a[3]||(a[3]=e=>s(!0))},{default:l(()=>[m("\u641C\u7D22")]),_:1})]),_:1}),t(k,null,{default:l(()=>[t(c,{type:"primary",onClick:a[4]||(a[4]=e=>F("add"))},{default:l(()=>[m("\u65B0\u589E")]),_:1})]),_:1})]),_:1}),t(Q,{"default-active":N.value,class:"el-menu-top",mode:"horizontal",onSelect:z},{default:l(()=>[(r(!0),f(me,null,ce(b.value,(e,p)=>(r(),_(P,{index:e.type+"",key:p},{default:l(()=>[m(I(`${e.name}(${e.count})`),1)]),_:2},1032,["index"]))),128))]),_:1},8,["default-active"]),t(D,{data:h.value,style:{width:"100%"}},{default:l(()=>[t(n,{prop:"product_id",label:"ID",width:"100"}),t(n,{prop:"image",label:"\u56FE\u7247",width:"120"},{default:l(e=>[t(x,{loading:"lazy",style:{width:"60px",height:"60px"},src:e.row.image},null,8,["src"])]),_:1}),t(n,{prop:"store_name",label:"\u5546\u54C1\u540D\u79F0",width:"500"}),t(n,{prop:"price",label:"\u552E\u4EF7"}),t(n,{prop:"stock",label:"\u5E93\u5B58"}),u.value.type<=2?(r(),_(n,{key:0,label:"\u4E0A/\u4E0B\u67B6",width:"100"},{default:l(e=>[t(j,{modelValue:e.row.is_show,"onUpdate:modelValue":p=>e.row.is_show=p,"active-value":1,"inline-prompt":"","active-text"
|