From ed6dd1859100f671c84e2498f06f05c9849c779f Mon Sep 17 00:00:00 2001
From: douzhuo <17611323298@163.com>
Date: Mon, 27 Jun 2022 15:50:07 +0800
Subject: [PATCH] =?UTF-8?q?=E6=8E=A5=E5=BE=85=E9=A1=B5=E9=9D=A2=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/mine/details2.vue | 166 ++++++++-----
pages/mine/reception/addreception.vue | 2 +-
pages/mine/reception/consultant.vue | 340 ++++++++++++++++----------
utils/domain.js | 4 +-
4 files changed, 326 insertions(+), 186 deletions(-)
diff --git a/pages/mine/details2.vue b/pages/mine/details2.vue
index 438ead9..f46f8e8 100644
--- a/pages/mine/details2.vue
+++ b/pages/mine/details2.vue
@@ -9,12 +9,6 @@
-
-
+
+
+
+
+
+
+
+
顾
@@ -64,14 +66,14 @@
-
-
+
@@ -107,11 +109,10 @@
src="../../static/images/audioinfo2.png" mode="">
接待信息
-
-
-
+
+ 确定
@@ -131,13 +132,15 @@
-
-
+
+
常错词:
-
+
@@ -148,7 +151,7 @@
-
+
+
+
+
+
+
+
+
+
@@ -26,18 +35,20 @@
-
-
-
-
- 暂无空闲顾问
+
+
+
+
+ 暂无空闲顾问
+
-
+
保存
-
-
+
@@ -51,39 +62,84 @@
current: null,
chosedAgentId: '',
textcdhSKJ: '',
- show:false,
+ show: false,
content: '东临碣石,以观沧海',
- confirmtext:'1',//确认文字
- canceltext:'2',//取消文字
- daitiReceptionobj:{},
- replaceReception:0
+ confirmtext: '1', //确认文字
+ canceltext: '2', //取消文字
+ daitiReceptionobj: {},
+ replaceReception: 0,
+ keywords: '', // 关键词
+
+ list: [], // 部门列表
+ listCurrent: 0, //选中分类下标
+ deptId: '',
+
}
},
onLoad(option) {
this.customerId = option.id;
+ this.getAllList()
},
onShow() {
this.buildingID = uni.getStorageSync('buildingID').id;
- this.getFreeList();
+ this.getFreeList();
+
},
methods: {
- //取消
- confirmA(){
- if(this.daitiReceptionobj.assign!=null){
+ // 获取全部的列表
+ getAllList() {
+ let params = {
+ houseId: uni.getStorageSync('buildingID').id
+ }
+ this.$u.post('/cusLvStatistics/findAllDeptIdByHouseId', params)
+ .then(res => {
+ console.log(res, 'list')
+ if (res && res.length > 0) {
+ this.list = res
+ this.list.unshift({
+ deptName: '全部',
+ deptId: '',
+ })
+ }
+ })
+ },
+
+ // 重置页面数据
+ initPageList() {
+ this.freeList = []
+ },
+ // 选中部门
+ change(index) {
+ this.deptId = this.list[index].deptId
+ this.listCurrent = index;
+ this.initPageList()
+ this.getFreeList()
+ },
+ // 搜索
+ searchFunc() {
+ console.log('我搜索了', 'keywords')
+ this.initPageList()
+ this.getFreeList()
+ },
+
+ //取消
+ confirmA() {
+ if (this.daitiReceptionobj.assign != null) {
+ this.baochunfun()
+ } else {
+ uni.showToast({
+ icon: "none",
+ title: "【" + this.daitiReceptionobj.owner.name + "】正在接待中"
+ })
+ return;
+ }
+ },
+ // 确认
+ confirmB() {
+ this.replaceReception = 1;
this.baochunfun()
- }else{
- uni.showToast({
- icon: "none",
- title: "【"+this.daitiReceptionobj.owner.name+"】正在接待中"
- })
- return;
- }
- },
- // 确认
- confirmB(){
- this.replaceReception=1;
- this.baochunfun()
- },
+ },
+ // 保存按钮点击事件
save() {
console.log(this.chosedAgentId)
if (!this.chosedAgentId) {
@@ -98,34 +154,37 @@
agentId: that.chosedAgentId,
id: that.customerId
}).then(res => {
- if(res.unchecked==0){
+ if (res.unchecked == 0) {
that.baochunfun()
- }else{
- if(res.zs==0){
+ } else {
+ if (res.zs == 0) {
that.baochunfun()
- }else{
- if(res.assign==null&&res.replacement==null){
+ } else {
+ if (res.assign == null && res.replacement == null) {
that.baochunfun()
- }else{
- if(res.assign==null){
- that.daitiReceptionobj=res;
- that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?"
- that.confirmtext=res.replacement.name +"代接待",//确认文字
- that.canceltext=res.owner.name +'接待',//取消文字
- that.show=true;
- }else{
- that.daitiReceptionobj=res;
- that.content="此客户的顾问为【"+ res.owner.name +"】,确认让【"+ res.replacement.name +"】代接待吗?"
- that.confirmtext=res.replacement.name +"代接待",//确认文字
- that.canceltext=res.assign.name +'接待',//取消文字
- that.show=true;
+ } else {
+ if (res.assign == null) {
+ that.daitiReceptionobj = res;
+ that.content = "此客户的顾问为【" + res.owner.name + "】,确认让【" + res.replacement.name +
+ "】代接待吗?"
+ that.confirmtext = res.replacement.name + "代接待", //确认文字
+ that.canceltext = res.owner.name + '接待', //取消文字
+ that.show = true;
+ } else {
+ that.daitiReceptionobj = res;
+ that.content = "此客户的顾问为【" + res.owner.name + "】,确认让【" + res.replacement.name +
+ "】代接待吗?"
+ that.confirmtext = res.replacement.name + "代接待", //确认文字
+ that.canceltext = res.assign.name + '接待', //取消文字
+ that.show = true;
}
}
}
}
});
},
- baochunfun(){
+ // 保存指派顾问
+ baochunfun() {
uni.showLoading({
title: "保存中",
mask: true
@@ -134,27 +193,30 @@
this.$u.post("customer/assign", {
agentId: that.chosedAgentId,
id: that.customerId,
- replaceReception:this.replaceReception
+ replaceReception: this.replaceReception
}).then(res => {
uni.showToast({
icon: "none",
title: "分配成功"
})
- uni.navigateBack();
- uni.hideLoading();
- });
+ uni.hideLoading()
+ uni.navigateBack()
+ })
},
+ // 获取顾问列表
getFreeList() {
- this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID).then(res => {
- if (res.length == 0) {
- this.freeList = []
- } else {
- this.freeList = res;
- this.textcdhSKJ = res[0].name
- }
- })
+ this.$u.get("/zkAgentPool/freeList?itemId=" + this.buildingID + "&deptId=" + this.deptId + '&name=' + this
+ .keywords)
+ .then(res => {
+ if (res.length == 0) {
+ this.freeList = []
+ } else {
+ this.freeList = res;
+ this.textcdhSKJ = res[0].name
+ }
+ })
},
- radioChange: function(evt) {
+ radioChange(evt) {
this.chosedAgentId = '';
this.chosedAgentId = evt.detail.value;
},
@@ -163,50 +225,17 @@
diff --git a/utils/domain.js b/utils/domain.js
index 656f1a7..8877528 100644
--- a/utils/domain.js
+++ b/utils/domain.js
@@ -1,10 +1,10 @@
// http.js使用域名
-const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
+// const baseUrl = 'http://81.70.55.170:9090/autoSR/api';// 最新测试
// const baseUrl = 'http://192.168.31.211:8080/api';// 泽明
// const baseUrl = 'http://localhost:8080/autoSR/api'; // 本地
// const baseUrl = 'http://192.168.31.161:8080/autoSR/api'; // 长龙
// const baseUrl = 'http://192.168.31.86:9090/api'; // 盛浩
-// const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
+const baseUrl = 'https://zkgj.quhouse.com/api'; // 质控正式
// const baseUrl = 'https://hfju.com/api'; // 数智正式