Bladeren bron

评估流程修改

wangqiang 2 jaren geleden
bovenliggende
commit
a56e9c81df

+ 7 - 0
src/api/materialManagement/WareHouseService.js

@@ -15,6 +15,13 @@ export default class WareHouseService {
       params: param
     })
   }
+  wareHouseSummaryList (param) {
+    return request({
+      url: '/material/management/wareHouse/wareHouseSummaryList',
+      method: 'get',
+      params: param
+    })
+  }
   save (param) {
     return request({
       url: '/material/management/wareHouse/save',

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

@@ -458,6 +458,15 @@
       // Process_1669275081328 发票申请
       // Process_1669275380218 发票作废
       // Process_1672738002595 发起通知
+      // Process_1662628133027 评估-合同登记新建
+      // Process_1663743217785 评估-合同登记归档
+      // Process_1664370362499 评估-项目登记流程
+      // Process_1666169509264 评估-项目一级校审
+      // Process_1666266316011 评估-项目二级校审
+      // Process_1666266494837 评估-项目三级校审
+      // Process_1666331430821 评估-报告签发审批
+      // Process_1666332258192 评估-项目登记归档
+      // Process_1665383385070 评估-报销申请
       // 驳回
       reject (vars) {
         if (this.procDefId.includes('Process_1667978088459') ||
@@ -473,7 +482,16 @@
           this.procDefId.includes('Process_1669271524486') ||
           this.procDefId.includes('Process_1669275081328') ||
           this.procDefId.includes('Process_1669275380218') ||
-          this.procDefId.includes('Process_1672738002595')
+          this.procDefId.includes('Process_1672738002595') ||
+          this.procDefId.includes('Process_1662628133027') ||
+          this.procDefId.includes('Process_1663743217785') ||
+          this.procDefId.includes('Process_1664370362499') ||
+          this.procDefId.includes('Process_1666169509264') ||
+          this.procDefId.includes('Process_1666266316011') ||
+          this.procDefId.includes('Process_1666266494837') ||
+          this.procDefId.includes('Process_1666331430821') ||
+          this.procDefId.includes('Process_1666332258192') ||
+          this.procDefId.includes('Process_1665383385070')
         ) {
           console.log('进入新版驳回')
           this.$confirm(`确定驳回流程吗?`, '提示', {

+ 1 - 0
src/views/modules/materialManagement/collect/CollectForm.vue

@@ -684,6 +684,7 @@
           if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].collectNumber)) {
             if (this.inputForm.detailInfos[j].surplusNumber < this.inputForm.detailInfos[j].collectNumber) {
               this.$message.error('领用数量不能大于剩余数量')
+              this.inputForm.detailInfos[j].collectNumber = ''
               return
             }
           }

+ 226 - 0
src/views/modules/materialManagement/wareHouseSummary/WareHouseSummaryList.vue

@@ -0,0 +1,226 @@
+<template>
+  <div class="page">
+    <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="wareHouseNumber">
+        <el-input size="small" v-model="searchForm.wareHouseNumber" placeholder="请输入入库编号" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="商品名称" prop="tradeName">
+        <el-input size="small" v-model="searchForm.tradeName" placeholder="请输入商品名称" clearable></el-input>
+      </el-form-item>
+      <el-form-item label="入库人" prop="wareHouseMan">
+        <SelectUserTree
+          ref="companyTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+          :url="`/sys/user/treeUserDataAllOffice?type=2`"
+          :value="searchForm.wareHouseMan"
+          :clearable="true"
+          :accordion="true"
+          @getValue="(value) => {searchForm.wareHouseMan=value}"/>
+      </el-form-item>
+      <el-form-item  prop="wareHouseManOffice" label="入库人部门">
+        <SelectTree
+          ref="officeTree"
+          :props="{
+                  value: 'id',             // ID字段名
+                  label: 'name',         // 显示名称
+                  children: 'children'    // 子级字段名
+                }"
+
+          :url="`/sys/office/treeData?type=1`"
+          :value="searchForm.wareHouseManOffice"
+          :accordion="true"
+          @getValue="(value) => {searchForm.wareHouseManOffice=value}"/>
+      </el-form-item>
+      <el-form-item label="入库时间" prop="wareHouseDates">
+        <el-date-picker
+          placement="bottom-start"
+          format="yyyy-MM-dd HH:mm:ss"
+          value-format="yyyy-MM-dd HH:mm:ss"
+          v-model="searchForm.wareHouseDates"
+          type="datetimerange"
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+        <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <div class="bg-white top" style="">
+      <div style="height: calc(100% - 90px)">
+        <vxe-table
+          :key="tableKey"
+          border="inner"
+          auto-resize
+          resizable
+          height="auto"
+          :loading="loading"
+          size="small"
+          ref="clientTable"
+          show-header-overflow
+          show-overflow
+          highlight-hover-row
+          :menu-config="{}"
+          @sort-change="sortChangeHandle"
+          :sort-config="{remote:true}"
+          :data="dataList"
+          :checkbox-config="{}">
+          <vxe-column type="seq" width="60" title="序号"></vxe-column>
+          <vxe-column min-width="160" align="center" title="入库编号" field="wareHouseNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="入库人" field="wareHouseManName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="入库部门" field="wareHouseManOfficeName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="入库类型" field="wareHouseType"></vxe-column>
+          <vxe-column min-width="160" align="center" title="商品名称" field="tradeName"></vxe-column>
+          <vxe-column min-width="160" align="center" title="商品数量" field="tradeNumber"></vxe-column>
+          <vxe-column min-width="160" align="center" title="单位" field="company"></vxe-column>
+          <vxe-column min-width="160" align="center" title="入库时间" field="wareHouseDate"></vxe-column>
+
+        </vxe-table>
+        <vxe-pager
+          background
+          size="small"
+          :current-page="tablePage.currentPage"
+          :page-size="tablePage.pageSize"
+          :total="tablePage.total"
+          :page-sizes="[10, 20, 100, 1000, {label: '全量数据', value: 1000000}]"
+          :layouts="['PrevPage', 'JumpNumber', 'NextPage', 'FullJump', 'Sizes', 'Total']"
+          @page-change="currentChangeHandle">
+        </vxe-pager>
+        <WareHouseAddForm ref="wareHouseAddForm" @refreshList="refreshList"></WareHouseAddForm>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+  import WareHouseAddForm from '../wareHouse/WareHouseAddForm'
+  import InputNumber from '@/views/modules/cw/workContract/InputNumber.vue'
+  import SelectTree from '@/components/treeSelect/treeSelect.vue'
+  import WorkClientService from '@/api/cw/workClientInfo/WorkClientService'
+  import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
+  import WareHouseService from '@/api/materialManagement/WareHouseService'
+  import TaskService from '@/api/flowable/TaskService'
+  import ProcessService from '@/api/flowable/ProcessService'
+  import UserService from '@/api/sys/UserService'
+  import SelectUserTree from '@/views/modules/utils/treeUserSelect'
+  export default {
+    data () {
+      return {
+        num: 0,
+        searchForm: {
+          tradeName: '',
+          wareHouseNumber: '',
+          wareHouseMan: '',
+          wareHouseManOffice: '',
+          wareHouseDates: [],
+          procurementType: '',
+          createBy: ''
+        },
+        dataList: [],
+        tablePage: {
+          total: 0,
+          currentPage: 1,
+          pageSize: 10,
+          orders: []
+        },
+        tableKey: '',
+        loading: false,
+        processDefinitionAuditId: '',
+        procDefAuditKey: '',
+        isAdmin: false,
+        create: ''
+      }
+    },
+    workClientService: null,
+    materialManagementService: null,
+    wareHouseService: null,
+    taskService: null,
+    processService: null,
+    userService: null,
+    created () {
+      this.workClientService = new WorkClientService()
+      this.materialManagementService = new MaterialManagementService()
+      this.wareHouseService = new WareHouseService()
+      this.taskService = new TaskService()
+      this.processService = new ProcessService()
+      this.userService = new UserService()
+    },
+    components: {
+      InputNumber,
+      SelectUserTree,
+      SelectTree,
+      WareHouseAddForm
+    },
+    computed: {
+      userName () {
+        return JSON.parse(localStorage.getItem('user')).name
+      },
+      user () {
+        this.createName = JSON.parse(localStorage.getItem('user')).name
+        return JSON.parse(localStorage.getItem('user'))
+      }
+    },
+    mounted () {
+      this.refreshList()
+    },
+    activated () {
+      this.refreshList()
+    },
+    methods: {
+      // 查询当前用户是否是管理员用户
+      checkIsAdmin () {
+        this.userService.is().then(({data}) => {
+          this.isAdmin = data
+        })
+      },
+      // 获取数据列表
+      refreshList () {
+        this.loading = true
+        this.wareHouseService.wareHouseSummaryList({
+          'current': this.tablePage.currentPage,
+          'size': this.tablePage.pageSize,
+          'orders': this.tablePage.orders,
+          ...this.searchForm
+        }).then(({data}) => {
+          this.dataList = data.records
+          this.tablePage.total = data.total
+          this.tableKey = Math.random()
+          this.loading = false
+        })
+        this.checkIsAdmin()
+        this.processService.getByName('物资管理-采购申请').then(({data}) => {
+          if (!this.commonJS.isEmpty(data.id)) {
+            this.processDefinitionAuditId = data.id
+            this.procDefAuditKey = data.key
+          }
+        })
+      },
+      // 当前页
+      currentChangeHandle ({ currentPage, pageSize }) {
+        this.tablePage.currentPage = currentPage
+        this.tablePage.pageSize = pageSize
+        this.refreshList()
+      },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
+      resetSearch () {
+        this.$refs.searchForm.resetFields()
+        this.refreshList()
+      }
+    }
+  }
+</script>

+ 90 - 22
src/views/modules/program/registered/ProjectArchiveForm.vue

@@ -737,6 +737,16 @@
           })
         })
       },
+      reapplyForm (callback) {
+        this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       saveForm (callback) {
         this.doSubmit('save', callback)
       },
@@ -818,7 +828,7 @@
           }
         })
       },
-      async updateStatusById (type) {
+      async updateStatusById (type, callback) {
         if (await this.$refs.uploadComponentReport.checkProgress()) {
           this.loading = false
           throw new Error()
@@ -839,30 +849,88 @@
           this.loading = false
           throw new Error()
         }
-        await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
-          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
-            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            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') {
+          await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              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).then(() => {
+                  callback()
+                })
+              }
             }
-            if (type === 'reback' || type === 'reject') {
-              let param = {status: this.inputForm.status, id: this.inputForm.id}
-              this.programProjectListInfoService.updateStatusByArchiveId(param)
+          })
+        } else if (type === 'hold') {
+          this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+            if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              // 终止
+              let param = {status: '1', id: this.inputForm.id}
+              this.programProjectListInfoService.updateStatusByArchiveId(param).then(() => {
+                callback()
+              })
             }
-          }
-        })
+          })
+        }
       },
+      // async updateStatusById (type) {
+      //   if (await this.$refs.uploadComponentReport.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   if (await this.$refs.uploadComponentExplain.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   if (await this.$refs.uploadComponentDetail.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   if (await this.$refs.uploadComponentPapers.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   if (await this.$refs.uploadComponentOther.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   await this.programProjectListInfoService.findByIdArchive(this.inputForm.id).then(({data}) => {
+      //     if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+      //       this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+      //       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()
         this.$refs.uploadComponentExplain.clearUpload()

+ 39 - 20
src/views/modules/program/registered/ProjectList.vue

@@ -141,7 +141,7 @@
           </vxe-column>
           <vxe-column title="操作" min-width="200px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.status === '1' || scope.row.status === '3'||scope.row.status === '4')&&scope.row.createBy === createName" type="text" size="small" @click="registeredPush(scope.row)">修改</el-button>
+              <el-button v-if="hasPermission('program:registered:edit')&&(scope.row.status === '1' || scope.row.status === '3')&&scope.row.createBy === createName" type="text" size="small" @click="registeredPush(scope.row)">修改</el-button>
               <!--管理员角色登记完成后可修改-->
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '5' && isAdmin" type="text" size="small" @click="edit(scope.row.id)">修改</el-button>
               <el-button v-if="hasPermission('program:registered:edit')&&scope.row.status === '2'&&scope.row.createBy === createName" type="text" size="small" @click="registeredReback(scope.row)">撤回</el-button>
@@ -426,6 +426,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 status: 'startAndHold',
@@ -446,8 +447,10 @@
         let title = `发起流程【项目登记审批】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目登记审批]`
         let status = 'startAndHold'
-        if (row.status === '3' || row.status === '4') {
+        if (row.status === '3') {
           status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
           businessId: row.id,
@@ -455,6 +458,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionAuditId,
                 procDefKey: this.procDefAuditKey,
                 title: title,
@@ -481,13 +485,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '项目登记' + '流程详情',
                 formTitle: '项目登记' + '流程详情',
                 businessId: row.id,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })
@@ -521,8 +525,10 @@
         let title = `发起流程【项目一级校审】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目一级校审]`
         let status = 'startAndHold'
-        if (row.status1 === '3' || row.status1 === '4') {
+        if (row.status1 === '3') {
           status = 'startAndClose'
+        } else if (row.status1 === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId1,
           businessId: row.auditId1,
@@ -530,6 +536,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId1,
                 procDefKey: this.procDefKey1,
                 title: title,
@@ -556,13 +563,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '一级校审' + '流程详情',
                 formTitle: '一级校审' + '流程详情',
                 businessId: row.auditId1,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })
@@ -596,8 +603,10 @@
         let title = `发起流程【项目二级校审】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目二级校审]`
         let status = 'startAndHold'
-        if (row.status2 === '3' || row.status2 === '4') {
+        if (row.status2 === '3') {
           status = 'startAndClose'
+        } else if (row.status2 === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId2,
           businessId: row.auditId2,
@@ -605,6 +614,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId2,
                 procDefKey: this.procDefKey2,
                 title: title,
@@ -631,13 +641,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '二级校审' + '流程详情',
                 formTitle: '二级校审' + '流程详情',
                 businessId: row.auditId2,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })
@@ -671,8 +681,10 @@
         let title = `发起流程【项目三级校审】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目三级校审]`
         let status = 'startAndHold'
-        if (row.status3 === '3' || row.status3 === '4') {
+        if (row.status3 === '3') {
           status = 'startAndClose'
+        } else if (row.status3 === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId3,
           businessId: row.auditId3,
@@ -680,6 +692,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId3,
                 procDefKey: this.procDefKey3,
                 title: title,
@@ -706,13 +719,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '三级校审' + '流程详情',
                 formTitle: '三级校审' + '流程详情',
                 businessId: row.auditId3,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })
@@ -746,8 +759,10 @@
         let title = `发起流程【项目登记归档】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[项目登记归档]`
         let status = 'startAndHold'
-        if (row.archiveStatus === '3' || row.archiveStatus === '4') {
+        if (row.archiveStatus === '3') {
           status = 'startAndClose'
+        } else if (row.archiveStatus === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionIdArchive,
           businessId: row.archiveId,
@@ -755,6 +770,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionIdArchive,
                 procDefKey: this.procDefKeyArchive,
                 title: title,
@@ -770,7 +786,7 @@
             })
           })
       },
