myZiyuan.vue
3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<template>
<view class="page">
<view class="screen-list">
<view class="list">
<u-input type="select" @click="typeShow = true"
:placeholder="pageindex.dataStatus == '1'?'申请中':pageindex.dataStatus == '3'?'已终止':'状态筛选'" />
</view>
</view>
<!-- 记录列表 -->
<view class="record-list">
<view class="record-list-box" v-for="(item,index) in recordList" :key="index"
@click="item.dataStatus =='1' || item.dataStatus =='3'?recordXq(item):''">
<view class="list">
<view class="title" style="padding-bottom: 20rpx;">
<view class="left">
<!-- {{item.contractName}} -->
{{item.cereBasicInformationShop&&item.cereBasicInformationShop.shopName?item.cereBasicInformationShop.shopName:item.cereBasicInformationVenue&&item.cereBasicInformationVenue.venueName?item.cereBasicInformationVenue.venueName:item.cereAdvertisingInformation&&item.cereAdvertisingInformation.advertisingName?item.cereAdvertisingInformation.advertisingName:''}}
</view>
<view class="right" v-if="item.dataStatus =='1' || item.dataStatus =='3'"><u-icon
name="arrow-right"></u-icon></view>
</view>
<!-- <view class="info-item">申请时间:{{item.applicationTime}}</view> -->
<view class="info-item">租赁时间 :{{item.leaseStartDate}} 至 {{item.contractTerminationDate}}</view>
<view class="info-item" v-if="item.dataStatus =='1'">状态:<span
style="color: #0FBB59;">{{item.dataStatus =='1'?'租赁中':item.dataStatus =='3'?'已终止':'-'}}</span>
</view>
</view>
</view>
</view>
<view v-if="recordList.length == 0" style="text-align: center;margin-top: 60rpx;color:#808080;">暂无数据</view>
<u-select v-model="typeShow" :list="activesType" @confirm="typeChange"></u-select>
</view>
</template>
<script>
export default {
data() {
return {
activesType: [
// {
// value: 1,
// label: '申请中'
// },
{
value: '1',
label: '租赁中'
},
{
value: '3',
label: '已终止'
},
],
typeShow: false,
recordList: [],
pageindex: {
dataStatus: '1',
pageNumber: 0,
pageSize: 10
},
total: 0
}
},
mounted() {
this.getALL()
},
onReachBottom(e) {
console.error(e)
if (this.recordList.length < this.total) {
this.pageindex.pageNumber++
this.gain()
}
},
methods: {
getALL() {
// this.pageindex.relatedMerchants = uni.getStorageSync('user').phone
this.$http.sendRequest('/cerePlatformMerchant/queryByPage', 'POST', {
pageSize: 1,
pageNumber: 0,
phone: uni.getStorageSync('user').phone
}, 1).then(res => {
if (res.data.data.content.length > 0) {
let c1 = res.data.data.content[0]
console.error({
...c1
})
if (c1.checkState == '2') {
this.pageindex.relatedMerchants = c1.id
this.gain()
}
}
})
},
gain() {
this.$http.sendRequest('/cereContractInformation/getPage', 'POST', this.pageindex, 1).then(res1 => {
//成功回调
console.error(res1)
this.recordList = [...this.recordList,...res1.data.data.content]
this.total = res1.data.data.totalElements
})
},
recordXq(item) {
const encodedItem = encodeURIComponent(JSON.stringify(item));
uni.navigateTo({
url: `/pagesA/myZiyuan/myZiDetailsnew?item=${encodedItem}`,
})
},
contractdetail() {
// uni.navigateTo({
// })
},
typeChange(e) {
this.pageindex.pageNumber = 0
this.pageindex.start = e[0].labels
this.pageindex.dataStatus = e[0].value
this.recordList = []
this.getALL()
},
}
}
</script>
<style scoped lang="scss">
@import 'myZiyuan.scss';
</style>