From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 六月 2025 19:19:34 +0800
Subject: [PATCH] 开发更新

---
 admin/src/views/client/staffList.vue |   39 ++++++++++++++++++++++++++++++++++++++-
 1 files changed, 38 insertions(+), 1 deletions(-)

diff --git a/admin/src/views/client/staffList.vue b/admin/src/views/client/staffList.vue
index 6117255..fdb031d 100644
--- a/admin/src/views/client/staffList.vue
+++ b/admin/src/views/client/staffList.vue
@@ -37,8 +37,12 @@
           </template>
         </el-table-column>
         <el-table-column prop="status" label="鐘舵��" min-width="100px">
+
           <template slot-scope="{row}">
-            <span :class="{ red: row.status == 1 }">{{ row.status == '0' ? '姝e父' : '绂佺敤' }}</span>
+            <el-switch v-model="row.status" @change="e => changeStatus(row)" :active-value="0"
+              :inactive-value="1">
+            </el-switch>
+            <!-- <span :class="{ red: row.status == 1 }">{{ row.status == '0' ? '姝e父' : '绂佺敤' }}</span> -->
           </template>
         </el-table-column>
         <el-table-column v-if="containPermissions(['business:ywcustomer:update', 'business:ywcustomer:delete'])"
@@ -65,6 +69,9 @@
 import Pagination from '@/components/common/Pagination'
 import OperaYwCustomerWindow from './components/staffEdit.vue'
 import { fetchList } from '@/api/client/ywCustomer'
+import { updateStatusById } from '@/api/business/member'
+import { ywExportExcel } from '@/api/client/staff'
+import { Message } from 'element-ui'
 export default {
   name: 'YwCustomer',
   extends: BaseTable,
@@ -90,6 +97,14 @@
     this.initData()
   },
   methods: {
+    changeStatus(e) {
+      updateStatusById(e).then(res => {
+        this.search()
+        Message.success('鐘舵�佷慨鏀规垚鍔�')
+      }, () => {
+        this.search()
+      })
+    },
     initData() {
       fetchList({
         capacity: 9000,
@@ -99,6 +114,28 @@
         this.clientList = res.records || []
       })
     },
+    exportExcel () {
+      this.$dialog.exportConfirm('纭瀵煎嚭鍚楋紵')
+        .then(() => {
+          this.isWorking.export = true
+          ywExportExcel({
+            page: this.tableData.pagination.pageIndex,
+            capacity: 1000000,
+            model: this.searchForm,
+            sorts: this.tableData.sorts
+          })
+            .then(response => {
+              this.download(response)
+            })
+            .catch(e => {
+              this.$tip.apiFailed(e)
+            })
+            .finally(() => {
+              this.isWorking.export = false
+            })
+        })
+        .catch(() => {})
+    },
   }
 }
 </script>

--
Gitblit v1.9.3