Jelajahi Sumber

代码提交:
0926合同管理-合同登记格式调整,bug修改

sunruiqi 2 tahun lalu
induk
melakukan
c3fa4ebf8f
1 mengubah file dengan 34 tambahan dan 1 penghapusan
  1. 34 1
      src/views/modules/sys/workContract/WorkContractList.vue

+ 34 - 1
src/views/modules/sys/workContract/WorkContractList.vue

@@ -144,8 +144,9 @@
                       <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.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>
-                      <el-button v-if="hasPermission('sys:workContract:filed') && scope.row.status === '5' && scope.row.createId === create && (scope.row.filedType === '1' || scope.row.filedType === '4' || scope.row.filedType === '5' || scope.row.filedType === undefined)" 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 === '1' || scope.row.filedType === '4' || scope.row.filedType === undefined)" 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 === '2'" 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 === '5'" type="text" size="small" @click="filedAndClose(scope.row.id)">修改</el-button>
                       <el-button v-if="hasPermission('sys:workContract:back') && scope.row.status === '5' && scope.row.filedType === '3'" 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 === '6' && (scope.row.borrowType === undefined || 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 === '6' && scope.row.borrowType === '2'" type="text" size="small" @click="rebackBorrow(scope.row)">撤回</el-button>
@@ -551,6 +552,38 @@
           }
         })
       },
+      // 归档
+      filedAndClose (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')} 发起了 [合同登记归档]`
+            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'
+                }
+              })
+            })
+          }
+        })
+      },
       // 归档详情
       detailFiled (row) {
         if (row.filedType !== '4') {