|
|
@@ -20,12 +20,24 @@ export default {
|
|
20
|
20
|
followUpModelShow: false,
|
|
21
|
21
|
followUpNotes: '',
|
|
22
|
22
|
countdown: 300,
|
|
23
|
|
- countdownIntervals: null
|
|
|
23
|
+ countdownIntervals: null,
|
|
|
24
|
+
|
|
|
25
|
+ //筛选条件
|
|
|
26
|
+ filterList: [
|
|
|
27
|
+ { name: '全部列表', type: 1 },
|
|
|
28
|
+ { name: '我的接发单', type: 2 }
|
|
|
29
|
+ ],
|
|
|
30
|
+
|
|
|
31
|
+ statisticsSendStatus: [],//中间统计数据
|
|
|
32
|
+ activeType: 1,//当前选择的筛选类型,顶部tab的类型
|
|
|
33
|
+ activeStatus: '',//当前选择的状态,统计数据的类型
|
|
24
|
34
|
}
|
|
25
|
35
|
},
|
|
26
|
36
|
onLoad() {
|
|
27
|
37
|
//初始调用
|
|
28
|
38
|
this.getOrderList();
|
|
|
39
|
+ this.getStatisticsSendStatus();
|
|
|
40
|
+
|
|
29
|
41
|
this.countdownInterval()
|
|
30
|
42
|
// uni.navigateTo({
|
|
31
|
43
|
// url: `/pages/orderDetailNew/index?orderId=5464&item=测试发单&type=undefined&clueId=1973381744953516033`,
|
|
|
@@ -61,6 +73,9 @@ export default {
|
|
61
|
73
|
const result = await uni.$u.api.selectClueOrderFormList({
|
|
62
|
74
|
pageSize: this.page.pageSize,
|
|
63
|
75
|
pageNum: this.page.pageNum,
|
|
|
76
|
+ }, {
|
|
|
77
|
+ type: this.activeType,
|
|
|
78
|
+ status: this.activeStatus,
|
|
64
|
79
|
});
|
|
65
|
80
|
|
|
66
|
81
|
console.log('接单列表', result);
|
|
|
@@ -79,7 +94,12 @@ export default {
|
|
79
|
94
|
uni.$u.toast('获取订单列表失败,请稍后重试');
|
|
80
|
95
|
}
|
|
81
|
96
|
},
|
|
82
|
|
-
|
|
|
97
|
+ //获取统计数据
|
|
|
98
|
+ async getStatisticsSendStatus() {
|
|
|
99
|
+ const { data } = await uni.$u.api.statisticsSendStatus({ type: this.activeType });
|
|
|
100
|
+ console.log('统计数据是', data)
|
|
|
101
|
+ this.statisticsSendStatus = data;
|
|
|
102
|
+ },
|
|
83
|
103
|
// 处理按钮点击事件
|
|
84
|
104
|
handleBtnClick(btnType, order) {
|
|
85
|
105
|
|
|
|
@@ -203,6 +223,24 @@ export default {
|
|
203
|
223
|
}
|
|
204
|
224
|
this.followUpNotes = '';
|
|
205
|
225
|
},
|
|
|
226
|
+
|
|
|
227
|
+ // 切换筛选条件
|
|
|
228
|
+ async changeFilter(param) {
|
|
|
229
|
+ this.activeType = param.type;
|
|
|
230
|
+
|
|
|
231
|
+ this.page.pageNum = 1;
|
|
|
232
|
+ this.orderList = [];
|
|
|
233
|
+
|
|
|
234
|
+ this.getOrderList();
|
|
|
235
|
+ this.getStatisticsSendStatus()
|
|
|
236
|
+ },
|
|
|
237
|
+ //切换统计数据的类型
|
|
|
238
|
+ changeStatus(param) {
|
|
|
239
|
+ this.activeStatus = param;
|
|
|
240
|
+ this.page.pageNum = 1;
|
|
|
241
|
+ this.orderList = [];
|
|
|
242
|
+ this.getOrderList();
|
|
|
243
|
+ },
|
|
206
|
244
|
}
|
|
207
|
245
|
}
|
|
208
|
246
|
</script>
|
|
|
@@ -211,6 +249,18 @@ export default {
|
|
211
|
249
|
<view class="container">
|
|
212
|
250
|
<u-navbar title="接单中心" :autoBack="true" :placeholder="true" v-hideNav></u-navbar>
|
|
213
|
251
|
|
|
|
252
|
+ <!-- 筛选条件 -->
|
|
|
253
|
+ <u-tabs :list="filterList" @click="changeFilter"></u-tabs>
|
|
|
254
|
+
|
|
|
255
|
+ <!-- 统计数据 -->
|
|
|
256
|
+ <view class="statisticsContainer">
|
|
|
257
|
+ <view v-for="item in statisticsSendStatus" :key="item.status" @click="changeStatus(item.status)"
|
|
|
258
|
+ class="statisticsItem">
|
|
|
259
|
+ <view>{{ item.statusName }}</view>
|
|
|
260
|
+ <view>({{ item.count || 0 }})</view>
|
|
|
261
|
+ </view>
|
|
|
262
|
+ </view>
|
|
|
263
|
+
|
|
214
|
264
|
<view class="scrollViewContainer">
|
|
215
|
265
|
<scroll-view class="scrollView" scroll-y @scrolltolower="scrolltolower">
|
|
216
|
266
|
<transition-group name="order-move" tag="div">
|
|
|
@@ -337,7 +387,7 @@ export default {
|
|
337
|
387
|
}
|
|
338
|
388
|
|
|
339
|
389
|
.scrollViewContainer {
|
|
340
|
|
- height: calc(100vh - 44px);
|
|
|
390
|
+ height: calc(100vh - 44px - 44px - 27px - 10rpx);
|
|
341
|
391
|
}
|
|
342
|
392
|
|
|
343
|
393
|
.scrollView {
|
|
|
@@ -529,4 +579,28 @@ export default {
|
|
529
|
579
|
display: grid;
|
|
530
|
580
|
grid-template-columns: repeat(2, 1fr);
|
|
531
|
581
|
}
|
|
|
582
|
+
|
|
|
583
|
+
|
|
|
584
|
+
|
|
|
585
|
+
|
|
|
586
|
+
|
|
|
587
|
+
|
|
|
588
|
+.statisticsContainer {
|
|
|
589
|
+ display: flex;
|
|
|
590
|
+ justify-content: space-around;
|
|
|
591
|
+ align-items: center;
|
|
|
592
|
+ gap: 20rpx;
|
|
|
593
|
+}
|
|
|
594
|
+
|
|
|
595
|
+.statisticsItem {
|
|
|
596
|
+ display: flex;
|
|
|
597
|
+ justify-content: center;
|
|
|
598
|
+ align-items: center;
|
|
|
599
|
+ background-color: #fff;
|
|
|
600
|
+ padding: 10rpx 20rpx;
|
|
|
601
|
+ border-radius: 15rpx;
|
|
|
602
|
+ font-size: 24rpx;
|
|
|
603
|
+ font-weight: 700;
|
|
|
604
|
+ width: 100rpx;
|
|
|
605
|
+}
|
|
532
|
606
|
</style>
|