douzhuo 2 роки тому
джерело
коміт
43cef130b7
4 змінених файлів з 156 додано та 143 видалено
  1. +20
    -22
      pages/index/customer.vue
  2. +67
    -56
      pages/mine/details.vue
  3. +69
    -65
      pages/mine/details2.vue
  4. BIN
      static/images/downs.png

+ 20
- 22
pages/index/customer.vue Переглянути файл

@@ -262,27 +262,24 @@
content: "确定更改当前客户接待状态为结束?",
cancelColor: "#999999",
success: res => {
if (this.noClick) {
this.noClick = false;
if (res.confirm) {
if (res.confirm) {
this.$u.post("/customer/endReception", {
id: id,
houseId: this.buildingID
}).then(res => {
uni.showToast({
icon: "none",
title: "操作成功"
})
this.init();
});
}
}
setTimeout(() => {
this.noClick = true;
}, 2000)
} else {
// 这里是重复点击的判断
if (res.confirm) {
uni.showLoading({
mask: true,
title: '结束中...'
})
this.$u.post("/customer/endReception", {
id: id,
houseId: this.buildingID
}).then(res => {
uni.hideLoading()
uni.showToast({
icon: "none",
title: "操作成功"
})
this.init();
}).catch(() => {
uni.hideLoading()
});
}
}
})
@@ -291,7 +288,8 @@
// 检测是否有添加顾问的权限
queryHaveDept() {
uni.request({
url: config.service.getSelfAssignedByHouseId + "?houseId=" + uni.getStorageSync('buildingID').id,
url: config.service.getSelfAssignedByHouseId + "?houseId=" + uni.getStorageSync('buildingID')
.id,
method: "GET",
header: {
'content-type': 'application/json',


+ 67
- 56
pages/mine/details.vue Переглянути файл

@@ -155,31 +155,35 @@
<view class="bounced3-2" @tap="Confirmtheexit2">确认</view>
</view>
</view>
<view class="zhezhao" v-if="effective"></view>
<view class="bounced" v-if="effective">
<view class="jiajinghuatit">选择</view>
<view>
<view class="uni-list">
<radio-group @change="radioChange">
<label style="display: flex;align-items: center;font-size: 30rpx;
width: 94%;height: 80rpx;margin: 0 auto;" v-for="(item, index) in effectiveitems" :key="item.value">
<view style="margin-top: 2rpx;flex: 1; text-indent: 20rpx;">{{item.name}}</view>
<view style="width: 80rpx;">
<radio :value="item.value" :checked="index == effectiveindex" />
</view>
</label>
</radio-group>

<template v-if="effective">
<view class="zhezhao"></view>
<view class="bounced">
<view class="jiajinghuatit">请选择无效原因</view>
<view class="uni-list" style="margin: 20rpx 0;padding: 0 40rpx;display: flex;justify-content: center;"
@tap="effectiveIndexShow = true">
<view
style="width: 100%;padding: 10rpx 20rpx;display: flex;align-items: center;justify-content: space-between;border: 1rpx solid #E0E0E0;border-radius: 4rpx;color: #333333;">
{{ effectiveIndexText }}
<image style="width: 20rpx;height: 12rpx;" src="@/static/images/downs.png" mode=""></image>
</view>
</view>
<view v-if="effectiveindex==4">
<textarea class="ffectivetext" v-model="effectiveitext" placeholder="备注" />
<view v-if="effectiveindex == 5" style="margin: 20rpx 0;padding: 0 40rpx;">
<textarea class="ffectivetext" v-model="effectiveitext" placeholder="请填写无效原因" />
</view>
<view class="bounced3">
<view class="bounced3-1" @click="effective=false">取消</view>
<view class="bounced3-2" @click="effectiveAdd">确认</view>
</view>
</view>
<view class="bounced3">
<view class="bounced3-1" @click="effective=false">取消</view>
<view class="bounced3-2" @click="effectiveAdd()">确认</view>
</view>
</view>
</template>
<u-toast ref="uToast" />
<u-select :mask-close-able="false" label-name="name" value-name="id" v-model="effectiveIndexShow"
mode="single-column" :list="effectiveitems" @cancel="effectiveIndexCancel" @confirm="effectiveIndexConfirm"></u-select>
</view>
</template>

@@ -238,29 +242,10 @@
Menulistisshow: false,

effective: false,
effectiveindex: '0',
effectiveitems: [{
value: '1',
name: '没电指派无录音',
checked: true
},
{
value: '2',
name: '离线指派无录音',
},
{
value: '3',
name: '系统测试误操作'
},
{
value: '4',
name: '非接访场景录音'
},
{
value: '5',
name: '其他'
}
],
effectiveindex: 0,
effectiveIndexShow: false,
effectiveIndexText: '请选择',
effectiveitems: [],
effectiveitext:'',
textItself:'',
argtextindex1:0,
@@ -328,6 +313,7 @@
if (this.stateisshow == 2) {
var info = this.itemobj;
}
this.getInvalidList()
this.gituserlist()
!this.isPageHide && this.init(info)
},
@@ -362,6 +348,26 @@
}
},
methods: {
effectiveIndexCancel() {
this.effectiveitext = "";
},
effectiveIndexConfirm(e) {
this.effectiveIndexText = e[0].label
this.effectiveindex = e[0].value
},
// 获取接待类型列表
getInvalidList() {
this.$u.post('/customer/invalidList', {
houseId: this.buildingID,
}).then(res => {
console.log(res)
this.effectiveitems = res.filter(item => item.id != 6 && item.id != 7)
})
},
CancelAdd(){
this.wajueshow = false
},
@@ -371,7 +377,7 @@
})
},
effectiveAdd() {
if (this.effectiveindex == 4) {
if (this.effectiveindex == 5) {
if (this.effectiveitext.length == 0) {
uni.showToast({
title: '备注不能为空',
@@ -381,12 +387,22 @@
return
}
}
if (this.effectiveIndexText == "请选择") {
uni.showToast({
title: '请选择无效原因',
icon: "none",
duration: 2000
});
return
}
this.effective = false;
let parames = {
id: this.customerId,
validInvalid: '',
validInvalid: 1,
invalidReason: Number(this.effectiveindex) + 1,
invalidReason: this.effectiveindex,
invalidNote: this.effectiveitext
}
this.$u.post("/customer/updateValidInvalid", parames).then(res => {
@@ -396,12 +412,6 @@
},
radioChange(evt) {
this.effectiveitext = "";
for (let i = 0; i < this.effectiveitems.length; i++) {
if (this.effectiveitems[i].value === evt.detail.value) {
this.effectiveindex = i;
break;
}
}
},
//标记
alllogo() {
@@ -1168,11 +1178,12 @@
</script>
<style lang="scss" scoped>
.ffectivetext {
width: 85%;
margin: 10rpx auto;
height: 100rpx;
box-sizing: border-box;
width: 100%;
height: 166rpx;
padding: 20rpx;
border: 1rpx solid #E4F0FF;
border-radius: 4px;
border: 1rpx solid #E0E0E0;
}

.biaoqiantom {


+ 69
- 65
pages/mine/details2.vue Переглянути файл

@@ -122,8 +122,7 @@
<view @click="Receivedetailsabouttab('Receivedetailsabout')">更多</view>

<view class="allimg" :style="[getAllImgStyle]" v-if="Thetapeidisshow">
<template
v-if="checkAuthority('更换销讲业务')">
<template v-if="checkAuthority('更换销讲业务')">
<view @click="showTemplate = !showTemplate; Thetapeidisshow=false" class="allimg-item"
style="line-height:70rpx;">
更换销讲业务
@@ -524,23 +523,18 @@
<template v-if="effective">
<view class="zhezhao"></view>
<view class="bounced">
<view class="jiajinghuatit">选择</view>
<view>
<view class="uni-list">
<radio-group @change="radioChange">
<label style="display: flex;align-items: center;font-size: 30rpx;
width: 94%;height: 80rpx;margin: 0 auto;" v-for="(item, index) in effectiveitems" :key="item.value">
<view style="margin-top: 2rpx;flex: 1; text-indent: 20rpx;">{{item.name}}</view>
<view style="width: 80rpx;">
<radio :value="item.value" :checked="index == effectiveindex" />
</view>
</label>
</radio-group>
</view>
<view v-if="effectiveindex==4">
<textarea class="ffectivetext" v-model="effectiveitext" placeholder="备注" />
<view class="jiajinghuatit">请选择无效原因</view>
<view class="uni-list" style="margin: 20rpx 0;padding: 0 40rpx;display: flex;justify-content: center;height: 90rpx;"
@tap="effectiveIndexShow = true">
<view
style="width: 100%;padding: 10rpx 20rpx;display: flex;align-items: center;justify-content: space-between;border: 1rpx solid #E0E0E0;border-radius: 4rpx;color: #333333;">
{{ effectiveIndexText }}
<image style="width: 20rpx;height: 12rpx;" src="@/static/images/downs.png" mode=""></image>
</view>
</view>
<view v-if="effectiveindex == 5" style="margin: 20rpx 0;padding: 0 40rpx;">
<textarea class="ffectivetext" v-model="effectiveitext" placeholder="请填写无效原因" />
</view>
<view class="bounced3">
<view class="bounced3-1" @click="effective=false">取消</view>
<view class="bounced3-2" @click="$noMultipleClicks(effectiveAdd)">确认</view>
@@ -602,14 +596,18 @@

</view>
</u-popup>
<!-- 销讲业务 -->
<u-select :mask-close-able="false" label-name="templateName" value-name="id" v-model="showTemplate"
mode="single-column" :list="templateList" @cancel="templateCancel" @confirm="templateConfirm"></u-select>

</view>

<u-select :mask-close-able="false" label-name="name" value-name="id" v-model="effectiveIndexShow"
mode="single-column" :list="effectiveitems" @cancel="effectiveIndexCancel" @confirm="effectiveIndexConfirm">
</u-select>

</view>
</template>

<script>
@@ -695,29 +693,10 @@
validInvalid: 0,
calibration: 0,
effective: false,
effectiveindex: '0',
effectiveitems: [{
value: '1',
name: '没电指派无录音',
checked: true
},
{
value: '2',
name: '离线指派无录音',
},
{
value: '3',
name: '系统测试误操作'
},
{
value: '4',
name: '非接访场景录音'
},
{
value: '5',
name: '其他'
}
],
effectiveindex: 0,
effectiveIndexShow: false,
effectiveIndexText: '请选择',
effectiveitems: [],
effectiveitext: '',
textItself: '',
argtextindex1: 0,
@@ -740,9 +719,9 @@
projectId: uni.getStorageSync('buildingID').id, // 当前项目id
visitRecordNum: 1, // 默认到访次数
},
templateList: [], // 销讲业务
showTemplate: false, // 展示选择销讲业务弹窗
templateName: '', // 销讲业务类型文字
@@ -761,7 +740,7 @@
if (this.Menulistisshow) {
position += 70
}
if (this.checkAuthority('更换销讲业务')) {
position += 70
}
@@ -771,7 +750,7 @@
}

if ((this.userlistobj.visitRecord == 1 || this.userlistobj.visitFlag == 1) && this.checkAuthority(
'修改到访次数')) {
'修改到访次数')) {
position += 70
}

@@ -783,6 +762,8 @@
},
onLoad(options) {
this.LOADING = true
this.buildingID = uni.getStorageSync('buildingID').id;
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
let menu = uni.getStorageSync('weapp_session_Menu_data');
this.eqLog = menu.findIndex(item => item.name == '设备日志');
this.status = options.status;
@@ -814,7 +795,7 @@
customerId: this.customerId
})
})
this.getInvalidList()
uni.$on('DETAILS2INIT', (info) => {
this.init(info)
});
@@ -831,8 +812,6 @@
})
this.intention = false;
this.kehuyixiangcenterindex = 0;
this.buildingID = uni.getStorageSync('buildingID').id;
this.userInfo = uni.getStorageSync('weapp_session_userInfo_data');
if (this.userInfo.dataCode == 6 || this.userInfo.dataCode == 3) {
this.methodsisshow = false;
} else {
@@ -848,6 +827,7 @@
this.gituserlist()
this.getMarketingBusiness()


},

