浏览代码

feat (PageOne): 优化记录类型选择并新增跟进相关功能

Yannay 2 月之前
父节点
当前提交
40491dbb38

+ 54 - 0
pages/orderDetailRefactored/components/FollowCard.vue

@@ -0,0 +1,54 @@
1
+<template>
2
+  <view class="follow-card-container">
3
+    <clue-follow :clueId="clueId" :type="type" />
4
+  </view>
5
+</template>
6
+
7
+<script>
8
+import clueFollow from '@/pages/orderDetail/tabs/followRecord/index.vue'
9
+
10
+export default {
11
+  name: 'FollowCard',
12
+  components: {
13
+    clueFollow
14
+  },
15
+  props: {
16
+    clueId: {
17
+      type: [String, Number],
18
+      default: ''
19
+    },
20
+    type: {
21
+      type: [String, Number],
22
+      required: true
23
+    }
24
+  }
25
+}
26
+</script>
27
+
28
+<style scoped lang="scss">
29
+.follow-card-container {
30
+  padding: 20rpx;
31
+  background-color: #ffffff;
32
+  min-height: auto;
33
+
34
+  // 覆盖 clue-follow 组件的样式
35
+  ::v-deep .followRecord_wrap {
36
+    min-height: auto;
37
+    background: transparent;
38
+    padding: 0;
39
+  }
40
+
41
+  ::v-deep .followRecord_timeLine_wrap {
42
+    background: transparent;
43
+  }
44
+
45
+  ::v-deep .empty_wrap {
46
+    position: static;
47
+    transform: none;
48
+    padding: 40rpx 0;
49
+    text-align: center;
50
+    color: #999999;
51
+    font-size: 28rpx;
52
+  }
53
+}
54
+</style>

+ 35 - 6
pages/orderDetailRefactored/components/PageOne.vue

@@ -11,7 +11,7 @@
11 11
       </view>
12 12
     </view>
13 13
 
14
-    <!-- 聊天记录/通话记录卡片 -->
14
+    <!-- 聊天记录/通话记录/跟进卡片 -->
15 15
     <view class="card-wrap">
16 16
       <view class="card-title">
17 17
         <text :class="{ 'active': recordType === 'chat' }" @click="recordType = 'chat'">
@@ -21,6 +21,14 @@
21 21
         <text :class="{ 'active': recordType === 'call' }" @click="recordType = 'call'">
22 22
           通话记录
23 23
         </text>
24
+        <text class="divider">|</text>
25
+        <text :class="{ 'active': recordType === 'frontendFollow' }" @click="recordType = 'frontendFollow'">
26
+          前端跟进
27
+        </text>
28
+        <text class="divider">|</text>
29
+        <text :class="{ 'active': recordType === 'followRecord' }" @click="recordType = 'followRecord'">
30
+          跟进记录
31
+        </text>
24 32
       </view>
25 33
 
26 34
       <!-- 聊天记录 -->
@@ -41,6 +49,12 @@
41 49
         <sound-recorder v-for="item in soundRecordList" :key="item.fileName" :data="item"
42 50
           @handleDelectThisSoundRecord="handleDeleteSoundRecord" />
43 51
       </view>
52
+
53
+      <!-- 前端跟进 -->
54
+      <follow-card v-else-if="recordType === 'frontendFollow'" :clue-id="currentClueId" type="4" />
55
+
56
+      <!-- 跟进记录 -->
57
+      <follow-card v-else-if="recordType === 'followRecord'" :clue-id="currentClueId" type="5" />
44 58
     </view>
45 59
 
46 60
     <!-- 实物图卡片 -->
@@ -109,13 +123,15 @@
109 123
 <script>
110 124
 import PicComp from './PicComp.vue'
111 125
 import soundRecorder from '@/components/soundRecorder/soundRecorder.vue'
126
+import FollowCard from './FollowCard.vue'
112 127
 import imageUpload from '../utils/imageUpload.js'
113 128
 
114 129
 export default {
115 130
   name: 'PageOne',
116 131
   components: {
117 132
     PicComp,
118
-    soundRecorder
133
+    soundRecorder,
134
+    FollowCard
119 135
   },
120 136
   props: {
121 137
     orderDetail: {
@@ -133,12 +149,17 @@ export default {
133 149
   },
134 150
   data() {
135 151
     return {
136
-      recordType: 'chat', // 'chat' | 'call'
152
+      recordType: 'chat', // 'chat' | 'call' | 'frontendFollow' | 'followRecord'
137 153
       chatRecordsList: [],
138 154
       truePicList: [],
139 155
       soundRecordList: []
140 156
     }
141 157
   },
158
+  computed: {
159
+    currentClueId() {
160
+      return (this.currentReceipt && this.currentReceipt.clueId) || (this.orderDetail && this.orderDetail.clueId) || ''
161
+    }
162
+  },
142 163
   watch: {
143 164
     currentReceipt: {
144 165
       handler(newVal) {
@@ -408,14 +429,20 @@ export default {
408 429
 }
409 430
 
410 431
 .card-title {
411
-  padding: 20rpx;
432
+  padding: 20rpx 15rpx;
412 433
   border-bottom: 1rpx solid map-get($colors, border);
413 434
   display: flex;
414 435
   align-items: center;
436
+  white-space: nowrap;
437
+  overflow-x: auto;
438
+  -webkit-overflow-scrolling: touch;
415 439
 
416 440
   text {
417
-    padding: 0 10rpx;
441
+    padding: 0 6rpx;
418 442
     cursor: pointer;
443
+    font-size: 26rpx;
444
+    white-space: nowrap;
445
+    flex-shrink: 0;
419 446
 
420 447
     &.active {
421 448
       color: map-get($colors, primary);
@@ -424,8 +451,10 @@ export default {
424 451
   }
425 452
 
426 453
   .divider {
427
-    margin: 0 10rpx;
454
+    margin: 0 4rpx;
428 455
     color: #ddd;
456
+    font-size: 24rpx;
457
+    flex-shrink: 0;
429 458
   }
430 459
 }
431 460