Browse Source

提交修改

yun
douzhuo 2 years ago
parent
commit
48bd0d4343
5 changed files with 89 additions and 73 deletions
  1. +7
    -0
      App.vue
  2. +9
    -8
      pages/center/Piabodata/Customerportrait/Receivedetailabout.vue
  3. +5
    -34
      pages/index/customer.vue
  4. +0
    -1
      pages/mine/details2.vue
  5. +68
    -30
      pages/mine/reception/addreception.vue

+ 7
- 0
App.vue View File

@@ -77,6 +77,13 @@
} }
return obj return obj
}, },
// 检测权限
checkAuthority(name = '') {
let menu = uni.getStorageSync('weapp_session_Menu_data')
return menu.findIndex(item => item.name == name) != -1
},
}, },


filters: { filters: {


+ 9
- 8
pages/center/Piabodata/Customerportrait/Receivedetailabout.vue View File

@@ -42,17 +42,21 @@
v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker"> v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker">
<view class="avatar"> <view class="avatar">
<view :style="[SPEAKERSTYLE(item.speaker)]"> <view :style="[SPEAKERSTYLE(item.speaker)]">
<!-- <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image> -->
<text v-if="item.isShow == 0">顾</text>
<text v-else>{{ item.speaker | toCapital }}</text>
<text>{{ item.speaker | toCapital }}</text>
</view> </view>
</view> </view>




<view class="contentInfo"> <view class="contentInfo">
<view class="info"> <view class="info">
<text class="AudioUserName" v-if="item.isShow == 0">{{ item.username }}</text>
<text class="AudioUserName" v-else>{{ item.speaker | toCapital }}</text>
<text class="AudioUserName">
<template v-if="item.username">
{{ item.username }}
</template>
<template v-else>
{{ item.speaker | toCapital }}
</template>
</text>
<text>{{conversionTiame(item.bg/1000)}}</text> <text>{{conversionTiame(item.bg/1000)}}</text>
</view> </view>
<view class="content"> <view class="content">
@@ -535,14 +539,11 @@
}, },


onHide() { onHide() {
this.isAudio = 0
this.info = {}
this.isPageHide = true this.isPageHide = true
}, },


// 销毁实例 // 销毁实例
onUnload() { onUnload() {
this.isAudio = 0
this.info = {} this.info = {}
//卸载不需要的业务和获取播放状态的业务,提高页面性能 //卸载不需要的业务和获取播放状态的业务,提高页面性能
this.$zaudio.off('seek', this.ACTION); this.$zaudio.off('seek', this.ACTION);


+ 5
- 34
pages/index/customer.vue View File

@@ -59,7 +59,7 @@
</view> </view>


</view> </view>
<image v-if="isAdd == 0 && (dataCode!=6||(dataCode==6&&addAccount==0))" @click="addreception()" class="add"
<image v-if="dataCode!=6||(dataCode==6&&addAccount==0)" @click="addreception()" class="add"
src="/static/images/add.png" mode=""></image> src="/static/images/add.png" mode=""></image>
<image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode=""> <image class="add2" @click="reshCustom()" src="https://static.quhouse.com/zhikong_xcx_img/refresh.png" mode="">
</image> </image>
@@ -87,7 +87,6 @@
current: 0, current: 0,
buildingID: '', buildingID: '',
waitCustomList: [], waitCustomList: [],
isAdd: '',
dataCode: '', dataCode: '',
addAccount: '', addAccount: '',
endReception: true, endReception: true,
@@ -109,7 +108,6 @@
this.addAccount = addAccount; this.addAccount = addAccount;
this.dataCode = dataCode; this.dataCode = dataCode;
this.init() this.init()
this.queryHaveDept()
this.updateInit() this.updateInit()
}, },
methods: { methods: {
@@ -182,14 +180,6 @@
} }


}, },
queryHaveDept() {
return new Promise((resolve, reject) => {
this.$u.get("/user/queryHaveDept?houseId=" + this.buildingID).then(res => {
this.isAdd = res;
resolve();
})
})
},
init() { init() {
this.waitCustomList = [] this.waitCustomList = []
let parames = { let parames = {
@@ -267,29 +257,10 @@
}); });
return return
} }
if (this.waitCustomList.length == 0) {
uni.navigateTo({
url: '/pages/mine/reception/addreception'
})
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/mine/reception/addreception'
})
return
}
}
}
uni.navigateTo({
url: '/pages/mine/reception/addreception'
});

} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/mine/reception/addreception' url: '/pages/mine/reception/addreception'


+ 0
- 1
pages/mine/details2.vue View File

@@ -42,7 +42,6 @@
</view> </view>
<view class="contentInfo"> <view class="contentInfo">
<view class="info"> <view class="info">
<text class="AudioUserName"> <text class="AudioUserName">
<template v-if="item.username"> <template v-if="item.username">
{{ item.username }} {{ item.username }}


+ 68
- 30
pages/mine/reception/addreception.vue View File

@@ -54,33 +54,30 @@
</view> </view>


</view> </view>
<template v-if="shifoinfo==0 && userInfo.dataCode != 6">
<view class="Pinspeak">顾问</view>
<view class="chented" @click="clickShowhid()">
<view class="title" style="border: none;">
<view class="titletext">接待顾问</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
<!-- {{text || '请选择接待顾问'}} -->
<text v-if="text" style="color: #333333;">{{text}}</text>
<text v-else>请选择接待顾问</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
</view>

