|
|
@@ -5,7 +5,7 @@ |
|
|
|
下一位接待顾问:{{textcdhSKJ}} |
|
|
|
</view> |
|
|
|
<!-- 搜索筛选顾问 --> |
|
|
|
<view class="search-tag"> |
|
|
|
<view class="search-tag" :class="{pdBtm: isShowBtn}"> |
|
|
|
<u-search v-model="keywords" @search="searchFunc" bgColor="#F8F8F8" shape="round" placeholder="顾问名称" |
|
|
|
:showAction="false" :clearabled="true"></u-search> |
|
|
|
|
|
|
@@ -85,10 +85,16 @@ |
|
|
|
from: '', // 来源页面需要通知的事件 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
isShowBtn() { |
|
|
|
return this.list.length > 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
onLoad(option) { |
|
|
|
this.LOADING = true |
|
|
|
if (option.id) this.customerId = option.id; |
|
|
|
if (option.from) this.from = option.from |
|
|
|
if (option.chosedAgentId) this.chosedAgentId = option.chosedAgentId |
|
|
|
}, |
|
|
|
async onShow() { |
|
|
|
this.buildingID = uni.getStorageSync('buildingID').id; |
|
|
@@ -101,7 +107,7 @@ |
|
|
|
this.listCurrent = Number(e) |
|
|
|
this.getFreeList(); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// |
|
|
|
searchFunc() { |
|
|
|
this.getFreeList(); |
|
|
@@ -116,25 +122,27 @@ |
|
|
|
try { |
|
|
|
let res = await this.$u.get(`/zkAgentPool/getAllDeptName?itemId=${this.buildingID}`) |
|
|
|
console.log(res) |
|
|
|
if (res&&res.length>0) { |
|
|
|
if (res && res.length > 0) { |
|
|
|
res.unshift({ |
|
|
|
id: '', |
|
|
|
deptName: '全部' |
|
|
|
}) |
|
|
|
this.list = res |
|
|
|
} |
|
|
|
} catch(e) { |
|
|
|
} catch (e) { |
|
|
|
console.log(e) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取空闲顾问 |
|
|
|
async getFreeList() { |
|
|
|
try { |
|
|
|
let deptId = this.list.length > 0 ? this.list[this.listCurrent].id : '' |
|
|
|
// deptId 部门id |
|
|
|
// name 顾问名称 |
|
|
|
let res = await this.$u.get(`/zkAgentPool/freeList?itemId=${this.buildingID}&name=${this.keywords||''}&deptId=${deptId}`) |
|
|
|
let res = await this.$u.get( |
|
|
|
`/zkAgentPool/freeList?itemId=${this.buildingID}&name=${this.keywords||''}&deptId=${deptId}` |
|
|
|
) |
|
|
|
if (res.length == 0) { |
|
|
|
this.freeList = [] |
|
|
|
} else { |
|
|
@@ -143,7 +151,7 @@ |
|
|
|
this.current = res.findIndex(item => item.agentId == this.customerId) |
|
|
|
} |
|
|
|
this.freeList = res; |
|
|
|
|
|
|
|
|
|
|
|
this.freeList.forEach(item => { |
|
|
|
if (item.onLine == 0) { |
|
|
|
item.label = "(离线)"; |
|
|
@@ -163,7 +171,7 @@ |
|
|
|
this.LOADING = false |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//取消 |
|
|
|
confirmA() { |
|
|
|
if (this.daitiReceptionobj.assign != null) { |
|
|
@@ -181,7 +189,7 @@ |
|
|
|
this.replaceReception = 1; |
|
|
|
this.baochunfun() |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
save() { |
|
|
|
console.log(this.chosedAgentId) |
|
|
|
if (!this.chosedAgentId) { |
|
|
@@ -191,14 +199,14 @@ |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 如果是从其他页面跳转过来的 |
|
|
|
if (this.from) { |
|
|
|
uni.$emit(this.from, this.chosedAgentId) |
|
|
|
uni.navigateBack() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const that = this; |
|
|
|
this.$u.post("customer/daitiReception", { |
|
|
|
agentId: that.chosedAgentId, |
|
|
@@ -281,7 +289,7 @@ |
|
|
|
|
|
|
|
.search-tag { |
|
|
|
margin: 0 0 20rpx 0; |
|
|
|
padding: 30rpx 30rpx 0; |
|
|
|
padding: 30rpx; |
|
|
|
background: #fff; |
|
|
|
|
|
|
|
.tabs-box { |
|
|
@@ -289,6 +297,9 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.pdBtm { |
|
|
|
padding: 30rpx 30rpx 0; |
|
|
|
} |
|
|
|
|
|
|
|
.content { |
|
|
|
flex-grow: 1; |
|
|
@@ -323,24 +334,24 @@ |
|
|
|
margin-top: 4rpx; |
|
|
|
margin-bottom: 24rpx; |
|
|
|
line-height: 30rpx; |
|
|
|
|
|
|
|
|
|
|
|
.names { |
|
|
|
font-weight: 600; |
|
|
|
color: #333333; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.red { |
|
|
|
margin-left: 10rpx; |
|
|
|
color: #E7483C; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.gren { |
|
|
|
margin-left: 10rpx; |
|
|
|
color: #43CD80; |
|
|
|
font-size: 28rpx; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.none { |
|
|
|
margin-left: 10rpx; |
|
|
|
color: #999; |
|
|
|