lizhenhao 2 vuotta sitten
vanhempi
commit
b3cecbd679

+ 21 - 29
src/views/modules/finance/invoice/InvoiceFormTask.vue

@@ -817,15 +817,11 @@
         await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       async doSubmit (status, callback) {
@@ -1162,30 +1158,26 @@
         await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.inputForm.status = '4'
+            }
+            if (type === 'reback') {
+              // 撤回
+              this.inputForm.status = '3'
+            }
+            if (type === 'reject' || type === 'reback') {
+              let param = {status: this.inputForm.status, id: this.inputForm.id}
+              this.financeInvoiceService.updateStatusById(param)
+            }
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.inputForm.status = '4'
-          }
-          if (type === 'reback') {
-            // 撤回
-            this.inputForm.status = '3'
-          }
-          if (type === 'reject' || type === 'reback') {
-            let param = {status: this.inputForm.status, id: this.inputForm.id}
-            this.financeInvoiceService.updateStatusById(param)
-          }
-        }
       },
       // 下载模板
       downloadTpl () {

+ 23 - 31
src/views/modules/finance/invoice/InvoiceFormTaskInvalid.vue

@@ -775,15 +775,11 @@
         await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       async doSubmit (status, callback) {
@@ -1123,32 +1119,28 @@
         await this.financeInvoiceService.queryById(this.inputForm.id).then(({data}) => {
           if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            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)
+            }
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          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)
-          }
-        }
       }
     }
   }

+ 16 - 24
src/views/modules/finance/invoice/InvoiceList.vue

@@ -643,20 +643,16 @@
           await this.financeInvoiceService.queryById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(async ({data}) => {
+                let form = {status: '3', id: row.id}
+                await this.financeInvoiceService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(async ({data}) => {
-              let form = {status: '3', id: row.id}
-              await this.financeInvoiceService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       invoiceInvalidReBack (row) {
@@ -668,20 +664,16 @@
           await this.financeInvoiceService.queryById(row.id).then(({data}) => {
             if (data.status !== '6') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.financeInvoiceInvalidDTO.procInsId).then(async ({data}) => {
+                let form = {status: '5', id: row.id}
+                await this.financeInvoiceService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.financeInvoiceInvalidDTO.procInsId).then(async ({data}) => {
-              let form = {status: '5', id: row.id}
-              await this.financeInvoiceService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       isReceivables (row) {

+ 1 - 1
src/views/modules/flowable/task/TaskForm.vue

@@ -267,7 +267,7 @@
           } catch (e) {
             console.log(e)
           }
-        }, 200)
+        }, 500)
       },
       cc (procInsId) {
         if (this.isCC && this.auditForm.userIds) {

+ 11 - 3
src/views/modules/flowable/task/TaskFormDetail.vue

@@ -117,13 +117,21 @@ const _import = require('@/router/import-' + process.env.NODE_ENV)
         this.businessId = this.$route.query.businessId
         this.procInsId = this.$route.query.procInsId
         this.formReadOnly = true
-        this.$nextTick(() => {
+        // this.$nextTick(() => {
+        //   try {
+        //     _this.$refs.form.getKeyWatch(Math.random().toString())
+        //   } catch (e) {
+        //     console.log(e)
+        //   }
+        // })
+        let _this = this
+        setTimeout(function () {
           try {
-            this.$refs.form.getKeyWatch(Math.random().toString())
+            _this.$refs.form.getKeyWatch(Math.random().toString())
           } catch (e) {
             console.log(e)
           }
-        })
+        }, 500)
       }
     },
     data () {

+ 50 - 58
src/views/modules/klgBase/questions/KlgBaseQuestionsDetailForm.vue

@@ -269,15 +269,11 @@
         await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
           if (this.inputForm.procInsId !== data.procInsId) { // “procInsId”已经改变,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          await this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       doSubmit (status, callback) {
@@ -365,61 +361,57 @@
         await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
           if (this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
-          }
-        })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.loading = true
-            if (this.$refs.uploadComponent.checkProgress()) {
-              this.loading = false
-              return
-            }
-            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
-            if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
-              this.inputForm.klgBaseDisposeDTOList = []
-              this.inputForm.disposeBy.split(',').forEach(item => {
-                let i = {disposeBy: item, questionId: this.inputForm.id}
-                this.inputForm.klgBaseDisposeDTOList.push(i)
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.loading = true
+              if (this.$refs.uploadComponent.checkProgress()) {
+                this.loading = false
+                return
+              }
+              this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+              if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
+                this.inputForm.klgBaseDisposeDTOList = []
+                this.inputForm.disposeBy.split(',').forEach(item => {
+                  let i = {disposeBy: item, questionId: this.inputForm.id}
+                  this.inputForm.klgBaseDisposeDTOList.push(i)
+                })
+              } else {
+                this.inputForm.klgBaseDisposeDTOList = []
+              }
+              this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+                if (this.commonJS.isEmpty(item.content)) {
+                  this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+                }
               })
-            } else {
-              this.inputForm.klgBaseDisposeDTOList = []
-            }
-            this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
-              if (this.commonJS.isEmpty(item.content)) {
-                this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+              if (this.inputForm.status === '2') {
+                this.inputForm.status = '4'
+              } else if (this.inputForm.status === '5') {
+                this.inputForm.status = '2'
               }
-            })
-            if (this.inputForm.status === '2') {
-              this.inputForm.status = '4'
-            } else if (this.inputForm.status === '5') {
-              this.inputForm.status = '2'
+              this.getEditorFilesDTOList()
+              this.getEditorFilesDTOS()
+              this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
+                this.inputForm.assignee = this.inputForm.disposeBy
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
+              return
+            }
+            if (type === 'reback') {
+              // 撤回
+              let param = {status: '3', id: this.inputForm.id}
+              this.klgBaseQuestionsService.updateStatusById(param)
             }
-            this.getEditorFilesDTOList()
-            this.getEditorFilesDTOS()
-            this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
-              this.inputForm.assignee = this.inputForm.disposeBy
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
-            return
-          }
-          if (type === 'reback') {
-            // 撤回
-            let param = {status: '3', id: this.inputForm.id}
-            this.klgBaseQuestionsService.updateStatusById(param)
           }
