Преглед изворни кода

调整工时成本统计的问题

Lijy пре 2 година
родитељ
комит
5481a39df3
1 измењених фајлова са 12 додато и 8 уклоњено
  1. 12 8
      fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

+ 12 - 8
fhKeeper/formulahousekeeper/timesheet/src/views/project/cost.vue

@@ -437,15 +437,19 @@
                     this.allListData = arrlist
                     // this.gtff()
                     if(this.user.userNameNeedTranslate == '1') {
-                        let list = arrlist.list
-                        let dealWithList = []
-                        for(var i in list) {
-                            let obj = {}
-                            obj.type = list[i].type
-                            obj.id = list[i].name
-                            dealWithList.push(obj)
+                        if(arrlist.list.length > 0) {
+                            let list = arrlist.list
+                            let dealWithList = []
+                            for(var i in list) {
+                                let obj = {}
+                                obj.type = list[i].type
+                                obj.id = list[i].name
+                                dealWithList.push(obj)
+                            }
+                            this.dealWithTranslationPlone(dealWithList)
+                        } else {
+                            this.getUserCostList()
                         }
-                        this.dealWithTranslationPlone(dealWithList)
                     } else {
                         this.allListData = arrlist
                         this.gtff()