|
@@ -616,6 +616,7 @@
|
|
import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
|
|
import ProjectReportService from '@/api/cw/reportManagement/ProjectReportService'
|
|
import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
|
|
import EnterpriseSearchService from '@/api/cw/common/EnterpriseSearchService'
|
|
import UserService from '@/api/sys/UserService'
|
|
import UserService from '@/api/sys/UserService'
|
|
|
|
+ import CommonApi from '@/api/cw/common/CommonApi'
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
businessId: {
|
|
businessId: {
|
|
@@ -714,6 +715,7 @@
|
|
ProjectReportService: null,
|
|
ProjectReportService: null,
|
|
enterpriseSearchService: null,
|
|
enterpriseSearchService: null,
|
|
userService: null,
|
|
userService: null,
|
|
|
|
+ commonApi: null,
|
|
created () {
|
|
created () {
|
|
this.enterpriseSearchService = new EnterpriseSearchService()
|
|
this.enterpriseSearchService = new EnterpriseSearchService()
|
|
// this.projectReportService = new ProjectReportService()
|
|
// this.projectReportService = new ProjectReportService()
|
|
@@ -721,6 +723,7 @@
|
|
this.reportReviewService = new ReportReviewService()
|
|
this.reportReviewService = new ReportReviewService()
|
|
this.projectReportService = new ProjectReportService()
|
|
this.projectReportService = new ProjectReportService()
|
|
this.userService = new UserService()
|
|
this.userService = new UserService()
|
|
|
|
+ this.commonApi = new CommonApi()
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
bus: {
|
|
bus: {
|
|
@@ -1059,33 +1062,31 @@
|
|
throw new Error()
|
|
throw new Error()
|
|
} else {
|
|
} else {
|
|
if (type === 'reject') {
|
|
if (type === 'reject') {
|
|
- // 驳回
|
|
|
|
- let param
|
|
|
|
- // this.userService.is().then(({data}) => {
|
|
|
|
- // if (data) {
|
|
|
|
- // this.inputForm.reviewStatus = '2'
|
|
|
|
- // // param = {status: '4', id: this.inputForm.id}
|
|
|
|
- // } else {
|
|
|
|
- // this.inputForm.reviewStatus = '4'
|
|
|
|
- // }
|
|
|
|
- // })
|
|
|
|
- this.inputForm.reviewStatus = '4'
|
|
|
|
- // 列表处理
|
|
|
|
- this.inputForm.details = []
|
|
|
|
- this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
- this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
- this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
- param = {reviewStatus: this.inputForm.reviewStatus,
|
|
|
|
- id: this.inputForm.id,
|
|
|
|
- needUpdate2: this.inputForm.needUpdate2,
|
|
|
|
- needUpdate3: this.inputForm.needUpdate3,
|
|
|
|
- remark2: this.inputForm.remark2,
|
|
|
|
- remark3: this.inputForm.remark3,
|
|
|
|
- details: this.inputForm.details
|
|
|
|
- }
|
|
|
|
- this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
|
|
|
|
- this.loading = false
|
|
|
|
- callback()
|
|
|
|
|
|
+ this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
|
|
|
|
+ this.commonApi.getTaskNameByProcInsId(review.data.procInsId).then(({data}) => {
|
|
|
|
+ if (data === '二级复核') { // 二级复核 进入下面操作,不是二级复核 直接驳回
|
|
|
|
+ this.reportReviewService.getHaveReportNo(this.inputForm.id).then((haveReportNo) => { // 根据报告id查询是否已经生成报告文号
|
|
|
|
+ console.log(haveReportNo)
|
|
|
|
+ if (haveReportNo.data === '1' || haveReportNo.data === 1) { // 返回值为 ’1‘,已生成报告文号,直接驳回
|
|
|
|
+ this.rejectOn(callback)
|
|
|
|
+ } else { // 返回值为 ’0‘,未生成报告文号,询问是否需要生成报告文号?是 则生成后驳回,否 则直接驳回
|
|
|
|
+ this.$confirm(`是否需要生成报告文号?`, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => { // 是 则生成报告文号后驳回
|
|
|
|
+ this.reportReviewService.saveReportNo(this.inputForm.id).then(() => {
|
|
|
|
+ this.rejectOn(callback)
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => { // 否 则直接驳回
|
|
|
|
+ this.rejectOn(callback)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.rejectOn(callback)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
}
|
|
}
|
|
if (type === 'reback') {
|
|
if (type === 'reback') {
|
|
@@ -1112,6 +1113,29 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
|
|
|
|
+ rejectOn (callback) {
|
|
|
|
+ // 驳回
|
|
|
|
+ let param
|
|
|
|
+ this.inputForm.reviewStatus = '4'
|
|
|
|
+ // 列表处理
|
|
|
|
+ this.inputForm.details = []
|
|
|
|
+ this.inputForm.detailFor1010.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
+ this.inputForm.detailFor1020.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
+ this.inputForm.detailFor1030.forEach(item => { this.inputForm.details.push(item) })
|
|
|
|
+ param = {reviewStatus: this.inputForm.reviewStatus,
|
|
|
|
+ id: this.inputForm.id,
|
|
|
|
+ needUpdate2: this.inputForm.needUpdate2,
|
|
|
|
+ needUpdate3: this.inputForm.needUpdate3,
|
|
|
|
+ remark2: this.inputForm.remark2,
|
|
|
|
+ remark3: this.inputForm.remark3,
|
|
|
|
+ details: this.inputForm.details
|
|
|
|
+ }
|
|
|
|
+ this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
|
|
|
|
+ this.loading = false
|
|
|
|
+ callback()
|
|
|
|
+ })
|
|
|
|
+ },
|
|
close () {
|
|
close () {
|
|
this.inputForm = {
|
|
this.inputForm = {
|
|
id: '',
|
|
id: '',
|