moreShopAdmin/build/admin/assets/index.09149e68.js

2 lines
5.8 KiB
JavaScript

import{T as R,C as S,D as q,w as U,F as j,L as A,M,b as O,N as Z,O as z}from"./element-plus.78e68aed.js";import{_ as G}from"./index.vue_vue_type_script_setup_true_lang.3c4454b7.js";import{d as B,r as k,Z as H,af as J,ap as Q,o as i,c as W,U as e,L as o,u as l,aa as X,R as s,M as d,K as u,a as D,j as Y}from"./@vue.18505fe0.js";import{u as ee}from"./usePaging.6a6670f9.js";import{u as oe}from"./useDictOptions.e2d02908.js";import{f as te,d as ae}from"./store_product.185261c2.js";import"./lodash.60201f64.js";import{f as le}from"./index.f985d63e.js";import{_ as re}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.c60741e8.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.8ae0c638.js";import"./axios.2b8d80bd.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./system_store.8210a48c.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.b82a2ce7.js";import"./color.b905eb26.js";import"./clone.e1fb2883.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.495afef3.js";import"./vue-clipboard3.cb649e18.js";import"./clipboard.4592e390.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_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const ie={class:"mt-4"},se={class:"flex mt-4 justify-end"},ue=B({name:"storeProductLists"}),He=B({...ue,setup(ne){const h=k(null),_=H({store_name:"",cate_id:""}),w=k([]),x=p=>{console.log(p),w.value=p.map(({id:r})=>r)};oe("");const{pager:c,getLists:C,resetParams:V,resetPage:v}=ee({fetchFun:ae,params:_}),P=async p=>{var r,f;(r=h.value)==null||r.open(),(f=h.value)==null||f.setFormData(p)},y=async p=>{await le.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await te({id:p}),C()};return C(),(p,r)=>{const f=S,E=q,n=U,L=j,g=A,b=J("router-link"),t=M,T=O,F=R,$=Z,I=G,m=Q("perms"),K=z;return i(),W("div",null,[e(g,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(L,{class:"mb-[-16px]",model:l(_),inline:""},{default:o(()=>[e(E,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(f,{class:"w-[280px]",onKeydown:X(l(v),["enter"]),modelValue:l(_).store_name,"onUpdate:modelValue":r[0]||(r[0]=a=>l(_).store_name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(E,null,{default:o(()=>[e(n,{type:"primary",onClick:l(v)},{default:o(()=>[s("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(n,{onClick:l(V)},{default:o(()=>[s("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),d((i(),u(g,{class:"!border-none",shadow:"never"},{default:o(()=>[d((i(),u(b,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:o(()=>[e(n,{type:"primary",icon:"Plus"},{default:o(()=>[s(" \u65B0\u589E ")]),_:1})]),_:1})),[[m,["store_product.store_product/add"]]]),d((i(),u(n,{disabled:!l(w).length,onClick:r[1]||(r[1]=a=>y(l(w)))},{default:o(()=>[s(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[m,["store_product.store_product/delete"]]]),d((i(),u(b,{to:{path:"product_import"},class:"ml-4"},{default:o(()=>[e(n,{type:"primary"},{default:o(()=>[s(" \u5BFC\u5165\u5546\u54C1\u5230\u95E8\u5E97 ")]),_:1})]),_:1})),[[m,["store_product.store_product/add"]]]),D("div",ie,[e($,{data:l(c).lists,onSelectionChange:x},{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:a})=>[e(T,{style:{width:"50px",height:"50px"},src:a.image},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:"\u5546\u54C1\u4EF7\u683C",prop:"price","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u6210\u672C\u4EF7",prop:"cost","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u91C7\u8D2D\u4EF7",prop:"purchase","min-width":"100","show-overflow-tooltip":""}),e(t,{label:"\u5E93\u5B58",prop:"stock","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:a})=>[a.is_show?(i(),u(F,{key:0,type:"success"},{default:o(()=>[s(" \u4E0A\u67B6 ")]),_:1})):(i(),u(F,{key:1,type:"info"},{default:o(()=>[s(" \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:a})=>[d((i(),u(b,{to:{path:"store_product_edit",query:{id:a.id,mode:"edit"}},class:"mr-4"},{default:o(()=>[e(n,{type:"primary",link:""},{default:o(()=>[s(" \u7F16\u8F91 ")]),_:1})]),_:2},1032,["to"])),[[m,["store_product.store_product/edit"]]]),d((i(),u(n,{type:"primary",link:"",onClick:N=>P(a)},{default:o(()=>[s(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[m,["store_product.store_product/edit"]]]),d((i(),u(n,{type:"danger",link:"",onClick:N=>y(a.id)},{default:o(()=>[s(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[m,["store_product.store_product/delete"]]])]),_:1})]),_:1},8,["data"])]),D("div",se,[e(I,{modelValue:l(c),"onUpdate:modelValue":r[2]||(r[2]=a=>Y(c)?c.value=a:null),onChange:l(C)},null,8,["modelValue","onChange"])])]),_:1})),[[K,l(c).loading]]),e(re,{ref_key:"detailsRef",ref:h},null,512)])}}});export{He as default};