|
@@ -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)
|