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