unliquidated.vue
10.5 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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<template>
<view>
<global-loading/>
<view v-if="ifShow">
<view class="unliquidated-topBackImg flex-items flex-column">
<view class="totalAward-content flex-column font-color-FFF">
<view class="flex-items-plus mar-top-60">
<label class="fs60 amount">¥{{ ZSalesOrderData.total }}</label>
</view>
<view class="flex-row-plus flex-sp-around fs24 mar-top-30">
<view class="awardBox">
<view class="fs36 font-color-FFF">{{ ZSalesOrderData.directPrice }}</view>
<view class="awardTit font-color-FFF">直接奖励(元)</view>
</view>
<view class="awardBox">
<view class="fs36 font-color-FFF">{{ ZSalesOrderData.indirectPrice }}</view>
<view class="awardTit font-color-FFF">间接奖励(元)</view>
</view>
</view>
</view>
</view>
<view class="awardType">
<view class="awardType-box flex-center">
<view class="awardType-content">
<u-tabs :list="awardTypeList" bar-width="60" :bold="false" active-color="#C5AA7B" inactive-color="#999999"
:is-scroll="false" :current="awardTypeFlag" @change="awardTypeActive"></u-tabs>
</view>
</view>
<view v-if="awardTypeFlag == 0">
<view v-if="ZStotallength>0">
<view class="flex-center" v-for="(item, index) in ZSalesOrderDatalist" :key="index">
<view class="directAward-box font-color-656 fs26" @click="arrowTypeChange1(index)">
<view style="display: flex;" class="directAwardInfo">
<view style="flex: 1;" class="flex-items flex-sp-between">
<label class="orderId-box font-color-999">订单号:{{ item.orderFormid }}</label>
<view class="mar-right-50 font-color-999">
佣金:<label class="font-color-C5AA7B">¥{{ item.commission }}</label>
</view>
</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>
</view>
</view>
<view v-if="item.ifOpen == true">
<view class="flex-row-plus flex-items flex-sp-between mar-top-30">
<label class="orderId-box font-color-999">商品数:{{ item.products }}</label>
<label class="commission-box mar-left-70 font-color-999">实付金额:¥{{ item.price }}</label>
</view>
<view class="flex-row-plus flex-items mar-top-30">
<label class="orderId-box font-color-999">下单人:{{ item.customerName }}</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>
<view v-if="awardTypeFlag == 1">storeName
<view v-if="JStotallength>0">
<view class="flex-center" v-for="(item, index) in JSalesOrderDatalist" :key="index">
<view class="directAward-box font-color-656 fs26" @click="arrowTypeChange(index)">
<view style="display: flex;" class="directAwardInfo">
<view style="flex: 1;" class="flex-items flex-sp-between">
<label class="orderId-box font-color-999">订单号:{{ item.orderFormid }}</label>
<view class="mar-right-50 font-color-999">
佣金:<label class="font-color-C5AA7B">¥{{ item.commission }}</label>
</view>
</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>
</view>
</view>
<view v-if="item.ifOpen == true">
<view class="flex-row-plus flex-items flex-sp-between mar-top-30">
<label class="orderId-box font-color-999">商品数:{{ item.products }}</label>
<label class="commission-box mar-left-70 font-color-999">实付金额:¥{{ item.price }}</label>
</view>
<view class="flex-row-plus flex-items mar-top-30">
<label class="orderId-box font-color-999">下单人:{{ item.customerName }}</label>
</view>
<view class="flex-row-plus flex-items mar-top-30">
<label class="orderId-box font-color-999">分销员:{{ item.distributorName }}</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>
</view>
</view>
</view>
</template>
<script>
const NET = require('../../utils/request')
const API = require('../../config/api')
export default {
data() {
return {
awardTypeList: [{
name: '直接奖励'
}, {
name: '间接奖励'
}],
awardTypeFlag: 0,
SalesOrderQuery: {
model: {
tenantCode: '',
settleStatus: '',
type: ''
},
current: 0,
size: 10
},
SalesOrderData: [],
ZSalesOrderData: [],
JSalesOrderData: [],
shopId: 0,
distributorId: 0,
ZStotallength: 0,
JStotallength: 0,
page: 1,
pageSize: 20,
loadingType: 0,
loadingType1: 0,
ZSalesOrderDatalist: [],
JSalesOrderDatalist: [],
ifShow: false
}
},
onLoad: function (options) {
this.shopId = options.shopId
this.distributorId = options.distributorId
this.getZSalesOrderData()
this.getJSalesOrderData()
},
onReachBottom() {
if (this.awardTypeFlag == 0) {
if (this.loadingType == 1) {
uni.stopPullDownRefresh()
} else {
this.page = this.page + 1
this.getZSalesOrderData()
}
} else {
if (this.loadingType1 == 1) {
uni.stopPullDownRefresh()
} else {
this.page = this.page + 1
this.getJSalesOrderData()
}
}
},
methods: {
getZSalesOrderData() {
// uni.showLoading({
// mask: true,
// title:'加载中...'
// })
NET.request(API.GetNotReward, {
shopId: this.shopId,
distributorId: this.distributorId,
type: 1,
page: this.page,
pageSize: this.pageSize
}, 'GET').then(res => {
uni.hideLoading()
if (res.data.page.list.length == 0) {
this.loadingType = 1
this.page = this.page
}
this.ZSalesOrderDatalist = this.ZSalesOrderDatalist.concat(res.data.page.list)
this.ZSalesOrderData = res.data
this.ZStotallength = this.ZSalesOrderData.page.total
this.ifShow = true
}).catch(res => {
uni.hideLoading()
})
},
getJSalesOrderData() {
// uni.showLoading({
// mask: true,
// title:'加载中...'
// })
NET.request(API.GetNotReward, {
shopId: this.shopId,
distributorId: this.distributorId,
type: 2,
page: this.page,
pageSize: this.pageSize
}, 'GET').then(res => {
uni.hideLoading()
if (res.data.page.list.length == 0) {
this.loadingType1 = 1
uni.showToast({
title: '已加载全部···',
duration: 2000,
icon: 'none'
});
this.page = this.page
}
this.JSalesOrderDatalist = this.JSalesOrderDatalist.concat(res.data.page.list)
this.JSalesOrderData = res.data
this.JStotallength = this.JSalesOrderData.page.total
}).catch(res => {
uni.hideLoading()
})
},
awardTypeActive(type) {
this.awardTypeFlag = type
this.page = 1
},
arrowTypeChange1(arrowTypeId) {
this.ZSalesOrderData.page.list[arrowTypeId].ifOpen = this.ZSalesOrderData.page.list[arrowTypeId].ifOpen == false ? true : false
},
arrowTypeChange(arrowTypeId) {
this.JSalesOrderData.page.list[arrowTypeId].ifOpen = this.JSalesOrderData.page.list[arrowTypeId].ifOpen == false ? true : false
}
}
}
</script>
<style lang="scss">
page {
background: #333333;
}
.emptyCart-box {
margin-top: 70 upx;
.emptyCart-img {
width: 225 upx;
height: 196 upx;
}
}
.unliquidated-topBackImg {
width: 100%;
height: 360 rpx;
background: url(https://zhgw-uat.028wlkj.com/cdwlMall/zsfwzxt/file/static/images/unliquidatedBg.png) no-repeat;
background-size: 100%;
margin-top: 30 rpx;
.totalAward-content {
width: 90%;
.awardBox {
text-align: center;
.awardTit {
opacity: 0.7;
}
}
.amount {
color: #FFEBC4;
}
}
}
.awardType-box {
border-bottom: 1 upx solid #666666;
.awardType-content {
height: 80 upx;
width: 500 upx;
}
}
.directAward-box {
width: 94%;
border-bottom: 1 upx solid #666666;
padding: 30 upx;
display: flex;
justify-content: flex-start;
flex-direction: column;
background: #FFFFFF;
margin-top: 30 rpx;
.orderId-box {
display: flex;
justify-content: flex-start;
flex-direction: row;
}
.commission-box {
width: 260 upx;
}
.arrow-down {
width: 24 upx;
height: 24 upx;
}
.directAwardInfo {
}
}
.totalAwardEmpty-box {
margin-top: 65 upx;
.totalAwardEmpty {
width: 270 upx;
height: 270 upx;
}
}
</style>
<style scoped>
.awardType /deep/ .u-tabs {
background: none !important;
}
</style>