|
@@ -1077,9 +1077,9 @@
|
|
// this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
// this.inputForm.agreeDate = this.moment(new Date()).format('YYYY-MM-DD')
|
|
// this.inputForm.agreeUserId = this.$store.state.user.id
|
|
// this.inputForm.agreeUserId = this.$store.state.user.id
|
|
this.inputForm.signatureAnnotatorStatus = '5'
|
|
this.inputForm.signatureAnnotatorStatus = '5'
|
|
- } else if (status === 'reapply') {
|
|
|
|
- this.inputForm.signatureAnnotatorStatus = '2'
|
|
|
|
- this.inputForm.assignee = this.inputForm.reviewBy
|
|
|
|
|
|
+ } else if (status === 'reapplyFlag') {
|
|
|
|
+ this.inputForm.signatureAnnotatorStatus = '4'
|
|
|
|
+ // this.inputForm.assignee = this.inputForm.reviewBy
|
|
}
|
|
}
|
|
this.$refs['inputForm2'].validate((valid) => {
|
|
this.$refs['inputForm2'].validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
@@ -1115,89 +1115,10 @@
|
|
},
|
|
},
|
|
async updateStatusById (type, callback) {
|
|
async updateStatusById (type, callback) {
|
|
this.loading = true
|
|
this.loading = true
|
|
- if (type === 'reject' || type === 'reback') {
|
|
|
|
- await projectReportService.queryById(this.inputForm.id).then((data) => {
|
|
|
|
- this.commonApi.getTaskNameByProcInsId(review.procInsId).then((data) => {
|
|
|
|
- if (data === '二级复核') { // 二级复核 进入下面操作,不是二级复核 直接驳回
|
|
|
|
- this.reportReviewService.getHaveReportNo(this.inputForm.id).then((haveReportNo) => { // 根据报告id查询是否已经生成报告文号
|
|
|
|
- console.log(haveReportNo)
|
|
|
|
- if (haveReportNo === '1' || haveReportNo === 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 (data.signatureAnnotatorStatus !== '4') { // status的值不等于“审核中”就弹出提示
|
|
|
|
- this.loading = false
|
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
|
- throw new Error()
|
|
|
|
- } else {
|
|
|
|
- if (type === 'reject') {
|
|
|
|
- this.reportReviewService.queryByReportId(this.inputForm.id).then((review) => {
|
|
|
|
- console.log('review', review)
|
|
|
|
- this.commonApi.getTaskNameByProcInsId(review.procInsId).then((data) => {
|
|
|
|
- if (data === '二级复核') { // 二级复核 进入下面操作,不是二级复核 直接驳回
|
|
|
|
- this.reportReviewService.getHaveReportNo(this.inputForm.id).then((haveReportNo) => { // 根据报告id查询是否已经生成报告文号
|
|
|
|
- console.log(haveReportNo)
|
|
|
|
- if (haveReportNo === '1' || haveReportNo === 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') {
|
|
|
|
- // 撤回
|
|
|
|
- let param = {signatureAnnotatorStatus: '3', id: this.inputForm.id}
|
|
|
|
- this.reportReviewService.updateReviewStatysByReportId(param)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- } else if (type === 'hold') {
|
|
|
|
- projectReportService.queryById(this.inputForm.id).then((data) => {
|
|
|
|
- if (data.signatureAnnotatorStatus !== '4') { // status的值不等于“驳回”就弹出提示
|
|
|
|
- this.loading = false
|
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
|
- throw new Error()
|
|
|
|
- } else {
|
|
|
|
- // 终止
|
|
|
|
- let param = {signatureAnnotatorStatus: '1', id: this.inputForm.id}
|
|
|
|
- this.reportReviewService.updateReviewStatysByReportId(param).then(() => {
|
|
|
|
- callback()
|
|
|
|
- this.loading = false
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
|
|
+ let param = {signatureAnnotatorStatus: '4', id: this.inputForm.id}
|
|
|
|
+ projectReportService.updateSigStatusById(param)
|
|
|
|
+ callback()
|
|
|
|
+ this.loading = false
|
|
},
|
|
},
|
|
// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
|
|
// 这个方法是这个之前这个页面的驳回方法,现在粘出来复用
|
|
rejectOn (callback) {
|
|
rejectOn (callback) {
|