Pārlūkot izejas kodu

项目登记bug

lizhenhao 2 gadi atpakaļ
vecāks
revīzija
64056d677b
1 mainītis faili ar 46 papildinājumiem un 3 dzēšanām
  1. 46 3
      src/views/modules/program/registered/RegisItemForm.vue

+ 46 - 3
src/views/modules/program/registered/RegisItemForm.vue

@@ -1051,13 +1051,56 @@
           return
         } else {
           this.inputForm.members.forEach((item, index) => {
+            if (this.commonJS.isEmpty(item.job)) {
+              if (this.commonJS.isNotEmpty(item.row)) {
+                if (this.commonJS.isNotEmpty(item.row.job)) {
+                  this.inputForm.members[index].job = item.row.job
+                } else {
+                  this.inputForm.members[index].job = ''
+                }
+              } else {
+                this.inputForm.members[index].job = ''
+              }
+            }
+            if (this.commonJS.isEmpty(item.workHours)) {
+              if (this.commonJS.isNotEmpty(item.row)) {
+                if (this.commonJS.isNotEmpty(item.row.workHours)) {
+                  this.inputForm.members[index].workHours = item.row.workHours
+                } else {
+                  this.inputForm.members[index].workHours = 0
+                }
+              } else {
+                this.inputForm.members[index].workHours = 0
+              }
+            }
+            if (this.commonJS.isEmpty(item.type)) {
+              if (this.commonJS.isNotEmpty(item.row)) {
+                if (this.commonJS.isNotEmpty(item.row.type)) {
+                  this.inputForm.members[index].type = item.row.type
+                } else {
+                  this.inputForm.members[index].type = ''
+                }
+              } else {
+                this.inputForm.members[index].type = ''
+              }
+            }
+            if (this.commonJS.isEmpty(item.name)) {
+              if (this.commonJS.isNotEmpty(item.row)) {
+                if (this.commonJS.isNotEmpty(item.row.name)) {
+                  this.inputForm.members[index].name = item.row.name
+                } else {
+                  this.inputForm.members[index].name = ''
+                }
+              } else {
+                this.inputForm.members[index].name = ''
+              }
+            }
+          })
+          this.inputForm.members.forEach((item, index) => {
             if (this.commonJS.isEmpty(item.name)) {
               this.$message.error('项目组成员姓名不允许为空')
               throw new Error('项目组成员姓名不允许为空')
             }
-            if (this.commonJS.isNotEmpty(item.row)) {
-              this.inputForm.members[index] = item.row
-            }
           })
         }
         this.$refs['inputForm'].validate((valid) => {