Commit d29114b5 authored by Mac's avatar Mac

1

parent e08679c0
......@@ -398,6 +398,19 @@ export function SetSynvEduEmployee(data) {
})
}
/**
* 获取离职人员未交接客服列表
*
*/
export function setUserCoustomerTransfer(data) {
return request({
url: '/QYWeChat/SetUserCoustomerTransfer',
method: 'post',
data
})
}
......
......@@ -10,7 +10,7 @@
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat class="sticky-column-table"
separator="none" title="" :data="data" :columns="columns" row-key="name">
<template v-slot:top="props">
<div class="q-table__title">离职人员未交接客列表</div>
<div class="q-table__title">离职人员未交接客列表</div>
<q-space />
</template>
......@@ -180,7 +180,7 @@
return
}
setLeaveUserCustomerTransfer(this.jiaojMsg).then(res => {
if(res.Code)
if(res.Code==1)
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
......
......@@ -11,7 +11,6 @@
padding: 0 3px;
min-height: 0 !important;
}
</style>
<template>
<div class="page-body">
......@@ -54,7 +53,8 @@
<el-date-picker v-model="dateListThree" @change="resetSearch()" value-format="yyyy-MM-dd" type="daterange" style="border:none;"
  range-separator="至"  start-placeholder="离职开始日期"  end-placeholder="离职结束日期">
</el-date-picker>
 </template>
 
</template>
 </q-field>
</div>
<div class="col-3 Sysuser_Date">
......@@ -182,6 +182,11 @@
<q-item-label>重置密码</q-item-label>
</q-item-section>
</q-item>
<q-item clickable v-close-popup @click="khHandover(props.row)">
<q-item-section>
<q-item-label>客户交接</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
</div>
......@@ -194,6 +199,40 @@
</employee-set>
<employee-info v-if="isShowEmpInfo" :save-obj="managerOption" @close="closeStuForm" @success="refreshPage">
</employee-info>
<q-dialog v-model="isDetails">
<q-card style="width: 450px;">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">客户交接</div>
<q-space />
<q-btn icon="close" flat round dense v-close-popup />
</q-card-section>
<q-separator />
<q-card-section>
<div>
<q-select style="width: 100%;" filled stack-label option-value="Id" option-label="EmployeeName" use-input
v-model="joinMsg.ReceiveUserId" @filter="filterFn" ref="Id" :options="Employeelist" label="交接人员"
:dense="false" emit-value map-options />
</div>
<div style="font-size: 12px;color:red;margin-top: 10px;">注:必须选择一项转移目标</div>
<div style="display: flex;align-items: center;margin-top: 0px;">
<div style="width: 110px;">客户转移</div>
<q-radio v-model="joinMsg.CustomerTransfer" val="1" label="是" />
<q-radio v-model="joinMsg.CustomerTransfer" val="2" label="否" />
</div>
<div style="display: flex;align-items: center;margin-top: 10px;">
<div style="width: 110px;">渠道码人员转移</div>
<q-radio v-model="joinMsg.ChannelTransfer" val="1" label="是" />
<q-radio v-model="joinMsg.ChannelTransfer" val="2" label="否" />
</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn class="q-mr-md" label="取消" @click="isDetails=false" />
<q-btn color="accent" class="q-mr-md" label="确定" @click="saveOrderInfo()" :loading="jtloading"/>
</q-card-actions>
</q-card>
</q-dialog>
</div>
</div>
</template>
......@@ -208,6 +247,7 @@
} from '../../api/school/index'
import {
SetSynvEduEmployee,
setUserCoustomerTransfer
} from '../../api/system/wechat';
import {
BatchResetUserPassword
......@@ -219,6 +259,9 @@
import {
getDeptTree
} from '../../api/system/dept.js'
import {
queryEmployee
} from '../../api/users/user'
import managerForm from '../../components/school/manager/manager-form'
import employeeSet from '../../components/school/manager/employee-set'
import employeeInfo from '../../components/school/manager/employee-info'
......@@ -240,6 +283,8 @@
data() {
return {
currentUrl: "",
isDetails: false,
jtloading:false,
columns: [{
name: 'desc',
required: true,
......@@ -370,6 +415,14 @@
selected: []
},
isShowEmpInfo: false, //是否显示员工信息
joinMsg: {
TransferUserId: '',
ReceiveUserId: '',
CustomerTransfer: '1',
ChannelTransfer: '1'
},
Employeelist: [],
AllEmployeelist: []
}
},
mounted() {
......@@ -379,6 +432,8 @@
this.getDepartList(0);
this.queryPostList(0);
this.getLeaveState();
this.queryEmployee()
},
methods: {
resetSearch() {
......@@ -691,10 +746,10 @@
path: tempStr
});
},
synchronization(){
synchronization() {
Loading.show({
message: '数据正在同步中,请稍后进入企业微信查看',
spinner:QSpinnerPie
spinner: QSpinnerPie
})
SetSynvEduEmployee({}).then(res => {
if (res.Code == 1) {
......@@ -708,17 +763,87 @@
Loading.hide()
}
})
.catch(err=>{
.catch(err => {
Loading.hide()
})
},
queryEmployee() {//下拉人员列表
queryEmployee({ IsLeave: 1 }).then(res => {
if (res.Code == 1) {
this.AllEmployeelist = JSON.parse(JSON.stringify(res.Data));
this.Employeelist = res.Data
}
}).catch(() => {
})
},
filterFn(val, update) {
update(() => {
if (val === '') {
this.Employeelist = JSON.parse(JSON.stringify(this.AllEmployeelist))
} else {
const needle = val.toLowerCase()
this.Employeelist = this.AllEmployeelist.filter(v => v.EmployeeName.toLowerCase().indexOf(needle) > -1)
}
})
},
khHandover(row) {//客户交接
this.joinMsg.TransferUserId = row.EmAccountId
this.joinMsg.CustomerTransfer = '1'
this.joinMsg.ChannelTransfer = '1'
this.isDetails = true
},
saveOrderInfo() {//保存
if (this.joinMsg.ReceiveUserId == '') {
this.$q.notify({
type: 'negative',
message: `请选择接替人员`,
position: 'top'
})
return
}
if (this.joinMsg.ReceiveUserId == this.joinMsg.TransferUserId) {
this.$q.notify({
type: 'negative',
message: `接替人员不能是本人`,
position: 'top'
})
return
}
if(this.joinMsg.CustomerTransfer ==2 && this.joinMsg.ChannelTransfer==2){
this.$q.notify({
type: 'negative',
message: `转移目标必须选择一项`,
position: 'top'
})
return
}
this.jtloading = true
setUserCoustomerTransfer(this.joinMsg).then(res => {
if(res.Code==1)
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: res.Message,
position: 'top'
})
this.isDetails = false
this.jtloading = false
this.getManager()
})
.catch(err => {
this.jtloading = false
})
},
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment