wangxiaohua 3 years ago
parent
commit
834dbd7296
5 changed files with 369 additions and 98 deletions
  1. +2
    -1
      config.js
  2. +54
    -13
      pages/index/customer.vue
  3. +190
    -21
      pages/mine/reception/addreception.vue
  4. +123
    -63
      pages/mine/reception/consultant.vue
  5. BIN
      static/images/customerEmpty.png

+ 2
- 1
config.js View File

@@ -70,7 +70,8 @@ var config = {
realTimeStatistics:`${host}/cusLvStatistics/realTimeStatistics`, realTimeStatistics:`${host}/cusLvStatistics/realTimeStatistics`,
//首页本周工作 //首页本周工作
workThisWeek:`${host}/cusLvStatistics/workThisWeek`, workThisWeek:`${host}/cusLvStatistics/workThisWeek`,
//查询是否开启选择顾问权限
getSelfAssignedByHouseId:`${host}/user/getSelfAssignedByHouseId`,
} }
}; };
module.exports = config; module.exports = config;

+ 54
- 13
pages/index/customer.vue View File

@@ -26,16 +26,16 @@
</view> </view>
</view> </view>
<view class="footer-button" v-if="item.status!=0"> <view class="footer-button" v-if="item.status!=0">
<view class="footer1">接待延时</view>
<view class="footer1" @click="goConsultant">重新指派</view>
<view class="footer3">结束接待</view>
<view class="footer1" @click.stop="addTime(item)">接待延时</view>
<view class="footer1" @click.stop="assign(item)">重新指派</view>
<view class="footer3" @click.stop="changeEnd(item.id)">结束接待</view>
</view> </view>
<view class="centerbox" v-if="item.status==0"> <view class="centerbox" v-if="item.status==0">
<view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view> <view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
</view> </view>
<view class="footer-button" v-if="item.status==0"> <view class="footer-button" v-if="item.status==0">
<view class="footer3">指派顾问</view>
<view class="footer3" @click.stop="assign(item)">指派顾问</view>
</view> </view>
</view> </view>
@@ -85,6 +85,45 @@
this.waitCustomList=data; this.waitCustomList=data;
}); });
}, },
//延时接待
addTime(item) {
uni.showModal({
content: "确定延长半小时接待时间?",
cancelColor: "#999999",
success: res => {
if (res.confirm) {
this.$u.post("/customer/delayed", {
cusId: item.id
}).then(res => {
uni.showToast({
icon: "none",
title: "操作成功"
})
});
}
}
})
},
//结束接待
changeEnd(id) {
uni.showModal({
content: "确定更改当前客户接待状态为结束?",
cancelColor: "#999999",
success: res => {
if (res.confirm) {
this.$u.post("/customer/endReception", {
id
}).then(res => {
uni.showToast({
icon: "none",
title: "操作成功"
})
this.init();
});
}
}
})
},
//新增接待 //新增接待
addreception(){ addreception(){
const { const {
@@ -99,7 +138,6 @@
}); });
return return
} }
console.log(this.waitCustomList.length)
if(this.waitCustomList.length==0){ if(this.waitCustomList.length==0){
uni.navigateTo({ uni.navigateTo({
url: "/pages/customer/add/add" url: "/pages/customer/add/add"
@@ -125,18 +163,21 @@
} }
}else{ }else{
uni.navigateTo({ uni.navigateTo({
url: "/pages/customer/add/add"
})
url: '/pages/mine/reception/addreception'
});
} }
// uni.navigateTo({
// url: '/pages/mine/reception/addreception'
// });
}, },
goConsultant(){
assign(item) {
let url = `/pages/mine/reception/consultant?id=${item.id}`
if (item.beforeAgentId) {
url += `&beforeAgentId=${item.beforeAgentId}`;
}
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/reception/consultant'
});
url: url
})
}, },
}, },
}; };


+ 190
- 21
pages/mine/reception/addreception.vue View File

