|
@@ -9,17 +9,17 @@
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="业务员" class="formItem">
|
|
<el-form-item label="业务员" class="formItem">
|
|
|
- <el-input v-model="form.operation" placeholder="输入姓名、手机号、工号查找"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.salesman" placeholder="输入姓名、手机号、工号查找"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="归属机构" class="formItem">
|
|
<el-form-item label="归属机构" class="formItem">
|
|
|
- <el-cascader style="width: 100%" v-model="form.organization" :options="options" />
|
|
|
|
|
|
|
+ <el-cascader style="width: 100%" :options="options" @change="organizationChange" />
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="类型" class="formItem">
|
|
<el-form-item label="类型" class="formItem">
|
|
|
- <el-select v-model="form.type">
|
|
|
|
|
|
|
+ <el-select v-model="form.typeAttr">
|
|
|
<el-option key="1" value="type1"></el-option>
|
|
<el-option key="1" value="type1"></el-option>
|
|
|
<el-option key="2" value="type2"></el-option>
|
|
<el-option key="2" value="type2"></el-option>
|
|
|
<el-option key="3" value="type3"></el-option>
|
|
<el-option key="3" value="type3"></el-option>
|
|
@@ -30,12 +30,12 @@
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="所属" class="formItem">
|
|
<el-form-item label="所属" class="formItem">
|
|
|
- <el-input v-model="form.belong" placeholder="渠道、团队、电销组名称查找"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.deptName" placeholder="渠道、团队、电销组名称查找"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="人员状态" class="formItem">
|
|
<el-form-item label="人员状态" class="formItem">
|
|
|
- <el-select v-model="form.staffState">
|
|
|
|
|
|
|
+ <el-select v-model="form.status">
|
|
|
<el-option key="1" value="type1"></el-option>
|
|
<el-option key="1" value="type1"></el-option>
|
|
|
<el-option key="2" value="type2"></el-option>
|
|
<el-option key="2" value="type2"></el-option>
|
|
|
<el-option key="3" value="type3"></el-option>
|
|
<el-option key="3" value="type3"></el-option>
|
|
@@ -44,10 +44,9 @@
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="账号状态" class="formItem">
|
|
<el-form-item label="账号状态" class="formItem">
|
|
|
- <el-select v-model="form.accountState">
|
|
|
|
|
- <el-option key="1" value="type1"></el-option>
|
|
|
|
|
- <el-option key="2" value="type2"></el-option>
|
|
|
|
|
- <el-option key="3" value="type3"></el-option>
|
|
|
|
|
|
|
+ <el-select v-model="form.isEnable">
|
|
|
|
|
+ <el-option key="0" value="禁用"></el-option>
|
|
|
|
|
+ <el-option key="1" value="启用"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -55,7 +54,7 @@
|
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
|
<el-form-item label="管理人" class="formItem">
|
|
<el-form-item label="管理人" class="formItem">
|
|
|
- <el-input v-model="form.person" placeholder="管理人姓名、工号"></el-input>
|
|
|
|
|
|
|
+ <el-input v-model="form.leaderId" placeholder="管理人姓名、工号"></el-input>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-col>
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
<el-col :span="8">
|
|
@@ -66,8 +65,8 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<el-row :gutter="20" style="margin: 20px 0" flex>
|
|
<el-row :gutter="20" style="margin: 20px 0" flex>
|
|
|
<el-col :span="3" style="display: flex">
|
|
<el-col :span="3" style="display: flex">
|
|
|
- <el-checkbox @change="selectAll"></el-checkbox>
|
|
|
|
|
- <el-select class="select-all" placeholder="全选" v-model="selectType" style="width: 120px">
|
|
|
|
|
|
|
+ <el-checkbox @change="selectAll" v-model="selectAllValue"></el-checkbox>
|
|
|
|
|
+ <el-select class="select-all" placeholder="全选" v-model="selectType" style="width: 120px" @change="selectTypeChange">
|
|
|
<el-option key="all" value="选中所有数据"></el-option>
|
|
<el-option key="all" value="选中所有数据"></el-option>
|
|
|
<el-option key="cur" value="选中本页数据"></el-option>
|
|
<el-option key="cur" value="选中本页数据"></el-option>
|
|
|
</el-select>
|
|
</el-select>
|
|
@@ -91,21 +90,23 @@
|
|
|
</el-row>
|
|
</el-row>
|
|
|
<el-table
|
|
<el-table
|
|
|
:data="tableData"
|
|
:data="tableData"
|
|
|
|
|
+ ref="operationListRef"
|
|
|
height="460"
|
|
height="460"
|
|
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
>
|
|
>
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
- <el-table-column label="姓名" prop="name" width="80"></el-table-column>
|
|
|
|
|
- <el-table-column label="手机号" prop="" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column label="工号" prop="" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column label="类型" prop="" width="100"></el-table-column>
|
|
|
|
|
- <el-table-column label="归属" prop="" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column label="所属机构" prop="" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column label="人员状态" prop="" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column label="账号状态" prop="" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column label="管理人" prop="" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column label="管理人工号" prop="" width="200"></el-table-column>
|
|
|
|
|
- <el-table-column label="推荐人" prop="" width="150"></el-table-column>
|
|
|
|
|
- <el-table-column label="推荐人工号" prop="" width="200"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="姓名" prop="username" width="80"></el-table-column>
|
|
|
|
|
+ <el-table-column label="手机号" prop="mobile" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column label="工号" prop="userId" width="200"></el-table-column>
|
|
|
|
|
+ <el-table-column label="类型" prop="typeAttr" width="100"></el-table-column>
|
|
|
|
|
+ <el-table-column label="归属" prop="deptName" width="200"></el-table-column>
|
|
|
|
|
+ <el-table-column label="所属机构" prop="deptName" width="200"></el-table-column>
|
|
|
|
|
+ <el-table-column label="人员状态" prop="status" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column label="账号状态" prop="isEnable" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column label="管理人" prop="leaderName" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column label="管理人工号" prop="leaderId" width="200"></el-table-column>
|
|
|
|
|
+ <el-table-column label="推荐人" prop="referrerName" width="150"></el-table-column>
|
|
|
|
|
+ <el-table-column label="推荐人工号" prop="referrerId" width="200"></el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
|
<div style="display: flex; align-items: center; justify-content: space-between">
|
|
@@ -133,7 +134,7 @@
|
|
|
v-model:page-size="pageSize"
|
|
v-model:page-size="pageSize"
|
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
:page-sizes="[10, 20, 30, 40]"
|
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="400"
|
|
|
|
|
|
|
+ :total="total"
|
|
|
@size-change="handleSizeChange"
|
|
@size-change="handleSizeChange"
|
|
|
@current-change="handleCurrentChange"
|
|
@current-change="handleCurrentChange"
|
|
|
/>
|
|
/>
|
|
@@ -143,26 +144,14 @@
|
|
|
:title="title"
|
|
:title="title"
|
|
|
width="1000"
|
|
width="1000"
|
|
|
>
|
|
>
|
|
|
- <addOperation></addOperation>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-button plain @click="() => { dialogShow = false }">取消</el-button>
|
|
|
|
|
- <el-button type="primary">确定</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <addOperation @closeDialog="closeAddOperation"></addOperation>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
v-model="bankCardDialogShow"
|
|
v-model="bankCardDialogShow"
|
|
|
title="添加银行卡"
|
|
title="添加银行卡"
|
|
|
width="500"
|
|
width="500"
|
|
|
>
|
|
>
|
|
|
- <addCard></addCard>
|
|
|
|
|
- <template #footer>
|
|
|
|
|
- <div>
|
|
|
|
|
- <el-button plain @click="() => { bankCardDialogShow = false }">取消</el-button>
|
|
|
|
|
- <el-button type="primary">确定</el-button>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <addCard @closeDialog="closeAddBankCard"></addCard>
|
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
v-model="allocationShow"
|
|
v-model="allocationShow"
|
|
@@ -180,20 +169,44 @@ import { useRouter } from 'vue-router'
|
|
|
import addOperation from './modules/addOperation.vue'
|
|
import addOperation from './modules/addOperation.vue'
|
|
|
import addCard from './modules/addCard.vue'
|
|
import addCard from './modules/addCard.vue'
|
|
|
import allocation from './modules/allocation.vue'
|
|
import allocation from './modules/allocation.vue'
|
|
|
-import { ElMessageBox, ElMessage } from 'element-plus'
|
|
|
|
|
|
|
+import type { OperationSearch, OperationIsEnable } from '@/api/modules/operation.ts'
|
|
|
|
|
+import api from "@/api";
|
|
|
|
|
+import {ElMessageBox, ElMessage, TableInstance} from 'element-plus'
|
|
|
|
|
+import type { TabBarInstance } from 'element-plus'
|
|
|
import Allocation from "@/views/operationManagement/modules/allocation.vue";
|
|
import Allocation from "@/views/operationManagement/modules/allocation.vue";
|
|
|
|
|
|
|
|
let muRouter = useRouter()
|
|
let muRouter = useRouter()
|
|
|
|
|
|
|
|
|
|
+const operationListRef = ref<TableInstance>()
|
|
|
|
|
+
|
|
|
|
|
+interface TableDataProps {
|
|
|
|
|
+ username: string,
|
|
|
|
|
+ mobile: string,
|
|
|
|
|
+ id: string,
|
|
|
|
|
+ typeAttr: string,
|
|
|
|
|
+ deptName: string,
|
|
|
|
|
+ userId: string,
|
|
|
|
|
+ status: number,
|
|
|
|
|
+ isEnable: number,
|
|
|
|
|
+ leaderName: string,
|
|
|
|
|
+ leaderId: string,
|
|
|
|
|
+ referrerName: string,
|
|
|
|
|
+ referrerId: string
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+const organizationChange = (e) => {
|
|
|
|
|
+ console.log(123, e)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 查询条件
|
|
// 查询条件
|
|
|
-let form = ref({
|
|
|
|
|
- operation: '',
|
|
|
|
|
- organization: [],
|
|
|
|
|
- type: '',
|
|
|
|
|
- belong: '',
|
|
|
|
|
- staffState: '',
|
|
|
|
|
- accountState: '',
|
|
|
|
|
- person: ''
|
|
|
|
|
|
|
+let form = ref<OperationSearch>({
|
|
|
|
|
+ salesman: '',
|
|
|
|
|
+ deptId: '',
|
|
|
|
|
+ typeAttr: '',
|
|
|
|
|
+ deptName: '',
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ isEnable: '',
|
|
|
|
|
+ leaderId: ''
|
|
|
})
|
|
})
|
|
|
let options = [
|
|
let options = [
|
|
|
{
|
|
{
|
|
@@ -227,30 +240,105 @@ let options = [
|
|
|
]
|
|
]
|
|
|
// 获取列表数据
|
|
// 获取列表数据
|
|
|
const init = () => {
|
|
const init = () => {
|
|
|
-
|
|
|
|
|
|
|
+ api.operationApi.operationList({
|
|
|
|
|
+ pages: currentPage.value,
|
|
|
|
|
+ size: pageSize.value,
|
|
|
|
|
+ ...form.value
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if(res?.code == 200) {
|
|
|
|
|
+ tableData.value = res.data.records
|
|
|
|
|
+ total.value = res.data.total
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res?.msg,
|
|
|
|
|
+ type: 'error'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+// 删除
|
|
|
|
|
+const operationDel = (id: string[]) => {
|
|
|
|
|
+ api.operationApi.operationDelete({ id: id }).then(res => {
|
|
|
|
|
+ if(res?.code == 200) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ init()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+const operationIsEnable = (data: OperationIsEnable) => {
|
|
|
|
|
+ api.operationApi.operationIsEnable(data).then(res => {
|
|
|
|
|
+ if(res?.code == 200) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ type: 'success'
|
|
|
|
|
+ })
|
|
|
|
|
+ init()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ message: res.msg,
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
// 搜索
|
|
// 搜索
|
|
|
const search = () => {
|
|
const search = () => {
|
|
|
-
|
|
|
|
|
|
|
+ init();
|
|
|
}
|
|
}
|
|
|
// 重置
|
|
// 重置
|
|
|
const reset = () => {
|
|
const reset = () => {
|
|
|
form.value = {
|
|
form.value = {
|
|
|
- operation: '',
|
|
|
|
|
- organization: [],
|
|
|
|
|
- type: '',
|
|
|
|
|
- belong: '',
|
|
|
|
|
- staffState: '',
|
|
|
|
|
- accountState: '',
|
|
|
|
|
- person: ''
|
|
|
|
|
|
|
+ salesman: '',
|
|
|
|
|
+ deptId: '',
|
|
|
|
|
+ typeAttr: '',
|
|
|
|
|
+ deptName: '',
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ isEnable: '',
|
|
|
|
|
+ leaderId: ''
|
|
|
}
|
|
}
|
|
|
|
|
+ currentPage.value = 1
|
|
|
|
|
+ pageSize.value = 10
|
|
|
|
|
+ init()
|
|
|
}
|
|
}
|
|
|
|
|
+// 全选的类型
|
|
|
|
|
+let selectType = ref('')
|
|
|
|
|
+// 外部全选是否勾选
|
|
|
|
|
+let selectAllValue = ref(false)
|
|
|
// 外部的全选
|
|
// 外部的全选
|
|
|
-const selectAll = () => {
|
|
|
|
|
|
|
+const selectAll = (type: boolean) => {
|
|
|
|
|
+ console.log(1111, type)
|
|
|
|
|
+ if(type) {
|
|
|
|
|
+ if(selectType.value) {
|
|
|
|
|
+ tableData.value.forEach((item: TableDataProps) => {
|
|
|
|
|
+ operationListRef.value!.toggleRowSelection(item, true)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ tableData.value.forEach((item: TableDataProps) => {
|
|
|
|
|
+ operationListRef.value!.toggleRowSelection(item, false)
|
|
|
|
|
+ })
|
|
|
|
|
+ selectType.value = ''
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 表格组件中的勾选
|
|
|
|
|
+const handleSelectionChange = (row: TableDataProps) => {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
-// 全选的类型
|
|
|
|
|
-let selectType = ref('')
|
|
|
|
|
|
|
+// 全选类型改变
|
|
|
|
|
+const selectTypeChange = (type) => {
|
|
|
|
|
+ selectAllValue.value = true
|
|
|
|
|
+ tableData.value.forEach((item: TableDataProps) => {
|
|
|
|
|
+ operationListRef.value!.toggleRowSelection(item, true)
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
// 批量管理
|
|
// 批量管理
|
|
|
const dropdownCommand = (e) => {
|
|
const dropdownCommand = (e) => {
|
|
|
switch (e) {
|
|
switch (e) {
|
|
@@ -263,7 +351,7 @@ const dropdownCommand = (e) => {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
}).then(( action ) => {
|
|
}).then(( action ) => {
|
|
|
-
|
|
|
|
|
|
|
+ init()
|
|
|
}).catch(( action ) => {
|
|
}).catch(( action ) => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -277,15 +365,23 @@ const dropdownCommand = (e) => {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
}).then(( action ) => {
|
|
}).then(( action ) => {
|
|
|
-
|
|
|
|
|
|
|
+ init()
|
|
|
}).catch(( action ) => {
|
|
}).catch(( action ) => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
case '启用':
|
|
case '启用':
|
|
|
- ElMessage({
|
|
|
|
|
- message: '启用成功!',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
|
|
+ ElMessageBox({
|
|
|
|
|
+ title: '启用业务员',
|
|
|
|
|
+ message: '确定要启用该业务员吗?',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ showCancelButton: true,
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ }).then(( action ) => {
|
|
|
|
|
+ init()
|
|
|
|
|
+ }).catch(( action ) => {
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
case '分配管理人':
|
|
case '分配管理人':
|
|
@@ -294,28 +390,33 @@ const dropdownCommand = (e) => {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 列表数据
|
|
// 列表数据
|
|
|
-let tableData = ref([
|
|
|
|
|
- {
|
|
|
|
|
- name: 1
|
|
|
|
|
- }
|
|
|
|
|
-])
|
|
|
|
|
|
|
+let tableData = ref<TableDataProps[]>([])
|
|
|
|
|
+
|
|
|
// 分页数据
|
|
// 分页数据
|
|
|
// 页码
|
|
// 页码
|
|
|
let currentPage = ref(1)
|
|
let currentPage = ref(1)
|
|
|
// 单页数量
|
|
// 单页数量
|
|
|
let pageSize = ref(10)
|
|
let pageSize = ref(10)
|
|
|
|
|
+// 总数
|
|
|
|
|
+let total = ref(0)
|
|
|
// 单页数量变化
|
|
// 单页数量变化
|
|
|
const handleSizeChange = (size) => {
|
|
const handleSizeChange = (size) => {
|
|
|
pageSize.value = size
|
|
pageSize.value = size
|
|
|
|
|
+ init()
|
|
|
}
|
|
}
|
|
|
// 页码变化
|
|
// 页码变化
|
|
|
const handleCurrentChange = (page) => {
|
|
const handleCurrentChange = (page) => {
|
|
|
currentPage.value = page
|
|
currentPage.value = page
|
|
|
|
|
+ init()
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
// 详情
|
|
// 详情
|
|
|
const showDetail = (scope) => {
|
|
const showDetail = (scope) => {
|
|
|
muRouter.push({
|
|
muRouter.push({
|
|
|
- path: '/operationDetail'
|
|
|
|
|
|
|
+ path: '/operationDetail',
|
|
|
|
|
+ query: {
|
|
|
|
|
+ id: scope.row.id
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -338,7 +439,11 @@ const tableDataCommand = (scope, e) => {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
}).then(( action ) => {
|
|
}).then(( action ) => {
|
|
|
-
|
|
|
|
|
|
|
+ if(action === 'confirm') {
|
|
|
|
|
+ let ids = [scope.row.id]
|
|
|
|
|
+ console.log(123123, ids)
|
|
|
|
|
+ operationDel(ids)
|
|
|
|
|
+ }
|
|
|
}).catch(( action ) => {
|
|
}).catch(( action ) => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -352,15 +457,35 @@ const tableDataCommand = (scope, e) => {
|
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
|
}).then(( action ) => {
|
|
}).then(( action ) => {
|
|
|
-
|
|
|
|
|
|
|
+ if(action === 'confirm') {
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ id: [scope.row.id],
|
|
|
|
|
+ isEnable: 0
|
|
|
|
|
+ }
|
|
|
|
|
+ operationIsEnable(data)
|
|
|
|
|
+ }
|
|
|
}).catch(( action ) => {
|
|
}).catch(( action ) => {
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
case '启用':
|
|
case '启用':
|
|
|
- ElMessage({
|
|
|
|
|
- message: '启用成功!',
|
|
|
|
|
- type: 'success',
|
|
|
|
|
|
|
+ ElMessageBox({
|
|
|
|
|
+ title: '启用业务员',
|
|
|
|
|
+ message: '确定要启用该业务员吗?',
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ showCancelButton: true,
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ }).then(( action ) => {
|
|
|
|
|
+ if(action === 'confirm'){
|
|
|
|
|
+ let data = {
|
|
|
|
|
+ id: [scope.row.id],
|
|
|
|
|
+ isEnable: 1
|
|
|
|
|
+ }
|
|
|
|
|
+ operationIsEnable(data)
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(( action ) => {
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
break;
|
|
break;
|
|
|
case '添加银行卡':
|
|
case '添加银行卡':
|
|
@@ -378,12 +503,24 @@ const addNumber = () => {
|
|
|
}
|
|
}
|
|
|
// 添加/编辑业务员弹框
|
|
// 添加/编辑业务员弹框
|
|
|
let dialogShow = ref(false)
|
|
let dialogShow = ref(false)
|
|
|
|
|
+// 关闭新增弹框
|
|
|
|
|
+const closeAddOperation = (bool: boolean) => {
|
|
|
|
|
+ dialogShow.value = bool
|
|
|
|
|
+}
|
|
|
|
|
+// 关闭添加银行卡弹框
|
|
|
|
|
+const closeAddBankCard = (bool: boolean) => {
|
|
|
|
|
+ bankCardDialogShow.value = bool
|
|
|
|
|
+}
|
|
|
// 添加/编辑业务员弹框标题
|
|
// 添加/编辑业务员弹框标题
|
|
|
let title = ref('添加')
|
|
let title = ref('添加')
|
|
|
|
|
|
|
|
// 分配管理人
|
|
// 分配管理人
|
|
|
let allocationShow = ref(false)
|
|
let allocationShow = ref(false)
|
|
|
|
|
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ init()
|
|
|
|
|
+})
|
|
|
|
|
+
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|