Browse Source

Merge branch 'master' into newyun

newyun
corala 2 years ago
parent
commit
c31faf3ca2
2 changed files with 28 additions and 17 deletions
  1. +1
    -1
      pages/mine/reception/addreception.vue
  2. +27
    -16
      pages/mine/reception/consultant.vue

+ 1
- 1
pages/mine/reception/addreception.vue View File

@@ -348,7 +348,7 @@
}); });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: `/pages/mine/reception/consultant?from=addreception&id=${this.parames.agentId}`
url: `/pages/mine/reception/consultant?from=addreception&id=${this.parames.agentId}&chosedAgentId=${this.parames.agentId}`
}) })


} }


+ 27
- 16
pages/mine/reception/consultant.vue View File

@@ -5,7 +5,7 @@
下一位接待顾问:{{textcdhSKJ}} 下一位接待顾问:{{textcdhSKJ}}
</view> </view>
<!-- 搜索筛选顾问 --> <!-- 搜索筛选顾问 -->
<view class="search-tag">
<view class="search-tag" :class="{pdBtm: isShowBtn}">
<u-search v-model="keywords" @search="searchFunc" bgColor="#F8F8F8" shape="round" placeholder="顾问名称" <u-search v-model="keywords" @search="searchFunc" bgColor="#F8F8F8" shape="round" placeholder="顾问名称"
:showAction="false" :clearabled="true"></u-search> :showAction="false" :clearabled="true"></u-search>


@@ -85,10 +85,16 @@
from: '', // 来源页面需要通知的事件 from: '', // 来源页面需要通知的事件
} }
}, },
computed: {
isShowBtn() {
return this.list.length > 0
}
},
onLoad(option) { onLoad(option) {
this.LOADING = true this.LOADING = true
if (option.id) this.customerId = option.id; if (option.id) this.customerId = option.id;
if (option.from) this.from = option.from if (option.from) this.from = option.from
if (option.chosedAgentId) this.chosedAgentId = option.chosedAgentId
}, },
async onShow() { async onShow() {
this.buildingID = uni.getStorageSync('buildingID').id; this.buildingID = uni.getStorageSync('buildingID').id;
@@ -101,7 +107,7 @@
this.listCurrent = Number(e) this.listCurrent = Number(e)
this.getFreeList(); this.getFreeList();
}, },
// //
searchFunc() { searchFunc() {
this.getFreeList(); this.getFreeList();
@@ -116,25 +122,27 @@
try { try {
let res = await this.$u.get(`/zkAgentPool/getAllDeptName?itemId=${this.buildingID}`) let res = await this.$u.get(`/zkAgentPool/getAllDeptName?itemId=${this.buildingID}`)
console.log(res) console.log(res)
if (res&&res.length>0) {
if (res && res.length > 0) {
res.unshift({ res.unshift({
id: '', id: '',
deptName: '全部' deptName: '全部'
}) })
this.list = res this.list = res
} }
} catch(e) {
} catch (e) {
console.log(e) console.log(e)
} }
}, },
// 获取空闲顾问 // 获取空闲顾问
async getFreeList() { async getFreeList() {
try { try {
let deptId = this.list.length > 0 ? this.list[this.listCurrent].id : '' let deptId = this.list.length > 0 ? this.list[this.listCurrent].id : ''
// deptId 部门id // deptId 部门id
// name 顾问名称 // 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) { if (res.length == 0) {
this.freeList = [] this.freeList = []
} else { } else {
@@ -143,7 +151,7 @@
this.current = res.findIndex(item => item.agentId == this.customerId) this.current = res.findIndex(item => item.agentId == this.customerId)
} }
this.freeList = res; this.freeList = res;
this.freeList.forEach(item => { this.freeList.forEach(item => {
if (item.onLine == 0) { if (item.onLine == 0) {
item.label = "(离线)"; item.label = "(离线)";
@@ -163,7 +171,7 @@
this.LOADING = false this.LOADING = false
} }
}, },
//取消 //取消
confirmA() { confirmA() {
if (this.daitiReceptionobj.assign != null) { if (this.daitiReceptionobj.assign != null) {
@@ -181,7 +189,7 @@
this.replaceReception = 1; this.replaceReception = 1;
this.baochunfun() this.baochunfun()
}, },
save() { save() {
console.log(this.chosedAgentId) console.log(this.chosedAgentId)
if (!this.chosedAgentId) { if (!this.chosedAgentId) {
@@ -191,14 +199,14 @@
}) })
return return
} }
// 如果是从其他页面跳转过来的 // 如果是从其他页面跳转过来的
if (this.from) { if (this.from) {
uni.$emit(this.from, this.chosedAgentId) uni.$emit(this.from, this.chosedAgentId)
uni.navigateBack() uni.navigateBack()
return return
} }
const that = this; const that = this;
this.$u.post("customer/daitiReception", { this.$u.post("customer/daitiReception", {
agentId: that.chosedAgentId, agentId: that.chosedAgentId,
@@ -281,7 +289,7 @@


.search-tag { .search-tag {
margin: 0 0 20rpx 0; margin: 0 0 20rpx 0;
padding: 30rpx 30rpx 0;
padding: 30rpx;
background: #fff; background: #fff;


.tabs-box { .tabs-box {
@@ -289,6 +297,9 @@
} }
} }


.pdBtm {
padding: 30rpx 30rpx 0;
}


.content { .content {
flex-grow: 1; flex-grow: 1;
@@ -323,24 +334,24 @@
margin-top: 4rpx; margin-top: 4rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
line-height: 30rpx; line-height: 30rpx;
.names { .names {
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
} }
.red { .red {
margin-left: 10rpx; margin-left: 10rpx;
color: #E7483C; color: #E7483C;
font-size: 28rpx; font-size: 28rpx;
} }
.gren { .gren {
margin-left: 10rpx; margin-left: 10rpx;
color: #43CD80; color: #43CD80;
font-size: 28rpx; font-size: 28rpx;
} }
.none { .none {
margin-left: 10rpx; margin-left: 10rpx;
color: #999; color: #999;


Loading…
Cancel
Save