ERP-admin/build/admin/assets/index.fc07d326.js

2 lines
5.4 KiB
JavaScript

import{C as j,D as A,w as M,F as q,L as K,M as O,N as Q,O as Z}from"./element-plus.73c9e9a6.js";import{_ as z}from"./index.vue_vue_type_script_setup_true_lang.317e431e.js";import{f as G,b as H}from"./index.bd5cd373.js";import{u as J}from"./usePaging.77fa9d39.js";import{u as W}from"./useDictOptions.3ea9a314.js";import{e as X,a as Y}from"./unit.14e32b28.js";import"./lodash.403d4198.js";import{_ as ee}from"./edit.vue_vue_type_script_setup_true_name_unitEdit_lang.03bcffee.js";import{d as k,s as oe,r as V,Z as le,ap as te,o as i,c as ae,U as e,L as t,u as o,R as d,M as f,K as c,a as g,j as ue,Q as ne,n as y}from"./@vue.663bc523.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.4b5afb22.js";import"./@element-plus.8b1118e2.js";import"./dayjs.3f38f327.js";import"./axios.18becb61.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./vue-router.58fac957.js";import"./pinia.068f0ef2.js";import"./vue-demi.b3a9cad9.js";import"./css-color-function.e6143ca6.js";import"./color.d79aa98b.js";import"./clone.a63396d9.js";import"./color-convert.69e17089.js";import"./color-string.e356f5de.js";import"./color-name.e7a4e1d3.js";import"./nprogress.48cb4095.js";import"./vue-clipboard3.6d09ff6e.js";import"./clipboard.564aa4b9.js";import"./echarts.8485a033.js";import"./zrender.b2f30540.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.85e4ac8b.js";import"./index.fa58e261.js";const se={class:"mt-4"},re={class:"flex mt-4 justify-end"},ie=k({name:"unitLists"}),Ze=k({...ie,setup(me){const _=oe(),b=V(!1),u=le({name:"",py:"",number:"",data:"",more:""}),w=V([]),h=n=>{w.value=n.map(({id:l})=>l)},{dictData:x}=W(""),{pager:F,getLists:C,resetParams:B,resetPage:U}=J({fetchFun:Y,params:u}),$=async()=>{var n;b.value=!0,await y(),(n=_.value)==null||n.open("add")},L=async n=>{var l,s;b.value=!0,await y(),(l=_.value)==null||l.open("edit"),(s=_.value)==null||s.setFormData(n)},E=async n=>{await G.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await X({id:n}),C()};return C(),(n,l)=>{const s=j,m=A,p=M,N=q,D=K,P=H,r=O,R=Q,S=z,v=te("perms"),T=Z;return i(),ae("div",null,[e(D,{class:"!border-none mb-4",shadow:"never"},{default:t(()=>[e(N,{class:"mb-[-16px]",model:o(u),inline:""},{default:t(()=>[e(m,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).name,"onUpdate:modelValue":l[0]||(l[0]=a=>o(u).name=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).py,"onUpdate:modelValue":l[1]||(l[1]=a=>o(u).py=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u62FC\u97F3\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u5355\u4F4D\u7F16\u53F7",prop:"number"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).number,"onUpdate:modelValue":l[2]||(l[2]=a=>o(u).number=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).data,"onUpdate:modelValue":l[3]||(l[3]=a=>o(u).data=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(m,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more"},{default:t(()=>[e(s,{class:"w-[280px]",modelValue:o(u).more,"onUpdate:modelValue":l[4]||(l[4]=a=>o(u).more=a),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6269\u5C55\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(m,null,{default:t(()=>[e(p,{type:"primary",onClick:o(U)},{default:t(()=>[d("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:o(B)},{default:t(()=>[d("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),f((i(),c(D,{class:"!border-none",shadow:"never"},{default:t(()=>[f((i(),c(p,{type:"primary",onClick:$},{icon:t(()=>[e(P,{name:"el-icon-Plus"})]),default:t(()=>[d(" \u65B0\u589E ")]),_:1})),[[v,["goods.unit/add"]]]),f((i(),c(p,{disabled:!o(w).length,onClick:l[5]||(l[5]=a=>E(o(w)))},{default:t(()=>[d(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[v,["goods.unit/delete"]]]),g("div",se,[e(R,{data:o(F).lists,onSelectionChange:h},{default:t(()=>[e(r,{type:"selection",width:"55"}),e(r,{label:"ID",prop:"id",width:"55"}),e(r,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(r,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py","show-overflow-tooltip":""}),e(r,{label:"\u5355\u4F4D\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),e(r,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(r,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more","show-overflow-tooltip":""}),e(r,{label:"\u64CD\u4F5C",width:"120",fixed:"right"},{default:t(({row:a})=>[f((i(),c(p,{type:"primary",link:"",onClick:I=>L(a)},{default:t(()=>[d(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[v,["goods.unit/edit"]]]),f((i(),c(p,{type:"danger",link:"",onClick:I=>E(a.id)},{default:t(()=>[d(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[v,["goods.unit/delete"]]])]),_:1})]),_:1},8,["data"])]),g("div",re,[e(S,{modelValue:o(F),"onUpdate:modelValue":l[6]||(l[6]=a=>ue(F)?F.value=a:null),onChange:o(C)},null,8,["modelValue","onChange"])])]),_:1})),[[T,o(F).loading]]),o(b)?(i(),c(ee,{key:0,ref_key:"editRef",ref:_,"dict-data":o(x),onSuccess:o(C),onClose:l[7]||(l[7]=a=>b.value=!1)},null,8,["dict-data","onSuccess"])):ne("",!0)])}}});export{Ze as default};