提交 5b587766 编写于 作者: X xinla

离职继承完成已分配群聊,交互优化等

上级 edd2d6ad
......@@ -15,7 +15,7 @@ userName:
export function getList(params) {
return request({
url: service + '/leaveUserAllocateList',
params,
params
})
}
......@@ -33,7 +33,7 @@ userName:
export function getListNo(params) {
return request({
url: service + '/leaveUserNoAllocateList',
params,
params
})
}
......@@ -49,7 +49,7 @@ export function allocate(data) {
return request({
url: service + '/allocateLeaveUserAboutData',
method: 'put',
data,
data
})
}
......@@ -67,6 +67,24 @@ export function allocate(data) {
export function getAllocateCustomers(params) {
return request({
url: service + '/getAllocateCustomers',
params,
params
})
}
/**
* 离职已分配客户群
* @param {*} params
{
"pageNum": 0,
"pageSize": 0,
"beginTime": "",
"endTime": "",
"oldOwner": "" 原群主ID
}
*/
export function getAllocateGroups(params) {
return request({
url: service + '/getAllocateGroups',
params
})
}
......@@ -66,7 +66,6 @@ export default {
let matched = this.$route.matched.filter(
(item) => item.meta && item.meta.title
)
console.log(matched)
const first = matched[0]
// if (!this.isDashboard(first)) {
......@@ -91,12 +90,10 @@ export default {
},
handleLink(item) {
const { redirect, path } = item
console.log(redirect, 'redirect')
if (redirect) {
this.$router.push(redirect)
return
}
console.log(this.pathCompile(path))
this.$router.push(this.pathCompile(path))
}
}
......
<script>
import { getAllocateCustomers } from '@/api/customer/dimission'
import AllocatedStaffDetailList from './allocatedStaffDetailList'
export default {
......@@ -8,18 +7,8 @@ export default {
props: {},
data() {
return {
// 查询参数
query: {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
beginTime: undefined,
endTime: undefined,
},
loading: false,
total: 0,
list: [],
dateRange: [], // 离职日期
active: 'customer',
dateRange: [] // 离职日期
}
},
watch: {},
......@@ -28,13 +17,14 @@ export default {
mounted() {},
methods: {
getList() {
this.$refs.AllocatedStaffDetailList.getList(1)
this.$refs[this.active].getList(1)
},
resetForm(formName) {
this.dateRange = []
this.$refs['queryForm'].resetFields()
},
},
this.getList()
}
}
}
</script>
......@@ -43,14 +33,14 @@ export default {
<el-form
ref="queryForm"
:inline="true"
:model="query"
label-width="100px"
label-width="70px"
class="top-search"
>
<el-form-item label="离职日期">
<el-date-picker
v-model="dateRange"
type="daterange"
value-format="yyyy-MM-dd"
:picker-options="pickerOptions"
range-separator="至"
start-placeholder="开始日期"
......@@ -74,17 +64,18 @@ export default {
</el-form-item>
</el-form>
<el-tabs value="first" type="card">
<el-tab-pane label="已分配客户" name="first">
<el-tabs v-model="active">
<el-tab-pane label="已分配客户" name="customer">
<AllocatedStaffDetailList
ref="AllocatedStaffDetailList"
ref="customer"
:dateRange="dateRange"
></AllocatedStaffDetailList>
</el-tab-pane>
<el-tab-pane label="已分配群聊" name="second">
<el-tab-pane label="已分配群聊" name="group">
<AllocatedStaffDetailList
ref="AllocatedStaffDetailList"
ref="group"
:dateRange="dateRange"
type="group"
></AllocatedStaffDetailList>
</el-tab-pane>
</el-tabs>
......
<script>
import { getAllocateCustomers } from '@/api/customer/dimission'
import {
getAllocateCustomers,
getAllocateGroups
} from '@/api/customer/dimission'
export default {
name: 'AllocatedStaffDetailList',
......@@ -8,6 +11,10 @@ export default {
dateRange: {
type: Array,
default: () => []
},
type: {
type: String,
default: 'customer'
}
},
data() {
......@@ -17,6 +24,7 @@ export default {
pageNum: 1,
pageSize: 10,
handoverUserId: undefined,
oldOwner: undefined,
beginTime: undefined,
endTime: undefined
},
......@@ -29,6 +37,7 @@ export default {
computed: {},
created() {
this.query.handoverUserId = this.$route.query.userId
this.query.oldOwner = this.$route.query.userId
this.getList()
},
mounted() {},
......@@ -41,7 +50,9 @@ export default {
}
page && (this.query.pageNum = page)
this.loading = true
getAllocateCustomers(this.query)
;(this.type === 'customer' ? getAllocateCustomers : getAllocateGroups)(
this.query
)
.then(({ rows, total }) => {
this.list = rows
this.total = +total
......@@ -63,8 +74,16 @@ export default {
tooltip-effect="dark"
style="width: 100%"
>
<el-table-column prop="customerName" label="客户名称"></el-table-column>
<el-table-column prop="takeUserName" label="接替员工"></el-table-column>
<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="接替员工所属部门"
......
......@@ -80,6 +80,7 @@ export default {
this.dialogVisibleSelectUser = true
return
}
let loading = this.$loading()
api
.allocate({
handoverUserid: this.currentRow.userId,
......@@ -87,6 +88,10 @@ export default {
})
.then(() => {
this.msgSuccess('操作成功')
loading.close()
})
.catch(() => {
loading.close()
})
},
// 选中数据
......@@ -157,6 +162,7 @@ export default {
</div>
<el-table
v-loading="loading"
ref="multipleTable"
:data="list"
tooltip-effect="dark"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册