2024-11-21 17:27:37 +08:00
|
|
|
import{C as q,D as I,w as M,F as W,L as K,M as O,N as Q,O as Z}from"./element-plus.91c68cc0.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.863ae816.js";import{f as G,b as H}from"./index.d12b3af4.js";import{u as J}from"./usePaging.f8c888e4.js";import{u as X}from"./useDictOptions.1f11cf62.js";import{e as Y,a as ee}from"./warehouse.90507ca7.js";import{d as h,s as oe,r as B,Z as te,af as le,ap as ae,o as r,c as ue,U as o,L as t,u as l,R as i,M as f,K as d,a as k,S as ne,j as se,Q as re,n as g}from"./@vue.76ce7aa3.js";import"./lodash.4e6d2a38.js";import{_ as ie}from"./edit.vue_vue_type_script_setup_true_name_warehouseEdit_lang.22bc9142.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"./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.e03c2e5b.js";import"./index.vue_vue_type_style_index_0_scoped_d380c88d_lang.cf0d972e.js";const pe={class:"mt-4"},me={class:"flex mt-4 justify-end"},de=h({name:"warehouseLists"}),oo=h({...de,setup(ce){const _=oe(),w=B(!1),s=te({name:"",contacts:"",tel:""}),E=B([]),y=n=>{E.value=n.map(({id:e})=>e)},{dictData:V}=X(""),{pager:c,getLists:v,resetParams:x,resetPage:$}=J({fetchFun:ee,params:s}),L=async()=>{var n;w.value=!0,await g(),(n=_.value)==null||n.open("add")},S=async n=>{var e,p;w.value=!0,await g(),(e=_.value)==null||e.open("edit"),(p=_.value)==null||p.setFormData(n)},b=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await Y({id:n}),v()};return v(),(n,e)=>{const p=q,C=I,m=M,A=W,D=K,N=H,u=O,P=le("router-link"),R=Q,U=z,F=ae("perms"),T=Z;return r(),ue("div",null,[o(D,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[o(A,{class:"mb-[-16px]",model:l(s),inline:""},{default:t(()=>[o(C,{label:"\u4ED3\u5E93\u540D\u79F0",prop:"name"},{default:t(()=>[o(p,{class:"w-[280px]",modelValue:l(s).name,"onUpdate:modelValue":e[0]||(e[0]=a=>l(s).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u4ED3\u5E93\u540D\u79F0"},null,8,["modelValue"])]),_:1}),o(C,{label:"\u8054\u7CFB\u4EBA\u5458",prop:"contacts"},{default:t(()=>[o(p,{class:"w-[280px]",modelValue:l(s).contacts,"onUpdate:modelValue":e[1]||(e[1]=a=>l(s).contacts=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u4EBA\u5458"},null,8,["modelValue"])]),_:1}),o(C,{label:"\u8054\u7CFB\u7535\u8BDD",prop:"tel"},{default:t(()=>[o(p,{class:"w-[280px]",modelValue:l(s).tel,"onUpdate:modelValue":e[2]||(e[2]=a=>l(s).tel=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u8054\u7CFB\u7535\u8BDD"},null,8,["modelValue"])]),_:1}),o(C,null,{default:t(()=>[o(m,{type:"primary",onClick:l($)},{default:t(()=>e[6]||(e[6]=[i("\u67E5\u8BE2")])),_:1},8,["onClick"]),o(m,{onClick:l(x)},{default:t(()=>e[7]||(e[7]=[i("\u91CD\u7F6E")])),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((r(),d(D,{class:"!border-none",shadow:"never"},{default:t(()=>[f((r(),d(m,{type:"primary",onClick:L},{icon:t(()=>[o(N,{name:"el-icon-Plus"})]),default:t(()=>[e[8]||(e[8]=i(" \u65B0\u589E "))]),_:1})),[[F,["admin.warehouse/add"]]]),f((r(),d(m,{disabled:!l(E).length,onClick:e[3]||(e[3]=a=>b(l(E)))},{default:t(()=>e[9]||(e[9]=[i(" \u5220\u9664 ")])),_:1},8,["disabled"])),[[F,["admin.warehouse/delete"]]]),k("div",pe,[o(R,{data:l(c).lists,onSelectionChange:y},{default:t(()=>[o(u,{type:"sel
|