-      // 查看三级校审审批流程结果
+      // 查看项目归档审批流程结果
       archiveDetail (row) {
         if (row.archiveStatus !== '0' && row.archiveStatus !== '1') {
           // eslint-disable-next-line eqeqeq
@@ -781,13 +797,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '项目登记归档' + '流程详情',
                 formTitle: '项目登记归档' + '流程详情',
                 businessId: row.archiveId,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })
@@ -958,8 +974,10 @@
         let title = `发起流程【报告签发审批】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[报告签发审批]`
         let status = 'startAndHold'
-        if (row.issuedStatus === '3' || row.issuedStatus === '4' || row.issuedStatus === '2') {
+        if (row.issuedStatus === '3' || row.issuedStatus === '2') {
           status = 'startAndClose'
+        } else if (row.issuedStatus === '4') {
+          status = 'reapplyFlag'
         }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId4,
           businessId: row.id,
@@ -967,6 +985,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId4,
                 procDefKey: this.procDefKey4,
                 title: title,
@@ -993,13 +1012,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '报告签发单' + '流程详情',
                 formTitle: '报告签发单' + '流程详情',
                 businessId: row.id,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'title', 'businessId')
+                status: 'reback'
               }
             })
           })

+ 113 - 39
src/views/modules/program/registered/ProjectThreeAuditForm.vue

@@ -307,6 +307,16 @@
           })
         })
       },
+      reapplyForm (callback) {
+        this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       saveForm (callback) {
         this.doSubmit('save', callback)
       },
@@ -382,52 +392,116 @@
           }
         })
       },
-      async updateStatusById (type) {
+      async updateStatusById (type, callback) {
         if (await this.$refs.uploadComponent.checkProgress()) {
           this.loading = false
           throw new Error()
-        }
-        await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
-          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
-            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            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 {
+          if (type === 'reject' || type === 'reback') {
+            this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                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
+                  // })
+                  // return
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.status = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {status: this.inputForm.status, id: this.inputForm.id}
+                  this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
               } else {
-                this.inputForm.programAuditAssessPeopleDtoList = []
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.programProjectListInfoService.updateStatusByAuditId(param).then(() => {
+                  callback()
+                })
               }
-              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)
-            }
+            })
           }
-        })
+        }
       },
+      // async updateStatusById (type) {
+      //   if (await this.$refs.uploadComponent.checkProgress()) {
+      //     this.loading = false
+      //     throw new Error()
+      //   }
+      //   await this.programProjectListInfoService.findByIdAudit(this.inputForm.id).then(({data}) => {
+      //     if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+      //       this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+      //       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
+      //         })
+      //         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()
         this.inputForm = {

+ 70 - 16
src/views/modules/program/registered/ProofreadIssuedForm.vue

@@ -355,6 +355,16 @@
           })
         })
       },
+      reapplyForm (callback) {
+        this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       saveForm (callback) {
         this.loading = true
         this.inputForm.status = '1'
@@ -403,25 +413,69 @@
           }
         })
       },
-      async updateStatusById (type) {
-        await this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
-          if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
-            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
-            throw new Error()
-          } else {
-            if (type === 'reject') {
-              // 驳回
-              this.inputForm.status = '4'
-              this.proofreadIssuedService.updateStatus(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (type === 'reject' || type === 'reback') {
+          this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              // if (type === 'agree') {
+              //   // 同意
+              //   this.inputForm.status = '5'
+              // }
+              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 (type === 'reject' || type === 'reback') {
+                let param = {status: this.inputForm.status, id: this.inputForm.id}
+                this.proofreadIssuedService.updateStatus(param).then(() => {
+                  callback()
+                })
+              }
             }
-            if (type === 'reback') {
-              // 撤回
-              this.inputForm.status = '3'
-              this.proofreadIssuedService.updateStatus(this.inputForm)
+          })
+        } else if (type === 'hold') {
+          this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
+            if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+              this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+              throw new Error()
+            } else {
+              // 终止
+              let param = {status: '1', id: this.inputForm.id}
+              this.proofreadIssuedService.updateStatus(param).then(() => {
+                callback()
+              })
             }
-          }
-        })
+          })
+        }
       },
+      // async updateStatusById (type) {
+      //   await this.proofreadIssuedService.findById(this.inputForm.id).then(({data}) => {
+      //     if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+      //       this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+      //       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 = {
           id: '',

+ 70 - 13
src/views/modules/program/registered/RegisItemForm.vue

@@ -929,6 +929,16 @@
           })
         })
       },
+      reapplyForm (callback) {
+        this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       saveForm (callback) {
         this.doSubmit('save', callback)
       },
@@ -1123,21 +1133,68 @@
           }
         })
       },
