linwenxin il y a 5 mois
Parent
commit
1ed10eceb3
1 fichiers modifiés avec 9 ajouts et 9 suppressions
  1. 9 9
      src/views/workOrder/workOrderPool/index.vue

+ 9 - 9
src/views/workOrder/workOrderPool/index.vue

@@ -516,15 +516,15 @@ export default {
           }
         ].map(item => {
           var data = res.data.find(val => val.orderStatus == item.value)
-          if (data) {
-            if (item.value == 'YWGO') {
-              var data_ = res.data.find(val => val.orderStatus == 'YWG')
-              var data_2 = res.data.find(val => val.orderStatus == 'GCSZX')
-              var data_3 = res.data.find(val => val.orderStatus == 'YJS')
-              item.label = `${item.label}(${data.total + data_.total + data_2.total + data_3.total})`
-            } else {
-              item.label = `${item.label}(${data.total})`
-            }
+          if (item.value == 'YWGO') {
+            var data_ = res.data.find(val => val.orderStatus == 'YWG')
+            var data_2 = res.data.find(val => val.orderStatus == 'GCSZX')
+            var data_3 = res.data.find(val => val.orderStatus == 'YJS')
+            item.label = `${item.label}(${
+              (data?.total || 0) + (data_?.total || 0) + (data_2?.total || 0) + (data_3?.total || 0)
+            })`
+          } else {
+            item.label = `${item.label}(${data?.total || 0})`
           }
           return item
         })