wangxiaohua 3 jaren geleden
bovenliggende
commit
baf5111455
3 gewijzigde bestanden met toevoegingen van 125 en 82 verwijderingen
  1. +1
    -1
      manifest.json
  2. +108
    -63
      pages/index/customer.vue
  3. +16
    -18
      pages/index/index.vue

+ 1
- 1
manifest.json Bestand weergeven

@@ -91,7 +91,7 @@
},
"quickapp" : {},
"mp-weixin" : {
"appid" : "wx8f883dca5ecc5510",
"appid" : "wxb6493c296350b9db",
"setting" : {
"urlCheck" : false,
"es6" : true,


+ 108
- 63
pages/index/customer.vue Bestand weergeven

@@ -1,97 +1,136 @@
<template>
<view class="cented-box">
<view class="customer">
<view class="customer" v-for="(item,index) in waitCustomList" :key='index'>
<view class="title">
<view class="zuo">
<view class="zuoimg">A</view>
<view class="zuoname">李先生</view>
<view class="zuoname">{{item.name}}</view>
</view>
<view class="you">
<view class="youimg1"></view>
<view class="youtext">接待中</view>
<view class="youimg1" v-if="item.status!=0"></view>
<view class="youimg1-1" v-if="item.status==0"></view>
<view class="youtext">{{item.status==0?"排队中":item.status==1?"接待中":"已完成"}}</view>
</view>
</view>
<view class="centerbox">
<view class="centerbox-che">手机号码:<text class="shizai">17551333886</text></view>
<view class="centerbox-che">开始时间:<text class="shizai">2021-07-20 14:00:30</text></view>
<view class="centerbox-che">顾问姓名:<text class="shizai">毛丫丫</text></view>
<view class="centerbox-che2">
<view class="Workcard">工牌电量:<text class="shizai">56%</text></view>
<view class="Workcard">录音状态:<text class="shizai">使用中</text></view>
<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.createTime}}</text></view>
<view class="centerbox-che">顾问姓名:<text class="shizai">{{item.agentName}}</text></view>
<view class="centerbox-che2" v-if="item.zkEquipmentState.audioStatus!=''">
<view class="Workcard">工牌电量:<text class="shizai">{{item.zkEquipmentState.electricity}}%</text></view>
<view class="Workcard">录音状态:
<text v-if="item.zkEquipmentState.audioStatus=='true'" class="shizai">使用中</text>
<text v-if="item.zkEquipmentState.audioStatus=='false'" class="shizai">未使用</text>
</view>
</view>
</view>
<view class="footer-button">
<view class="footer-button" v-if="item.status!=0">
<view class="footer1">接待延时</view>
<view class="footer1" @click="goConsultant">重新指派</view>
<view class="footer3">结束接待</view>
</view>
</view>
<view class="customer">
<view class="title">
<view class="zuo">
<view class="zuoimg">A</view>
<view class="zuoname">李先生</view>
</view>
<view class="you">
<view class="youimg1"></view>
<view class="youtext">排队中</view>
</view>
</view>
<view class="centerbox">
<view class="centerbox-che">手机号码:<text class="shizai">--</text></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">
<view class="footer-button" v-if="item.status==0">
<view class="footer3">指派顾问</view>
</view>
</view>
<view class="customer">
<view class="title">
<view class="zuo">
<view class="zuoimg">A</view>
<view class="zuoname">李先生</view>
</view>
<view class="you">
<view class="youimg1"></view>
<view class="youtext">接待中</view>
</view>
</view>
<view class="centerbox">
<view class="centerbox-che">手机号码:<text class="shizai">17551333886</text></view>
<view class="centerbox-che">开始时间:<text class="shizai">2021-07-20 14:00:30</text></view>
<view class="centerbox-che">顾问姓名:<text class="shizai">毛丫丫</text></view>
<view class="centerbox-che2">
<view class="Workcard">工牌电量:<text class="shizai">56%</text></view>
<view class="Workcard">录音状态:<text class="shizai">使用中</text></view>
</view>
</view>
<view class="footer-button">
<view class="footer1">接待延时</view>
<view class="footer1">重新指派</view>
<view class="footer3">结束接待</view>
</view>
</view>
<image @click="addreception()" class="add" src="/static/images/add.png" mode=""></image>
<image v-if="isAdd == 0&&(dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add" src="/static/images/add.png" mode=""></image>
</view>
</template>

