Forráskód Böngészése

修复联系师傅等会显示很多的问题

Yannay 2 hónap óta
szülő
commit
a5a5be9c12
1 módosított fájl, 10 hozzáadás és 4 törlés
  1. 10 4
      pages/orderDetailNew/components/pageTwo.vue

+ 10 - 4
pages/orderDetailNew/components/pageTwo.vue

@@ -312,17 +312,22 @@ export default {
312 312
         },
313 313
         checkFollowUpContent() {
314 314
             // 检查跟进记录是否包含上面的三个选择
315
+            //每个检查到一个就不继续检查了
316
+            let hasContactMaster = false;
317
+            let hasPhotoTips = false;
318
+            let hasFace2face = false;
315 319
             this.followUpListInner.forEach(item => {
316 320
                 console.log('这里是跟进记录', item)
317 321
                 // 判断内容是否含有联系师傅,师傅拍图技巧,到达客户面对面,如果包含的话就上面对应的box就打上对勾
318
-                if (item.includes('联系师傅')) {
322
+                if (item.includes('联系师傅') && !hasContactMaster) {
319 323
                     this.selectedCheckbox.push('contact师傅');
320 324
                     // 联系师傅的手机号,已:为分割,取后面的内容
321 325
                     const phone = item.split(';')[1] || '';
322 326
                     console.log('联系师傅的手机号111111', phone)
323 327
                     this.formData.contactPhone = phone;
328
+                    hasContactMaster = true;
324 329
                 }
325
-                if (item.includes('师傅拍图技巧')) {
330
+                if (item.includes('师傅拍图技巧') && !hasPhotoTips) {
326 331
                     this.selectedCheckbox.push('photo技巧');
327 332
                     // 师傅拍图技巧的内容,已:为分割,取后面的内容
328 333
                     const photoTips = item.split(';')[1] || '';
@@ -331,9 +336,9 @@ export default {
331 336
                     //把url转为数组
332 337
                     const urlArray = urls.split(',').map(url => url.trim());
333 338
                     this.photoTipsImages = [...this.photoTipsImages, ...urlArray];
334
-
339
+                    hasPhotoTips = true;
335 340
                 }
336
-                if (item.includes('到达客户面对面')) {
341
+                if (item.includes('到达客户面对面') && !hasFace2face) {
337 342
                     this.selectedCheckbox.push('face2face');
338 343
                     // 到达客户面对面的内容,已:为分割,取后面的内容
339 344
                     const face2faceNotes = item.split(';')[1] || '';
@@ -342,6 +347,7 @@ export default {
342 347
                     //把url转为数组
343 348
                     const urlArray = urls.split(',').map(url => url.trim());
344 349
                     this.face2faceImages = [...this.face2faceImages, ...urlArray];
350
+                    hasFace2face = true;
345 351
                 }
346 352
             })
347 353
         },