|
|
@@ -1,11 +1,6 @@
|
|
|
<template>
|
|
|
<div class="operation pad-24">
|
|
|
- <el-form
|
|
|
- class="operationForm"
|
|
|
- ref="OperationRef"
|
|
|
- :model="form"
|
|
|
- label-width="70"
|
|
|
- >
|
|
|
+ <el-form class="operationForm" ref="OperationRef" :model="form" label-width="70">
|
|
|
<el-row :gutter="20">
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="业务员" class="formItem">
|
|
|
@@ -14,7 +9,8 @@
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
<el-form-item label="归属机构" class="formItem">
|
|
|
- <el-cascader clearable v-model="form.deptId" style="width: 100%" :options="options" :props="cascaderProps" @change="organizationChange" />
|
|
|
+ <el-cascader clearable v-model="form.deptId" style="width: 100%" :options="options" :props="cascaderProps"
|
|
|
+ @change="organizationChange" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="8">
|
|
|
@@ -24,7 +20,7 @@
|
|
|
<el-option key="2" value="7" label="渠道"></el-option>
|
|
|
<el-option key="3" value="5" label="团队"></el-option>
|
|
|
<el-option key="4" value="8" label="电销组"></el-option>
|
|
|
-<!-- <el-option key="1" value="1" label="前线人员"></el-option>
|
|
|
+ <!-- <el-option key="1" value="1" label="前线人员"></el-option>
|
|
|
<el-option key="2" value="2" label="后线人员"></el-option>
|
|
|
<el-option key="3" value="3" label="合伙人"></el-option>
|
|
|
<el-option key="4" value="4" label="工作室管理员"></el-option>
|
|
|
@@ -92,44 +88,43 @@
|
|
|
<span class="col-108 m-r-8">
|
|
|
<el-dropdown class="width-100" trigger="click" placement="bottom" @command="dropdownCommand">
|
|
|
<el-button class="radius-2px width-100">
|
|
|
- 批量管理 <el-icon><ArrowDown /></el-icon>
|
|
|
+ 批量管理 <el-icon>
|
|
|
+ <ArrowDown />
|
|
|
+ </el-icon>
|
|
|
</el-button>
|
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item command="启用">启用</el-dropdown-item>
|
|
|
<el-dropdown-item command="禁用">禁用</el-dropdown-item>
|
|
|
<el-dropdown-item command="删除">删除</el-dropdown-item>
|
|
|
-<!-- <el-dropdown-item command="分配管理人">分配管理人</el-dropdown-item>-->
|
|
|
+ <!-- <el-dropdown-item command="分配管理人">分配管理人</el-dropdown-item>-->
|
|
|
</el-dropdown-menu>
|
|
|
</template>
|
|
|
</el-dropdown>
|
|
|
</span>
|
|
|
</el-row>
|
|
|
- <el-table
|
|
|
- :data="tableData"
|
|
|
- ref="operationListRef"
|
|
|
- height="536"
|
|
|
- @selection-change="handleSelectionChange"
|
|
|
- >
|
|
|
+ <el-table :data="tableData" ref="operationListRef" height="536" @selection-change="handleSelectionChange">
|
|
|
<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="mobile" width="150"></el-table-column>
|
|
|
<el-table-column label="工号" prop="workNumber" width="200"></el-table-column>
|
|
|
<el-table-column label="类型" prop="typeAttr" width="100">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.typeAttr == '6'?'个代':scope.row.typeAttr == '8'?'电销组':scope.row.typeAttr == '7'?'渠道':scope.row.typeAttr == '5'?'团队': '' }}
|
|
|
+ <span>{{ typeMatch(scope.row.typeAttr) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="归属" prop="organizationName" width="200"></el-table-column>
|
|
|
<el-table-column label="所属机构" prop="deptName" width="200"></el-table-column>
|
|
|
<el-table-column label="人员状态" prop="status" width="150">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.status == '0'?'未认证':scope.row.status == '1'?'实名认证中':scope.row.status == '2'?'实名认证失败':scope.row.status == '3'?'待入职':scope.row.status == '4'?'入司审核中':scope.row.status == '5'?'入司审核失败':scope.row.status == '6'?'已入职':scope.row.status == '7'?'离职待审核':scope.row.status == '8'?'离职': '' }}
|
|
|
+ {{ scope.row.status == '0' ? '未认证' : scope.row.status == '1' ? '实名认证中' : scope.row.status ==
|
|
|
+ '2' ? '实名认证失败' : scope.row.status == '3' ? '待入职' : scope.row.status == '4' ? '入司审核中' : scope.row.status ==
|
|
|
+ '5' ? '入司审核失败' : scope.row.status == '6' ? '已入职' : scope.row.status == '7' ? '离职待审核' : scope.row.status == '8'?'离职': '' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="账号状态" prop="isEnable" width="150">
|
|
|
<template #default="scope">
|
|
|
- {{ scope.row.isEnable == '1'?'禁用':scope.row.isEnable == '0'?'启用': '--' }}
|
|
|
+ {{ scope.row.isEnable == '1' ? '禁用' : scope.row.isEnable == '0' ? '启用' : '--' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column label="管理人" prop="leaderName" width="150"></el-table-column>
|
|
|
@@ -158,35 +153,17 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
<div style="display: flex; justify-content: flex-end; margin-top: 15px">
|
|
|
- <el-pagination
|
|
|
- v-model:current-page="currentPage"
|
|
|
- v-model:page-size="pageSize"
|
|
|
- :page-sizes="[10, 20, 30, 40]"
|
|
|
- layout="total, sizes, prev, pager, next, jumper"
|
|
|
- :total="total"
|
|
|
- @size-change="handleSizeChange"
|
|
|
- @current-change="handleCurrentChange"
|
|
|
- />
|
|
|
+ <el-pagination v-model:current-page="currentPage" v-model:page-size="pageSize" :page-sizes="[10, 20, 30, 40]"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange" />
|
|
|
</div>
|
|
|
- <el-dialog
|
|
|
- v-model="dialogShow"
|
|
|
- :title="title"
|
|
|
- width="1000"
|
|
|
- >
|
|
|
+ <el-dialog v-model="dialogShow" :title="title" width="1000">
|
|
|
<addOperation ref="AddOperationRef" @closeDialog="closeAddOperation"></addOperation>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- v-model="bankCardDialogShow"
|
|
|
- title="添加银行卡"
|
|
|
- width="500"
|
|
|
- >
|
|
|
+ <el-dialog v-model="bankCardDialogShow" title="添加银行卡" width="500">
|
|
|
<addCard @closeDialog="closeAddBankCard" :userInfo="addName"></addCard>
|
|
|
</el-dialog>
|
|
|
- <el-dialog
|
|
|
- v-model="allocationShow"
|
|
|
- title="分配管理人"
|
|
|
- width="800"
|
|
|
- >
|
|
|
+ <el-dialog v-model="allocationShow" title="分配管理人" width="800">
|
|
|
<allocation ref="AllocationRef" @closeDialog="closeAllocation"></allocation>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -229,7 +206,19 @@ interface TableDataProps {
|
|
|
const organizationChange = (e) => {
|
|
|
form.value.deptId = e[e.length - 1]
|
|
|
}
|
|
|
-
|
|
|
+// 人员类型匹配
|
|
|
+const typeMatch = (typeAttr: string) => {
|
|
|
+ const map: any = {
|
|
|
+ '6': '个代',
|
|
|
+ '7': '渠道',
|
|
|
+ '5': '团队',
|
|
|
+ '8': '电销组',
|
|
|
+ '3': '合伙人',
|
|
|
+ }
|
|
|
+ return typeAttr?.split(',')
|
|
|
+ .map((typeId: any) => map[typeId] || typeId)
|
|
|
+ .join(',') || '未知'
|
|
|
+}
|
|
|
// 查询条件
|
|
|
let form = ref<OperationSearch>({
|
|
|
salesman: '',
|
|
|
@@ -250,7 +239,7 @@ const cascaderProps = {
|
|
|
// 获取机构数据
|
|
|
const institutionList = () => {
|
|
|
api.institutionApi.institutionList({ name: '', system: '' }).then(res => {
|
|
|
- if(res?.code == 200) {
|
|
|
+ if (res?.code == 200) {
|
|
|
options.value = res.data
|
|
|
} else {
|
|
|
ElMessage({
|
|
|
@@ -268,7 +257,7 @@ const init = () => {
|
|
|
isMember: 2,
|
|
|
...form.value
|
|
|
}).then(res => {
|
|
|
- if(res?.code == 200) {
|
|
|
+ if (res?.code == 200) {
|
|
|
tableData.value = res.data.records
|
|
|
total.value = res.data.total
|
|
|
} else {
|
|
|
@@ -282,10 +271,10 @@ const init = () => {
|
|
|
// 删除
|
|
|
const operationDel = (id: string[]) => {
|
|
|
api.operationApi.operationDelete({
|
|
|
- ids:id,
|
|
|
- getAll: selectType.value == 'all'?1:0
|
|
|
+ ids: id,
|
|
|
+ getAll: selectType.value == 'all' ? 1 : 0
|
|
|
}).then(res => {
|
|
|
- if(res?.code == 200) {
|
|
|
+ if (res?.code == 200) {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
|
type: 'success'
|
|
|
@@ -301,10 +290,10 @@ const operationDel = (id: string[]) => {
|
|
|
}
|
|
|
const operationDelList = (id: string[]) => {
|
|
|
api.operationApi.operationDelete({
|
|
|
- ids:id,
|
|
|
+ ids: id,
|
|
|
getAll: 0
|
|
|
}).then(res => {
|
|
|
- if(res?.code == 200) {
|
|
|
+ if (res?.code == 200) {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
|
type: 'success'
|
|
|
@@ -321,7 +310,7 @@ const operationDelList = (id: string[]) => {
|
|
|
// 启用/禁用
|
|
|
const operationIsEnable = (data: OperationIsEnable) => {
|
|
|
api.operationApi.operationIsEnable(data).then(res => {
|
|
|
- if(res?.code == 200) {
|
|
|
+ if (res?.code == 200) {
|
|
|
ElMessage({
|
|
|
message: res.msg,
|
|
|
type: 'success'
|
|
|
@@ -362,12 +351,12 @@ let selectType = ref('')
|
|
|
let selectAllValue = ref(false)
|
|
|
// 外部的全选
|
|
|
const selectAll = (type: boolean) => {
|
|
|
- if(type) {
|
|
|
- if(selectType.value) {
|
|
|
+ if (type) {
|
|
|
+ if (selectType.value) {
|
|
|
tableData.value.forEach((item: TableDataProps) => {
|
|
|
operationListRef.value!.toggleRowSelection(item, true)
|
|
|
})
|
|
|
- if(selectType.value == 'cur') {
|
|
|
+ if (selectType.value == 'cur') {
|
|
|
selectedList.value = tableData.value
|
|
|
} else {
|
|
|
selectedList.value = []
|
|
|
@@ -391,10 +380,10 @@ const selectTypeChange = (type) => {
|
|
|
tableData.value.forEach((item: TableDataProps) => {
|
|
|
operationListRef.value!.toggleRowSelection(item, true)
|
|
|
})
|
|
|
- if(type == 'cur') {
|
|
|
+ if (type == 'cur') {
|
|
|
selectedList.value = tableData.value
|
|
|
} else {
|
|
|
- selectedList.value =[]
|
|
|
+ selectedList.value = []
|
|
|
}
|
|
|
}
|
|
|
// 批量管理
|
|
|
@@ -408,15 +397,15 @@ const dropdownCommand = (e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let ids = []
|
|
|
- if(tableData.value.length>0) {
|
|
|
+ if (tableData.value.length > 0) {
|
|
|
tableData.value.forEach(item => {
|
|
|
ids.push(item.id)
|
|
|
})
|
|
|
} else {
|
|
|
- if(selectType == 'cur') {
|
|
|
+ if (selectType == 'cur') {
|
|
|
ElMessage({
|
|
|
message: '请选择需要操作的数据',
|
|
|
type: 'warning'
|
|
|
@@ -426,7 +415,7 @@ const dropdownCommand = (e) => {
|
|
|
}
|
|
|
operationDelList(ids)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
break;
|
|
|
@@ -438,15 +427,15 @@ const dropdownCommand = (e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let ids = []
|
|
|
- if(selectedList.value.length>0) {
|
|
|
+ if (selectedList.value.length > 0) {
|
|
|
selectedList.value.forEach(item => {
|
|
|
ids.push(item.id)
|
|
|
})
|
|
|
} else {
|
|
|
- if(selectType == 'cur') {
|
|
|
+ if (selectType == 'cur') {
|
|
|
ElMessage({
|
|
|
message: '请选择需要操作的数据',
|
|
|
type: 'warning'
|
|
|
@@ -457,11 +446,11 @@ const dropdownCommand = (e) => {
|
|
|
let data = {
|
|
|
ids: ids,
|
|
|
isEnable: 1,
|
|
|
- getAll: selectType.value == 'all'?1:0
|
|
|
+ getAll: selectType.value == 'all' ? 1 : 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
break;
|
|
|
@@ -473,15 +462,15 @@ const dropdownCommand = (e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let ids = []
|
|
|
- if(selectedList.value.length>0) {
|
|
|
+ if (selectedList.value.length > 0) {
|
|
|
selectedList.value.forEach(item => {
|
|
|
ids.push(item.id)
|
|
|
})
|
|
|
} else {
|
|
|
- if(selectType == 'cur') {
|
|
|
+ if (selectType == 'cur') {
|
|
|
ElMessage({
|
|
|
message: '请选择需要操作的数据',
|
|
|
type: 'warning'
|
|
|
@@ -492,11 +481,11 @@ const dropdownCommand = (e) => {
|
|
|
let data = {
|
|
|
ids: ids,
|
|
|
isEnable: 0,
|
|
|
- getAll: selectType.value == 'all'?1:0
|
|
|
+ getAll: selectType.value == 'all' ? 1 : 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
break;
|
|
|
@@ -563,12 +552,12 @@ const tableDataCommand = (scope, e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let ids = [scope.row.id]
|
|
|
operationDel(ids)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
break;
|
|
|
@@ -580,16 +569,16 @@ const tableDataCommand = (scope, e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm') {
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let data = {
|
|
|
ids: [scope.row.id],
|
|
|
isEnable: 1,
|
|
|
- getAll: selectType.value == 'all'?1:0
|
|
|
+ getAll: selectType.value == 'all' ? 1 : 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
// if(scope.row.isEnable == '0') {
|
|
|
@@ -617,16 +606,16 @@ const tableDataCommand = (scope, e) => {
|
|
|
showCancelButton: true,
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
- }).then(( action ) => {
|
|
|
- if(action === 'confirm'){
|
|
|
+ }).then((action) => {
|
|
|
+ if (action === 'confirm') {
|
|
|
let data = {
|
|
|
ids: [scope.row.id],
|
|
|
isEnable: 0,
|
|
|
- getAll: selectType.value == 'all'?1:0
|
|
|
+ getAll: selectType.value == 'all' ? 1 : 0
|
|
|
}
|
|
|
operationIsEnable(data)
|
|
|
}
|
|
|
- }).catch(( action ) => {
|
|
|
+ }).catch((action) => {
|
|
|
|
|
|
})
|
|
|
break;
|
|
|
@@ -657,7 +646,7 @@ const addNumber = () => {
|
|
|
let dialogShow = ref(false)
|
|
|
// 关闭新增弹框
|
|
|
const closeAddOperation = (text: string) => {
|
|
|
- if(text == '确定') {
|
|
|
+ if (text == '确定') {
|
|
|
init()
|
|
|
}
|
|
|
dialogShow.value = false
|
|
|
@@ -684,17 +673,21 @@ onMounted(() => {
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
@use "@/assets/styles/common/style.scss";
|
|
|
-.operation{
|
|
|
+
|
|
|
+.operation {
|
|
|
margin: 0 20px;
|
|
|
background: white;
|
|
|
- .operationForm{
|
|
|
+
|
|
|
+ .operationForm {
|
|
|
margin: 20px 0;
|
|
|
- .span-justify{
|
|
|
+
|
|
|
+ .span-justify {
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
}
|
|
|
}
|
|
|
- :deep(.select-all .el-select__wrapper){
|
|
|
+
|
|
|
+ :deep(.select-all .el-select__wrapper) {
|
|
|
box-shadow: none;
|
|
|
background: none;
|
|
|
}
|