-        }
+        })
       },
       close () {
         this.inputForm = {

+ 8 - 12
src/views/modules/klgBase/questions/KlgBaseQuestionsFocusList.vue

@@ -376,20 +376,16 @@
           await this.klgBaseQuestionsService.queryById(row.id).then(({data}) => {
             if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.klgBaseQuestionsService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.klgBaseQuestionsService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       openProgramPageForm () {

+ 50 - 58
src/views/modules/klgBase/questions/KlgBaseQuestionsForm.vue

@@ -255,15 +255,11 @@
         await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
           if (this.inputForm.procInsId !== data.procInsId) { // “procInsId”已经改变,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          await this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       doSubmit (status, callback) {
@@ -351,61 +347,57 @@
         await this.klgBaseQuestionsService.queryById(this.inputForm.id).then(({data}) => {
           if (this.inputForm.procInsId !== data.procInsId) { // status的值不等于“审核中”,或者“procInsId”已经改变,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
-          }
-        })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.loading = true
-            if (this.$refs.uploadComponent.checkProgress()) {
-              this.loading = false
-              return
-            }
-            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
-            if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
-              this.inputForm.klgBaseDisposeDTOList = []
-              this.inputForm.disposeBy.split(',').forEach(item => {
-                let i = {disposeBy: item, questionId: this.inputForm.id}
-                this.inputForm.klgBaseDisposeDTOList.push(i)
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.loading = true
+              if (this.$refs.uploadComponent.checkProgress()) {
+                this.loading = false
+                return
+              }
+              this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+              if (this.commonJS.isNotEmpty(this.inputForm.disposeBy)) {
+                this.inputForm.klgBaseDisposeDTOList = []
+                this.inputForm.disposeBy.split(',').forEach(item => {
+                  let i = {disposeBy: item, questionId: this.inputForm.id}
+                  this.inputForm.klgBaseDisposeDTOList.push(i)
+                })
+              } else {
+                this.inputForm.klgBaseDisposeDTOList = []
+              }
+              this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
+                if (this.commonJS.isEmpty(item.content)) {
+                  this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+                }
               })
-            } else {
-              this.inputForm.klgBaseDisposeDTOList = []
-            }
-            this.inputForm.klgBaseReplyDTOList.forEach((item, index) => {
-              if (this.commonJS.isEmpty(item.content)) {
-                this.inputForm.klgBaseReplyDTOList.splice(index, 1)
+              if (this.inputForm.status === '2') {
+                this.inputForm.status = '4'
+              } else if (this.inputForm.status === '5') {
+                this.inputForm.status = '2'
               }
-            })
-            if (this.inputForm.status === '2') {
-              this.inputForm.status = '4'
-            } else if (this.inputForm.status === '5') {
-              this.inputForm.status = '2'
+              this.getEditorFilesDTOList()
+              this.getEditorFilesDTOS()
+              this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
+                this.inputForm.assignee = this.inputForm.disposeBy
+                callback(data.businessTable, data.businessId, this.inputForm)
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
+              })
+              return
+            }
+            if (type === 'reback') {
+              // 撤回
+              let param = {status: '3', id: this.inputForm.id}
+              this.klgBaseQuestionsService.updateStatusById(param)
             }
-            this.getEditorFilesDTOList()
-            this.getEditorFilesDTOS()
-            this.klgBaseQuestionsService.saveForm(this.inputForm).then(({data}) => {
-              this.inputForm.assignee = this.inputForm.disposeBy
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
-            return
-          }
-          if (type === 'reback') {
-            // 撤回
-            let param = {status: '3', id: this.inputForm.id}
-            this.klgBaseQuestionsService.updateStatusById(param)
           }
-        }
+        })
       },
       close () {
         this.inputForm = {

+ 8 - 12
src/views/modules/klgBase/questions/KlgBaseQuestionsList.vue

@@ -395,20 +395,16 @@
           await this.klgBaseQuestionsService.queryById(row.id).then(({data}) => {
             if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.klgBaseQuestionsService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.klgBaseQuestionsService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       openProgramPageForm () {

+ 8 - 12
src/views/modules/klgBase/questions/KlgBaseQuestionsOwnList.vue

@@ -380,20 +380,16 @@
           await this.klgBaseQuestionsService.queryById(row.id).then(({data}) => {
             if (row.procInsId !== data.procInsId) { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.klgBaseQuestionsService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.klgBaseQuestionsService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       openProgramPageForm () {

+ 3 - 3
src/views/modules/program/configuration/typeDict/TypeDictList.vue

@@ -37,9 +37,9 @@
           :checkbox-config="{}">
           <vxe-column type="seq" width="60" title="序号"></vxe-column>
           <vxe-column type="checkbox" width="40" ></vxe-column>
-          <vxe-column width="180" title="项目类型名称" field="type" align="left" tree-node></vxe-column>
-          <vxe-column width="180" title="序号" field="sort"></vxe-column>
-          <vxe-column title="备注" field="remarks"></vxe-column>
+          <vxe-column min-width="350" title="项目类型名称" field="type" align="left" tree-node></vxe-column>
+          <vxe-column min-width="50" align="center" title="序号" field="sort"></vxe-column>
+          <vxe-column min-width="50" align="center" title="备注" field="remarks"></vxe-column>
           <vxe-column title="操作" width="230px" fixed="right" align="center">
             <template  slot-scope="scope">
               <el-button v-if="hasPermission('program:configuration:type:edit')&&scope.row.parentId === '0'" type="text" icon="el-icon-plus" size="small" @click="addChild(scope.row.id)">新建子类型</el-button>

+ 21 - 29
src/views/modules/program/registered/ProjectArchiveForm.vue

@@ -742,15 +742,11 @@
         await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          await this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       async doSubmit (status, callback) {
@@ -840,30 +836,26 @@
         await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.inputForm.status = '4'
+            }
+            if (type === 'reback') {
+              // 撤回
+              this.inputForm.status = '3'
+            }
+            if (type === 'reback' || type === 'reject') {
+              let param = {status: this.inputForm.status, id: this.inputForm.id}
+              this.programProjectListInfoService.updateStatusByArchiveId(param)
+            }
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.inputForm.status = '4'
-          }
-          if (type === 'reback') {
-            // 撤回
-            this.inputForm.status = '3'
-          }
-          if (type === 'reback' || type === 'reject') {
-            let param = {status: this.inputForm.status, id: this.inputForm.id}
-            this.programProjectListInfoService.updateStatusByArchiveId(param)
-          }
-        }
       },
       close () {
         this.$refs.uploadComponentReport.clearUpload()

+ 21 - 29
src/views/modules/program/registered/ProjectArchiveFormDialog.vue

@@ -749,15 +749,11 @@
         await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          await this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       async doSubmit (status, callback) {
@@ -850,30 +846,26 @@
         await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.inputForm.status = '4'
+            }
+            if (type === 'reback') {
+              // 撤回
+              this.inputForm.status = '3'
+            }
+            if (type === 'reback' || type === 'reject') {
+              let param = {status: this.inputForm.status, id: this.inputForm.id}
+              this.programProjectListInfoService.updateStatusByArchiveId(param)
+            }
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.inputForm.status = '4'
-          }
-          if (type === 'reback') {
-            // 撤回
-            this.inputForm.status = '3'
-          }
-          if (type === 'reback' || type === 'reject') {
-            let param = {status: this.inputForm.status, id: this.inputForm.id}
-            this.programProjectListInfoService.updateStatusByArchiveId(param)
-          }
-        }
       },
       close () {
         this.$refs.uploadComponentReport.clearUpload()

+ 61 - 79
src/views/modules/program/registered/ProjectList.vue

@@ -485,20 +485,16 @@
           await this.programProjectListInfoService.queryById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.programProjectListInfoService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.programProjectListInfoService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起一级校审
@@ -564,20 +560,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId1).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
+                let form = {status: '3', id: row.auditId1}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
-              let form = {status: '3', id: row.auditId1}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起二级校审
@@ -643,20 +635,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId2).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
+                let form = {status: '3', id: row.auditId2}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
-              let form = {status: '3', id: row.auditId2}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起三级校审
@@ -722,20 +710,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId3).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
+                let form = {status: '3', id: row.auditId3}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
-              let form = {status: '3', id: row.auditId3}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起项目登记归档
@@ -801,20 +785,16 @@
           await this.programProjectListInfoService.findByIdArchive(row.archiveId).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsIdArchive).then(({data}) => {
+                let form = {status: '3', id: row.archiveId}
+                this.programProjectListInfoService.updateStatusByArchiveId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsIdArchive).then(({data}) => {
-              let form = {status: '3', id: row.archiveId}
-              this.programProjectListInfoService.updateStatusByArchiveId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 下载一级校审
@@ -930,13 +910,19 @@
         })
       },
       saveReportNo (id) {
-        this.loading = true
-        this.programProjectListInfoService.saveReportNo(id).then((data) => {
-          this.$message.success(data.data)
-          this.refreshList()
-          this.loading = false
-        }).catch((e) => {
-          this.loading = false
+        this.$confirm(`确定生成项目报告号吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.loading = true
+          this.programProjectListInfoService.saveReportNo(id).then((data) => {
+            this.$message.success(data.data)
+            this.refreshList()
+            this.loading = false
+          }).catch((e) => {
+            this.loading = false
+          })
         })
       },
       // 校对
@@ -1010,20 +996,16 @@
           await this.proofreadIssuedService.findById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId4).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.proofreadIssuedService.updateStatus(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId4).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.proofreadIssuedService.updateStatus(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       }
     }

+ 48 - 72
src/views/modules/program/registered/ProjectList2022.vue

@@ -495,20 +495,16 @@
           await this.programProjectListInfoService.queryById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.programProjectListInfoService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.programProjectListInfoService.updateStatusById(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起一级校审
@@ -574,20 +570,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId1).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
+                let form = {status: '3', id: row.auditId1}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId1).then(({data}) => {
-              let form = {status: '3', id: row.auditId1}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起二级校审
@@ -653,20 +645,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId2).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
+                let form = {status: '3', id: row.auditId2}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
-              let form = {status: '3', id: row.auditId2}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起三级校审
@@ -732,20 +720,16 @@
           await this.programProjectListInfoService.findByIdAudit(row.auditId3).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
+                let form = {status: '3', id: row.auditId3}
+                this.programProjectListInfoService.updateStatusByAuditId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId3).then(({data}) => {
-              let form = {status: '3', id: row.auditId3}
-              this.programProjectListInfoService.updateStatusByAuditId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 发起项目登记归档
@@ -811,20 +795,16 @@
           await this.programProjectListInfoService.findByIdArchive(row.archiveId).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsIdArchive).then(({data}) => {
+                let form = {status: '3', id: row.archiveId}
+                this.programProjectListInfoService.updateStatusByArchiveId(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsIdArchive).then(({data}) => {
-              let form = {status: '3', id: row.archiveId}
-              this.programProjectListInfoService.updateStatusByArchiveId(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       },
       // 下载一级校审
@@ -1026,20 +1006,16 @@
           await this.proofreadIssuedService.findById(row.id).then(({data}) => {
             if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
               this.$message.error('数据已发生改变或不存在,请刷新数据')
-              this.err = true
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId4).then(({data}) => {
+                let form = {status: '3', id: row.id}
+                this.proofreadIssuedService.updateStatus(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
             }
           })
-          if (this.err === true) {
-            this.err = ''
-            this.refreshList()
-          } else {
-            this.processService.revokeProcIns(row.procInsId4).then(({data}) => {
-              let form = {status: '3', id: row.id}
-              this.proofreadIssuedService.updateStatus(form)
-              this.$message.success(data)
-              this.refreshList()
-            })
-          }
         })
       }
     }

+ 37 - 45
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -317,15 +317,11 @@
         await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.doSubmit('agree', callback)
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          await this.doSubmit('agree', callback)
-        }
       },
       // 表单提交
       async doSubmit (status, callback) {
@@ -394,47 +390,43 @@
         await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
-          }
-        })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          // if (type === 'agree') {
-          //   // 同意
-          //   this.inputForm.status = '5'
-          // }
-          if (type === 'reject') {
-            // 驳回
-            this.inputForm.status = '4'
-            this.loading = true
-            this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
-            if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
-              this.inputForm.programAuditAssessPeopleDtoList = []
-              this.inputForm.auditPeopleList.split(',').forEach(item => {
-                let i = {assessPeople: item, auditId: this.inputForm.id}
-                this.inputForm.programAuditAssessPeopleDtoList.push(i)
+            throw new Error()
+          } else {
+            // if (type === 'agree') {
+            //   // 同意
+            //   this.inputForm.status = '5'
+            // }
+            if (type === 'reject') {
+              // 驳回
+              this.inputForm.status = '4'
+              this.loading = true
+              this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
+              if (this.commonJS.isNotEmpty(this.inputForm.auditPeopleList)) {
+                this.inputForm.programAuditAssessPeopleDtoList = []
+                this.inputForm.auditPeopleList.split(',').forEach(item => {
+                  let i = {assessPeople: item, auditId: this.inputForm.id}
+                  this.inputForm.programAuditAssessPeopleDtoList.push(i)
+                })
+              } else {
+                this.inputForm.programAuditAssessPeopleDtoList = []
+              }
+              this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
+                this.loading = false
+              }).catch(() => {
+                this.loading = false
               })
-            } else {
-              this.inputForm.programAuditAssessPeopleDtoList = []
+              return
+            }
+            if (type === 'reback') {
+              // 撤回
+              this.inputForm.status = '3'
+            }
+            if (type === 'reback') {
+              let param = {status: this.inputForm.status, id: this.inputForm.id}
+              this.programProjectListInfoService.updateStatusByAuditId(param)
             }
-            this.programProjectListInfoService.saveFormThree(this.inputForm).then(({data}) => {
-              this.loading = false
-            }).catch(() => {
-              this.loading = false
-            })
-            return
-          }
-          if (type === 'reback') {
-            // 撤回
-            this.inputForm.status = '3'
-          }
-          if (type === 'reback') {
-            let param = {status: this.inputForm.status, id: this.inputForm.id}
-            this.programProjectListInfoService.updateStatusByAuditId(param)
           }
-        }
+        })
       },
       close () {
         this.$refs.uploadComponent.clearUpload()

+ 29 - 37
src/views/modules/program/registered/ProofreadIssuedForm.vue

@@ -381,52 +381,44 @@
         await this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            this.$refs['inputForm'].validate((valid) => {
+              if (valid) {
+                this.loading = true
+                this.inputForm.status = '5'
+                this.inputForm.agreeTime = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
+                let userId = JSON.parse(localStorage.getItem('user')).id
+                this.inputForm.agreeUserId = userId
+                this.proofreadIssuedService.save(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.loading = false
+                }).catch(() => {
+                  this.loading = false
+                })
+              }
+            })
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          this.$refs['inputForm'].validate((valid) => {
-            if (valid) {
-              this.loading = true
-              this.inputForm.status = '5'
-              this.inputForm.agreeTime = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
-              let userId = JSON.parse(localStorage.getItem('user')).id
-              this.inputForm.agreeUserId = userId
-              this.proofreadIssuedService.save(this.inputForm).then(({data}) => {
-                callback(data.businessTable, data.businessId, this.inputForm)
-                this.loading = false
-              }).catch(() => {
-                this.loading = false
-              })
-            }
-          })
-        }
       },
       async updateStatusById (type) {
         await this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
           if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            this.err = true
+            throw new Error()
+          } else {
+            if (type === 'reject') {
+              // 驳回
+              this.inputForm.status = '4'
+              this.proofreadIssuedService.updateStatus(this.inputForm)
+            }
+            if (type === 'reback') {
+              // 撤回
+              this.inputForm.status = '3'
+              this.proofreadIssuedService.updateStatus(this.inputForm)
+            }
           }
         })
-        if (this.err === true) {
-          this.err = ''
-          throw new Error()
-        } else {
-          if (type === 'reject') {
-            // 驳回
-            this.inputForm.status = '4'
-            this.proofreadIssuedService.updateStatus(this.inputForm)
-          }
-          if (type === 'reback') {
-            // 撤回
-            this.inputForm.status = '3'
-            this.proofreadIssuedService.updateStatus(this.inputForm)
-          }
-        }
       },
       close () {
         this.inputForm = {