<!-- <template v-if="shifoinfo==0 && userInfo.dataCode != 6"> -->
<view class="Pinspeak">顾问</view>
<view class="chented" @click="clickShowhid()">
<view class="title" style="border: none;">
<view class="titletext">接待顾问</view>
<view class="titletext2"
style="font-size: 30rpx;font-weight: 400;color: #B2B2B2;line-height: 90rpx;padding-left: 10rpx;">
<text v-if="text" style="color: #333333;">{{text}}</text>
<text v-else>请选择接待顾问</text>
</view>
<view class="titleimg">
<image class="titleimg1" src="../../../static/images/arrow.png" mode=""></image>
</view> </view>
</view> </view>
</template>
</view>
<!-- </template> -->



<view class="clive" @click.stop="$noMultipleClicks(save)" :style="{background:(isBand==false?'#2671E2':'#949494')}">确定</view>
<view class="clive" @click.stop="$noMultipleClicks(save)"
:style="{background:(isBand==false?'#2671E2':'#949494')}">确定</view>


<!-- <view v-if="Showhiddenunits"> -->
<!-- <u-select v-model="show" :list="list"></u-select> -->
<u-select :mask-close-able="false" label-name="sourceName" value-name="id" v-model="Showhiddenunits" <u-select :mask-close-able="false" label-name="sourceName" value-name="id" v-model="Showhiddenunits"
mode="single-column" :list="list" @cancel="cancel" @confirm="confirm"></u-select> mode="single-column" :list="list" @cancel="cancel" @confirm="confirm"></u-select>
<!-- </view> -->
<u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1" <u-select :mask-close-able="false" v-model="Showhid" mode="single-column" :list="freeList" @cancel="cancel1"
@confirm="confirm1"></u-select> @confirm="confirm1"></u-select>
<u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext" <u-modal v-model="show" :mask-close-able="true" :title="'代接待提醒'" :confirm-text="confirmtext"
@@ -115,7 +112,7 @@
replaceReception: 0 replaceReception: 0
}, },
showSourceName: '', // 展示文字 showSourceName: '', // 展示文字
shifoinfo: 0,
shifoinfo: 0, // 高级权限 项目是否能指派顾问
freeList: [], freeList: [],
Showhid: false, Showhid: false,
text: null, text: null,
@@ -127,18 +124,18 @@
saveisshow: true, saveisshow: true,
isBand: false, // 阻止二次提交 isBand: false, // 阻止二次提交
tap: true, tap: true,
fdFlag:null,
fdFlag: null,
isPass: false, // 当前顾问是否正在接待
}; };
}, },
computed: { computed: {
// 用户详情 // 用户详情
userInfo() { userInfo() {
return uni.getStorageSync("weapp_session_userInfo_data") return uni.getStorageSync("weapp_session_userInfo_data")
}
},
}, },
onShow() { onShow() {
this.parames.projectId = uni.getStorageSync('buildingID').id; this.parames.projectId = uni.getStorageSync('buildingID').id;
console.log(this.$u) console.log(this.$u)
@@ -147,6 +144,7 @@
this.getFromSource(); this.getFromSource();
}, },
methods: { methods: {

// 获取客户来源 // 获取客户来源
getFromSource() { getFromSource() {
uni.request({ uni.request({
@@ -189,8 +187,18 @@
if (this.isBand) return if (this.isBand) return
this.save() this.save()
}, },
save() { save() {

// 校验当前登录人是否是顾问
let obj = this.freeList.find(item => {
return item.agentId == this.userInfo.accountId
}) || null
if (!obj && this.userInfo.userRoleType == 6) {
this.isPass = true
} else {
this.isPass = false
}
if (this.parames.name.length == 0) { if (this.parames.name.length == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
@@ -205,6 +213,15 @@
}) })
return; return;
} }

// 判断条件2是否选中顾问
if (this.isPass && !this.parames.agentId) {
uni.showToast({
icon: "none",
title: "当前顾问正在接待,请选择其他顾问"
})
return;
}
const that = this; const that = this;
this.isBand = true this.isBand = true
this.$u.post("customer/daitiReception", { this.$u.post("customer/daitiReception", {
@@ -233,7 +250,7 @@
that.confirmtext = res.replacement.name + "代接待", //确认文字 that.confirmtext = res.replacement.name + "代接待", //确认文字
that.canceltext = res.owner.name + '接待', //取消文字 that.canceltext = res.owner.name + '接待', //取消文字
that.show = true; that.show = true;
this.isBand = false
this.isBand = false
} else { } else {
that.daitiReceptionobj = res; that.daitiReceptionobj = res;
console.log(that.daitiReceptionobj) console.log(that.daitiReceptionobj)
@@ -242,7 +259,7 @@
that.confirmtext = res.replacement.name + "代接待", //确认文字 that.confirmtext = res.replacement.name + "代接待", //确认文字
that.canceltext = res.assign.name + '接待', //取消文字 that.canceltext = res.assign.name + '接待', //取消文字
that.show = true; that.show = true;
this.isBand = false
this.isBand = false
} }
} }
} }
@@ -296,6 +313,23 @@
this.parames.howMany = num; this.parames.howMany = num;
}, },
clickShowhid() { clickShowhid() {
if (this.shifoinfo != 0) {
uni.showToast({
icon: 'none',
title: '您没有指派权限~',
duration: 2000
});
return
}

if (this.userInfo.dataCode == 6 && !this.checkAuthority('顾问指派顾问')) {
uni.showToast({
icon: "none",
title: "您没有指派权限~",
duration: 2000
})
return
}
if (this.freeList.length == 0) { if (this.freeList.length == 0) {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'none',
@@ -355,6 +389,10 @@
item.label = item.name + "(无设备)"; item.label = item.name + "(无设备)";
} }
item.value = item.agentId item.value = item.agentId
if (this.userInfo.accountId == item.agentId) {
this.text = item.label
this.parames.agentId = item.agentId;
}
}) })
}) })
}, },


Loading…
Cancel
Save