ERP-admin/build/admin/assets/index.b48ab341.js

2 lines
6.1 KiB
JavaScript

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.9990c39e.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.b5094f82.js";import{a as ge,d as ke}from"./index.9424646f.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":"\u4E0A\u67B6","inactive-text":"\u4E0B\u67B6",onClick:p=>R(e.row)},null,8,["modelValue","onUpdate:modelValue","onClick"])]),_:1})):y("",!0),u.value.type<=4?(r(),_(n,{key:1,label:"\u5546\u54C1\u72B6\u6001",width:"100"},{default:l(e=>[e.row.is_used?e.row.is_show?(r(),f("span",Ce,"\u4E0A\u67B6\u663E\u793A")):(r(),f("span",be,"\u4E0B\u67B6")):(r(),f("span",he,"\u5E73\u53F0\u5173\u95ED"))]),_:1})):y("",!0),t(n,{label:"\u64CD\u4F5C",width:"120"},{default:l(e=>[u.value.type!=5?(r(),_(c,{key:0,type:"primary",link:"",onClick:p=>T(e.row)},{default:l(()=>[m("\u4FEE\u6539\u5E93\u5B58")]),_:2},1032,["onClick"])):y("",!0),u.value.type!=1&&u.value.type!=5?(r(),_(c,{key:1,type:"primary",link:"",onClick:p=>F("edit",e.row)},{default:l(()=>[m("\u7F16\u8F91")]),_:2},1032,["onClick"])):y("",!0)]),_:1})]),_:1},8,["data"]),t(G,{"page-size":u.value.limit,layout:"prev, pager, next",total:C.value,onPrevClick:S,onNextClick:$,onCurrentChange:U},null,8,["page-size","total"]),t(q,{modelValue:v.value,"onUpdate:modelValue":a[6]||(a[6]=e=>v.value=e),title:"\u7F16\u8F91\u5546\u54C1\u5E93\u5B58",width:"800"},{footer:l(()=>[A("div",Be,[t(c,{onClick:a[5]||(a[5]=e=>v.value=!1)},{default:l(()=>[m("\u53D6\u6D88")]),_:1}),t(c,{type:"primary",onClick:L},{default:l(()=>[m(" \u786E\u5B9A ")]),_:1})])]),default:l(()=>[i.value.attrValue?(r(),_(D,{key:0,data:i.value.attrValue,stripe:"",style:{width:"100%"}},{default:l(()=>[t(n,{prop:"image",label:"\u56FE\u7247",width:"180"},{default:l(e=>[t(x,{loading:"lazy",style:{width:"5rem",height:"5rem"},src:e.row.image||i.value.image},null,8,["src"])]),_:1}),t(n,{prop:"sku",label:"\u540D\u79F0",width:"180"},{default:l(e=>[A("span",null,I(e.row.sku||i.value.store_name),1)]),_:1}),t(n,{prop:"price",label:"\u4EF7\u683C"}),t(n,{prop:"stock",label:"\u5E93\u5B58"},{default:l(e=>[t(O,{modelValue:e.row.stock,"onUpdate:modelValue":p=>e.row.stock=p,"step-strictly":"",min:0,step:1},null,8,["modelValue","onUpdate:modelValue"])]),_:1})]),_:1},8,["data"])):y("",!0)]),_:1},8,["modelValue"]),t(_e,{ref_key:"addRef",ref:V,onReload:a[7]||(a[7]=e=>s(!0))},null,512)])),[[H,g.value]])}}});const nt=ke(Ve,[["__scopeId","data-v-fde2514d"]]);export{nt as default};