From 3cd92951fd2a67a02e649a870d100b3e8776ae11 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期四, 11 十二月 2025 17:43:37 +0800
Subject: [PATCH] 经销商管理

---
 admin/src/views/business/goodsLabels.vue |   26 ++++++++++++++++++++++++++
 1 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/admin/src/views/business/goodsLabels.vue b/admin/src/views/business/goodsLabels.vue
index 5395235..3d5adef 100644
--- a/admin/src/views/business/goodsLabels.vue
+++ b/admin/src/views/business/goodsLabels.vue
@@ -49,6 +49,18 @@
         <el-table-column prop="name" label="鍒嗙被鍚嶇О" min-width="100px"></el-table-column>
         <el-table-column prop="sortnum" label="鎺掑簭鐮�(鍗囧簭)" min-width="100px"></el-table-column>
         <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="100px"></el-table-column>
+        <el-table-column prop="status" label="鐘舵��" min-width="100px">
+          <template slot-scope="{row}">
+            <el-switch
+                v-model="row.status"
+                :active-value="1"
+                :inactive-value="0"
+                active-color="#13ce66"
+                inactive-color="#ff4949"
+                @change="statusChange(row)"
+            ></el-switch>
+          </template>
+        </el-table-column>
         <el-table-column
           v-if="containPermissions(['business:productlabel:update', 'business:productlabel:delete'])"
           label="鎿嶄綔"
@@ -101,6 +113,20 @@
       'field.main': 'id'
     })
     this.search()
+  },
+  methods: {
+    statusChange (row) {
+      this.api.updateById({ id: row.id, status: row.status })
+          .then(() => {
+            this.$message.success('鎿嶄綔鎴愬姛')
+          })
+          .catch(e => {
+            this.$message.error('鎿嶄綔鎴愬姛')
+          })
+          .then(() => {
+            this.handlePageChange()
+          })
+    }
   }
 }
 </script>

--
Gitblit v1.9.3