Parcourir la source

Merge remote-tracking branch 'origin/master'

user5 il y a 2 ans
Parent
commit
73524f614b

+ 1 - 1
src/views/modules/cw/projectRecords/ProjectRecordsTaskForm.vue

@@ -443,7 +443,7 @@
       },
       async agreeForm (callback) {
         await this.projectRecordsService.queryById(this.inputForm.id).then(({data}) => {
-          if (this.inputForm.status !== '2') { // 审核状态不是“待审核”,就弹出提示
+          if (data.status !== '2') { // 审核状态不是“待审核”,就弹出提示
             this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
             throw new Error()
           } else {

+ 95 - 4
src/views/modules/cw/reportManagement/ReportManagementList.vue

@@ -91,12 +91,16 @@
               </el-button>
             </template>
           </vxe-column>
-          <vxe-column  min-width="150px"align="center" fixed="right" title="签章状态" field="status1" >
+          <vxe-column  min-width="150px"align="center" fixed="right" title="签章状态" >
             <template slot-scope="scope">
-              <el-button  type="text" @click="detailS(scope.row)" effect="dark" size="mini"
+              <el-button v-if="scope.row.signatureType === '1'"  type="text" @click="detailS(scope.row)" effect="dark" size="mini"
                           :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.status1, '-')">
                 {{$dictUtils.getDictLabel("cw_status", scope.row.status1, '-')}}
               </el-button>
+              <el-button v-if="scope.row.signatureType === '2'" type="text" @click="detailS2(scope.row)" effect="dark" size="mini"
+                          :type="$dictUtils.getDictLabel('cw_project_report_sign_status_flag', scope.row.status2, '-')">
+                {{$dictUtils.getDictLabel("cw_project_report_sign_status", scope.row.status2, '-')}}
+              </el-button>
             </template>
           </vxe-column>
 
@@ -107,8 +111,12 @@
               <el-button v-if="hasPermission('cwProjectReport:edit')&&scope.row.createById === $store.state.user.id&&scope.row.status==='2'" type="text" icon="el-icon-edit" size="small" @click="reback(scope.row)">撤回</el-button>
               <el-button v-if="hasPermission('cwProjectReport:del')&&scope.row.createById === $store.state.user.id&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
               <el-button v-else-if="hasPermission('cwProjectReport:del')&&isAdmin&&(scope.row.status==='1'||scope.row.status==='3'||scope.row.status==='4'||scope.row.status==='5')" type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+<!--              公章流程-->
               <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && (scope.row.status1 === '0' || scope.row.status1 === '3' || scope.row.status1 === '4')" type="text" size="small" @click="pushS(scope.row)">公章</el-button>
-              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '1' && scope.row.status1 === '2'" type="text" size="small" @click="rebackS(scope.row)">撤回签章申请</el-button>
+<!--              公章+执业章流程-->
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '0' || scope.row.status2 === '3' || scope.row.status2 === '4')" type="text" size="small" @click="pushS2(scope.row)">公章+执业章</el-button>
+              <el-button v-if="hasPermission('cw:workContract:filed') && scope.row.status === '5' && scope.row.signatureType === '2' && (scope.row.status2 === '2' || scope.row.status2 === '6' || scope.row.status2 === '7')" type="text" size="small" @click="rebackS2(scope.row)">撤回签章申请</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -161,7 +169,9 @@
         isAdmin: false,
         create: '',
         processDefinitionSId: '',
-        procDefSKey: ''
+        procDefSKey: '',
+        processDefinitionSId2: '',
+        procDefSKey2: ''
       }
     },
     workClientService: null,
@@ -261,6 +271,12 @@
             this.procDefSKey = data.key
           }
         })
+        this.processService.getByName('财务-报告签章-公章+执业章').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionSId2 = data.id
+            this.procDefSKey2 = data.key
+          }
+        })
       },
       // 当前页
       currentChangeHandle ({ currentPage, pageSize }) {
@@ -523,6 +539,81 @@
             }
           })
         })
