|
@@ -644,49 +644,46 @@
|
|
|
},
|
|
|
async updateStatusById (type) {
|
|
|
if (type === 'reject' || type === 'reback') {
|
|
|
- // if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ // if (await this.$refs.upLoadComponentDialog.checkProgress()) {
|
|
|
// this.loading = false
|
|
|
// throw new Error()
|
|
|
- // }
|
|
|
+ // } else {
|
|
|
await this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- if (data.status1 !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
- if (type === 'reject') {
|
|
|
- // 驳回
|
|
|
- this.inputForm.status = '4'
|
|
|
- let param = {status: '4', id: this.inputForm.sid1}
|
|
|
- this.projectReportService.updateSignatureStatusById(param)
|
|
|
- // this.projectRecordsService.updateStatusById(param)
|
|
|
+ if (data.signatureType === '1') {
|
|
|
+ if (data.status1 !== '2') { // 审核状态不是“待审核”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'reject') {
|
|
|
+ // 驳回
|
|
|
+ this.inputForm.status = '4'
|
|
|
+ let param = {status: '4', id: data.sid1}
|
|
|
+ this.projectReportService.updateSignatureStatusById(param)
|
|
|
+ }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ let param = {status: '3', id: data.sid1}
|
|
|
+ this.projectReportService.updateSignatureStatusById(param)
|
|
|
+ }
|
|
|
}
|
|
|
- if (type === 'reback') {
|
|
|
- // 撤回
|
|
|
- let param = {status: '3', id: this.inputForm.sid1}
|
|
|
- // this.projectRecordsService.updateStatusById(param)
|
|
|
- this.projectReportService.updateSignatureStatusById(param)
|
|
|
+ }
|
|
|
+ if (data.signatureType === '2') {
|
|
|
+ if (data.status2 !== this.inputForm.status2) { // 审核状态不是“待审核”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ debugger
|
|
|
+ if (type === 'reject') {
|
|
|
+ // 驳回
|
|
|
+ this.projectReportService.updateSignatureStatusById({status: '4', id: data.sid2})
|
|
|
+ }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ this.projectReportService.updateSignatureStatusById({status: '3', id: data.sid2})
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- // await this.projectRecordsService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- // if (data.status !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
- // this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- // throw new Error()
|
|
|
- // } else {
|
|
|
- // if (type === 'reject') {
|
|
|
- // // 驳回
|
|
|
- // this.inputForm.status = '4'
|
|
|
- // let param = {status: '4', id: this.inputForm.id}
|
|
|
- // this.projectRecordsService.updateStatusById(param)
|
|
|
- // }
|
|
|
- // if (type === 'reback') {
|
|
|
- // // 撤回
|
|
|
- // let param = {status: '3', id: this.inputForm.id}
|
|
|
- // // this.projectRecordsService.updateStatusById(param)
|
|
|
- // this.projectReportService.updateStatusById(param)
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
}
|
|
|
},
|
|
|
close () {
|