Pārlūkot izejas kodu

财务-合同登记

wangqiang 2 gadi atpakaļ
vecāks
revīzija
aab434208b

+ 3 - 3
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -291,8 +291,8 @@
       // 发起客户登记
       push (row) {
         // 读取流程表单
-        let title = `发起流程【客户登记】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[客户登记]`
+        let title = `发起流程【质控管理员审核】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[质控管理员审核]`
         let status = 'startAndHold'
         if (row.status === '3' || row.status === '4') {
           status = 'startAndClose'
@@ -313,7 +313,7 @@
                 businessId: row.id,
                 isShow: 'false',
                 status: status,
-                routePath: '/cw/workClientInfo/WorkClientList'
+                routePath: '/cw/reportManagement/ReportManagementList'
               }
             })
           })

+ 38 - 1
src/views/modules/cw/reportManagement/ReportManagementTaskForm.vue

@@ -520,7 +520,26 @@
           this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
           // 验证报告 日期报告 类型是否出具报告 意见类型 是否为空
           // eslint-disable-next-line no-unused-expressions
-          console.log('this.inputForm.cwProjectInfoList.reportDate', this.inputForm.cwProjectInfoList.reportDate)
+          this.inputForm.cwProjectInfoList.forEach((item, index) => {
+            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
+              this.$message.error('报告日期不能为空')
+              throw new Error('报告日期不能为空')
+              // eslint-disable-next-line no-unreachable
+              this.loading = false
+            }
+            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
+              this.$message.error('报告类型不能为空')
+              throw new Error('报告类型不能为空')
+              // eslint-disable-next-line no-unreachable
+              this.loading = false
+            }
+            if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
+              this.$message.error('意见类型不能为空')
+              throw new Error('意见类型不能为空')
+              // eslint-disable-next-line no-unreachable
+              this.loading = false
+            }
+          })
           this.projectReportService.saveForm(this.inputForm).then(({data}) => {
             callback(data.businessTable, data.businessId, this.inputForm)
             this.loading = false
@@ -549,6 +568,24 @@
             if (this.commonJS.isEmpty(this.inputForm.createDate)) {
               this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
             }
+            console.log('进来了')
+            this.inputForm.cwProjectInfoList.forEach((item, index) => {
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportDate)) {
+                this.$message.error('报告日期不能为空')
+                this.loading = false
+                throw new Error('报告日期不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].reportType)) {
+                this.$message.error('报告类型不能为空')
+                this.loading = false
+                throw new Error('报告类型不能为空')
+              }
+              if (this.commonJS.isEmpty(this.inputForm.cwProjectInfoList[index].opinionType)) {
+                this.$message.error('意见类型不能为空')
+                this.loading = false
+                throw new Error('意见类型不能为空')
+              }
+            })
             this.projectReportService.saveForm(this.inputForm).then(({data}) => {
               console.log('businessTable', data.businessTable)
               console.log('businessId', data.businessId)