+      },
+      // 发起报告签章-公章+执业章流程
+      pushS2 (row) {
+        // 读取流程表单
+        let title = `发起流程【报告签章-公章+执业章】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告签章-公章+执业章]`
+        let status = 'startAndClose'
+        if (row.status2 === '3' || row.status2 === '4') {
+          status = 'startAndClose'
+        }
+        this.taskService.getTaskDef({ procDefId: this.processDefinitionSId2,
+          businessId: row.sid2,
+          businessTable: 'cw_project_report_signature'}).then((data) => {
+            this.$router.push({
+              path: '/flowable/task/TaskForm',
+              query: {
+                procDefId: this.processDefinitionSId2,
+                procDefKey: this.procDefSKey2,
+                title: title,
+                formType: data.data.formType,
+                formUrl: data.data.formUrl,
+                formTitle: processTitle,
+                businessTable: 'cw_project_report_signature',
+                businessId: row.sid2,
+                isShow: 'false',
+                status: status,
+                routePath: '/cw/reportManagement/ReportManagementList'
+              }
+            })
+          })
+      },
+      // 查看报告签章-公章+执业章流程结果
+      detailS2 (row) {
+        if (row.status2 !== '0' && row.status2 !== '1') {
+          // eslint-disable-next-line eqeqeq
+          this.taskService.getTaskDef({
+            procInsId: row.procInsId2,
+            procDefId: this.processDefinitionSId2
+          }).then(({data}) => {
+            this.$router.push({
+              path: '/flowable/task/TaskFormDetail',
+              query: {
+                isShow: 'false',
+                readOnly: true,
+                title: '报告签章-公章+执业章' + '流程详情',
+                formTitle: '报告签章-公章+执业章' + '流程详情',
+                businessId: row.sid2,
+                status: 'reback',
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+              }
+            })
+          })
+        }
+      },
+      // 撤回报告签章-公章+执业章的申请流程
+      rebackS2 (row) {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(async () => {
+          await this.projectReportService.findBySignatureId(row.sid2).then(({data}) => {
+            if (data.status !== row.status2) { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId2).then(({data}) => {
+                let form = {status: '3', id: row.sid2}
+                this.projectReportService.updateSignatureStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
+              })
+            }
+          })
+        })
       }
     }
   }

+ 64 - 27
src/views/modules/cw/reportManagement/ReportManagementSignatureForm.vue

@@ -307,7 +307,9 @@
           cwProjectInfoList: [],
           cwFileInfoList: [],
           servedUnitId: '',
-          status: ''
+          status: '',
+          status1: '',
+          status2: ''
         },
         keyWatch: '',
         activeName: 'newRow',
@@ -445,7 +447,10 @@
           signatureAnnotator2: '',
           signatureType: '',
           projectMasterName: '',
-          cwProjectInfoList: []
+          cwProjectInfoList: [],
+          status: '',
+          status1: '',
+          status2: ''
         }
         this.inputForm.id = id
         this.loading = false
@@ -502,6 +507,9 @@
         // this.doSubmit('start', callback)
         this.loading = true
         this.projectReportService.saveData(this.inputForm).then(({data}) => {
+          if (this.inputForm.signatureType === '2') {
+            this.inputForm.assignee = this.inputForm.signatureAnnotator1
+          }
           callback(data.businessTable, data.businessId, this.inputForm)
           this.loading = false
           throw new Error()
@@ -510,33 +518,59 @@
           throw new Error('流程发起失败')
         })
       },