-      updateStatusById (type) {
-        if (type === 'agree') {
-          // 同意
-          this.inputForm.status = '5'
-        }
-        if (type === 'reject') {
-          // 驳回
-          this.inputForm.status = '4'
-        }
-        if (type === 'reback') {
-          // 撤回
-          this.inputForm.status = '3'
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                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.programProjectListInfoService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.programProjectListInfoService.queryById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.programProjectListInfoService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
-        this.programProjectListInfoService.updateStatusById(this.inputForm)
       },
+      // updateStatusById (type) {
+      //   if (type === 'agree') {
+      //     // 同意
+      //     this.inputForm.status = '5'
+      //   }
+      //   if (type === 'reject') {
+      //     // 驳回
+      //     this.inputForm.status = '4'
+      //   }
+      //   if (type === 'reback') {
+      //     // 撤回
+      //     this.inputForm.status = '3'
+      //   }
+      //   this.programProjectListInfoService.updateStatusById(this.inputForm)
+      // },
       openContractForm () {
         if (!this.commonJS.isEmpty(this.inputForm.contractId)) {
           this.$refs.contractForm.init(this.inputForm.contractId)

+ 47 - 26
src/views/modules/reimbursement/info/InfoList.vue

@@ -132,7 +132,7 @@
 
           <vxe-column title="操作" width="130px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('reimbursement:info:edit')&& scope.row.createId === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' || scope.row.type === '4')" type="text"  size="small" @click="edit(scope.row)">修改</el-button>
+              <el-button v-if="hasPermission('reimbursement:info:edit')&& scope.row.createId === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3')" type="text"  size="small" @click="edit(scope.row)">修改</el-button>
               <el-button v-if="hasPermission('reimbursement:info:edit')&& scope.row.createId === $store.state.user.id && (scope.row.type === '2')" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
               <el-button v-if="hasPermission('reimbursement:info:del')&& scope.row.createId === $store.state.user.id && (scope.row.type === '1')" type="text"  size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
@@ -241,6 +241,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId,
                 procDefKey: this.procDefKey,
                 status: 'startAndHold',
@@ -258,17 +259,23 @@
       // 修改
       edit (row) {
         // 暂存修改
-        let status = ''
-        if (row.type === '1') {
-          status = 'startAndHold'
-        }
-        // 撤回或者驳回修改
-        if (row.type === '3' || row.type === '4') {
-          status = 'startAndClose'
-        }
+        // let status = ''
+        // if (row.type === '1') {
+        //   status = 'startAndHold'
+        // }
+        // // 撤回或者驳回修改
+        // if (row.type === '3' || row.type === '4') {
+        //   status = 'startAndClose'
+        // }
         // 读取流程表单
         let tabTitle = `发起流程【报销申请】`
         let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [报销申请]`
+        let status = 'startAndHold'
+        if (row.type === '3') {
+          status = 'startAndClose'
+        } else if (row.type === '4') {
+          status = 'reapplyFlag'
+        }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
           businessId: row.id,
           businessTable: 'reimbursement_info',
@@ -277,6 +284,7 @@
           this.$router.push({
             path: '/flowable/task/TaskForm',
             query: {
+              ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
               procDefId: this.processDefinitionId,
               procDefKey: this.procDefKey,
               status: status,
@@ -299,25 +307,38 @@
           cancelButtonText: '取消',
           taskId: row.procInsId,
           type: 'warning'
-        }).then(() => {
-          this.taskService.backNodes(row.taskId).then(({data}) => {
-            let backNodes = data
-            if (backNodes.length > 0) {
-              let backTaskDefKey = backNodes[0].taskDefKey
-              this.taskService.back({
-                taskId: row.taskId,
-                backTaskDefKey: backTaskDefKey,
-                isShow: false,
-                ...this.auditForm
-              }).then(({data}) => {
-                row.type = '3'
-                console.log('type', row)
-                this.reimbursementService.updateStatusById(row)
-                this.$message.success('回退成功')
+        }).then(async () => {
+          await this.reimbursementService.findById(row.id).then(({data}) => {
+            if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(({data}) => {
+                let form = {type: '3', id: row.id}
+                this.reimbursementService.updateStatusById(form)
+                this.$message.success(data)
                 this.refreshList()
               })
             }
           })
+          // this.taskService.backNodes(row.taskId).then(({data}) => {
+          //   let backNodes = data
+          //   if (backNodes.length > 0) {
+          //     let backTaskDefKey = backNodes[0].taskDefKey
+          //     this.taskService.back({
+          //       taskId: row.taskId,
+          //       backTaskDefKey: backTaskDefKey,
+          //       isShow: false,
+          //       ...this.auditForm
+          //     }).then(({data}) => {
+          //       row.type = '3'
+          //       console.log('type', row)
+          //       this.reimbursementService.updateStatusById(row)
+          //       this.$message.success('回退成功')
+          //       this.refreshList()
+          //     })
+          //   }
+          // })
         })
       },
       // 查看
@@ -380,13 +401,13 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 isShow: 'false',
                 readOnly: true,
                 title: '流程详情',
                 formTitle: '流程详情',
                 businessId: row.id,
-                status: 'reback',
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
+                status: 'reback'}
             })
           })
         }

+ 92 - 31
src/views/modules/reimbursement/info/ReimbursementForm.vue

@@ -304,6 +304,7 @@
             this.$refs.inputForm.resetFields()
             this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
               this.inputForm = this.recover(this.inputForm, data)
+              this.$refs.uploadComponent.clearUpload()
               this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
               this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
               this.loading = false
@@ -314,6 +315,16 @@
           }
         })
       },
+      reapplyForm (callback) {
+        this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+          if (data.type !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       // 表单提交
       doSubmit () {
         this.$refs['inputForm'].validate((valid) => {
@@ -455,45 +466,95 @@
       },
       // 通过
       async agreeForm (callback) {
-        this.$refs['inputForm'].validate(async (valid) => {
-          if (valid) {
-            this.loading = true
-            if (this.$refs.uploadComponent.checkProgress()) {
-              this.loading = false
-              return
-            }
-            if (this.commonJS.isEmpty(this.inputForm.files)) {
-              this.inputForm.files = []
-            }
-            this.inputForm.files = this.$refs.uploadComponent.getDataList()
-            // await this.userService.is().then(({data}) => {
-            //   if (data) {
-            //     this.inputForm.type = '5'
-            //   }
-            // })
-            this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
-              if (this.commonJS.isNotEmpty(data)) {
-                if (data === '公司领导审批') {
-                  this.inputForm.type = '5'
+        await this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+          if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error()
+          } else {
+            this.$refs['inputForm'].validate(async (valid) => {
+              if (valid) {
+                this.loading = true
+                if (this.$refs.uploadComponent.checkProgress()) {
+                  this.loading = false
+                  return
                 }
+                if (this.commonJS.isEmpty(this.inputForm.files)) {
+                  this.inputForm.files = []
+                }
+                this.inputForm.files = this.$refs.uploadComponent.getDataList()
+                // await this.userService.is().then(({data}) => {
+                //   if (data) {
+                //     this.inputForm.type = '5'
+                //   }
+                // })
+                this.commonApi.getTaskNameByProcInsId(this.inputForm.procInsId).then(({data}) => {
+                  if (this.commonJS.isNotEmpty(data)) {
+                    if (data === '公司领导审批') {
+                      this.inputForm.type = '5'
+                    }
+                  }
+                  this.reimbursementService.save(this.inputForm).then(({data}) => {
+                    callback(data.businessTable, data.businessId, this.inputForm)
+                    this.loading = false
+                  }).catch(() => {
+                    this.loading = false
+                  })
+                })
               }
-              this.reimbursementService.save(this.inputForm).then(({data}) => {
-                callback(data.businessTable, data.businessId, this.inputForm)
-                this.loading = false
-              }).catch(() => {
-                this.loading = false
-              })
             })
           }
         })
       },
-      // 修改状态
-      updateStatusById (type) {
-        if (type === 'reject') {
-          this.inputForm.type = '4'
-          this.reimbursementService.updateStatusById(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+              if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.type = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.type = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {type: this.inputForm.type, id: this.inputForm.id}
+                  this.reimbursementService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
+              if (data.type !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {type: '1', id: this.inputForm.id}
+                this.reimbursementService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
       },
+      // 修改状态
+      // updateStatusById (type) {
+      //   if (type === 'reject') {
+      //     this.inputForm.type = '4'
+      //     this.reimbursementService.updateStatusById(this.inputForm)
+      //   }
+      // },
       footerMethod ({ columns, data }) {
         const footerData = [
           columns.map((column, columnIndex) => {

+ 152 - 47
src/views/modules/sys/workContract/WorkContractFileForm.vue

@@ -121,7 +121,7 @@
         <el-col :span="24">
           <el-form-item label="收费标准" prop="contractFees">
             <el-checkbox-group v-model="inputForm.contractFees">
-              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee_pg')" :label="item.value">
+              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value">
                 {{item.label}}
               </el-checkbox>
             </el-checkbox-group>
@@ -328,8 +328,6 @@
     watch: {
       'businessId': {
         handler (newVal) {
-          console.log('businessId', this.businessId)
-          console.log('status', this.status)
           if (this.status && this.status === 'startAndHoldFiled') {
             this.isFiled = true
           }
@@ -370,7 +368,6 @@
         this.showViewer = false
       },
       init (method, id) {
-        console.log(method)
         this.dataList = []
         this.dataListNew = []
         this.method = method
@@ -400,6 +397,7 @@
           src: '',
           showVi: true,
           workAttachmentList: [],
+          contractFileId: '',
           status: '',
           filedType: ''
         }
@@ -488,7 +486,6 @@
       },
       // 送审
       startForm (callback) {
-        console.log('filedType', this.inputForm.id)
         let id = this.inputForm.id
         this.loading = true
         this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
@@ -497,42 +494,78 @@
           this.inputForm.fees = this.inputForm.contractFees.join(',')
         }
         this.workContractService.save(this.inputForm)
-        console.log('inputForm', this.inputForm)
         this.inputForm.filedType = '2'
         this.inputForm.contractInfoId = id
         this.workContractFileService.save(this.inputForm).then(({data}) => {
-          console.log('data', data)
           callback(data.businessTable, data.businessId, this.inputForm)
           this.$refs.inputForm.resetFields()
           this.loading = false
           this.businessId = ''
         })
       },
+      reapplyForm (callback) {
+        this.workContractFileService.findById(this.inputForm.contractFileId).then(({data}) => {
+          if (data.filedType !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       // 通过
       agreeForm (callback) {
-        this.$refs['inputForm2'].validate((valid) => {
+        this.$refs['inputForm2'].validate(async (valid) => {
           if (valid) {
-            let id = this.inputForm.id
-            this.loading = true
-            if (this.inputForm.filedNo !== this.inputForm.confirmFiledNo) {
-              this.loading = false
-              this.$message.warning(`案卷号和确认案卷号不一致`)
-              throw new Error('案卷号和确认案卷号不一致')
-            }
-            this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
-            this.inputForm.status = '5'
-            if (this.inputForm.contractFees !== undefined && this.inputForm.contractFees !== null) {
-              this.inputForm.fees = this.inputForm.contractFees.join(',')
-            }
-            this.inputForm.filedType = '5'
-            this.workContractService.save(this.inputForm)
-            this.inputForm.contractInfoId = id
-            this.workContractFileService.save(this.inputForm).then(({data}) => {
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-              this.businessId = ''
+            await this.workContractFileService.findById(this.inputForm.contractFileId).then(({data}) => {
+              if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                let id = this.inputForm.id
+                this.loading = true
+                if (this.inputForm.filedNo !== this.inputForm.confirmFiledNo) {
+                  this.loading = false
+                  this.$message.warning(`案卷号和确认案卷号不一致`)
+                  throw new Error('案卷号和确认案卷号不一致')
+                }
+                this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+                this.inputForm.status = '5'
+                if (this.inputForm.contractFees !== undefined && this.inputForm.contractFees !== null) {
+                  this.inputForm.fees = this.inputForm.contractFees.join(',')
+                }
+                this.inputForm.filedType = '5'
+                this.workContractService.save(this.inputForm)
+                this.inputForm.contractInfoId = id
+                this.workContractFileService.save(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.$refs.inputForm.resetFields()
+                  this.loading = false
+                  this.businessId = ''
+                })
+              }
             })
+            // let id = this.inputForm.id
+            // this.loading = true
+            // if (this.inputForm.filedNo !== this.inputForm.confirmFiledNo) {
+            //   this.loading = false
+            //   this.$message.warning(`案卷号和确认案卷号不一致`)
+            //   throw new Error('案卷号和确认案卷号不一致')
+            // }
+            // this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+            // this.inputForm.status = '5'
+            // if (this.inputForm.contractFees !== undefined && this.inputForm.contractFees !== null) {
+            //   this.inputForm.fees = this.inputForm.contractFees.join(',')
+            // }
+            // this.inputForm.filedType = '5'
+            // this.workContractService.save(this.inputForm)
+            // this.inputForm.contractInfoId = id
+            // this.workContractFileService.save(this.inputForm).then(({data}) => {
+            //   callback(data.businessTable, data.businessId, this.inputForm)
+            //   this.$refs.inputForm.resetFields()
+            //   this.loading = false
+            //   this.businessId = ''
+            // })
           }
         })
       },
@@ -668,37 +701,111 @@
         if (fees.length > 0) {
           fees.forEach(i => {
             if (i === '1') {
-              i = '计价格(2002)1980号文下浮%'
+              i = '苏会协[2010]52号'
+              fee = fee + ';' + i
             }
             if (i === '2') {
-              i = '苏价服(2014)383号文下浮%'
+              i = '苏政办发[2010]101号'
+              fee = fee + ';' + i
             }
             if (i === '3') {
-              i = '标段 元/标段'
+              i = '苏价费[2010]284号'
+              fee = fee + ';' + i
             }
             if (i === '4') {
+              i = '发改价格[2010]196号'
+              fee = fee + ';' + i
+            }
+            if (i === '5') {
               i = '其他'
+              fee = fee + ';' + i
             }
-            fee = fee + ';' + i
             this.inputForm.contractFee = fee.substring(1, fee.length)
           })
+        } else {
+          this.inputForm.contractFee = ''
         }
+        // if (fees.length > 0) {
+        //   fees.forEach(i => {
+        //     if (i === '1') {
+        //       i = '计价格(2002)1980号文下浮%'
+        //     }
+        //     if (i === '2') {
+        //       i = '苏价服(2014)383号文下浮%'
+        //     }
+        //     if (i === '3') {
+        //       i = '标段 元/标段'
+        //     }
+        //     if (i === '4') {
+        //       i = '其他'
+        //     }
+        //     fee = fee + ';' + i
+        //     this.inputForm.contractFee = fee.substring(1, fee.length)
+        //   })
+        // }
       },
-      updateStatusById (type) {
-        console.log('updateStatusById', this.inputForm)
-        if (type === 'agree') {
-          this.inputForm.filedType = '5'
-          this.workContractFileService.updateStatusById(this.inputForm)
-        }
-        if (type === 'reject') {
-          this.inputForm.filedType = '4'
-          this.workContractFileService.updateStatusById(this.inputForm)
-        }
-        if (type === 'reback') {
-          this.inputForm.filedType = '3'
-          this.workContractFileService.updateStatusById(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.workContractFileService.findById(this.inputForm.contractFileId).then(({data}) => {
+              if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // if (type === 'agree') {
+                //   // 同意
+                //   this.inputForm.status = '5'
+                // }
+                if (type === 'reject') {
+                  // 驳回
+                  this.inputForm.filedType = '4'
+                }
+                if (type === 'reback') {
+                  // 撤回
+                  this.inputForm.filedType = '3'
+                }
+                if (type === 'reject' || type === 'reback') {
+                  let param = {filedType: this.inputForm.filedType, id: this.inputForm.id}
+                  this.workContractFileService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.workContractFileService.findById(this.inputForm.contractFileId).then(({data}) => {
+              if (data.filedType !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {filedType: '1', id: this.inputForm.id}
+                this.workContractFileService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
       },
+      // updateStatusById (type) {
+      //   console.log('updateStatusById', this.inputForm)
+      //   if (type === 'agree') {
+      //     this.inputForm.filedType = '5'
+      //     this.workContractFileService.updateStatusById(this.inputForm)
+      //   }
+      //   if (type === 'reject') {
+      //     this.inputForm.filedType = '4'
+      //     this.workContractFileService.updateStatusById(this.inputForm)
+      //   }
+      //   if (type === 'reback') {
+      //     this.inputForm.filedType = '3'
+      //     this.workContractFileService.updateStatusById(this.inputForm)
+      //   }
+      // },
       checkData () {
         let begin = this.inputForm.effectiveDate
         let close = this.inputForm.closingDate
@@ -719,12 +826,10 @@
         if (this.commonJS.isEmpty(this.inputForm.filedNo) || this.commonJS.isEmpty(this.inputForm.confirmFiledNo)) {
           this.$message.warning(`请输入案卷号和确认案卷号`)
           let i = 'false'
-          console.log('callback', 'false')
           // callback(new Error('请输入案卷号和确认案卷号'))
           callback(i)
           return
         }
-        console.log('callback', 'true')
         callback()
       }
     }

+ 103 - 26
src/views/modules/sys/workContract/WorkContractForm.vue

@@ -121,7 +121,7 @@
         <el-col :span="24">
           <el-form-item label="收费标准" prop="contractFees">
             <el-checkbox-group v-model="inputForm.contractFees">
-              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee_pg')" :label="item.value">
+              <el-checkbox @change="changeContractFee" v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value">
                 {{item.label}}
               </el-checkbox>
             </el-checkbox-group>
@@ -309,7 +309,6 @@
         this.showViewer = false
       },
       init (method, id) {
-        console.log(method)
         this.dataList = []
         this.dataListNew = []
         this.method = method
@@ -412,21 +411,38 @@
           }
         })
       },
+      reapplyForm (callback) {
+        this.workContractService.findById(this.inputForm.id).then(({data}) => {
+          if (data.status !== '4') { // 审核状态不是“驳回”,就弹出提示
+            this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+            throw new Error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+          } else {
+            this.startForm(callback)
+          }
+        })
+      },
       // 通过
       agreeForm (callback) {
         this.$refs['inputForm'].validate(async (valid) => {
           if (valid) {
-            this.loading = true
-            this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
-            this.inputForm.status = '5'
-            this.inputForm.fees = this.inputForm.contractFees.join(',')
-            await this.workContractService.save(this.inputForm).then(({data}) => {
-              callback(data.businessTable, data.businessId, this.inputForm)
-              this.$refs.inputForm.resetFields()
-              this.loading = false
-            }).catch(() => {
-              this.$refs.inputForm.resetFields()
-              this.loading = false
+            await this.workContractService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                this.loading = true
+                this.inputForm.workAttachmentList = this.$refs.uploadComponent.getDataList()
+                this.inputForm.status = '5'
+                this.inputForm.fees = this.inputForm.contractFees.join(',')
+                this.workContractService.save(this.inputForm).then(({data}) => {
+                  callback(data.businessTable, data.businessId, this.inputForm)
+                  this.$refs.inputForm.resetFields()
+                  this.loading = false
+                }).catch(() => {
+                  this.$refs.inputForm.resetFields()
+                  this.loading = false
+                })
+              }
             })
           }
         })
@@ -561,31 +577,92 @@
         if (fees.length > 0) {
           fees.forEach(i => {
             if (i === '1') {
-              i = '发改价格[2009]2914号'
+              i = '苏会协[2010]52号'
               fee = fee + ';' + i
             }
             if (i === '2') {
+              i = '苏政办发[2010]101号'
+              fee = fee + ';' + i
+            }
+            if (i === '3') {
+              i = '苏价费[2010]284号'
+              fee = fee + ';' + i
+            }
+            if (i === '4') {
+              i = '发改价格[2010]196号'
+              fee = fee + ';' + i
+            }
+            if (i === '5') {
               i = '其他'
               fee = fee + ';' + i
             }
             this.inputForm.contractFee = fee.substring(1, fee.length)
           })
+        } else {
+          this.inputForm.contractFee = ''
         }
       },
-      updateStatusById (type) {
-        if (type === 'agree') {
-          this.inputForm.status = '5'
-          this.workContractService.updateStatusById(this.inputForm)
-        }
-        if (type === 'reject') {
-          this.inputForm.status = '4'
-          this.workContractService.updateStatusById(this.inputForm)
-        }
-        if (type === 'reback') {
-          this.inputForm.status = '3'
-          this.workContractService.updateStatusById(this.inputForm)
+      async updateStatusById (type, callback) {
+        if (await this.$refs.uploadComponent.checkProgress()) {
+          this.loading = false
+          throw new Error()
+        } else {
+          if (type === 'reject' || type === 'reback') {
+            this.workContractService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                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.workContractService.updateStatusById(param).then(() => {
+                    callback()
+                  })
+                }
+              }
+            })
+          } else if (type === 'hold') {
+            this.workContractService.findById(this.inputForm.id).then(({data}) => {
+              if (data.status !== '4') { // status的值不等于“驳回”就弹出提示
+                this.$message.error('任务数据已发生改变或不存在,请在待办任务中确认此任务是否存在')
+                throw new Error()
+              } else {
+                // 终止
+                let param = {status: '1', id: this.inputForm.id}
+                this.workContractService.updateStatusById(param).then(() => {
+                  callback()
+                })
+              }
+            })
+          }
         }
       },
+      // updateStatusById (type) {
+      //   if (type === 'agree') {
+      //     this.inputForm.status = '5'
+      //     this.workContractService.updateStatusById(this.inputForm)
+      //   }
+      //   if (type === 'reject') {
+      //     this.inputForm.status = '4'
+      //     this.workContractService.updateStatusById(this.inputForm)
+      //   }
+      //   if (type === 'reback') {
+      //     this.inputForm.status = '3'
+      //     this.workContractService.updateStatusById(this.inputForm)
+      //   }
+      // },
       checkData () {
         let begin = this.inputForm.effectiveDate
         let close = this.inputForm.closingDate

+ 1 - 1
src/views/modules/sys/workContract/WorkContractForm2.vue

@@ -125,7 +125,7 @@
             <el-col :span="24">
               <el-form-item label="收费标准" prop="contractFees">
                 <el-checkbox-group v-model="inputForm.contractFees" @change="changeContractFee">
-                  <el-checkbox  v-for="item in $dictUtils.getDictList('contract_fee_pg')" :label="item.value" >{{item.label}}</el-checkbox>
+                  <el-checkbox  v-for="item in $dictUtils.getDictList('contract_fee')" :label="item.value" >{{item.label}}</el-checkbox>
                 </el-checkbox-group>
               </el-form-item>
             </el-col>

+ 220 - 102
src/views/modules/sys/workContract/WorkContractList.vue

@@ -131,16 +131,16 @@
                     <el-button  type="text" @click="detailFiled(scope.row)" :type="$dictUtils.getDictLabel('filed_type_status', scope.row.filedType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("filed_type", scope.row.filedType, '未归档')}} </el-button>
                   </template>
                 </vxe-column>
-                <vxe-column width="100px"  title="借用状态" field="borrowType" >
-                  <template slot-scope="scope">
-                    <el-button  type="text" @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>
-                  </template>
-                </vxe-column>
+<!--                <vxe-column width="100px"  title="借用状态" field="borrowType" >-->
+<!--                  <template slot-scope="scope">-->
+<!--                    <el-button  type="text" @click="detailBorrow(scope.row)" :type="$dictUtils.getDictLabel('borrow_type_status', scope.row.borrowType, '-')" effect="dark" size="mini">{{$dictUtils.getDictLabel("borrow_type", scope.row.borrowType, '未借用')}} </el-button>-->
+<!--                  </template>-->
+<!--                </vxe-column>-->
 
                 <vxe-column title="操作" width="200px" fixed="right" align="center">
                     <template  slot-scope="scope">
                       <el-button v-if="hasPermission('sys:workContract:view')" type="text" size="small" @click="view(scope.row.id)">查看</el-button>
-                      <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.createId === create" type="text" size="small" @click="edit(scope.row)">修改</el-button>
+                      <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status !== '2' && scope.row.status !== '5' && scope.row.status !== '4' && scope.row.createId === create" type="text" size="small" @click="edit(scope.row)">修改</el-button>
                       <el-button v-if="hasPermission('sys:workContract:edit') && scope.row.status === '5' && isAdmin" type="text" size="small" @click="editForm(scope.row.id)">修改</el-button>
                       <el-button v-if="hasPermission('sys:workContract:del') && (scope.row.status === '1' || scope.row.status === '3' || scope.row.status === '4')  && scope.row.createId === create" type="text" size="small" @click="del(scope.row.id)">删除</el-button>
                       <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '2'" type="text" size="small" @click="reback(scope.row)">撤回</el-button>
@@ -148,15 +148,15 @@
                       <!--归档暂存修改-->
                       <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && scope.row.filedType === '1'" type="text" size="small" @click="filed(scope.row.id)">修改</el-button>
                       <!--归档撤回驳回修改-->
-                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '3' || scope.row.filedType === '4')" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
+                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '3')" type="text" size="small" @click="filedAndClose(scope.row)">修改</el-button>
                       <!--归档撤回-->
                       <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '2'" type="text"  size="small" @click="rebackFiled(scope.row)">撤回</el-button>
                       <!--合同借用-->
-                      <el-button v-if="hasPermission('sys:workContract:borrow') && scope.row.status === '5' && scope.row.filedType === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '0' || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>
-                      <!--借用撤回-->
-                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
-                      <!--借用归还-->
-                      <el-button v-if="hasPermission('sys:workContract:reture') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '5'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>
+<!--                      <el-button v-if="hasPermission('sys:workContract:borrow') && scope.row.status === '5' && scope.row.filedType === '5' && (scope.row.borrowType === undefined || scope.row.borrowType === '0' || scope.row.borrowType === '1')" type="text" size="small" @click="borrow(scope.row.id)">借用</el-button>-->
+<!--                      &lt;!&ndash;借用撤回&ndash;&gt;-->
+<!--                      <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>-->
+<!--                      &lt;!&ndash;借用归还&ndash;&gt;-->
+<!--                      <el-button v-if="hasPermission('sys:workContract:reture') && scope.row.status === '5' && scope.row.filedType === '5' && scope.row.borrowType === '5'" type="text" size="small" @click="retureBorrow(scope.row)">归还合同</el-button>-->
                     </template>
                 </vxe-column>
             </vxe-table>
@@ -299,7 +299,7 @@
       add () {
         this.start()
       },
-      // 详情
+      // 合同登记新建详情
       detail (row) {
         // eslint-disable-next-line eqeqeq
         if (!this.commonJS.isEmpty(row.status) && row.status != '1') {
@@ -310,23 +310,18 @@
             this.$router.push({
               path: '/flowable/task/TaskFormDetail',
               query: {
+                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
+                isShow: 'false',
                 readOnly: true,
                 title: '流程详情',
                 formTitle: '流程详情',
                 businessId: row.id,
-                ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
+                status: 'reback'
+              }
             })
           })
         }
       },
-      // 修改
-      edit (row) {
-        if (row.status === '3' || row.status === '4') {
-          this.editWithClose(row)
-        } else {
-          this.editWithHold(row)
-        }
-      },
       // 管理员修改
       editForm (id) {
         id = id || this.$refs.workClientTable.getCheckboxRecords().map(item => {
@@ -373,6 +368,7 @@
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId,
                 procDefKey: this.procDefKey,
                 status: 'startAndHold',
@@ -387,106 +383,176 @@
             })
           })
       },
-      editWithHold (row) {
+      // 合同登记新建撤回驳回修改
+      edit (row) {
+        // if (row.status === '3' || row.status === '4') {
+        //   this.editWithClose(row)
+        // } else {
+        //   this.editWithHold(row)
+        // }
         // 读取流程表单
-        let tabTitle = `发起流程【合同登记新建】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
+        let tabTitle = `发起流程【发票申请】`
+        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[发票申请]`
+        let status = 'startAndHold'
+        if (row.status === '3') {
+          status = 'startAndClose'
+        } else if (row.status === '4') {
+          status = 'reapplyFlag'
+        }
         this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
           businessId: row.id,
-          businessTable: 'work_contract_info',
-          status: 'startAndHold'}).then((data) => {
+          businessTable: 'work_contract_info'}).then((data) => {
             this.$router.push({
               path: '/flowable/task/TaskForm',
               query: {
+                ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                 procDefId: this.processDefinitionId,
                 procDefKey: this.procDefKey,
-                status: 'startAndHold',
                 title: tabTitle,
                 formType: data.data.formType,
                 formUrl: data.data.formUrl,
                 formTitle: processTitle,
                 businessTable: 'work_contract_info',
                 businessId: row.id,
-                isShow: false,
+                isShow: 'false',
+                status: status,
                 routePath: '/sys/workContract/WorkContractList'
               }
             })
           })
       },
-      editWithClose (row) {
-        // 读取流程表单
-        let tabTitle = `发起流程【合同登记新建】`
-        let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
-        this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
-          businessId: row.id,
-          businessTable: 'work_contract_info',
-          status: 'startAndClose'
-        }).then((data) => {
-          this.$router.push({
-            path: '/flowable/task/TaskForm',
-            query: {
-              procDefId: this.processDefinitionId,
-              procDefKey: this.procDefKey,
-              status: 'startAndClose',
-              title: tabTitle,
-              formType: data.data.formType,
-              formUrl: data.data.formUrl,
-              formTitle: processTitle,
-              businessTable: 'work_contract_info',
-              businessId: row.id,
-              isShow: false,
-              routePath: '/sys/workContract/WorkContractList'
-            }
-          })
-        })
-      },
+      // editWithHold (row) {
+      //   // 读取流程表单
+      //   let tabTitle = `发起流程【合同登记新建】`
+      //   let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
+      //   this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
+      //     businessId: row.id,
+      //     businessTable: 'work_contract_info',
+      //     status: 'startAndHold'}).then((data) => {
+      //       this.$router.push({
+      //         path: '/flowable/task/TaskForm',
+      //         query: {
+      //           procDefId: this.processDefinitionId,
+      //           procDefKey: this.procDefKey,
+      //           status: 'startAndHold',
+      //           title: tabTitle,
+      //           formType: data.data.formType,
+      //           formUrl: data.data.formUrl,
+      //           formTitle: processTitle,
+      //           businessTable: 'work_contract_info',
+      //           businessId: row.id,
+      //           isShow: false,
+      //           routePath: '/sys/workContract/WorkContractList'
+      //         }
+      //       })
+      //     })
+      // },
+      // editWithClose (row) {
+      //   // 读取流程表单
+      //   let tabTitle = `发起流程【合同登记新建】`
+      //   let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记新建]`
+      //   this.taskService.getTaskDef({ procDefId: this.processDefinitionId,
+      //     businessId: row.id,
+      //     businessTable: 'work_contract_info',
+      //     status: 'startAndClose'
+      //   }).then((data) => {
+      //     this.$router.push({
+      //       path: '/flowable/task/TaskForm',
+      //       query: {
+      //         procDefId: this.processDefinitionId,
+      //         procDefKey: this.procDefKey,
+      //         status: 'startAndClose',
+      //         title: tabTitle,
+      //         formType: data.data.formType,
+      //         formUrl: data.data.formUrl,
+      //         formTitle: processTitle,
+      //         businessTable: 'work_contract_info',
+      //         businessId: row.id,
+      //         isShow: false,
+      //         routePath: '/sys/workContract/WorkContractList'
+      //       }
+      //     })
+      //   })
+      // },
+      // 合同登记新建撤回
       reback (row) {
-        this.$confirm(`确定撤回流程吗?`, '提示', {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
-          taskId: row.procInsId,
           type: 'warning'
-        }).then(() => {
-          this.taskService.backNodes(row.taskId).then(({data}) => {
-            let backNodes = data
-            if (backNodes.length > 0) {
-              let backTaskDefKey = backNodes[0].taskDefKey
-              this.taskService.back({
-                taskId: row.taskId,
-                backTaskDefKey: backTaskDefKey,
-                isShow: false,
-                ...this.auditForm
-              }).then(({data}) => {
-                this.updateStatusById(row, 'reback')
-                this.$message.success('回退成功')
+        }).then(async () => {
+          await this.workContractService.findById(row.id).then(({data}) => {
+            if (data.status !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(row.procInsId).then(async ({data}) => {
+                let form = {status: '3', id: row.id}
+                await this.workContractService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
               })
             }
           })
+          // this.taskService.backNodes(row.taskId).then(({data}) => {
+          //   let backNodes = data
+          //   if (backNodes.length > 0) {
+          //     let backTaskDefKey = backNodes[0].taskDefKey
+          //     this.taskService.back({
+          //       taskId: row.taskId,
+          //       backTaskDefKey: backTaskDefKey,
+          //       isShow: false,
+          //       ...this.auditForm
+          //     }).then(({data}) => {
+          //       this.updateStatusById(row, 'reback')
+          //       this.$message.success('回退成功')
+          //     })
+          //   }
+          // })
         })
       },
+      // 归档撤回
       rebackFiled (row) {
-        this.$confirm(`确定撤回流程吗?`, '提示', {
+        this.$confirm(`确定要撤回该申请吗?`, '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
-          taskId: row.taskFiledId,
           type: 'warning'
-        }).then(() => {
-          console.log('datas', row.taskFiledId)
-          this.taskService.backNodes(row.taskFiledId).then(({data}) => {
-            let backNodes = data
-            if (backNodes.length > 0) {
-              let backTaskDefKey = backNodes[0].taskDefKey
-              this.taskService.back({
-                taskId: row.taskFiledId,
-                backTaskDefKey: backTaskDefKey,
-                isShow: false,
-                ...this.auditForm
-              }).then(({data}) => {
-                this.updateStatusById(row, 'rebackFiled')
-                this.$message.success('回退成功')
+        }).then(async () => {
+          await this.workContractFileService.findByContractInfoId(row.id).then(({data}) => {
+            if (data.filedType !== '2') { // status的值不等于“审核中”,就弹出提示
+              this.$message.error('数据已发生改变或不存在,请刷新数据')
+              this.refreshList()
+            } else {
+              this.processService.revokeProcIns(data.procInsId).then(async ({data}) => {
+                let form = {filedType: '3', id: row.id}
+                await this.workContractFileService.updateStatusById(form)
+                this.$message.success(data)
+                this.refreshList()
               })
             }
           })
+        // this.$confirm(`确定撤回流程吗?`, '提示', {
+        //   confirmButtonText: '确定',
+        //   cancelButtonText: '取消',
+        //   taskId: row.taskFiledId,
+        //   type: 'warning'
+        // }).then(() => {
+        //   console.log('datas', row.taskFiledId)
+        //   this.taskService.backNodes(row.taskFiledId).then(({data}) => {
+        //     let backNodes = data
+        //     if (backNodes.length > 0) {
+        //       let backTaskDefKey = backNodes[0].taskDefKey
+        //       this.taskService.back({
+        //         taskId: row.taskFiledId,
+        //         backTaskDefKey: backTaskDefKey,
+        //         isShow: false,
+        //         ...this.auditForm
+        //       }).then(({data}) => {
+        //         this.updateStatusById(row, 'rebackFiled')
+        //         this.$message.success('回退成功')
+        //       })
+        //     }
+        //   })
         })
       },
       updateStatusById (row, type) {
@@ -530,7 +596,6 @@
       filed (id) {
         this.processService.getByName('合同登记归档').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
-            console.log('data', data)
             // 读取流程表单
             let tabTitle = `发起流程【合同登记归档】`
             let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记归档]`
@@ -541,6 +606,7 @@
                 this.$router.push({
                   path: '/flowable/task/TaskForm',
                   query: {
+                    ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                     procDefId: data.id,
                     procDefKey: data.key,
                     status: 'startAndHoldFiled',
@@ -555,38 +621,91 @@
                   }
                 })
               })
+            // 读取流程表单
+            // let tabTitle = `发起流程【合同登记归档】`
+            // let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记归档]`
+            // this.taskService.getTaskDef({ procDefId: data.id,
+            //   businessId: id,
+            //   businessTable: 'work_contract_file',
+            //   status: 'startAndHoldFiled'}).then((reture) => {
+            //     this.$router.push({
+            //       path: '/flowable/task/TaskForm',
+            //       query: {
+            //         procDefId: data.id,
+            //         procDefKey: data.key,
+            //         status: 'startAndHoldFiled',
+            //         title: tabTitle,
+            //         formType: reture.data.formType,
+            //         formUrl: reture.data.formUrl,
+            //         formTitle: processTitle,
+            //         businessTable: 'work_contract_file',
+            //         businessId: id,
+            //         isShow: false,
+            //         routePath: '/sys/workContract/WorkContractList'
+            //       }
+            //     })
+            //   })
           }
         })
       },
-      // 归档
-      filedAndClose (id) {
+      // 归档驳回撤回修改
+      filedAndClose (row) {
         this.processService.getByName('合同登记归档').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
-            console.log('data', data)
             // 读取流程表单
             let tabTitle = `发起流程【合同登记归档】`
-            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记归档]`
+            let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了[合同登记归档]`
+            let status = 'startAndCloseFiled'
+            if (row.filedType === '3') {
+              status = 'startAndClose'
+            } else if (row.filedType === '4') {
+              status = 'reapplyFlag'
+            }
             this.taskService.getTaskDef({ procDefId: data.id,
-              businessId: id,
-              businessTable: 'work_contract_file',
-              status: 'startAndCloseFiled'}).then((reture) => {
+              businessId: row.id,
+              businessTable: 'work_contract_file'}).then((reture) => {
                 this.$router.push({
                   path: '/flowable/task/TaskForm',
                   query: {
+                    ...pick(data.data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                     procDefId: data.id,
                     procDefKey: data.key,
-                    status: 'startAndCloseFiled',
                     title: tabTitle,
                     formType: reture.data.formType,
                     formUrl: reture.data.formUrl,
                     formTitle: processTitle,
                     businessTable: 'work_contract_file',
-                    businessId: id,
-                    isShow: false,
+                    businessId: row.id,
+                    isShow: 'false',
+                    status: status,
                     routePath: '/sys/workContract/WorkContractList'
                   }
                 })
               })
+            // 读取流程表单
+            // let tabTitle = `发起流程【合同登记归档】`
+            // let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记归档]`
+            // this.taskService.getTaskDef({ procDefId: data.id,
+            //   businessId: id,
+            //   businessTable: 'work_contract_file',
+            //   status: 'startAndCloseFiled'}).then((reture) => {
+            //     this.$router.push({
+            //       path: '/flowable/task/TaskForm',
+            //       query: {
+            //         procDefId: data.id,
+            //         procDefKey: data.key,
+            //         status: 'startAndCloseFiled',
+            //         title: tabTitle,
+            //         formType: reture.data.formType,
+            //         formUrl: reture.data.formUrl,
+            //         formTitle: processTitle,
+            //         businessTable: 'work_contract_file',
+            //         businessId: id,
+            //         isShow: false,
+            //         routePath: '/sys/workContract/WorkContractList'
+            //       }
+            //     })
+            //   })
           }
         })
       },
@@ -595,7 +714,6 @@
         if (row.filedType !== '4') {
           this.workContractFileService.findByContractInfoId(row.id).then(({data}) => {
             if (!this.commonJS.isEmpty(data.id)) {
-              console.log('data', data)
               this.taskService.getTaskDef({
                 procInsId: data.procInsId,
                 procDefId: data.processDefinitionId
@@ -603,11 +721,12 @@
                 this.$router.push({
                   path: '/flowable/task/TaskFormDetail',
                   query: {
+                    ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
                     readOnly: true,
                     title: '归档流程详情',
                     formTitle: '归档流程详情',
-                    businessId: row.id,
-                    ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
+                    businessId: row.id
+                  }
                 })
               })
             }
@@ -618,7 +737,6 @@
       borrow (id) {
         this.processService.getByName('合同登记借用').then(({data}) => {
           if (!this.commonJS.isEmpty(data.id)) {
-            console.log('data', data)
             // 读取流程表单
             let tabTitle = `发起流程【合同登记借用】`
             let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [合同登记借用]`