moreShopAdmin/build/admin/assets/index.285d4bc1.js

2 lines
6.9 KiB
JavaScript

import{a6 as Z,$ as G,C as H,D as J,w as Q,F as W,L as X,M as Y,b as ee,N as oe,O as te}from"./element-plus.4a7d92a3.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.5d4e738c.js";import{d as I,r as k,Z as ae,af as re,ap as se,o as i,c as ue,U as e,L as o,u as a,aa as ie,R as n,M as f,K as m,a as z,j as ne}from"./@vue.18505fe0.js";import{u as pe}from"./usePaging.6a6670f9.js";import{u as me}from"./useDictOptions.44e45292.js";import{f as de,e as ce}from"./store_product.5b7083db.js";import"./lodash.9dc701ad.js";import{f as _e}from"./index.61122cf1.js";import{_ as fe}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.d3708f01.js";import{a as we}from"./store_category.6dfd5402.js";import{u as he}from"./vue-router.101084e3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.7347fedc.js";import"./axios.4607972f.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./pinia.a969beab.js";import"./css-color-function.bb8c34b2.js";import"./color.fbd63fe8.js";import"./clone.31a3aa2c.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.0d2736b7.js";import"./vue-clipboard3.7d5a7a5d.js";import"./clipboard.860a1cea.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.vue_vue_type_script_setup_true_name_systemStoreLists_lang.ad88061a.js";import"./system_store.e4bc79d0.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ve={class:"mt-4"},be={class:"flex mt-4 justify-end"},Ce=I({name:"storeProductLists"}),io=I({...Ce,setup(ge){const D=he(),h=k(null),c=ae({store_name:"",class_all:""}),v=k([]),R=s=>{v.value=s.map(({id:l})=>l)};me("");let V=1;D.query.page_no&&(V=parseInt(D.query.page_no));const{pager:_,getLists:b,resetParams:S,resetPage:C}=pe({page:V,fetchFun:ce,params:c}),A=async s=>{var l,d;(l=h.value)==null||l.open(),(d=h.value)==null||d.setFormData(s)};let g,y;const E=k(!1);let F;const K=s=>(F=s,E.value=!0,x.lazyLoad(y,g),!1),x={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(s,l){g||(g=l),y||(y=s);const d=s.value||0;let p={};E.value?(p={name:F},F||(p={pid:d,page_size:1e4})):p={pid:d,page_size:1e4},we({...p}).then(B=>{l(B.lists.map(u=>(u.leaf=!0,E.value=!1,u)))})}},L=async s=>{await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await de({id:s}),b()};return b(),(s,l)=>{const d=H,p=J,B=Z,u=Q,N=W,P=X,$=re("router-link"),t=Y,T=ee,q=G,U=oe,j=le,w=se("perms"),M=te;return i(),ue("div",null,[e(P,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(N,{class:"mb-[-16px]",model:a(c),inline:""},{default:o(()=>[e(p,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(d,{class:"w-[280px]",onKeydown:ie(a(C),["enter"]),modelValue:a(c).store_name,"onUpdate:modelValue":l[0]||(l[0]=r=>a(c).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(p,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:o(()=>[e(B,{class:"w-[280px]",modelValue:a(c).class_all,"onUpdate:modelValue":l[1]||(l[1]=r=>a(c).class_all=r),filterable:"",clearable:"","before-filter":K,props:x,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:a(C)},null,8,["modelValue","onChange"])]),_:1}),e(p,null,{default:o(()=>[e(u,{type:"primary",onClick:a(C)},{default:o(()=>[n("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(u,{onClick:a(S)},{default:o(()=>[n("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),m(P,{class:"!border-none",shadow:"never"},{default:o(()=>[f((i(),m($,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:o(()=>[e(u,{type:"primary",icon:"Plus"},{default:o(()=>[n(" \u65B0\u589E ")]),_:1})]),_:1})),[[w,["store_product.store_product/add"]]]),f((i(),m(u,{disabled:!a(v).length,onClick:l[2]||(l[2]=r=>L(a(v)))},{default:o(()=>[n(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["store_product.store_product/delete"]]]),z("div",ve,[e(U,{data:a(_).lists,onSelectionChange:R},{default:o(()=>[e(t,{type:"selection",width:"55"}),e(t,{label:"\u5546\u54C1ID",prop:"id","show-overflow-tooltip":""}),e(t,{label:"\u5546\u54C1\u56FE\u7247",prop:"image","min-width":"80"},{default:o(({row:r})=>[e(T,{style:{width:"50px",height:"50px"},src:r.image,"preview-teleported":!0},null,8,["src"])]),_:1}),e(t,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name","min-width":"200","show-overflow-tooltip":""}),e(t,{label:"\u5206\u7C7B",prop:"cate_name","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u5355\u4F4D",prop:"unit_name","min-width":"80","show-overflow-tooltip":""}),e(t,{label:"\u4F9B\u8D27\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5546\u6237\u4EF7",prop:"cost","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u4F1A\u5458\u4EF7",prop:"vip_price","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u7EC8\u7AEF\u96F6\u552E\u4EF7",prop:"price","min-width":"120","show-overflow-tooltip":""}),e(t,{label:"\u8D77\u6279\u91CF",prop:"batch","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u6BDB\u5229\u7387",prop:"rose","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u552E\u5356\u5E93\u5B58",prop:"stock","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5151\u6362\u5E93\u5B58",prop:"swap","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u9500\u91CF",prop:"sales","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u72B6\u6001",prop:"is_show"},{default:o(({row:r})=>[r.is_show?(i(),m(q,{key:0,type:"success"},{default:o(()=>[n(" \u4E0A\u67B6 ")]),_:1})):(i(),m(q,{key:1,type:"info"},{default:o(()=>[n(" \u4E0B\u67B6 ")]),_:1}))]),_:1}),e(t,{label:"\u6761\u7801",prop:"bar_code","min-width":"200","show-overflow-tooltip":""}),e(t,{label:"\u64CD\u4F5C",width:"180",fixed:"right"},{default:o(({row:r})=>[f((i(),m($,{to:{path:"store_product_edit",query:{id:r.id,mode:"edit",page:a(_).page}},class:"mr-4"},{default:o(()=>[e(u,{type:"primary",link:""},{default:o(()=>[n(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[w,["store_product.store_product/edit"]]]),f((i(),m(u,{type:"primary",link:"",onClick:O=>A(r)},{default:o(()=>[n(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/edit"]]]),f((i(),m(u,{type:"danger",link:"",onClick:O=>L(r.id)},{default:o(()=>[n(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),z("div",be,[e(j,{modelValue:a(_),"onUpdate:modelValue":l[3]||(l[3]=r=>ne(_)?_.value=r:null),onChange:a(b)},null,8,["modelValue","onChange"])])]),_:1})),[[M,a(_).loading]]),e(fe,{ref_key:"detailsRef",ref:h},null,512)])}}});export{io as default};