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

2 lines
5.8 KiB
JavaScript

import{C as K,D as M,w as O,F as Z,T as z,O as G,Q as H,R as J}from"./element-plus.bccb9376.js";import{_ as W}from"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import{f as X,b as Y}from"./index.ac7c1248.js";import{u as ee}from"./usePaging.6a6670f9.js";import{u as te}from"./useDictOptions.f22931fb.js";import{b as oe,e as ae,a as le}from"./unit.ba50c0f8.js";import{_ as ne}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.67d75eb8.js";import{_ as ie}from"./edit.vue_vue_type_script_setup_true_name_unitEdit_lang.0063a0af.js";import{d as R,r as b,Z as re,ap as se,o as i,c as ue,U as t,L as a,u as o,R as p,M as _,K as s,a as x,j as me,Q as $,n as y}from"./@vue.18505fe0.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.a6528143.js";import"./@babel.16688d44.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.js";import"./lodash.466e9fe4.js";import"./axios.4905d81f.js";import"./jspdf.54afd842.js";import"./fflate.fca59393.js";import"./vue-router.101084e3.js";import"./pinia.a969beab.js";import"./css-color-function.29b71fa4.js";import"./color.87d313dc.js";import"./clone.a63396d9.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"./vue-plugin-hiprint.a2d84e76.js";import"./jquery.c3f97e49.js";import"./jsbarcode.39151b53.js";import"./socket.io-client.0b5a7289.js";import"./engine.io-client.81030771.js";import"./engine.io-parser.c748e159.js";import"./@socket.io.77accf6a.js";import"./debug.b392f131.js";import"./socket.io-parser.b7256298.js";import"./html2canvas.0f5947bc.js";import"./canvg.a673c4b2.js";import"./core-js.97b94d69.js";import"./raf.407ad6ad.js";import"./performance-now.a710f6e4.js";import"./rgbcolor.20c71161.js";import"./svg-pathdata.eba17832.js";import"./stackblur-canvas.0fb5df18.js";import"./nprogress.3461658b.js";import"./vue-clipboard3.c63182fd.js";import"./clipboard.dd2c63d0.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./index.8f1b3064.js";const pe={class:"mt-4"},de={class:"flex mt-4 justify-end"},ce=R({name:"unitLists"}),bt=R({...ce,setup(_e){const f=b(null),k=b(null),D=b(!1),w=b(!1),d=re({name:"",py:"",number:"",data:"",more:""}),g=b([]),U=n=>{g.value=n.map(({id:e})=>e)},{dictData:E}=te(""),{pager:F,getLists:v,resetParams:S,resetPage:L}=ee({fetchFun:le,params:d}),P=async()=>{var n;D.value=!0,await y(),(n=f.value)==null||n.open("add")},T=async n=>{var e,r;console.log(f.value),D.value=!0,await y(),(e=f.value)==null||e.open("edit"),(r=f.value)==null||r.setFormData(n)},N=async n=>{var r,c;let e=await oe({id:n});w.value=!0,await y(),(r=k.value)==null||r.open("edit"),(c=k.value)==null||c.setFormData(e)},h=async n=>{await X.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await ae({id:n}),v()};return v(),(n,e)=>{const r=K,c=M,u=O,I=Z,V=z,j=Y,m=G,A=H,Q=W,C=se("perms"),q=J;return i(),ue("div",null,[t(V,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[t(I,{class:"mb-[-16px]",model:o(d),inline:""},{default:a(()=>[t(c,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name"},{default:a(()=>[t(r,{class:"w-[280px]",modelValue:o(d).name,"onUpdate:modelValue":e[0]||(e[0]=l=>o(d).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u540D\u79F0"},null,8,["modelValue"])]),_:1}),t(c,{label:"\u5355\u4F4D\u7F16\u53F7",prop:"number"},{default:a(()=>[t(r,{class:"w-[280px]",modelValue:o(d).number,"onUpdate:modelValue":e[1]||(e[1]=l=>o(d).number=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5355\u4F4D\u7F16\u53F7"},null,8,["modelValue"])]),_:1}),t(c,null,{default:a(()=>[t(u,{type:"primary",onClick:o(L)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),t(u,{onClick:o(S)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((i(),s(V,{class:"!border-none",shadow:"never"},{default:a(()=>[_((i(),s(u,{type:"primary",onClick:P},{icon:a(()=>[t(j,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[C,["goods.unit/add"]]]),_((i(),s(u,{disabled:!o(g).length,onClick:e[2]||(e[2]=l=>h(o(g)))},{default:a(()=>[p(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[C,["goods.unit/delete"]]]),x("div",pe,[t(A,{data:o(F).lists,onSelectionChange:U},{default:a(()=>[t(m,{type:"selection",width:"55"}),t(m,{label:"ID",prop:"id",width:"55"}),t(m,{label:"\u5355\u4F4D\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),t(m,{label:"\u5355\u4F4D\u7F16\u53F7",prop:"number","show-overflow-tooltip":""}),t(m,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),t(m,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more","show-overflow-tooltip":""}),t(m,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:a(({row:l})=>[_((i(),s(u,{type:"primary",link:"",onClick:B=>T(l)},{default:a(()=>[p(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[C,["goods.unit/edit"]]]),_((i(),s(u,{type:"danger",link:"",onClick:B=>h(l.id)},{default:a(()=>[p(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[C,["goods.unit/delete"]]]),_((i(),s(u,{link:"",onClick:B=>N(l.id)},{default:a(()=>[p(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])),[[C,["goods.unit/edit"]]])]),_:1})]),_:1},8,["data"])]),x("div",de,[t(Q,{modelValue:o(F),"onUpdate:modelValue":e[3]||(e[3]=l=>me(F)?F.value=l:null),onChange:o(v)},null,8,["modelValue","onChange"])])]),_:1})),[[q,o(F).loading]]),o(D)?(i(),s(ie,{key:0,ref_key:"editRef",ref:f,"dict-data":o(E),onSuccess:o(v),onClose:e[4]||(e[4]=l=>D.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0),o(w)?(i(),s(ne,{key:1,ref_key:"detailRef",ref:k,"dict-data":o(E),onSuccess:o(v),onClose:e[5]||(e[5]=l=>w.value=!1)},null,8,["dict-data","onSuccess"])):$("",!0)])}}});export{bt as default};