2024-07-20 16:30:26 +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.7b9d0c0d.js";import{_ as ae}from"./index.vue_vue_type_script_setup_true_lang.8b9de773.js";import{d as I,r as D,Z as le,af as re,ap as ue,o as i,c as se,U as e,L as o,u as l,aa as ie,R as p,M as c,K as n,a as z,j as pe}from"./@vue.18505fe0.js";import{u as ne}from"./usePaging.6a6670f9.js";import{u as de}from"./useDictOptions.d682158e.js";import{f as me,d as ce}from"./store_product.0fe1d118.js";import"./lodash.9dc701ad.js";import{f as _e}from"./index.dbb361e6.js";import{_ as fe}from"./details.vue_vue_type_script_setup_true_name_storeProductDETAILS_lang.3feaa76a.js";import{a as we}from"./store_category.297d76c6.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"./system_store.52f24937.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_style_index_0_scoped_d380c88d_lang.d9a16ced.js";const Ce={class:"mt-4"},ve={class:"flex mt-4 justify-end"},be=I({name:"storeProductLists"}),so=I({...be,setup(ge){const V=he(),h=D(null),_=le({store_name:"",class_all:""}),C=D([]),R=u=>{C.value=u.map(({id:a})=>a)};de("");let x=1;V.query.page_no&&(x=parseInt(V.query.page_no));const{pager:f,getLists:v,resetParams:S,resetPage:b}=ne({page:x,fetchFun:ce,params:_}),A=async u=>{var a,m;(a=h.value)==null||a.open(),(m=h.value)==null||m.setFormData(u)};let g,y;const E=D(!1);let F;const K=u=>(F=u,E.value=!0,L.lazyLoad(y,g),!1),L={value:"id",label:"name",emitPath:!1,lazy:!0,lazyLoad(u,a){g||(g=a),y||(y=u);const m=u.value||0;let d={};E.value?(d={name:F},F||(d={pid:m,page_size:1e4})):d={pid:m,page_size:1e4},we({...d}).then(k=>{a(k.lists.map(s=>(s.leaf=!0,E.value=!1,s)))})}},P=async u=>{await _e.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:u}),v()};return v(),(u,a)=>{const m=H,d=J,k=Z,s=Q,N=W,$=X,B=re("router-link"),t=Y,T=ee,q=G,U=oe,j=ae,w=ue("perms"),M=te;return i(),se("div",null,[e($,{class:"!border-none mb-4",shadow:"never"},{default:o(()=>[e(N,{class:"mb-[-16px]",model:l(_),inline:""},{default:o(()=>[e(d,{label:"\u5546\u54C1\u540D\u79F0",prop:"store_name"},{default:o(()=>[e(m,{class:"w-[280px]",onKeydown:ie(l(b),["enter"]),modelValue:l(_).store_name,"onUpdate:modelValue":a[0]||(a[0]=r=>l(_).store_name=r),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5546\u54C1\u540D\u79F0"},null,8,["onKeydown","modelValue"])]),_:1}),e(d,{label:"\u5546\u54C1\u5206\u7C7B",prop:"store_name"},{default:o(()=>[e(k,{class:"w-[280px]",modelValue:l(_).class_all,"onUpdate:modelValue":a[1]||(a[1]=r=>l(_).class_all=r),filterable:"",clearable:"","before-filter":K,props:L,placeholder:"\u8BF7\u9009\u62E9\u5546\u54C1\u5206\u7C7B",onChange:l(b)},null,8,["modelValue","onChange"])]),_:1}),e(d,null,{default:o(()=>[e(s,{type:"primary",onClick:l(b)},{default:o(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(s,{onClick:l(S)},{default:o(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),c((i(),n($,{class:"!border-none",shadow:"never"},{default:o(()=>[c((i(),n(B,{to:{path:"store_product_edit",query:{id:0,mode:"add"}},class:"mr-4"},{default:o(()=>[e(s,{type:"primary",icon:"Plus"},{default:o(()=>[p(" \u65B0\u589E ")]),_:1})]),_:1})),[[w,["store_product.store_product/add"]]]),c((i(),n(s,{disabled:!l(C).length,onClick:a[2]||(a[2]=r=>P(l(
|