-      async agreeForm (callback, param) {
-        await this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
-          if (data.status1 !== '2') { // 审核状态不是“待审核”,就弹出提示
-            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            throw new Error()
+      agreeOperate (callback, param) {
+        this.loading = true
+        this.inputForm.commitParamDTO = param
+        this.projectReportService.saveFlowableParam(this.inputForm).then(({data}) => {
+          // 关闭当前页面
+          this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
+          if (data === '操作成功') {
+            this.$message.success('审核完成')
+            // 跳转回指定页面
+            if (param.num === '2') {
+              this.$router.push({path: '/sys/dashboard/workBench/Pending'})
+            } else if (param.num === '3') {
+              this.$router.push({path: '/sys/dashboard/workBench/PendingList'})
+            } else {
+              this.$router.push({path: '/flowable/task/TodoList'})
+            }
           } else {
-            this.loading = true
-            this.inputForm.commitParamDTO = param
-            this.projectReportService.saveFlowableParam(this.inputForm).then(({data}) => {
-              // 关闭当前页面
-              this.$store.dispatch('tagsView/delView', {fullPath: this.$route.fullPath})
-              // 跳转回指定页面
-              if (param.num === '2') {
-                this.$router.push('/sys/dashboard/workBench/Pending')
-              } else if (param.num === '3') {
-                this.$router.push('/sys/dashboard/workBench/PendingList')
-              } else {
-                this.$router.push('/flowable/task/TodoList')
-              }
-              // 弹出签章页面,路径为后端返回
-              window.open(data.data, '_blank')
-              this.loading = false
+            // 跳转回指定页面
+            if (param.num === '2') {
+              this.$router.push({path: '/sys/dashboard/workBench/Pending', query: {signatureUrl: data}})
+            } else if (param.num === '3') {
+              this.$router.push({path: '/sys/dashboard/workBench/PendingList', query: {signatureUrl: data}})
+            } else {
+              this.$router.push({path: '/flowable/task/TodoList', query: {signatureUrl: data}})
+            }
+          }
+          this.loading = false
+          throw new Error()
+        }).catch(() => {
+          this.loading = false
+          throw new Error()
+        })
+      },
+      agreeForm (callback, param) {
+        this.projectReportService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.signatureType === '1') {
+            if (data.status1 !== '2') { // 审核状态不是“待审核”,就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
               throw new Error()
-            }).catch(() => {
-              this.loading = false
+            } else {
+              this.agreeOperate(callback, param)
+            }
+          }
+          if (data.signatureType === '2') {
+            if (data.status2 !== this.inputForm.status2) { // 审核状态不是“待审核”,就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
               throw new Error()
-            })
+            } else {
+              if (data.status2 === '2') {
+                param.assignee = this.inputForm.signatureAnnotator2
+              }
+              this.agreeOperate(callback, param)
+            }
           }
         })
       },
@@ -671,7 +705,10 @@
           signatureAnnotator1: '',
           signatureAnnotator2: '',
           signatureType: '',
-          projectMasterName: ''
+          projectMasterName: '',
+          status: '',
+          status1: '',
+          status2: ''
         }
         // this.$refs.uploadComponent.clearUpload()
         this.$refs.inputForm.resetFields()

+ 16 - 0
src/views/modules/flowable/task/TodoList.vue

@@ -3,6 +3,7 @@
       <el-form size="small" :inline="true"  class="query-form" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
         <el-form-item label="创建时间" prop="searchDates">
           <el-date-picker
+            placement="bottom-start"
             v-model="searchDates"
             type="daterange"
             size="small"
@@ -163,7 +164,22 @@
     created () {
       this.taskService = new TaskService()
     },
+    mounted () {
+    },
     activated () {
+      // 判断是否有签章页面带过来
+      if (this.commonJS.isNotEmpty(this.$route.query.signatureUrl)) {
+        this.$confirm(`确定要前往签章页面吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          console.log('前往签章页面')
+          window.open(this.$route.query.signatureUrl, '_blank')
+        }).catch(() => {
+          console.log('取消前往签章页面')
+        })
+      }
       this.refreshList()
     },
     components: {

+ 14 - 0
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -348,6 +348,19 @@
       this.noticeService = new NoticeService()
     },
     activated () {
+      // 判断是否有签章页面带过来
+      if (this.commonJS.isNotEmpty(this.$route.query.signatureUrl)) {
+        this.$confirm(`确定要前往签章页面吗?`, '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          console.log('前往签章页面')
+          window.open(this.$route.query.signatureUrl, '_blank')
+        }).catch(() => {
+          console.log('取消前往签章页面')
+        })
+      }
       this.refreshList()
     },
     components: {
@@ -358,6 +371,7 @@
     // watch: {
     // },
     mounted () {
+      console.log('123')
       // 页面加载后
       // 1.在执行定时器前先执行一次获取接口数据的操作函数, 否则接口会1秒钟后才调用
       // 2.为了避免退出当前页面后,在其他页面也继续调用接口,退出前需要清除定时器.

+ 0 - 1
src/views/modules/sys/dashboard/workBench/PendingList.vue

@@ -37,7 +37,6 @@
     data () {
       // eslint-disable-next-line no-unused-expressions,no-unused-vars
       var num = this.$route.query.num
-      console.log(num)
       return {
         activeName: 'todoList',
         num: num