onHide() {
@@ -864,7 +844,15 @@
},

methods: {

// 获取接待类型列表
getInvalidList() {
this.$u.post('/customer/invalidList', {
houseId: this.buildingID,
}).then(res => {
console.log(res)
this.effectiveitems = res.filter(item => item.id != 6 && item.id != 7)
})
},
// 获取销讲业务
getMarketingBusiness() {
this.$u.get('/customer/marketingBusiness', {
@@ -874,11 +862,21 @@
this.templateList = res
})
},

effectiveIndexCancel() {
this.effectiveitext = "";
},

effectiveIndexConfirm(e) {
this.effectiveIndexText = e[0].label
this.effectiveindex = e[0].value
},

// 销讲业务方法
templateCancel() {
this.showTemplate = false;
},
// 确认选择销讲业务
templateConfirm(e) {
this.showTemplate = false;
@@ -1314,7 +1312,7 @@
},

effectiveAdd() {
if (this.effectiveindex == 4) {
if (this.effectiveindex == 5) {
if (this.effectiveitext.length == 0) {
uni.showToast({
title: '备注不能为空',
@@ -1324,13 +1322,23 @@
return
}
}

if (this.effectiveIndexText == "请选择") {
uni.showToast({
title: '请选择无效原因',
icon: "none",
duration: 2000
});
return
}

this.effective = false;
this.isBand = true
let parames = {
id: this.customerId,
validInvalid: '',
validInvalid: 1,
invalidReason: Number(this.effectiveindex) + 1,
invalidReason: this.effectiveindex,
invalidNote: this.effectiveitext
}
this.$u.post("/customer/updateValidInvalid", parames).then(res => {
@@ -1338,16 +1346,11 @@
this.Thetapeidisshow = false;
}).catch(e => {
this.isBand = false
this.Thetapeidisshow = false;
})
},
radioChange(evt) {
this.effectiveitext = "";
for (let i = 0; i < this.effectiveitems.length; i++) {
if (this.effectiveitems[i].value === evt.detail.value) {
this.effectiveindex = i;
break;
}
}
},

//接待详情点击
@@ -3202,11 +3205,12 @@
}

.ffectivetext {
width: 85%;
margin: 10rpx auto;
height: 100rpx;
box-sizing: border-box;
width: 100%;
height: 166rpx;
padding: 20rpx;
border: 1rpx solid #E4F0FF;
border-radius: 4px;
border: 1rpx solid #E0E0E0;
}

/deep/ .u-model-title {


BIN
static/images/downs.png Переглянути файл

Перед Після
Ширина: 40  |  Висота: 24  |  Розмір: 692 B

Завантаження…
Відмінити
Зберегти