@@ -236,6 +236,16 @@ | |||
} | |||
} | |||
,{ | |||
"path" : "selectBuilding", | |||
"style" : | |||
{ | |||
"navigationBarTitleText": "切换楼盘", | |||
"navigationBarBackgroundColor": "#2671E2", | |||
"navigationBarTextStyle": "white" | |||
} | |||
} | |||
] | |||
}, | |||
{ | |||
@@ -149,7 +149,13 @@ | |||
到访次数 | |||
</view> | |||
<view class="screen-record-tab"> | |||
<view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" | |||
<block v-for="(item,index) in visitList" :key="index"> | |||
<view :class="[item.isShow?'screen-record-chose':'screen-record-nochose']" | |||
@click="choice(index,item.value)"> | |||
{{item.label}} | |||
</view> | |||
</block> | |||
<!-- <view :class="[screen.visitRecord==1?'screen-record-chose':'screen-record-nochose']" | |||
@click="recordclick(1)"> | |||
首次到访 | |||
</view> | |||
@@ -164,7 +170,7 @@ | |||
<view :class="[screen.visitRecord==4?'screen-record-chose':'screen-record-nochose']" | |||
@click="recordclick(4)"> | |||
3次以上 | |||
</view> | |||
</view> --> | |||
</view> | |||
</view> | |||
<view class="screen-foot"> | |||
@@ -266,7 +272,7 @@ | |||
agentId: '', //顾问id | |||
record: '0', | |||
markAdvisor: null, | |||
visitRecord: null, | |||
visitRecord: [], | |||
validInvalid: null | |||
}, | |||
freeList: [], //顾问 | |||
@@ -287,6 +293,23 @@ | |||
startFilterTime: '接待时间', // s筛选状态展示 | |||
receptionDuration: '接待时长', // 筛选状态展示 | |||
sortText: '排序', // | |||
visitList: [{ | |||
label: '首次到访', | |||
value: 1, | |||
isShow: false, | |||
}, { | |||
label: '2次到访', | |||
value: 2, | |||
isShow: false, | |||
}, { | |||
label: '3次到访', | |||
value: 3, | |||
isShow: false, | |||
}, { | |||
label: '3次以上', | |||
value: 4, | |||
isShow: false, | |||
}, ] | |||
} | |||
}, | |||
onLoad(options) { | |||
@@ -488,7 +511,7 @@ | |||
time: 1, | |||
staDate: this.staTime, | |||
endDate: this.endtime, | |||
visitRecord: this.screen.visitRecord, | |||
visitRecords: this.screen.visitRecord.join(","), | |||
markAdvisor: this.screen.markAdvisor, | |||
dateType: dateType, | |||
recDurationInterval: recDurationInterval, | |||
@@ -545,6 +568,19 @@ | |||
this.recordList = []; | |||
this.getMyCustom(); | |||
}, | |||
choice(index,e) { | |||
if (this.visitList[index].isShow == true) { | |||
this.visitList[index].isShow = false; | |||
for (var i = 0; i < this.screen.visitRecord.length; i++) { | |||
if (this.screen.visitRecord[i] === e) { | |||
this.screen.visitRecord.splice(i, 1); | |||
} | |||
} | |||
} else { | |||
this.visitList[index].isShow = true; | |||
this.screen.visitRecord.push(e) | |||
} | |||
}, | |||
recordclick(i) { | |||
if (this.screen.visitRecord == i) { | |||
this.screen.visitRecord = null | |||
@@ -743,7 +743,10 @@ | |||
}, | |||
//选择楼盘弹框 | |||
piskbuilding() { | |||
this.Showhiddenunits = true; | |||
// this.Showhiddenunits = true; | |||
uni.navigateTo({ | |||
url:"../mine/selectBuilding" | |||
}) | |||
}, | |||
// 楼盘选择确认 | |||
confirm(e) { | |||
@@ -0,0 +1,96 @@ | |||
<template> | |||
<view class="selectBuilding"> | |||
<view class="searchStyle"> | |||
<u-search placeholder="输入楼盘名称" v-model="search" :show-action="false"></u-search> | |||
</view> | |||
<view class="searchResultStyle"> | |||
<u-radio-group v-model="result" @change="radioGroupChange"> | |||
<u-radio v-for="(item, index) in list" :key="index" :name="item.id+'-'+item.propertyName" label-size="34"> | |||
{{item.propertyName}} | |||
</u-radio> | |||
</u-radio-group> | |||
</view> | |||
</view> | |||
</template> | |||
<script> | |||
var config = require("@/config"); | |||
export default { | |||
name: "selectBuilding", | |||
data() { | |||
return { | |||
search: "", | |||
list: [], | |||
result: "" | |||
}; | |||
}, | |||
watch:{ | |||
search(newState){ | |||
this.init(newState) | |||
} | |||
}, | |||
methods:{ | |||
radioGroupChange(e){ | |||
console.log() | |||
let lopan = { | |||
id: e.split('-')[0], | |||
name: e.split('-')[1] | |||
} | |||
uni.setStorageSync("buildingID", lopan); | |||
uni.navigateBack({ | |||
delta:-1 | |||
}) | |||
}, | |||
init(e){ | |||
let data = {houseName:decodeURI(e)||''} | |||
uni.request({ | |||
url: config.service.getUser, | |||
method: "GET", | |||
data, | |||
header: { | |||
'content-type': 'application/json', | |||
'Authorization': 'Bearer ' + uni.getStorageSync('weapp_session_login_data').token | |||
}, | |||
success: (res) => { | |||
this.list = res.data.data.houseList | |||
} | |||
}) | |||
} | |||
}, | |||
onLoad() { | |||
this.init("") | |||
} | |||
} | |||
</script> | |||
<style lang="scss" scoped> | |||
.selectBuilding { | |||
background: #dedede; | |||
.searchStyle { | |||
padding: 20rpx; | |||
} | |||
.searchResultStyle { | |||
/deep/ .u-radio-group { | |||
display: flex; | |||
flex-direction: column; | |||
} | |||
/deep/ .u-radio { | |||
display: flex; | |||
flex-direction: row-reverse; | |||
width: 100% !important; | |||
justify-content: space-between; | |||
background: #fff; | |||
box-shadow: 0px 4px 5px 3px #ccc; | |||
margin: 15rpx 0; | |||
padding: 20rpx; | |||
} | |||
/deep/ .u-radio__label { | |||
width: 100%; | |||
} | |||
} | |||
} | |||
</style> |