|
@@ -790,6 +790,16 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ reapplyForm (callback) {
|
|
|
+ this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.status !== '8') { // 审核状态不是“驳回”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ } else {
|
|
|
+ this.doSubmit('reapply', callback)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 表单提交
|
|
|
async doSubmit (status, callback) {
|
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
@@ -816,6 +826,8 @@
|
|
|
this.inputForm.status = '9'
|
|
|
this.inputForm.financeInvoiceInvalidDTO.invalidStatus = '1'
|
|
|
this.inputForm.invalidStatus = '1'
|
|
|
+ } else if (status === 'reapply') {
|
|
|
+ this.inputForm.status = '6'
|
|
|
}
|
|
|
if (this.commonJS.isEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
|
|
|
this.$message.error('至少新增一条基本信息')
|
|
@@ -1120,36 +1132,54 @@
|
|
|
this.financeInvoiceDetailDTOList.push({account: this.inputForm.account})
|
|
|
}
|
|
|
},
|
|
|
- async updateStatusById (type) {
|
|
|
+ async updateStatusById (type, callback) {
|
|
|
if (await this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
|
throw new Error()
|
|
|
- }
|
|
|
- await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
- if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
|
|
|
- this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
- throw new Error()
|
|
|
- } else {
|
|
|
- if (type === 'agree') {
|
|
|
- // 同意
|
|
|
- this.inputForm.status = '9'
|
|
|
- }
|
|
|
- if (type === 'reject') {
|
|
|
- // 驳回
|
|
|
- // this.inputForm.status = '8'
|
|
|
- this.inputForm.status = '5'
|
|
|
- }
|
|
|
- if (type === 'reback') {
|
|
|
- // 撤回
|
|
|
- // this.inputForm.status = '7'
|
|
|
- this.inputForm.status = '5'
|
|
|
- }
|
|
|
- if (type === 'reject' || type === 'reback') {
|
|
|
- let param = {status: this.inputForm.status, id: this.inputForm.id}
|
|
|
- this.financeInvoiceService.updateStatusById(param)
|
|
|
- }
|
|
|
+ } else {
|
|
|
+ if (type === 'reject' || type === 'reback') {
|
|
|
+ this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ if (type === 'agree') {
|
|
|
+ // 同意
|
|
|
+ this.inputForm.status = '9'
|
|
|
+ }
|
|
|
+ if (type === 'reject') {
|
|
|
+ // 驳回
|
|
|
+ this.inputForm.status = '8'
|
|
|
+ // this.inputForm.status = '5'
|
|
|
+ }
|
|
|
+ if (type === 'reback') {
|
|
|
+ // 撤回
|
|
|
+ // this.inputForm.status = '7'
|
|
|
+ this.inputForm.status = '5'
|
|
|
+ }
|
|
|
+ if (type === 'reject' || type === 'reback') {
|
|
|
+ let param = {status: this.inputForm.status, id: this.inputForm.id}
|
|
|
+ this.financeInvoiceService.updateStatusById(param).then(() => {
|
|
|
+ callback()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else if (type === 'hold') {
|
|
|
+ this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
|
|
|
+ if (data.status !== '8') { // status的值不等于“驳回”就弹出提示
|
|
|
+ this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
|
|
|
+ throw new Error()
|
|
|
+ } else {
|
|
|
+ // 终止
|
|
|
+ let param = {status: '5', id: this.inputForm.id}
|
|
|
+ this.financeInvoiceService.updateStatusById(param).then(() => {
|
|
|
+ callback()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
- })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|