|
@@ -14,7 +14,8 @@
|
|
|
<div class="jp-table top" style="">
|
|
|
<vxe-toolbar :refresh="{query: refreshList}" ref="toolbarRef" export custom>
|
|
|
<template #buttons>
|
|
|
- <el-button v-if="!haveComplete" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
|
|
|
+<!-- <el-button v-if="!haveComplete" type="primary" icon="el-icon-plus" @click="start()">新建</el-button>-->
|
|
|
+ <el-button type="primary" icon="el-icon-plus" @click="start()">新建</el-button>
|
|
|
</template>
|
|
|
</vxe-toolbar>
|
|
|
<div style="height: calc(100% - 90px)">
|
|
@@ -43,19 +44,24 @@
|
|
|
:data="dataList"
|
|
|
:checkbox-config="{}">
|
|
|
<vxe-column type="seq" width="60" title="序号"></vxe-column>
|
|
|
- <vxe-column min-width="160" align="center" title="姓名" field="name"></vxe-column>
|
|
|
- <vxe-column min-width="160" align="center" title="联系电话" field="mobilePhone"></vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="姓名" field="name">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-link type="primary" :underline="false" v-if="hasPermission('depart:view')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
|
|
|
+ <span v-else>{{scope.row.name}}</span>
|
|
|
+ </template>
|
|
|
+ </vxe-column>
|
|
|
+ <vxe-column min-width="160" align="center" title="联系电话" field="mobile"></vxe-column>
|
|
|
<vxe-column min-width="160" align="center" title="所属部门" field="departmentName"></vxe-column>
|
|
|
<vxe-column min-width="100" title="状态" fixed="right" align="center" field="type">
|
|
|
<template #default="scope">
|
|
|
- <el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('human_status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("human_status", scope.row.type, '未开始')}} </el-button>
|
|
|
+ <el-button @click="detail(scope.row)" :type="$dictUtils.getDictLabel('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
<vxe-column min-width="100" title="交接状态" fixed="right" align="center" field="handoverType">
|
|
|
<template #default="scope">
|
|
|
<el-button @click="handoverDetail(scope.row)"
|
|
|
- :type="$dictUtils.getDictLabel('cw_status_flag', scope.row.handoverType, '')" effect="dark" >
|
|
|
- {{$dictUtils.getDictLabel("cw_status", scope.row.handoverType, '未开始')}} </el-button>
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.handoverType, '')" effect="dark" >
|
|
|
+ {{$dictUtils.getDictLabel("status", scope.row.handoverType, '未开始')}} </el-button>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
|
|
|
@@ -68,17 +74,17 @@
|
|
|
scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="del(scope.row.id)">删除</el-button>
|
|
|
</div>
|
|
|
<div v-else>
|
|
|
- <el-button v-if="hasPermission('depart:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary" @click="edit(scope.row)">修改</el-button>
|
|
|
+ <el-button v-if="hasPermission('depart:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' )" text type="primary" @click="editForm(scope.row)">修改</el-button>
|
|
|
<el-button v-if="hasPermission('depart:edit') && scope.row.createById === $store.state.user.id && (scope.row.type === '2')" text type="primary" @click="reback(scope.row)">撤回</el-button>
|
|
|
- <el-button v-if="hasPermission('depart:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1')" text type="primary" @click="del(scope.row.id)">删除</el-button>
|
|
|
+ <el-button v-if="hasPermission('depart:del') && scope.row.createById === $store.state.user.id && (scope.row.type === '1' || scope.row.type === '3' || scope.row.type === undefined)" text type="primary" @click="del(scope.row.id)">删除</el-button>
|
|
|
<!-- 审核-->
|
|
|
<el-button v-if="scope.row.type==='2'&& checkIsAudit(scope.row)" text type="primary" @click="examine(scope.row)">审核</el-button>
|
|
|
<!-- 被驳回后当前申请人重新调整-->
|
|
|
- <el-button v-if="scope.row.createById === $store.state.user.id&&scope.row.type === '4'" text type="primary" @click="adjust(scope.row)">驳回调整</el-button>
|
|
|
- <el-button v-if="(scope.row.createById === $store.state.user.id) && haveComplete && (scope.row.handoverType === undefined || scope.row.handoverType === '0' || scope.row.handoverType === '1' || scope.row.handoverType === '3')" text type="primary" @click="handover(scope.row)">离职交接</el-button>
|
|
|
- <!--借用撤回-->
|
|
|
- <el-button v-if="haveComplete && scope.row.handoverType === '2' && (scope.row.createById === $store.state.user.id)" text type="primary" @click="rebackHandover(scope.row)">撤回离职交接</el-button>
|
|
|
- <el-button v-if="scope.row.createById === $store.state.user.id&&haveComplete&& scope.row.handoverType === '4'" text type="primary" @click="adjustHandover(scope.row)">驳回调整</el-button>
|
|
|
+ <el-button v-if="scope.row.createById === $store.state.user.id && scope.row.type === '4'" text type="primary" @click="adjust(scope.row)">驳回调整</el-button>
|
|
|
+ <el-button v-if="(scope.row.createById === $store.state.user.id) && scope.row.type === '5' && (scope.row.handoverType === undefined || scope.row.handoverType === '0' || scope.row.handoverType === '1' || scope.row.handoverType === '3')" text type="primary" @click="handover(scope.row)">离职交接</el-button>
|
|
|
+ <!--离职交接撤回-->
|
|
|
+ <el-button v-if="scope.row.type === '5' && scope.row.handoverType === '2' && (scope.row.createById === $store.state.user.id)" text type="primary" @click="rebackHandover(scope.row)">撤回离职交接</el-button>
|
|
|
+ <el-button v-if="scope.row.createById === $store.state.user.id && scope.row.type === '5'&& scope.row.handoverType === '4'" text type="primary" @click="adjustHandover(scope.row)">驳回调整</el-button>
|
|
|
</div>
|
|
|
</template>
|
|
|
</vxe-column>
|
|
@@ -109,7 +115,7 @@
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- haveComplete: false,
|
|
|
+ // haveComplete: false,
|
|
|
num: 0,
|
|
|
searchForm: {
|
|
|
projectNumber: '',
|
|
@@ -158,6 +164,10 @@
|
|
|
this.refreshList()
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 查看
|
|
|
+ view (id) {
|
|
|
+ this.$refs.departRegistrationEditForm.init('view', id)
|
|
|
+ },
|
|
|
// 新增
|
|
|
add () {
|
|
|
},
|
|
@@ -201,9 +211,9 @@
|
|
|
this.handoverDefAuditKey = data.key
|
|
|
}
|
|
|
})
|
|
|
- departRegistrationService.selectComplete().then((data) => {
|
|
|
- this.haveComplete = data
|
|
|
- })
|
|
|
+ // departRegistrationService.selectComplete().then((data) => {
|
|
|
+ // this.haveComplete = data
|
|
|
+ // })
|
|
|
},
|
|
|
// 当前页
|
|
|
currentChangeHandle ({ currentPage, pageSize }) {
|
|
@@ -247,6 +257,45 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ editForm (row) {
|
|
|
+ // 暂存修改
|
|
|
+ let status = ''
|
|
|
+ if (row.type === '1') {
|
|
|
+ status = 'startAndHold'
|
|
|
+ }
|
|
|
+ // 撤回或者驳回修改
|
|
|
+ if (row.type === '3') {
|
|
|
+ status = 'startAndClose'
|
|
|
+ } else if (row.status === '4') {
|
|
|
+ status = 'reapplyFlag'
|
|
|
+ }
|
|
|
+ // 读取流程表单
|
|
|
+ let tabTitle = `发起流程【离职申请】`
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职申请]`
|
|
|
+ taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
|
|
|
+ businessId: row.id,
|
|
|
+ businessTable: 'human_resources_depart_registration',
|
|
|
+ status: status
|
|
|
+ }).then((data) => {
|
|
|
+ this.$router.push({
|
|
|
+ path: '/flowable/task/TaskForm',
|
|
|
+ query: {
|
|
|
+ ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title'),
|
|
|
+ procDefId: this.processDefinitionAuditId,
|
|
|
+ procDefKey: this.procDefKey,
|
|
|
+ status: status,
|
|
|
+ title: tabTitle,
|
|
|
+ formType: data.formType,
|
|
|
+ formUrl: data.formUrl,
|
|
|
+ formTitle: processTitle,
|
|
|
+ businessTable: 'human_resources_depart_registration',
|
|
|
+ businessId: row.id,
|
|
|
+ isShow: false,
|
|
|
+ routePath: '/human/depart/registration/DepartRegistrationList'
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 查看离职申请流程结果
|
|
|
detail (row) {
|
|
|
if (row.type !== '0' && row.type !== '1') {
|