2024-05-21 13:42:22 +08:00
|
|
|
import{C as K,D as O,w as Z,F as z,T as H,O as J,b as W,Q as X,R as Y}from"./element-plus.619595c4.js";import{_ as ee}from"./index.vue_vue_type_script_setup_true_lang.02c63712.js";import{f as oe,b as te}from"./index.adbcc6f1.js";import{d as V,s as ae,r as k,Z as le,ap as se,o as u,c as ne,U as e,L as a,u as t,R as p,M as _,K as m,a as y,a3 as D,j as ie,Q as ue,n as B}from"./@vue.18505fe0.js";import{u as re}from"./usePaging.6a6670f9.js";import{u as de}from"./useDictOptions.2130484f.js";import{e as pe,a as me}from"./goodsclass.c924b0d4.js";import"./lodash.0987e768.js";import{u as ce,a as _e}from"./vue-router.101084e3.js";import{_ as fe}from"./edit.vue_vue_type_script_setup_true_name_goodsclassEdit_lang.e86b70fd.js";import"./lodash-es.bdeecbdb.js";import"./async-validator.fb49d0f5.js";import"./@vueuse.fbc6a400.js";import"./@element-plus.edbd5a83.js";import"./dayjs.6ad9ae30.js";import"./axios.fbe06b45.js";import"./@ctrl.b082b0c1.js";import"./normalize-wheel-es.8aeb3683.js";import"./@popperjs.36402333.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"./nprogress.316b9a3d.js";import"./vue-clipboard3.f9a42727.js";import"./clipboard.bf37ca4b.js";import"./echarts.5016c48c.js";import"./zrender.58d022a1.js";import"./tslib.60310f1a.js";import"./highlight.js.31cd7941.js";import"./@highlightjs.b0c09b66.js";import"./picker.cee998d0.js";import"./index.122ff80d.js";import"./index.a062bd93.js";import"./index.f9c4a330.js";import"./vuedraggable.4bfa7ed1.js";import"./vue.3bfea163.js";import"./sortablejs.2765eebe.js";const Ce={class:"mt-4"},Fe={class:"flex mt-4 justify-end"},ge=V({name:"goodsclassLists"}),ro=V({...ge,setup(Ee){var w;const f=ae(),C=k(!1),x=ce(),R=_e(),n=le({pid:((w=x.query)==null?void 0:w.pid)||0,name:"",data:"",pic:"",sort:""}),b=k([]),$=s=>{b.value=s.map(({id:o})=>o)},{dictData:I}=de(""),{pager:c,getLists:F,resetParams:L,resetPage:P}=re({fetchFun:me,params:n}),T=async()=>{var s;C.value=!0,await B(),(s=f.value)==null||s.open("add")},U=async s=>{var o,r;C.value=!0,await B(),(o=f.value)==null||o.open("edit"),(r=f.value)==null||r.setFormData(s)},v=async s=>{await oe.confirm("\u786E\u5B9A\u8981\u5220\u9664\uFF1F"),await pe({id:s}),F()};F();const N=(s,o)=>{if(o.no==7)return console.log("\u65E0\u6548\u70B9\u51FB");R.push({path:"/goods/goodsclass",query:{pid:s.id}})};return(s,o)=>{const r=K,g=O,d=Z,S=z,h=H,q=te,i=J,j=W,A=X,G=ee,E=se("perms"),M=Y;return u(),ne("div",null,[e(h,{class:"!border-none mb-4",shadow:"never"},{default:a(()=>[e(S,{class:"mb-[-16px] disabledEdit",model:t(n),inline:""},{default:a(()=>[e(g,{label:"\u5206\u7C7B\u540D\u79F0",prop:"name"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(n).name,"onUpdate:modelValue":o[0]||(o[0]=l=>t(n).name=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5206\u7C7B\u540D\u79F0"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u5907\u6CE8\u4FE1\u606F",prop:"data"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(n).data,"onUpdate:modelValue":o[1]||(o[1]=l=>t(n).data=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u5907\u6CE8\u4FE1\u606F"},null,8,["modelValue"])]),_:1}),e(g,{label:"\u6392\u5E8F",prop:"sort"},{default:a(()=>[e(r,{class:"w-[280px]",modelValue:t(n).sort,"onUpdate:modelValue":o[2]||(o[2]=l=>t(n).sort=l),clearable:"",placeholder:"\u8BF7\u8F93\u5165\u6392\u5E8F"},null,8,["modelValue"])]),_:1}),e(g,null,{default:a(()=>[e(d,{type:"primary",onClick:t(P)},{default:a(()=>[p("\u67E5\u8BE2")]),_:1},8,["onClick"]),e(d,{onClick:t(L)},{default:a(()=>[p("\u91CD\u7F6E")]),_:1},8,["onClick"])]),_:1})]),_:1},8,["model"])]),_:1}),_((u(),m(h,{class:"!border-none",shadow:"never"},{default:a(()=>[_((u(),m(d,{type:"primary",onClick:T},{icon:a(()=>[e(q,{name:"el-icon-Plus"})]),default:a(()=>[p(" \u65B0\u589E ")]),_:1})),[[E,["goods.goodsclass/add"]]]),_((u(),m(d,{disabled:!t(b).length,onClick:o[3]||(o[3]=l=>v(t(b)))},{default:a(()=>[p(" \u52
|