|
@@ -501,6 +501,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ reapplyForm (callback) {
|
|
|
+ this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.applyFileType !== '4') { // 审核状态不是“驳回”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ } else {
|
|
|
+ this.doSubmit('reapply', callback)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 表单提交
|
|
|
doSubmit (status, callback) {
|
|
|
if (status === 'save') {
|
|
@@ -528,6 +538,8 @@
|
|
|
} else if (status === 'start') {
|
|
|
// 送审 待审核
|
|
|
this.inputForm.applyFileType = '2'
|
|
|
+ } else if (status === 'reapply') {
|
|
|
+ this.inputForm.applyFileType = '2'
|
|
|
}
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
@@ -582,67 +594,81 @@
|
|
|
})
|
|
|
},
|
|
|
async updateStatusById (type, callback) {
|
|
|
- if (type === 'reject' || type === 'reback') {
|
|
|
- if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
- this.loading = false
|
|
|
- throw new Error()
|
|
|
- }
|
|
|
- await this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- console.log('data', data)
|
|
|
- if (data.applyFileType !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
- if (type === 'reject') {
|
|
|
- // 驳回
|
|
|
- this.inputForm.applyFileType = '4'
|
|
|
- let param = {applyFileType: '4', id: this.inputForm.id}
|
|
|
+ if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ this.loading = false
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'reject' || type === 'reback') {
|
|
|
+ this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ console.log('data', data)
|
|
|
+ if (data.applyFileType !== '2') { // status的值不等于“审核中”就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'reject') {
|
|
|
+ // 驳回
|
|
|
+ this.inputForm.applyFileType = '4'
|
|
|
+ let param = {applyFileType: '4', id: this.inputForm.id}
|
|
|
+ this.reportCancellApplyArchivedService.updateStatusById(param).then(() => {
|
|
|
+ callback()
|
|
|
+ })
|
|
|
+ // this.projectRecordsService.updateStatusById(param)
|
|
|
+ }
|
|
|
+ // if (type === 'reject') {
|
|
|
+ // if (this.inputForm.isNumber !== this.inputForm.number) {
|
|
|
+ // this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
+ // this.loading = false
|
|
|
+ // throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
+ // } else {
|
|
|
+ // // 驳回
|
|
|
+ // let _this = this
|
|
|
+ // const wait = function () {
|
|
|
+ // return new Promise(function (resolve, reject) {
|
|
|
+ // _this.inputForm.applyFileType = '4'
|
|
|
+ // _this.loading = true
|
|
|
+ // if (_this.$refs.uploadComponent.checkProgress()) {
|
|
|
+ // _this.loading = false
|
|
|
+ // reject(new Error())
|
|
|
+ // }
|
|
|
+ // _this.$refs.uploadComponent.getDataList().then((list) => {
|
|
|
+ // // list为返回数据
|
|
|
+ // _this.inputForm.workAttachmentDtoList = list
|
|
|
+ // })
|
|
|
+ // resolve()
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // wait().then(() => {
|
|
|
+ // this.reportCancellApplyArchivedService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ // this.loading = false
|
|
|
+ // }).catch(() => {
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+ // }).catch(() => {
|
|
|
+ // this.loading = false
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ let param = {applyFileType: '3', id: this.inputForm.id}
|
|
|
+ this.projectReportArchiveService.updateStatusById(param)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (type === 'hold') {
|
|
|
+ this.reportCancellApplyArchivedService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.applyFileType !== '4') { // status的值不等于“驳回”就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ // 终止
|
|
|
+ let param = {applyFileType: '1', id: this.inputForm.id}
|
|
|
this.reportCancellApplyArchivedService.updateStatusById(param).then(() => {
|
|
|
callback()
|
|
|
})
|
|
|
- // this.projectRecordsService.updateStatusById(param)
|
|
|
}
|
|
|
- // if (type === 'reject') {
|
|
|
- // if (this.inputForm.isNumber !== this.inputForm.number) {
|
|
|
- // this.$message.error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
- // this.loading = false
|
|
|
- // throw new Error('“案卷号”与“确认案卷号”不一致,请重新填写')
|
|
|
- // } else {
|
|
|
- // // 驳回
|
|
|
- // let _this = this
|
|
|
- // const wait = function () {
|
|
|
- // return new Promise(function (resolve, reject) {
|
|
|
- // _this.inputForm.applyFileType = '4'
|
|
|
- // _this.loading = true
|
|
|
- // if (_this.$refs.uploadComponent.checkProgress()) {
|
|
|
- // _this.loading = false
|
|
|
- // reject(new Error())
|
|
|
- // }
|
|
|
- // _this.$refs.uploadComponent.getDataList().then((list) => {
|
|
|
- // // list为返回数据
|
|
|
- // _this.inputForm.workAttachmentDtoList = list
|
|
|
- // })
|
|
|
- // resolve()
|
|
|
- // })
|
|
|
- // }
|
|
|
- // wait().then(() => {
|
|
|
- // this.reportCancellApplyArchivedService.saveForm(this.inputForm).then(({data}) => {
|
|
|
- // this.loading = false
|
|
|
- // }).catch(() => {
|
|
|
- // this.loading = false
|
|
|
- // })
|
|
|
- // }).catch(() => {
|
|
|
- // this.loading = false
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- if (type === 'reback') {
|
|
|
- // 撤回
|
|
|
- let param = {applyFileType: '3', id: this.inputForm.id}
|
|
|
- this.projectReportArchiveService.updateStatusById(param)
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
close () {
|