moreShopAdmin/build/admin/assets/index.00f25136.js

2 lines
5.4 KiB
JavaScript

import{C as q,D as O,w as Q,F as Z,L as z,M as G,N as H,O as J}from"./element-plus.91c68cc0.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as X,b as Y}from"./index.0e5577f4.js";import{d as h,r as F,Z as tt,ap as et,o as i,c as ot,U as o,L as a,u as e,aa as at,R as s,M as m,K as r,a as x,S as nt,j as lt,Q as P,n as g}from"./@vue.76ce7aa3.js";import{u as it}from"./usePaging.f8c888e4.js";import{u as st}from"./useDictOptions.1cd81cc1.js";import{b as rt,e as ut,a as dt}from"./store_product_unit.30d9f204.js";import{_ as pt}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.39e3b8fa.js";import{_ as mt}from"./edit.vue_vue_type_script_setup_true_name_unitEdit_lang.8db307a3.js";import"./lodash-es.f52bd8b1.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.9ffef7f8.js";import"./@element-plus.73235148.js";import"./dayjs.0112e2c7.js";import"./@babel.80d29b7b.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.4e6d2a38.js";import"./axios.cffda5ac.js";import"./jspdf.6c61b9d3.js";import"./fflate.0418c72f.js";import"./vue-router.10bd5b90.js";import"./pinia.f3529286.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.b502f541.js";import"./vue-clipboard3.e775fc74.js";import"./clipboard.6417898a.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.8d65305c.js";import"./index.395bb96e.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const ct={class:"mt-4"},_t={class:"flex mt-4 justify-end"},ft=h({name:"unitLists"}),le=h({...ft,setup(vt){const c=F(null),w=F(null),b=F(!1),D=F(!1),k=tt({name:"",py:"",number:"",data:"",more:""}),y=F([]),L=l=>{y.value=l.map(({id:t})=>t)},{dictData:E}=st(""),{pager:_,getLists:f,resetParams:R,resetPage:S}=it({fetchFun:dt,params:k}),U=async()=>{var l;b.value=!0,await g(),(l=c.value)==null||l.open("add")},N=async l=>{var t,u;console.log(c.value),b.value=!0,await g(),(t=c.value)==null||t.open("edit"),(u=c.value)==null||u.setFormData(l)},K=async l=>{var u,v;let t=await rt({id:l});D.value=!0,await g(),(u=w.value)==null||u.open("edit"),(v=w.value)==null||v.setFormData(t)},B=async l=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ut({id:l}),f()};return f(),(l,t)=>{const u=q,v=O,d=Q,T=Z,V=z,I=Y,p=G,j=H,A=W,C=et("perms"),M=J;return i(),ot("div",null,[o(V,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[o(T,{class:"mb-[-16px]",model:e(k),inline:""},{default:a(()=>[o(v,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name"},{default:a(()=>[o(u,{class:"w-[280px]",modelValue:e(k).name,"onUpdate:modelValue":t[0]||(t[0]=n=>e(k).name=n),onKeydown:at(e(S),["enter"]),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0"},null,8,["modelValue","onKeydown"])]),_:1}),o(v,null,{default:a(()=>[o(d,{type:"primary",onClick:e(S)},{default:a(()=>t[5]||(t[5]=[s("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(d,{onClick:e(R)},{default:a(()=>t[6]||(t[6]=[s("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),m((i(),r(V,{class:"!border-none",shadow:"never"},{default:a(()=>[m((i(),r(d,{type:"primary",onClick:U},{icon:a(()=>[o(I,{name:"el-icon-Plus"})]),default:a(()=>[t[7]||(t[7]=s(" \u65B0\u589E "))]),_:1})),[[C,["store_product_unit.store_product_unit/add"]]]),m((i(),r(d,{disabled:!e(y).length,onClick:t[1]||(t[1]=n=>B(e(y)))},{default:a(()=>t[8]||(t[8]=[s(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[C,["store_product_unit.store_product_unit/delete"]]]),x("div",ct,[o(j,{data:e(_).lists,onSelectionChange:L},{default:a(()=>[o(p,{type:"selection",width:"55"}),o(p,{label:"ID",prop:"id",width:"55"}),o(p,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),o(p,{label:"\u5355\u4F4D\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),o(p,{label:"\u662F\u5426\u6563\u88C5",prop:"is_bulk","show-overflow-tooltip":""},{default:a(({row:n})=>[s(nt(n.is_bulk?"\u662F":"\u5426"),1)]),_:1}),o(p,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),o(p,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:a(({row:n})=>[m((i(),r(d,{type:"primary",link:"",onClick:$=>N(n)},{default:a(()=>t[9]||(t[9]=[s(" \u7F16\u8F91 ")])),_:2},1032,["onClick"])),[[C,["store_product_unit.store_product_unit/edit"]]]),m((i(),r(d,{type:"danger",link:"",onClick:$=>B(n.id)},{default:a(()=>t[10]||(t[10]=[s(" \u5220\u9664 ")])),_:2},1032,["onClick"])),[[C,["store_product_unit.store_product_unit/delete"]]]),m((i(),r(d,{link:"",onClick:$=>K(n.id)},{default:a(()=>t[11]||(t[11]=[s(" \u8BE6\u60C5 ")])),_:2},1032,["onClick"])),[[C,["store_product_unit.store_product_unit/edit"]]])]),_:1})]),_:1},8,["data"])]),x("div",_t,[o(A,{modelValue:e(_),"onUpdate:modelValue":t[2]||(t[2]=n=>lt(_)?_.value=n:null),onChange:e(f)},null,8,["modelValue","onChange"])])]),_:1})),[[M,e(_).loading]]),e(b)?(i(),r(mt,{key:0,ref_key:"editRef",ref:c,"dict-data":e(E),onSuccess:e(f),onClose:t[3]||(t[3]=n=>b.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0),e(D)?(i(),r(pt,{key:1,ref_key:"detailRef",ref:w,"dict-data":e(E),onSuccess:e(f),onClose:t[4]||(t[4]=n=>D.value=!1)},null,8,["dict-data","onSuccess"])):P("",!0)])}}});export{le as default};