Procházet zdrojové kódy

增加剥离逻辑

Yannay před 2 měsíci
rodič
revize
ee830d3c50

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

@@ -113,7 +113,8 @@ export default {
113 113
             console.log("all page data:", this.allFroms[nowPage])
114 114
             // 当点击到第三页时,更新第三页的图片列表
115 115
             if (nowPage === 'formTwo') {
116
-                this.$refs.pageThreeComp.getList('2', '3', this.currentReceiptInner.id);
116
+                console.log('品牌', this.detail.brand)
117
+                this.$refs.pageThreeComp.getList('2', '3', this.currentReceiptInner.id, this.detail.itemBrand);
117 118
             }
118 119
         },
119 120
         // 没有recepitid就新增

+ 2 - 2
pages/orderDetailNew/components/pageOne.vue

@@ -133,8 +133,8 @@ export default {
133 133
                 console.log('currentReceipt 变化了', newVal);
134 134
                 if (newVal) {
135 135
                     //刷新图片列表
136
-                    this.getList('2', '1', newVal.id);
137
-                    this.getList('2', '2', newVal.id);
136
+                    this.getList('2', '1', newVal.id, this.orderDetail.itemBrand);
137
+                    this.getList('2', '2', newVal.id, this.orderDetail.itemBrand);
138 138
                 }
139 139
             }
140 140
         },

+ 1 - 1
pages/orderDetailNew/components/pageThree.vue

@@ -173,7 +173,7 @@ export default {
173 173
                 if (newVal) {
174 174
                     console.log('这里是page3的', newVal.tableFee)
175 175
                     this.paymentAmount = newVal.tableFee || '0.00'
176
-                    this.getList('2', '3', newVal.id);
176
+                    this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
177 177
                 }
178 178
             },
179 179
             deep: true,

+ 1 - 1
pages/orderDetailNew/components/pageTwo.vue

@@ -173,7 +173,7 @@ export default {
173 173
             handler(newVal) {
174 174
                 if (newVal) {
175 175
                     this.approvedPrice = Number(newVal.sellingPrice) || 0;
176
-                    this.getList('2', '3', newVal.id);
176
+                    this.getList('2', '3', newVal.id, this.orderDetail.itemBrand);
177 177
                 }
178 178
             },
179 179
             deep: true,

+ 24 - 10
pages/orderDetailNew/mixin/imgUploadAndDownLoad.js

@@ -25,15 +25,15 @@ export default {
25 25
                             })
26 26
                         }
27 27
                         // 删除成功后刷新列表
28
-                        this.getList('2', '1', this.currentReceipt.id);
29
-                        this.getList('2', '2', this.currentReceipt.id);
30
-                        this.getList('2', '3', this.currentReceipt.id);
28
+                        this.getList('2', '1', this.currentReceipt.id, this.orderDetail.itemBrand);
29
+                        this.getList('2', '2', this.currentReceipt.id, this.orderDetail.itemBrand);
30
+                        this.getList('2', '3', this.currentReceipt.id, this.orderDetail.itemBrand);
31 31
                     }
32 32
                 }
33 33
             })
34 34
         },
35 35
         //获取文件列表
36
-        async getList(type, orderFileType, receiptID) {
36
+        async getList(type, orderFileType, receiptID, itemBrand) {
37 37
             console.log('获取文件列表', type, receiptID)
38 38
             // console.log('当前的订单id', this.orderDetail.id)
39 39
             // console.log('当前的收单id', this.currentReceipt.id)
@@ -49,11 +49,25 @@ export default {
49 49
                 }
50 50
                 const response = await uni.$u.api.selectClueFileByDto(params)
51 51
                 if (orderFileType == '1') {
52
-                    this.trueUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
52
+                    //如果itemBrand里面有逗号的话说明是多个品牌
53
+
54
+                    if (itemBrand.indexOf(',') != -1) {
55
+                        this.trueUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
56
+                    } else {
57
+                        this.trueUploadList = response.rows
58
+                    }
53 59
                 } else if (orderFileType == '2') {
54
-                    this.chatRecordsUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
60
+                    if (itemBrand.indexOf(',') != -1) {
61
+                        this.chatRecordsUploadList = response.rows.filter(item => item.sourceId == receiptID) || []
62
+                    } else {
63
+                        this.chatRecordsUploadList = response.rows
64
+                    }
55 65
                 } else if (orderFileType == '3') {
56
-                    this.detailImages = response.rows.filter(item => item.sourceId == receiptID) || []
66
+                    if (itemBrand.indexOf(',') != -1) {
67
+                        this.detailImages = response.rows.filter(item => item.sourceId == receiptID) || []
68
+                    } else {
69
+                        this.detailImages = response.rows
70
+                    }
57 71
                 }
58 72
             } catch (error) {
59 73
                 uni.$u.toast(`获取列表失败:${error}`)
@@ -89,9 +103,9 @@ export default {
89 103
 
90 104
                 this.bindOrder(p, receiptID);
91 105
 
92
-                this.getList('2', '1', this.currentReceipt.id);
93
-                this.getList('2', '2', this.currentReceipt.id);
94
-                this.getList('2', '3', this.currentReceipt.id);
106
+                this.getList('2', '1', this.currentReceipt.id, this.orderDetail.itemBrand);
107
+                this.getList('2', '2', this.currentReceipt.id, this.orderDetail.itemBrand);
108
+                this.getList('2', '3', this.currentReceipt.id, this.orderDetail.itemBrand);
95 109
 
96 110
 
97 111
             } catch (error) {