totalClient.vue
5.57 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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
<template>
<view>
<global-loading />
<view class="totalClient-topBackImg flex-items flex-column">
<view class="topBg">
<view class="font-color-8A734A mar-top-30 fs60">{{SalesCustomerData.total}}</view>
<view class="font-color-C5AA7B">累计客户(人)</view>
</view>
</view>
<view class="content directAwardInfo" v-if="SalesCustomerData.total>0">
<view class="directAwardTit fs32 font-color-333">我的客户信息</view>
<view class="flex-center clientList-box mar-top-30" v-for="(item, index) in SalesCustomerDatalist"
:key="index">
<view class="directAward-box font-color-656 fs26" @click="arrowTypeChange1(index)">
<view class="directAward-icon flex-row-plus flex-items flex-sp-between">
<view>
<view class="flex-row-plus flex-items mar-top-30 flex-sp-between">
<label class="orderId-box font-color-999">客户昵称:{{item.customerName}}</label>
</view>
</view>
<image v-if="item.ifOpen == false" class="arrow-down" src="https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/arrowDownIcon.png"></image>
<image v-if="item.ifOpen == true" class="arrow-down" src="https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/arrowUpIcon.png"></image>topColor
</view>
<view v-if="item.ifOpen == true">
<view class="flex-row-plus flex-itdistributionOrderems mar-top-30 flex-sp-between">
<label class="orderId-box font-color-999">手机号:{{item.customerPhone}}</label>
</view>
<view class="flex-row-plus flex-itdistributionOrderems mar-top-30 flex-sp-between">
<label class="orderId-box font-color-999">累计下单数:{{item.orders}}</label>
<label class="commission-box mar-left-70 font-color-999">累计消费金额:¥{{item.price}}</label>
</view>
</view>
</view>
</view>
</view>
<view v-else class="emptyCart-box flex-items-plus flex-column">
<image class="emptyCart-img" src="https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/img//bgnull.png"></image>
<label class="font-color-999 fs26 mar-top-30">这里空空如也~</label>
</view>
</view>
</template>
<script>
const NET = require('../../utils/request')
const API = require('../../config/api')
export default {
data() {
return {
item: {},
SalesCustomerQuery: {
model: {
tenantCode: ''
}
},
SalesCustomerData: [],
shopId: 0,
distributorId: 0,
page: 1, //当前页
pageSize: 10, //每页记录数
loadingType: 0,
SalesCustomerDatalist: []
}
},
onLoad: function(options) {
this.shopId = JSON.parse(options.shopId)
this.distributorId = options.distributorId
this.getSalesCustomer()
},
onReachBottom() {
if (this.loadingType == 1) {
uni.stopPullDownRefresh()
} else {
this.pageSize = this.pageSize + 10
this.getSalesCustomer()
}
},
methods: {
getSalesCustomer() {
// uni.showLoading({
// mask: true,
// title: '加载中...'
// })
NET.request(API.FindSalesCustomerList, {
shopId: this.shopId,
distributorId: this.distributorId,
page: this.page,
pageSize: this.pageSize
}, 'GET').then(res => {
uni.hideLoading()
this.SalesCustomerDatalist = this.SalesCustomerDatalist.concat(res.data.list)
console.log(this.SalesCustomerDatalist)
this.SalesCustomerData = res.data
if (res.data.list.length == res.data.total) {
this.loadingType = 1
}
}).catch(res => {
uni.hideLoading()
})
},
arrowTypeChange1(arrowTypeId) {
this.SalesCustomerData.list[arrowTypeId].ifOpen = this.SalesCustomerData.list[arrowTypeId].ifOpen ==
false ? true : false
},
}
}
</script>
<style lang="scss">
page {
background: #333333;
}
.emptyCart-box {
margin-top: 300upx;
.emptyCart-img{
width: 216rpx;
height: 156rpx;
}
}
.totalClient-topBackImg {
width: 100%;
padding: 0 20rpx;
.topBg {
width: 100%;
height: 196upx;
background: url("https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/totalPersonnelTopBackImg.png") no-repeat;
margin-top: 50rpx;
text-align: center;
}
.content {
width: 690upx;
background-color: #FFFFFF;
.totalClient-left {
width: 170upx;
height: 20upx;
}
.massage-text {
padding: 0 20upx;
}
}
}
.top {
height: 50upx;
background-image: linear-gradient(#FF8E14, #FFFFFF);
}
.directAwardInfo {
width: 100%;
height: 100vh;
background: #F8F8F8;
padding: 0 20rpx;
.directAwardTit {
height: 88rpx;
line-height: 88rpx;
font-size: 32rpx;
color: #333333;
text-align: center;
padding-bottom: 20rpx;
border-bottom: 2rpx solid #EEEEEE;
font-weight: bold;
}
}
.uni-collapse-cell[data-v-8f47561c] {
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
border-color: #c8c7cc;
border-bottom-width: 1px;
border-bottom-style: none;
}
.directAward-box {
width: 100%;
display: flex;
justify-content: flex-start;
flex-direction: column;
background-color: #FFFFFF;
padding: 50upx 20upx;
.orderId-box {
width: 320upx;
display: flex;
justify-content: flex-start;
flex-direction: row;
}
label.name {
font-weight: bold;
}
.commission-box {
text-align: right;
}
.arrow-down {
width: 24upx;
height: 24upx;
}
.upBox {
border-top: 1upx solid #EDEDED;
margin-top: 30upx;
}
}
</style>