ERP-admin/build/admin/assets/index.1978a077.js

2 lines
6.3 KiB
JavaScript

import{C as G,D as H,K as J,L as W,w as X,F as Y,T as ee,O as oe,Q as te,R as ae}from"./element-plus.bccb9376.js";import{_ as le}from"./index.vue_vue_type_script_setup_true_lang.120de7ce.js";import{_ as ne}from"./index.vue_vue_type_script_setup_true_lang.2914ee54.js";import{f as ie,b as se}from"./index.ac7c1248.js";import{u as re}from"./usePaging.6a6670f9.js";import{u as ue}from"./useDictOptions.f22931fb.js";import{a as pe,d as me,e as de}from"./code.658003a1.js";import{_ as ce}from"./edit.vue_vue_type_script_setup_true_name_codeEdit_lang.6b547b26.js";import{_ as _e}from"./detail.vue_vue_type_script_setup_true_name_brandEdit_lang.f4014c05.js";import{d as T,s as x,r as h,Z as fe,ap as ve,o as s,c as R,U as e,L as a,u as o,T as Ce,a9 as ye,K as r,R as m,M as v,a as L,j as be,Q as S,n as D}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 we={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},ke=T({name:"codeLists"}),xo=T({...ke,setup(Ee){const C=x(),k=x(),y=h(!1),E=h(!1),d=fe({name:"",py:"",code:"",type:"",data:"",more:"",sort:""}),g=h([]),P=n=>{g.value=n.map(({id:t})=>t)},{dictData:b}=ue("code_type"),{pager:_,getLists:f,resetParams:N,resetPage:U}=re({fetchFun:de,params:d}),I=async()=>{var n;y.value=!0,await D(),(n=C.value)==null||n.open("add")},j=async n=>{var t,u;y.value=!0,await D(),(t=C.value)==null||t.open("edit"),(u=C.value)==null||u.setFormData(n)},A=async n=>{var u,c;let t=await pe({id:n});E.value=!0,await D(),(u=k.value)==null||u.open("edit"),(c=k.value)==null||c.setFormData(t)},B=async n=>{await ie.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await me({id:n}),f()};return f(),(n,t)=>{const u=G,c=H,V=J,K=W,p=X,O=Y,$=ee,Q=se,i=oe,q=ne,M=te,Z=le,w=ve("perms"),z=ae;return s(),R("div",null,[e($,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(O,{class:"mb-[-16px]",model:o(d),inline:""},{default:a(()=>[e(c,{label:"\u6761\u7801\u540D\u79F0",prop:"name"},{default:a(()=>[e(u,{class:"w-[280px]",modelValue:o(d).name,"onUpdate:modelValue":t[0]||(t[0]=l=>o(d).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6761\u7801\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(c,{label:"\u6761\u7801\u7C7B\u578B",prop:"type"},{default:a(()=>[e(K,{class:"w-[280px]",modelValue:o(d).type,"onUpdate:modelValue":t[1]||(t[1]=l=>o(d).type=l),clearable:"",placeholder:"\u8BF7\u9009\u62E9\u6761\u7801\u7C7B\u578B"},{default:a(()=>[e(V,{label:"\u5168\u90E8",value:""}),(s(!0),R(Ce,null,ye(o(b).code_type,(l,F)=>(s(),r(V,{key:F,label:l.name,value:l.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])]),_:1}),e(c,null,{default:a(()=>[e(p,{type:"primary",onClick:o(U)},{default:a(()=>[m("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(p,{onClick:o(N)},{default:a(()=>[m("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),v((s(),r($,{class:"!border-none",shadow:"never"},{default:a(()=>[v((s(),r(p,{type:"primary",onClick:I},{icon:a(()=>[e(Q,{name:"el-icon-Plus"})]),default:a(()=>[m(" \u65B0\u589E ")]),_:1})),[[w,["goods.code/add"]]]),v((s(),r(p,{disabled:!o(g).length,onClick:t[2]||(t[2]=l=>B(o(g)))},{default:a(()=>[m(" \u5220\u9664 ")]),_:1},8,["disabled"])),[[w,["goods.code/delete"]]]),L("div",we,[e(M,{data:o(_).lists,onSelectionChange:P},{default:a(()=>[e(i,{type:"selection",width:"55"}),e(i,{label:"ID",prop:"id",width:"55"}),e(i,{label:"\u6761\u7801\u540D\u79F0",prop:"name","show-overflow-tooltip":""}),e(i,{label:"\u62FC\u97F3\u4FE1\u606F",prop:"py","show-overflow-tooltip":""}),e(i,{label:"\u6761\u7801\u5185\u5BB9",prop:"code","show-overflow-tooltip":""}),e(i,{label:"\u6761\u7801\u7C7B\u578B",prop:"type"},{default:a(({row:l})=>[e(q,{options:o(b).code_type,value:l.type},null,8,["options","value"])]),_:1}),e(i,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data","show-overflow-tooltip":""}),e(i,{label:"\u6269\u5C55\u4FE1\u606F",prop:"more","show-overflow-tooltip":""}),e(i,{label:"\u6392\u5E8F",prop:"sort","show-overflow-tooltip":""}),e(i,{label:"\u64CD\u4F5C",width:"170",fixed:"right"},{default:a(({row:l})=>[v((s(),r(p,{type:"primary",link:"",onClick:F=>j(l)},{default:a(()=>[m(" \u7F16\u8F91 ")]),_:2},1032,["onClick"])),[[w,["goods.code/edit"]]]),v((s(),r(p,{type:"danger",link:"",onClick:F=>B(l.id)},{default:a(()=>[m(" \u5220\u9664 ")]),_:2},1032,["onClick"])),[[w,["goods.code/delete"]]]),e(p,{link:"",onClick:F=>A(l.id)},{default:a(()=>[m(" \u8BE6\u60C5 ")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])]),L("div",Fe,[e(Z,{modelValue:o(_),"onUpdate:modelValue":t[3]||(t[3]=l=>be(_)?_.value=l:null),onChange:o(f)},null,8,["modelValue","onChange"])])]),_:1})),[[z,o(_).loading]]),o(y)?(s(),r(ce,{key:0,ref_key:"editRef",ref:C,"dict-data":o(b),onSuccess:o(f),onClose:t[4]||(t[4]=l=>y.value=!1)},null,8,["dict-data","onSuccess"])):S("",!0),o(E)?(s(),r(_e,{key:1,ref_key:"detailRef",ref:k,"dict-data":o(b),onSuccess:o(f),onClose:t[5]||(t[5]=l=>E.value=!1)},null,8,["dict-data","onSuccess"])):S("",!0)])}}});export{xo as default};