@@ -6,7 +6,7 @@
<view class="title"> <view class="title">
<view class="titletext">客户姓名</view> <view class="titletext">客户姓名</view>
<view class="titletext2"> <view class="titletext2">
<input class="titletext-input" placeholder-class="titletext-input" type="text" placeholder="请输入客户姓名(必填)" />
<input class="titletext-input" v-model="parames.name" placeholder-class="titletext-input" type="text" placeholder="请输入客户姓名(必填)" />
</view> </view>
<view class="titleimg"> <view class="titleimg">
<!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> --> <!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
@@ -14,29 +14,33 @@
</view> </view>
<view class="title"> <view class="title">
<view class="titletext">客户性别</view> <view class="titletext">客户性别</view>
<view class="titletext2">
<view class="titletext2 displayclick" style="display: flex;align-items: center;padding-left: 10rpx;">
<view class="sexRadio" @click="changeSex(1)" :class="{active:parames.sex == 1}">男士</view>
<view class="sexRadio" @click="changeSex(2)" :class="{active:parames.sex == 2}">女士</view>
</view> </view>
</view> </view>
<view class="title"> <view class="title">
<view class="titletext">联系电话</view> <view class="titletext">联系电话</view>
<view class="titletext2"> <view class="titletext2">
<input class="titletext-input" placeholder-class="titletext-input" type="text" placeholder="请输入联系电话" />
<input class="titletext-input" v-model="parames.phone" placeholder-class="titletext-input" type="text" placeholder="请输入联系电话" />
</view> </view>
</view> </view>
<view class="title"> <view class="title">
<view class="titletext">接待人数</view> <view class="titletext">接待人数</view>
<view class="titletext2">
<view class="titletext2" style="display: flex;align-items: center;justify-content: space-around;">
<view class="num" v-for="i in 6" :key="i" :class="{active:parames.howMany == i+1}"
@click="changeHowMany(i+1)">
{{i + 1}}
</view>
</view> </view>
</view> </view>
<view class="title" style="border: none;">
<view class="title" style="border: none;" @click="Buildingselection()">
<view class="titletext">客户来源</view> <view class="titletext">客户来源</view>
<view class="titletext2">
<view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
{{parames.sourceName||'请选择客户来源'}}
</view> </view>
<view class="titleimg"> <view class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
@@ -44,22 +48,27 @@
</view> </view>
</view> </view>
<view class="Pinspeak">顾问</view>
<view class="chented">
<view class="Pinspeak" v-if="shifoinfo==0">顾问</view>
<view class="chented" v-if="shifoinfo==0" @click="clickShowhid()">
<view class="title" style="border: none;"> <view class="title" style="border: none;">
<view class="titletext">接待顾问</view> <view class="titletext">接待顾问</view>
<view class="titletext2">
请选择接待顾问
<view class="titletext2" style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
{{text || '请选择接待顾问'}}
</view> </view>
<view class="titleimg"> <view class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
</view> </view>
</view>
</view>
</view> </view>
<view class="clive">确定</view>
<view class="clive" @click="save">确定</view>
<view v-if="Showhiddenunits">
<u-select :mask-close-able="false" v-model="Showhiddenunits" mode="single-column" :list="list" @cancel="cancel" @confirm="confirm"></u-select>
</view>
<view v-if="Showhid">
<u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" @confirm="confirm1"></u-select>
</view>
</view> </view>
</template> </template>


