|
@@ -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.dataCode == 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; |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|