<script>
export default {
data() {
return {};
return {
buildingID:'',
waitCustomList:[],
isAdd:'',
dataCode:''
};
},
components: {},
onLoad() {},
onShow() {},
onShow() {
this.buildingID = uni.getStorageSync('buildingID').id;
const {
addAccount,
dataCode
} = uni.getStorageSync("weapp_session_userInfo_data");
this.addAccount=addAccount
this.dataCode=dataCode
this.init()
this.queryHaveDept()
},
methods: {
queryHaveDept() {
return new Promise((resolve, reject) => {
this.$u.get("/user/queryHaveDept?houseId="+this.buildingID).then(res => {
this.isAdd=res;
resolve();
})
})
},
init(){
this.waitCustomList=[]
let parames={
itemId:this.buildingID
}
this.$u.post("/customer/reception", parames).then(data => {
console.log(data)
this.waitCustomList=data;
});
},
//新增接待
addreception(){
uni.navigateTo({
url: '/pages/mine/reception/addreception'
});
const {
dataCode,addAccount
} = uni.getStorageSync("weapp_session_userInfo_data");
if(dataCode==6){
if(addAccount!=0){
uni.showToast({
title: '不允许自建客户!',
duration: 2000
});
return
}
console.log(this.waitCustomList.length)
if(this.waitCustomList.length==0){
uni.navigateTo({
url: "/pages/customer/add/add"
})
return
}else{
for(var i=0; i<this.waitCustomList.length; i++){
if(this.waitCustomList[i].status==1){
uni.showLoading({
title: '当前还有未完成的客户项'
});
setTimeout(function () {
uni.hideLoading();
}, 1000);
return
}else{
uni.navigateTo({
url: "/pages/customer/add/add"
})
return
}
}
}
}else{
uni.navigateTo({
url: "/pages/customer/add/add"
})
}
// uni.navigateTo({
// url: '/pages/mine/reception/addreception'
// });
},
goConsultant(){
uni.navigateTo({
@@ -107,7 +146,7 @@
.cented-box{
background: #F8F8F8;
width: 100%;
height: 100%;
height: 100vh;
padding-bottom: 30rpx;
}
.customer{
@@ -156,6 +195,12 @@
border-radius: 50%;
background: #2B6EFF;
}
.youimg1-1{
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background: #F2A269;
}
.youtext{
font-size: 30rpx;
font-weight: 400;


+ 16
- 18
pages/index/index.vue Bestand weergeven

@@ -59,24 +59,22 @@
</view>
</view>



<view class="title" v-if="equipmentisshow">设备</view>
<view class="shebenbox" v-if="equipmentisshow">
<view class="shebenche">
<view class="shebenchenum">{{equipmentobj.totalNum}}</view>
<view class="shebenchenum">{{equipmentobj.totalNum || 0}}</view>
<view class="shebenchetext">设备总数</view>
</view>
<view class="shebenche">
<view class="shebenchenum">{{equipmentobj.onlineNum}}</view>
<view class="shebenchenum">{{equipmentobj.onlineNum || 0}}</view>
<view class="shebenchetext">在线</view>
</view>
<view class="shebenche">
<view class="shebenchenum">{{equipmentobj.activeNum}}</view>
<view class="shebenchenum">{{equipmentobj.activeNum || 0}}</view>
<view class="shebenchetext">活跃</view>
</view>
<view class="shebenche">
<view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum}}</view>
<view class="shebenchenum" style="color: red;">{{equipmentobj.lowPowerNum || 0}}</view>
<view class="shebenchetext">急需充电</view>
</view>
</view>
@@ -87,33 +85,33 @@
<view class="real-timebox">
<view class="timebox">
<view class="real">
<view class="realnum">{{realtimeobj.sumCustomer}}</view>
<view class="realnum">{{realtimeobj.sumCustomer || 0}}</view>
<view class="realtext">接待量</view>
</view>
<view class="real">
<view class="realnum">{{realtimeobj.receivingCustomer}}</view>
<view class="realnum">{{realtimeobj.receivingCustomer || 0}}</view>
<view class="realtext">正在接待</view>
</view>
<view class="real">
<view class="realnum">{{realtimeobj.activeCustomer}}</view>
<view class="realnum">{{realtimeobj.activeCustomer || 0}}</view>
<view class="realtext">接待客户</view>
</view>
<view class="real">
<view class="realnum">{{realtimeobj.sumDuration}}</view>
<view class="realnum">{{realtimeobj.sumDuration || 0}}</view>
<view class="realtext">录音时长</view>
</view>
</view>
<view class="timebox">
<view class="real">
<view class="realnum">{{realtimeobj.tagCustomer}}</view>
<view class="realnum">{{realtimeobj.tagCustomer || 0}}</view>
<view class="realtext">未标顾问</view>
</view>
<view class="real">
<view class="realnum">{{realtimeobj.fraction}}</view>
<view class="realnum">{{realtimeobj.fraction || 0}}</view>
<view class="realtext">平均执行率</view>
</view>
<view class="real">
<view class="realnum">{{realtimeobj.fraction}}</view>
<view class="realnum">{{realtimeobj.fraction || 0}}</view>
<view class="realtext">平均得分</view>
</view>
<view class="real">
@@ -127,26 +125,26 @@
<view class="real-timebox">
<view class="timebox">
<view class="real">
<view class="realnum">{{Thisweekobj.sumCustomer}}</view>
<view class="realnum">{{Thisweekobj.sumCustomer || 0}}</view>
<view class="realtext">接待量</view>
</view>
<view class="real">
<view class="realnum">{{Thisweekobj.activeCustomer}}</view>
<view class="realnum">{{Thisweekobj.activeCustomer || 0}}</view>
<view class="realtext">接待客户</view>
</view>
<view class="real">
<view class="realnum">{{Thisweekobj.sumDuration}}</view>
<view class="realnum">{{Thisweekobj.sumDuration || 0}}</view>
<view class="realtext">录音时长</view>
</view>
</view>
<view class="timebox">

<view class="real">
<view class="realnum">{{Thisweekobj.fraction}}</view>
<view class="realnum">{{Thisweekobj.fraction || 0}}</view>
<view class="realtext">平均执行率</view>
</view>
<view class="real">
<view class="realnum">{{Thisweekobj.fraction}}</view>
<view class="realnum">{{Thisweekobj.fraction || 0}}</view>
<view class="realtext">平均得分</view>
</view>
<view class="real">


Laden…
Annuleren
Opslaan