From e1552a4eb2699eb84c4e1419cb76b7beb4951c4a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期五, 06 十二月 2024 18:34:16 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
admin/src/views/client/staffList.vue | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 118 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/client/staffList.vue b/admin/src/views/client/staffList.vue
index e69de29..e3be587 100644
--- a/admin/src/views/client/staffList.vue
+++ b/admin/src/views/client/staffList.vue
@@ -0,0 +1,118 @@
+<template>
+ <TableLayout :permissions="['business:ywcustomer:query']">
+ <!-- 鎼滅储琛ㄥ崟 -->
+ <el-form ref="searchForm" slot="search-form" :model="searchForm" label-width="100px" inline>
+ <el-form-item label="瀹㈡埛鍚嶇О" prop="customerId">
+ <el-select v-model="searchForm.customerId" clearable filterable>
+ <el-option v-for="item in clientList" :value="item.id" :label="item.name" />
+ </el-select>
+ </el-form-item>
+ <el-form-item prop="name">
+ <el-input v-model="searchForm.name" 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']"
+ @click="exportExcel">瀵煎嚭</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </section>
+ </el-form>
+ <!-- 琛ㄦ牸鍜屽垎椤� -->
+ <template v-slot:table-wrap>
+ <ul class="toolbar" v-permissions="['business:ywcustomer:create', 'business:ywcustomer:delete']">
+ <li><el-button type="primary" @click="$refs.operaYwCustomerWindow.open('鏂板缓浜哄憳')" icon="el-icon-plus"
+ v-permissions="['business:ywcustomer:create']">鏂板缓</el-button></li>
+ <li><el-button @click="deleteByIdInBatch" icon="el-icon-delete"
+ v-permissions="['business:ywcustomer:delete']">鍒犻櫎</el-button></li>
+ </ul>
+ <el-table v-loading="isWorking.search" :data="tableData.list" stripe @selection-change="handleSelectionChange">
+ <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="" label="韬唤" min-width="100px">
+ <template slot-scope="{row}">
+ <span v-if="row.highCheckor == 0">鑰佹澘/瓒呯骇绠$悊鍛�</span>
+ <span v-if="row.highCheckor == 1">浜轰簨/绠$悊鍛�</span>
+ <span v-if="row.highCheckor == 2">鍛樺伐/鏅�氬憳宸�</span>
+ </template>
+ </el-table-column>
+ <el-table-column prop="status" label="鐘舵��" min-width="100px">
+
+ <template slot-scope="{row}">
+ <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'])"
+ label="鎿嶄綔" min-width="120" fixed="right">
+ <template slot-scope="{row}">
+ <el-button type="text" @click="$refs.operaYwCustomerWindow.open('缂栬緫浜哄憳', row)" icon="el-icon-edit"
+ v-permissions="['business:ywcustomer:update']">缂栬緫</el-button>
+ <el-button type="text" @click="deleteById(row)" icon="el-icon-delete"
+ v-permissions="['business:ywcustomer:delete']">鍒犻櫎</el-button>
+ </template>
+ </el-table-column>
+ </el-table>
+ <pagination @size-change="handleSizeChange" @current-change="handlePageChange" :pagination="tableData.pagination">
+ </pagination>
+ </template>
+ <!-- 鏂板缓/淇敼 -->
+ <OperaYwCustomerWindow ref="operaYwCustomerWindow" @success="handlePageChange" />
+ </TableLayout>
+</template>
+
+<script>
+import BaseTable from '@/components/base/BaseTable'
+import TableLayout from '@/layouts/TableLayout'
+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 { Message } from 'element-ui'
+export default {
+ name: 'YwCustomer',
+ extends: BaseTable,
+ components: { TableLayout, Pagination, OperaYwCustomerWindow },
+ data() {
+ return {
+ // 鎼滅储
+ searchForm: {
+ customerId: '',
+ name: '',
+ },
+ clientList: []
+ }
+ },
+ created() {
+ this.config({
+ module: '杩愮淮瀹㈡埛淇℃伅琛�',
+ api: '/client/staff',
+ 'field.id': 'id',
+ 'field.main': 'id'
+ })
+ this.search()
+ this.initData()
+ },
+ methods: {
+ changeStatus(e) {
+ updateStatusById(e).then(res => {
+ this.search()
+ Message.success('鐘舵�佷慨鏀规垚鍔�')
+ }, () => {
+ this.search()
+ })
+ },
+ initData() {
+ fetchList({
+ capacity: 9000,
+ model: {},
+ page: 1
+ }).then(res => {
+ this.clientList = res.records || []
+ })
+ },
+ }
+}
+</script>
--
Gitblit v1.9.3