Bläddra i källkod

报告新建、修改页面签字注师关联项目经理

lizhenhao 2 år sedan
förälder
incheckning
1e25e6e61f

+ 2 - 0
src/views/modules/cw/reportManagement/ReportManagementAddForm.vue

@@ -795,6 +795,8 @@
         this.inputForm.projectMasterId1 = row.projectMasterId // 项目经理1id
         this.inputForm.projectMasterId2 = row.realHeader // 项目经理2id
         this.inputForm.realHeaderName = row.realHeaderName // 项目经理2名称
+        this.inputForm.signatureAnnotator1 = row.projectMasterId // 签字注师1id = 项目经理1id
+        this.inputForm.signatureAnnotator2 = row.realHeader // 签字注师2id = 项目经理2id
         this.clearClientList()
         this.$forceUpdate()
         this.inputForm.cwProjectInfoList = []

+ 25 - 18
src/views/modules/cw/reportManagement/ReportManagementForm.vue

@@ -895,7 +895,7 @@
           remark1: '',
           remark2: '',
           remark3: '',
-          projectMasterId: '',
+          projectMasterId1: '',
           reviewStatus: '',
           taskName: '',
           sealType: '',
@@ -936,7 +936,8 @@
           servedUnitId: '',
           status: '',
           realCreate: '',
-          realHeaderName: ''
+          realHeaderName: '',
+          projectMasterId2: ''
         },
         keyWatch: '',
         activeName: 'enclosure',
@@ -1049,7 +1050,7 @@
           remark1: '',
           remark2: '',
           remark3: '',
-          projectMasterId: '',
+          projectMasterId1: '',
           reviewStatus: '',
           taskName: '',
           sealType: '',
@@ -1090,7 +1091,8 @@
           servedUnitId: '',
           status: '',
           realCreate: '',
-          realHeaderName: ''
+          realHeaderName: '',
+          projectMasterId2: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -1350,7 +1352,8 @@
           paymentMethod: '',
           contractId: '',
           realCreate: '',
-          realHeaderName: ''
+          realHeaderName: '',
+          projectMasterId2: ''
         }
         // this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()
@@ -1423,22 +1426,19 @@
         this.$forceUpdate()
       },
       getContract (row) {
+        console.log('row', row)
         this.inputForm.projectName = row.projectName // 项目名称
         this.inputForm.projectId = row.id // 项目id
         this.inputForm.projectNumber = row.projectNumber // 项目编号
         this.inputForm.projectMasterName = row.projectMasterName // 项目经理
-        this.inputForm.projectMasterId = row.projectMasterId // 项目经理id
+        this.inputForm.projectMasterId1 = row.projectMasterId // 项目经理1id
+        this.inputForm.projectMasterId2 = row.realHeader // 项目经理2id
+        this.inputForm.realHeaderName = row.realHeaderName // 项目经理2名称
+        this.inputForm.signatureAnnotator1 = row.projectMasterId // 签字注师1id = 项目经理1id
+        this.inputForm.signatureAnnotator2 = row.realHeader // 签字注师2id = 项目经理2id
         this.clearClientList()
         this.$forceUpdate()
         this.inputForm.cwProjectInfoList = []
-        // this.inputForm.contractName = row.contractName
-        // this.inputForm.contractAmount = row.contractAmount
-        // this.inputForm.contractNum = row.contractNum
-        // this.inputForm.payerSubject = row.payerSubject
-        // this.inputForm.paymentMethod = row.paymentMethod
-        // this.inputForm.projectMasterId = row.projectMasterId // 项目经理id
-        // this.inputForm.contractId = row.id
-        // this.inputForm.cwProjectInfoList = []
       },
       openContract () {
         this.$refs.workContractChooseCom.init()
@@ -1493,8 +1493,12 @@
             this.$refs.userSelect1.clearSelectData()
             this.$forceUpdate()
           })
-        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator2) && this.inputForm.projectMasterId !== this.inputForm.signatureAnnotator2 &&
-          this.inputForm.projectMasterId !== value && this.commonJS.isNotEmpty(value)) {
+        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator2) &&
+          this.inputForm.projectMasterId1 !== this.inputForm.signatureAnnotator2 &&
+          this.inputForm.projectMasterId2 !== this.inputForm.signatureAnnotator2 &&
+          this.inputForm.projectMasterId1 !== value &&
+          this.inputForm.projectMasterId2 !== value &&
+          this.commonJS.isNotEmpty(value)) {
           this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
           this.$nextTick(() => {
             this.inputForm.signatureAnnotator1 = ''
@@ -1515,8 +1519,11 @@
             this.$refs.userSelect2.clearSelectData()
             this.$forceUpdate()
           })
-        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator1) && this.inputForm.projectMasterId !== this.inputForm.signatureAnnotator1 &&
-          this.inputForm.projectMasterId !== value && this.commonJS.isNotEmpty(value)) {
+        } else if (this.commonJS.isNotEmpty(this.inputForm.signatureAnnotator1) &&
+          this.inputForm.projectMasterId1 !== this.inputForm.signatureAnnotator1 &&
+          this.inputForm.projectMasterId2 !== this.inputForm.signatureAnnotator1 &&
+          this.inputForm.projectMasterId1 !== value && this.commonJS.isNotEmpty(value) &&
+          this.inputForm.projectMasterId2 !== value) {
           this.$message.warning('签字注师1和签字注师2至少有一个与项目经理相同')
           this.$nextTick(() => {
             this.inputForm.signatureAnnotator2 = ''