@@ -71,18 +80,178 @@
export default { export default {
data() { data() {
return { return {
Showhiddenunits:false,
list: [
{label: '自然到访',value:'自然到访'},
{label: '渠道推荐',value:'渠道推荐'},
],
parames: {
name: '',
// 性别1男 2女
sex: 1,
phone: '',
source: null,
sourceName: null,
howMany: 1,
agentId:null,
projectId:''
},
shifoinfo:0,
freeList:[],
Showhid:false,
text:null
}; };
}, },
onShow: function() { onShow: function() {

this.parames.projectId=uni.getStorageSync('buildingID').id;
this.init()
this.getFreeList();
}, },
methods: { methods: {

save() {
const {
dataCode
} = uni.getStorageSync("weapp_session_userInfo_data");
if (this.parames.name.length==0) {
uni.showToast({
icon: "none",
title: "客户姓名不能为空"
})
return;
}
if (this.parames.phone && !this.$u.test.mobile(this.parames.phone)) {
uni.showToast({
icon: "none",
title: "手机号码格式不正确"
})
return;
}
uni.showLoading({
title: "保存中",
mask: true
})
if (dataCode == 6) {
this.$u.post("/customer/gwAdd", this.parames).then(res => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "保存成功"
})
// uni.setStorageSync('addcustomer', true)
uni.navigateBack()
})
} else {
this.$u.post("/customer/add", this.parames).then(res => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "保存成功"
})
// uni.setStorageSync('addcustomer', true)
uni.navigateBack()
})
}
},
changeSex(sex) {
this.parames.sex = sex;
},
changeHowMany(num) {
this.parames.howMany = num;
},
clickShowhid(){
if(this.freeList.length==0){
uni.showToast({
icon:'none',
title: '当前无可用排班顾问',
duration: 2000
});
}else{
this.Showhid=true;
}
},
cancel1(){
this.Showhid=false;
},
confirm1(e) {
this.text=e[0].label;
this.parames.agentId=e[0].value;
this.Showhid=false;
},
Buildingselection(){
this.Showhiddenunits=true;
},
cancel(){
this.Showhiddenunits=false;
},
confirm(e) {
this.parames.sourceName=e[0].value;
this.Showhiddenunits=false;
},
init(){
uni.request({
url: config.service.getSelfAssignedByHouseId+"?houseId="+this.parames.projectId,
method: "GET",
header: {
'content-type': 'application/json',
'Access-Token': uni.getStorageSync('weapp_session_login_data').token
},
success: (data) => {
if(data.data.code==10000){
this.shifoinfo=data.data.data.selfAssigned
}
}
})
},
//获取顾问列表
getFreeList() {
this.$u.get("/zkAgentPool/freeList?itemId="+this.parames.projectId).then(res => {
this.freeList = res;
this.freeList.forEach(item=>{
item.label=item.name;
item.value=item.agentId
})
})
},
} }
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.sexRadio{
color: #BFBFBF;
border: 1rpx solid #BFBFBF;
font-size: 24upx;
width: 100rpx;
height: 43rpx;
text-align: center;
line-height: 40rpx;
&:last-child {
margin-left: 20rpx;
}
&.active {
color: #2B6FFF;
border-color: #2B6FFF;
}
}

.num {
width: 50rpx;
height: 50rpx;
background: rgba(43, 110, 253, 0.1);
color: #2B6EFD;
font-size: 30rpx;
display: flex;
align-items: center;
justify-content: center;

&.active {
background: #2B6EFD;
color: #FFFFFF;
}
}
.cented-box{ .cented-box{
background: #F8F8F8; background: #F8F8F8;
width: 100%; width: 100%;
@@ -131,7 +300,7 @@
font-weight: 400; font-weight: 400;
color: #B2B2B2; color: #B2B2B2;
line-height: 90rpx; line-height: 90rpx;
text-indent: 10rpx;
padding-left: 10rpx;
} }
.titleimg{ .titleimg{
width: 8%; width: 8%;


+ 123
- 63
pages/mine/reception/consultant.vue View File

@@ -2,114 +2,172 @@
<view class="box"> <view class="box">
<!-- 顾问选择 --> <!-- 顾问选择 -->
<view class="nextcon"> <view class="nextcon">
下一位接待顾问:毛丫丫
下一位接待顾问:{{textcdhSKJ}}
</view> </view>
<view class="content">
<radio-group v-model="value" @change="radioChange">
<view class="content-tips">
<view class="content" style="padding-bottom: 200rpx;">
<radio-group @change="radioChange">
<view v-for="(item,index) in freeList" :key="index" class="content-tips">
<view class="left"> <view class="left">
<view class="img"> <view class="img">
{{item.name.slice(0,1)}}
</view> </view>
<view class="text"> <view class="text">
<view class="name"> <view class="name">
宋幸运
{{item.name}}
</view> </view>
<view class="num"> <view class="num">
今日接待: 5
今日接待: {{item.todayNum}}
</view> </view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<radio value="2" style="transform:scale(0.7)" color="#2671E2"></radio>
<radio :value="item.agentId" :checked="index == current" style="transform:scale(0.7)"
color="#2671E2"></radio>
</view> </view>
</view> </view>
<view class="content-tips">
<view class="left">
<view class="img">
</view>
<view class="text">
<view class="name">
宋幸运
</view>
<view class="num">
今日接待: 5
</view>
</view>
</view>
<view class="right">
<radio value="2" style="transform:scale(0.8)" color="#2671E2"></radio>
</view>
</view>
<view class="content-tips">
<view class="left">
<view class="img">
</view>
<view class="text">
<view class="name">
宋幸运
</view>
<view class="num">
今日接待: 5
</view>
</view>
</view>
<view class="right">
<radio value="2" style="transform:scale(0.7)" color="#2671E2"></radio>
</view>
</view>

</radio-group> </radio-group>
</view> </view>
<view class="empty" v-if="freeList.length == 0">
<image class="image" src="@/static/images/customerEmpty.png" mode=""></image>
<view class="tips">
暂无空闲顾问
</view>
</view>
<view class="save" @click="save" :class="{active:chosedAgentId}">
保存
</view>
</view> </view>
</template> </template>


<script> <script>
export default { export default {
data(){
return{
value:"",
data() {
return {
customerId: '',
buildingID: '',
freeList: [],
current: null,
chosedAgentId: '',
textcdhSKJ: ''
} }
}, },
methods:{
radioChange(e){
console.log(e)
onLoad(option) {
this.customerId = option.id;
},
onShow() {
this.buildingID = uni.getStorageSync('buildingID').id;
this.getFreeList();
},
methods: {
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
}
})
},
radioChange: function(evt) {
this.chosedAgentId = '';
this.chosedAgentId = evt.detail.value;
},
save() {
console.log(this.chosedAgentId)
if (!this.chosedAgentId) {
uni.showToast({
icon: "none",
title: "未选择指派顾问"
})
return
}
uni.showLoading({
title: "保存中",
mask: true
})
const that = this;
this.$u.post("customer/assign", {
agentId: that.chosedAgentId,
id: that.customerId
}).then(res => {
uni.showToast({
icon: "none",
title: "分配成功"
})
uni.navigateBack();
uni.hideLoading();
});
} }
} }
} }
</script> </script>


