Explorar o código

增加获取跟进记录

Yannay hai 2 meses
pai
achega
c23c37c50d

+ 28 - 1
pages/orderDetailNew/components/orderDetailNewView.vue

@@ -5,7 +5,8 @@
5 5
             <pageOne @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" />
6 6
         </view>
7 7
         <view class="page-item" v-show="activeIndex === 1">
8
-            <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId" />
8
+            <pageTwo @handleNextClick="handleNextClick" :orderDetail="detail" :orderId="orderId"
9
+                :followUpList="followUpList" />
9 10
         </view>
10 11
         <view class="page-item" v-show="activeIndex === 2">
11 12
             <pageThree @handleNextClick="handleNextClick" :orderDetail="detail" @handleNeedSave="handleNeedSave"
@@ -64,6 +65,10 @@ export default {
64 65
             fileIds: '',
65 66
             //收件信息page4
66 67
             receiptList: [],
68
+            //订单细节
69
+            orderDetail: {},
70
+            // 跟进记录
71
+            followUpList: {},
67 72
         }
68 73
     },
69 74
     name: 'OrderDetailNewView',
@@ -74,7 +79,17 @@ export default {
74 79
                     this.fetchReceiptList();
75 80
                 }
76 81
             }, immediate: true
82
+        },
83
+        detail: {
84
+            handler(newVal) {
85
+                if (newVal) {
86
+                    this.orderDetail = newVal;
87
+                    this.getFollowUpList();
88
+                }
89
+            },
90
+            deep: true,
77 91
         }
92
+
78 93
     },
79 94
     methods: {
80 95
         handleNextClick({ nowPage, form }) {
@@ -233,6 +248,18 @@ export default {
233 248
                 uni.$u.toast("获取收单列表失败");
234 249
             }
235 250
         },
251
+
252
+        //获取跟进记录
253
+        async getFollowUpList() {
254
+            try {
255
+                const res = await uni.$u.api.getDuplicateOrderFollowListByClueId({ clueId: this.orderDetail.clueId });
256
+                console.log('这里是跟进记录', res)
257
+                this.followUpList = res.data || [];
258
+            } catch (error) {
259
+                console.error("获取跟进记录失败:", error);
260
+                uni.$u.toast("获取跟进记录失败");
261
+            }
262
+        }
236 263
     },
237 264
 
238 265
 }

+ 9 - 5
pages/orderDetailNew/components/pageTwo.vue

@@ -32,7 +32,7 @@
32 32
                             type="textarea" placeholder="请输入拍图技巧" rows="3" class="checklist-textarea" />
33 33
                         <!-- 上传图片按钮 -->
34 34
                         <view v-if="selectedCheckbox.includes('photo技巧')" class="upload-btn-container">
35
-                            <div class="upload-btn" @click="chooseImage('photoTips')">
35
+                            <div class="upload-btn" @click="getImageUrl('')">
36 36
                                 <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
37 37
                                 <text class="upload-btn-text">上传图片</text>
38 38
                             </div>
@@ -55,7 +55,7 @@
55 55
                             type="textarea" placeholder="请输入备注信息" rows="3" class="checklist-textarea" />
56 56
                         <!-- 上传图片按钮 -->
57 57
                         <view v-if="selectedCheckbox.includes('face2face')" class="upload-btn-container">
58
-                            <div class="upload-btn" @click="chooseImage('face2face')">
58
+                            <div class="upload-btn" @click="getImageUrl('')">
59 59
                                 <u-icon name="camera" size="32rpx" color="#108cff"></u-icon>
60 60
                                 <text class="upload-btn-text">上传图片</text>
61 61
                             </div>
@@ -141,6 +141,10 @@ export default {
141 141
         orderId: {
142 142
             type: String,
143 143
             default: '',
144
+        },
145
+        followUpList: {
146
+            type: Object,
147
+            default: () => { },
144 148
         }
145 149
     },
146 150
     watch: {
@@ -152,7 +156,8 @@ export default {
152 156
                 }
153 157
             },
154 158
             deep: true,
155
-        }
159
+        },
160
+
156 161
     },
157 162
 
158 163
     components: {
@@ -179,7 +184,7 @@ export default {
179 184
 
180 185
             detailImages: [],// 高清细节图数组
181 186
             // 绑定订单相关
182
-            bindList: [] // 待绑定的图片列表
187
+            bindList: [],// 待绑定的图片列表,
183 188
         };
184 189
     },
185 190
     methods: {
@@ -249,7 +254,6 @@ export default {
249 254
 
250 255
 
251 256
 
252
-
253 257
     }
254 258
 };
255 259
 </script>

+ 25 - 1
pages/orderDetailNew/mixin/imgUploadAndDownLoad.js

@@ -85,7 +85,6 @@ export default {
85 85
                 console.log('当前上传的图片类型是', p)
86 86
                 const res = await Promise.all(filePaths.map(filePath => this.uploadFile(filePath, p)));
87 87
 
88
-                // 绑定
89 88
                 this.bindOrder(p);
90 89
 
91 90
                 this.getList('2', '1');
@@ -138,5 +137,30 @@ export default {
138 137
             // 清空待绑定的图片列表
139 138
             this.bindList = [];
140 139
         },
140
+        //选择图图片》上传》返回路径,适用于page2选项里面的上传图片
141
+        // getImageUrl() {
142
+        //     uni.chooseImage({
143
+        //         count: 9, // 最多选择1张
144
+        //         sizeType: ['compressed'], // 压缩图片
145
+        //         sourceType: ['album', 'camera'], // 从相册选择或拍照
146
+        //         success: async (res) => {
147
+        //             const tempFilePath = res.tempFilePaths
148
+        //             console.log('上传的图片路径:', tempFilePath)
149
+        //             // 把blob数组上传到服务器,然后返回路径
150
+        //             try {
151
+        //                 const res = await Promise.all(tempFilePath.map(filePath => uni.$u.api.uploadFile(filePath)));
152
+        //                 console.log('上传的图片路径数组是:', res.map(item => item.data.fileUrl))
153
+        //                 // 把数组返回给调用者
154
+        //                 return res.map(item => item.data.fileUrl)
155
+        //             } catch (error) {
156
+        //                 console.error('上传失败:', error);
157
+        //                 uni.$u.toast('上传失败');
158
+        //             }
159
+        //         },
160
+        //         fail: (err) => {
161
+        //             console.error('选择图片失败:', err)
162
+        //         }
163
+        //     })
164
+        // }
141 165
     }
142 166
 }