wangxiaohua 2 anni fa
parent
commit
834dbd7296
5 ha cambiato i file con 369 aggiunte e 98 eliminazioni
  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 Vedi File

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

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

@@ -26,16 +26,16 @@
</view>
</view>
<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 class="centerbox" v-if="item.status==0">
<view class="centerbox-che">手机号码:<text class="shizai">{{item.phone || "--"}}</text></view>
</view>
<view class="footer-button" v-if="item.status==0">
<view class="footer3">指派顾问</view>
<view class="footer3" @click.stop="assign(item)">指派顾问</view>
</view>
</view>
@@ -85,6 +85,45 @@
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(){
const {
@@ -99,7 +138,6 @@
});
return
}
console.log(this.waitCustomList.length)
if(this.waitCustomList.length==0){
uni.navigateTo({
url: "/pages/customer/add/add"
@@ -125,18 +163,21 @@
}
}else{
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({
url: '/pages/mine/reception/consultant'
});
url: url
})
},
},
};


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

@@ -6,7 +6,7 @@
<view class="title">
<view class="titletext">客户姓名</view>
<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 class="titleimg">
<!-- <image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image> -->
@@ -14,29 +14,33 @@
</view>
<view class="title">
<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 class="title">
<view class="titletext">联系电话</view>
<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 class="title">
<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 class="title" style="border: none;">
<view class="title" style="border: none;" @click="Buildingselection()">
<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 class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
@@ -44,22 +48,27 @@
</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="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 class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
</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>
</template>

@@ -71,18 +80,178 @@
export default {
data() {
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() {

this.parames.projectId=uni.getStorageSync('buildingID').id;
this.init()
this.getFreeList();
},
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>
<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{
background: #F8F8F8;
width: 100%;
@@ -131,7 +300,7 @@
font-weight: 400;
color: #B2B2B2;
line-height: 90rpx;
text-indent: 10rpx;
padding-left: 10rpx;
}
.titleimg{
width: 8%;


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

@@ -2,114 +2,172 @@
<view class="box">
<!-- 顾问选择 -->
<view class="nextcon">
下一位接待顾问:毛丫丫
下一位接待顾问:{{textcdhSKJ}}
</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="img">
{{item.name.slice(0,1)}}
</view>
<view class="text">
<view class="name">
宋幸运
{{item.name}}
</view>
<view class="num">
今日接待: 5
今日接待: {{item.todayNum}}
</view>
</view>
</view>
<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 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>
</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>
</template>

<script>
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>

<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;
width: 100%;
height: 100%;
font-size: 30rpx;
font-weight: 400;

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

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

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

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

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

.right {
margin: 54rpx 0;
}
}


BIN
static/images/customerEmpty.png Vedi File

Prima Dopo
Larghezza: 864  |  Altezza: 856  |  Dimensione: 36 KiB

Caricamento…
Annulla
Salva