소스 검색

feat(接单中心): 引入分成卡片组件并优化订单列表展示

新增分成卡片组件以展示我的分成信息,调整订单列表的渲染逻辑,确保在不同状态下的正确显示。优化样式以提升用户体验。
Yannay 2 달 전
부모
커밋
176bb2b1cc
1개의 변경된 파일77개의 추가작업 그리고 65개의 파일을 삭제
  1. 77 65
      pages/pagereceivecenter/pagereceivecenter.vue

+ 77 - 65
pages/pagereceivecenter/pagereceivecenter.vue

@@ -2,6 +2,7 @@
2 2
 // import orderCard from "./compounts/orderCard.vue";
3 3
 import filterQuery from "../order/components/orderCenter/filterQuery.vue";
4 4
 import commissionFilterQuery from "../order/components/commission/filterQuery.vue";
5
+import commissionItem from "../order/components/commission/commissionItem.vue";
5 6
 import dayjs from "dayjs";
6 7
 
7 8
 // status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到)
@@ -10,6 +11,7 @@ export default {
10 11
         // orderCard,
11 12
         filterQuery,
12 13
         commissionFilterQuery,
14
+        commissionItem,
13 15
     },
14 16
     data() {
15 17
         return {
@@ -494,90 +496,96 @@ export default {
494 496
             <scroll-view class="scrollView" scroll-y refresher-enabled :refresher-triggered="refresherTriggered"
495 497
                 @refresherrefresh="onRefresh" @scrolltolower="scrolltolower">
496 498
                 <transition-group name="order-move" tag="div">
499
+                    <!-- 我的分成 - 使用专门的分成卡片组件 -->
500
+                    <view class="commission_item_wrap" v-for="item in orderList" :key="activeType === 3 ? item.id : (item.receiptId + item.id)" v-if="activeType === 3">
501
+                        <commission-item :item="item" :type="'2'"></commission-item>
502
+                    </view>
503
+                    
504
+                    <!-- 全部列表和我的接发单 - 使用订单卡片 -->
497 505
                     <!-- <orderCard v-for="item in orderList" :key="item.receiptId + item.id" :order="item"
498 506
                         @handleBtnClick="handleBtnClick">
499 507
                     </orderCard> -->
500
-                    <view class="orderCard" v-for="item in orderList" :key="item.receiptId + item.id"
501
-                        @click.stop="toOrderDetail(item)">
502
-                        <view class="bandAndPrice">
503
-                            <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
504
-                            <view class="price">¥{{ item.priceRange || '?' }}</view>
505
-                        </view>
508
+                    <view class="orderCard" v-for="item in orderList" :key="activeType === 3 ? item.id : (item.receiptId + item.id)"
509
+                        v-if="activeType !== 3" @click.stop="toOrderDetail(item)">
510
+                            <view class="bandAndPrice">
511
+                                <view class="bandName">{{ item.itemBrand || '暂无品牌' }}</view>
512
+                                <view class="price">¥{{ item.priceRange || '?' }}</view>
513
+                            </view>
506 514
 
507
-                        <view class="mainLind">
508
-                            <!-- <view class="mainLindImg">
509
-                                <image :src="'/static/acceptOrder/orderCardPic.jpg'" v-if="item.src" />
510
-                            </view> -->
511
-                            <view class="itemName">{{ item.item || '暂无项目' }}</view>
515
+                            <view class="mainLind">
516
+                                <!-- <view class="mainLindImg">
517
+                                    <image :src="'/static/acceptOrder/orderCardPic.jpg'" v-if="item.src" />
518
+                                </view> -->
519
+                                <view class="itemName">{{ item.item || '暂无项目' }}</view>
512 520
 
513
-                            <view class="mainLindInfo">
514
-                                <view class="infoItem">
515
-                                    <view class="infoItemTitle">发单人:</view>
516
-                                    <view>{{ item.createNickName || '未知' }}</view>
517
-                                </view>
518
-                                <view class="infoItem">
519
-                                    <view class="infoItemTitle">机构:</view>
520
-                                    <view>{{ item.orgName || '暂无机构' }}</view>
521
-                                </view>
522
-                                <view class="infoItem">
523
-                                    <view class="infoItemTitle">电话:</view>
524
-                                    <view>{{ item.phone || '暂无电话' }}</view>
525
-                                </view>
526
-                                <view class="infoItem">
527
-                                    <view class="infoItemTitle">接单人:</view>
528
-                                    <view>{{ item.identificationName || '暂无所属人' }}</view>
529
-                                </view>
530
-                                <view class="infoItem">
531
-                                    <view class="infoItemTitle">运营人:</view>
532
-                                    <view>{{ item.clueOperationName || '暂无运营人' }}</view>
533
-                                </view>
534
-                                <view class="infoItem">
535
-                                    <view class="infoItemTitle">发单日期:</view>
536
-                                    <view>{{ item.sendDate || '暂无时间' }}</view>
521
+                                <view class="mainLindInfo">
522
+                                    <view class="infoItem">
523
+                                        <view class="infoItemTitle">发单人:</view>
524
+                                        <view>{{ item.createNickName || '未知' }}</view>
525
+                                    </view>
526
+                                    <view class="infoItem">
527
+                                        <view class="infoItemTitle">机构:</view>
528
+                                        <view>{{ item.orgName || '暂无机构' }}</view>
529
+                                    </view>
530
+                                    <view class="infoItem">
531
+                                        <view class="infoItemTitle">电话:</view>
532
+                                        <view>{{ item.phone || '暂无电话' }}</view>
533
+                                    </view>
534
+                                    <view class="infoItem">
535
+                                        <view class="infoItemTitle">接单人:</view>
536
+                                        <view>{{ item.identificationName || '暂无所属人' }}</view>
537
+                                    </view>
538
+                                    <view class="infoItem">
539
+                                        <view class="infoItemTitle">运营人:</view>
540
+                                        <view>{{ item.clueOperationName || '暂无运营人' }}</view>
541
+                                    </view>
542
+                                    <view class="infoItem">
543
+                                        <view class="infoItemTitle">发单日期:</view>
544
+                                        <view>{{ item.sendDate || '暂无时间' }}</view>
545
+                                    </view>
537 546
                                 </view>
538 547
                             </view>
539
-                        </view>
540
-
541
-                        <view class="tags">
542
-                            <view class="tag" v-for="(tag, index) in item.tags" :key="index"
543
-                                :style="{ backgroundColor: tag.color, opacity: 0.8 }">
544
-                                {{ tag.name }}</view>
545 548
 
546
-                        </view>
549
+                            <view class="tags">
550
+                                <view class="tag" v-for="(tag, index) in item.tags" :key="index"
551
+                                    :style="{ backgroundColor: tag.color, opacity: 0.8 }">
552
+                                    {{ tag.name }}</view>
547 553
 
548
-                        <view class="Btns">
549
-                            <!-- status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到) -->
554
+                            </view>
550 555
 
551
-                            <view class="btnGroup" v-if="item && (item.status == '1')">
552
-                                <view class="card-button" @click.stop="handleBtnClick('acceptOrder', item)">立即接单</view>
553
-                                <view class=" card-button isBusy" @click.stop="handleBtnClick('isBusy', item)">
554
-                                    <view>
555
-                                        在忙
556
-                                    </view>
557
-                                    <view v-if="countdown > 0">
558
-                                        ({{ countdown }} s)
556
+                            <view class="Btns">
557
+                                <!-- status 状态 1 发单(刚发出来) 2 接单(处理中) 3 收单(入库了) 4 未收(没有收到) -->
558
+
559
+                                <view class="btnGroup" v-if="item && (item.status == '1')">
560
+                                    <view class="card-button" @click.stop="handleBtnClick('acceptOrder', item)">立即接单</view>
561
+                                    <view class=" card-button isBusy" @click.stop="handleBtnClick('isBusy', item)">
562
+                                        <view>
563
+                                            在忙
564
+                                        </view>
565
+                                        <view v-if="countdown > 0">
566
+                                            ({{ countdown }} s)
567
+                                        </view>
559 568
                                     </view>
560 569
                                 </view>
561
-                            </view>
562 570
 
563
-                            <view class="btnGroup" v-if="item && (item.status == '2')">
564
-                                <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">
565
-                                    待跟进
571
+                                <view class="btnGroup" v-if="item && (item.status == '2')">
572
+                                    <view class="card-button willFollow" @click.stop="handleBtnClick('willFollow', item)">
573
+                                        待跟进
574
+                                    </view>
575
+                                    <view class="card-button isBusy" @click.stop="handleBtnClick('tag', item)">打标签</view>
566 576
                                 </view>
567
-                                <view class="card-button isBusy" @click.stop="handleBtnClick('tag', item)">打标签</view>
568
-                            </view>
569 577
 
570
-                            <!-- <view class="btnGroup" v-if="item && (item.status == '3')">
571
-                                <view class="card-button share" @click.stop="handleBtnClick('share', item)">一键分享</view>
572
-                            </view> -->
578
+                                <!-- <view class="btnGroup" v-if="item && (item.status == '3')">
579
+                                    <view class="card-button share" @click.stop="handleBtnClick('share', item)">一键分享</view>
580
+                                </view> -->
573 581
 
574
-                            <view class="btnGroup" v-if="item && (item.status == '4')">
575
-                                <view class="card-button oneFollow" @click.stop="handleBtnClick('oneFollow', item)">待跟进
582
+                                <view class="btnGroup" v-if="item && (item.status == '4')">
583
+                                    <view class="card-button oneFollow" @click.stop="handleBtnClick('oneFollow', item)">待跟进
584
+                                    </view>
576 585
                                 </view>
577
-                            </view>
578 586
 
587
+                            </view>
579 588
                         </view>
580
-                    </view>
581 589
                 </transition-group>
582 590
                 <view class="hasMore">
583 591
                     {{ orderList.length >= page.total ? '没有更多了~' : '向下滑动加载更多~' }}
@@ -951,4 +959,8 @@ export default {
951 959
 .u-tabs{
952 960
     background-color: #fff;
953 961
 }
962
+
963
+.commission_item_wrap {
964
+    padding: 20px 20px;
965
+}
954 966
 </style>