<style lang="scss" scoped> <style lang="scss" scoped>
.box{
.empty {
flex: 1;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;

.image {
width: 478upx;
height: 478upx;
}

.tips {
font-size: 36upx;
color: #242424;
line-height: 1;
margin-top: 50upx;
}
}

.save {
position: fixed;
width: calc(100vw - 60upx);
bottom: 50upx;
left: 30rpx;
color: #FFFFFF;
font-size: 30upx;
height: 98upx;
border-radius: 8upx;
display: flex;
justify-content: center;
align-items: center;
background: rgba(42, 111, 255, 1);
}

.box {
background: #F8F8F8; background: #F8F8F8;
width: 100%; width: 100%;
height: 100%; height: 100%;
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;

// line-height: 30px; // line-height: 30px;
.nextcon{
.nextcon {
height: 78rpx; height: 78rpx;
background: #F4F8FD; background: #F4F8FD;
color: #2671E2; color: #2671E2;
text-align: center; text-align: center;
line-height: 78rpx; line-height: 78rpx;
} }
.content-tips{

.content-tips {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
background: #fff; background: #fff;
padding: 0 30rpx; padding: 0 30rpx;
height: 148rpx; height: 148rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
.left{

.left {
display: flex; display: flex;
margin-top: 30rpx; margin-top: 30rpx;
.img{

.img {
width: 72rpx; width: 72rpx;
height: 72rpx; height: 72rpx;
background: #FFFFFF; background: #FFFFFF;
@@ -119,18 +177,20 @@
border-radius: 50%; border-radius: 50%;
margin-right: 20rpx; margin-right: 20rpx;
} }
.text{
.name{

.text {
.name {
margin-top: 4rpx; margin-top: 4rpx;
font-weight: 600; font-weight: 600;
color: #333333; color: #333333;
line-height: 30rpx; line-height: 30rpx;
margin-bottom: 24rpx; margin-bottom: 24rpx;
} }
} }
} }
.right{

.right {
margin: 54rpx 0; margin: 54rpx 0;
} }
} }


BIN
static/images/customerEmpty.png View File

Before After
Width: 864  |  Height: 856  |  Size: 36 KiB

Loading…
Cancel
Save