浏览代码

接单中心增加筛选项

Yannay 2 月之前
父节点
当前提交
8637dda57c
共有 2 个文件被更改,包括 97 次插入6 次删除
  1. 20 3
      pages/orderDetailNew/components/pageOne.vue
  2. 77 3
      pages/pagereceivecenter/pagereceivecenter.vue

+ 20 - 3
pages/orderDetailNew/components/pageOne.vue

@@ -28,8 +28,12 @@
28 28
 
29 29
         <!-- 聊天记录卡片 -->
30 30
         <view class="card_wrap">
31
-            <view class="card-title">聊天记录</view>
32
-            <view class="image-upload-container">
31
+            <view class="card-title">
32
+                <text @click="chatRecordOrCallRecord = 'chatRecords'">聊天记录</text>
33
+                <text style="margin: 0 10rpx;">|</text>
34
+                <text @click="chatRecordOrCallRecord = 'callRecords'">通话记录</text>
35
+            </view>
36
+            <view class="image-upload-container" v-if="chatRecordOrCallRecord === 'chatRecords'">
33 37
                 <view class="image-list">
34 38
                     <view class="image-item" v-for="(item, index) in chatRecordsUploadList"
35 39
                         :key="'chatRecords-' + index">
@@ -41,6 +45,9 @@
41 45
                     </view>
42 46
                 </view>
43 47
             </view>
48
+            <view class="image-upload-container" v-if="chatRecordOrCallRecord === 'callRecords'">
49
+
50
+            </view>
44 51
         </view>
45 52
 
46 53
         <!-- 基本信息卡片 -->
@@ -117,6 +124,7 @@ export default {
117 124
             chatRecordsUploadList: [],
118 125
             // 待绑定的图片列表
119 126
             bindList: [],
127
+            chatRecordOrCallRecord: 'chatRecords',
120 128
         }
121 129
     },
122 130
     watch: {
@@ -136,12 +144,14 @@ export default {
136 144
                     setTimeout(() => {
137 145
                         this.getList('2', '1', newVal.id, this.orderDetail.itemBrand);
138 146
                         this.getList('2', '2', newVal.id, this.orderDetail.itemBrand);
147
+                        this.getCallRecords();
139 148
                     }, 100)
140 149
 
141 150
                 }
142 151
             }
143 152
         },
144 153
     },
154
+
145 155
     methods: {
146 156
 
147 157
         // 电话卡片点击事件
@@ -380,7 +390,14 @@ export default {
380 390
                 urls: urlList,
381 391
                 current: src
382 392
             })
383
-        }
393
+        },
394
+        //获取通话记录
395
+        async getCallRecords() {
396
+            console.log('这里是参数', this.currentReceipt.clueId);
397
+            // const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: this.currentReceipt.clueId });
398
+            const { data } = await uni.$u.api.getCallClueFileByClueId({ clueId: 1998278069905854466 });
399
+            console.log('通话记录:', data);
400
+        },
384 401
 
385 402
     },
386 403
 

+ 77 - 3
pages/pagereceivecenter/pagereceivecenter.vue

@@ -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>