From ea689dd91eaa72425dc01759042c3b4eb2186512 Mon Sep 17 00:00:00 2001
From: doum <doum>
Date: 星期三, 17 六月 2026 10:14:44 +0800
Subject: [PATCH] 新增智能电表、空调管理

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

diff --git a/admin/src/views/client/staffList.vue b/admin/src/views/client/staffList.vue
index 6117255..4bc1161 100644
--- a/admin/src/views/client/staffList.vue
+++ b/admin/src/views/client/staffList.vue
@@ -10,6 +10,9 @@
       <el-form-item prop="name">
         <el-input v-model="searchForm.name" placeholder="璇疯緭鍏ヤ汉鍛樺鍚�/鎵嬫満鍙�" @keypress.enter.native="search"></el-input>
       </el-form-item>
+      <el-form-item label="韬唤璇佸彿" prop="idcardNo">
+        <el-input v-model="searchForm.idcardNo" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" @keypress.enter.native="search"></el-input>
+      </el-form-item>
       <section>
         <el-button type="primary" @click="search">鎼滅储</el-button>
         <el-button type="primary" :loading="isWorking.export" v-permissions="['business:ywcustomer:exportExcel']"
@@ -29,6 +32,7 @@
         <el-table-column prop="customerName" label="瀹㈡埛鍚嶇О" min-width="100px"></el-table-column>
         <el-table-column prop="name" label="鑱旂郴浜�" min-width="100px"></el-table-column>
         <el-table-column prop="phone" label="鑱旂郴鐢佃瘽" min-width="100px"></el-table-column>
+        <el-table-column prop="idcardDecode" label="韬唤璇佸彿" min-width="140px"></el-table-column>
         <el-table-column prop="" label="韬唤" min-width="100px">
           <template slot-scope="{row}">
             <span v-if="row.highCheckor == 0">鑰佹澘/瓒呯骇绠$悊鍛�</span>
@@ -37,8 +41,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 +73,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,
@@ -75,6 +86,7 @@
       searchForm: {
         customerId: '',
         name: '',
+        idcardNo: '',
       },
       clientList: []
     }
@@ -90,6 +102,14 @@
     this.initData()
   },
   methods: {
+    changeStatus(e) {
+      updateStatusById(e).then(res => {
+        this.search()
+        Message.success('鐘舵�佷慨鏀规垚鍔�')
+      }, () => {
+        this.search()
+      })
+    },
     initData() {
       fetchList({
         capacity: 9000,
@@ -99,6 +119,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