2024-08-06 20:14:31 +08:00
|
|
|
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.a63a26dd.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.ecb80feb.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.01b6a4d4.js";import{f as de,e as ce}from"./store_product.2d7e1c11.js";import"./lodash.2473fc51.js";import{f as _e}from"./index.038cab91.js";import{_ as fe}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.9f6bd1bb.js";import{a as we}from"./store_category.b66d9788.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.4884cfc2.js";import"./axios.932d3f8a.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./pinia.a969beab.js";import"./css-color-function.9f6a56f3.js";import"./color.d1bc3784.js";import"./clone.83700f2e.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.fcc9be76.js";import"./vue-clipboard3.9e751565.js";import"./clipboard.dda64e67.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.29ffc48b.js";import"./system_store.cd137b2d.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_produc
|