Commit f36ba6a3 by 姜鹏凯

离职功能优化

1 parent efd36ad9
......@@ -53,7 +53,7 @@
* userId 是 当前跟进人id
*/
getDetail() {
getDetail({ ...this.$route.query, delFlag: 1 }).then(({ data }) => {
getDetail({ ...this.$route.query, delFlag: this.$route.query.isDelete ? 1 : 0 }).then(({ data }) => {
data.companyTags && (data.companyTags = data.companyTags.split(','))
this.customer = data
......
<script>
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
import { getAllocateCustomers, getAllocateGroups } from '@/api/customer/dimission'
export default {
name: 'AllocatedStaffDetailList',
components: {},
props: {
dateRange: {
type: Array,
default: () => []
},
type: {
type: String,
default: 'customer'
}
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined
export default {
name: 'AllocatedStaffDetailList',
components: {},
props: {
dateRange: {
type: Array,
default: () => []
},
loading: false,
total: 0,
list: []
}
},
watch: {},
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.getList()
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
type: {
type: String,
default: 'customer'
}
},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined
},
loading: false,
total: 0,
list: []
}
},
watch: {},
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.getList()
},
mounted() {},
methods: {
/** 查询 */
getList(page) {
if (this.dateRange) {
this.query.beginTime = this.dateRange[0]
this.query.endTime = this.dateRange[1]
}
page && (this.query.pageNum = page)
this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
}
page && (this.query.pageNum = page)
this.loading = true
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(this.query)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
this.loading = false
})
.catch(() => {
this.loading = false
})
}
}
}
</script>
<template>
<div class="page">
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%">
<el-table-column
v-if="type === 'customer'"
prop="customerName"
label="客户名称"
></el-table-column>
<el-table ref="multipleTable" :data="list" tooltip-effect="dark" style="width: 100%;">
<el-table-column v-if="type === 'customer'" prop="customerName" label="客户名称"></el-table-column>
<el-table-column v-else prop="groupName" label="群名称"></el-table-column>
<el-table-column
:prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'"
label="接替员工"
></el-table-column>
<el-table-column
prop="department"
label="接替员工所属部门"
show-overflow-tooltip
></el-table-column>
<el-table-column :prop="type === 'customer' ? 'takeUserName' : 'newOwnerName'" label="接替员工"></el-table-column>
<el-table-column prop="department" label="接替员工所属部门" show-overflow-tooltip></el-table-column>
<el-table-column prop="allocateTime" label="分配时间" show-overflow-tooltip></el-table-column>
<el-table-column label="操作" width="100">
<template slot-scope="{ row }">
......@@ -87,7 +76,7 @@ export default {
@click="
$router.push({
path: 'customerDetail',
query: { externalUserid: row.externalUserid, userId: row.firstUserId }
query: { externalUserid: row.externalUserid, userId: row.firstUserId, isDelete: true }
})
"
type="text"
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!