|
@@ -1,349 +1,355 @@
|
|
<template>
|
|
<template>
|
|
- <div class="page">
|
|
|
|
- <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
|
- <!-- 搜索框-->
|
|
|
|
- <el-form-item label="姓名" prop="name">
|
|
|
|
- <el-input v-model="searchForm.name" placeholder="请输入姓名" clearable></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="归属部门" prop="department">
|
|
|
|
- <SelectTree
|
|
|
|
- ref="officeTree"
|
|
|
|
- :props="{
|
|
|
|
- value: 'id', // ID字段名
|
|
|
|
- label: 'name', // 显示名称
|
|
|
|
- children: 'children' // 子级字段名
|
|
|
|
- }"
|
|
|
|
- :url="`/system-server/sys/office/treeData?type=2`"
|
|
|
|
- :value="searchForm.department"
|
|
|
|
- :clearable="true"
|
|
|
|
- :accordion="true"
|
|
|
|
- size="default"
|
|
|
|
- @getValue="(value,label) => {searchForm.department=value}"/>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="联系电话" prop="mobile">
|
|
|
|
- <el-input v-model="searchForm.mobile" placeholder="请输入联系电话" clearable></el-input>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <div class="page">
|
|
|
|
+ <el-form :inline="true" class="query-form m-b-10" ref="searchForm" :model="searchForm"
|
|
|
|
+ @keyup.enter.native="refreshList()" @submit.native.prevent>
|
|
|
|
+ <!-- 搜索框-->
|
|
|
|
+ <el-form-item label="姓名" prop="name">
|
|
|
|
+ <el-input v-model="searchForm.name" placeholder="请输入姓名" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="归属部门" prop="department">
|
|
|
|
+ <SelectTree ref="officeTree" :props="{
|
|
|
|
+ value: 'id', // ID字段名
|
|
|
|
+ label: 'name', // 显示名称
|
|
|
|
+ children: 'children' // 子级字段名
|
|
|
|
+ }" :url="`/system-server/sys/office/treeData?type=2`" :value="searchForm.department" :clearable="true"
|
|
|
|
+ :accordion="true" size="default" @getValue="(value, label) => { searchForm.department = value }" />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="联系电话" prop="mobile">
|
|
|
|
+ <el-input v-model="searchForm.mobile" placeholder="请输入联系电话" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
|
|
- <el-form-item>
|
|
|
|
- <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
|
|
|
|
- <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <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>
|
|
|
|
- <span v-if="haveComplete" style="color: red">已存在离职申请,无法多次提交</span>
|
|
|
|
- </template>
|
|
|
|
- </vxe-toolbar>
|
|
|
|
- <div style="height: calc(100% - 90px)">
|
|
|
|
- <vxe-table
|
|
|
|
- border="inner"
|
|
|
|
- auto-resize
|
|
|
|
- resizable
|
|
|
|
- height="auto"
|
|
|
|
- :loading="loading"
|
|
|
|
- ref="clientTable"
|
|
|
|
- show-header-overflow
|
|
|
|
- show-overflow
|
|
|
|
- highlight-hover-row
|
|
|
|
- :print-config="{}"
|
|
|
|
- :export-config="{
|
|
|
|
- remote: true,
|
|
|
|
- filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
|
- sheetName: '入职登记信息',
|
|
|
|
- exportMethod: exportMethod,
|
|
|
|
- types: ['xlsx'],
|
|
|
|
- modes: ['current', 'selected', 'all']
|
|
|
|
- }"
|
|
|
|
- :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="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('status_info', scope.row.type, '')" effect="dark" >{{$dictUtils.getDictLabel("status", scope.row.type, '未开始')}} </el-button>
|
|
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="refreshList()" icon="el-icon-search">查询</el-button>
|
|
|
|
+ <el-button @click="resetSearch()" icon="el-icon-refresh-right">重置</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <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>
|
|
|
|
+ <span v-if="haveComplete" style="color: red">已存在离职申请,无法多次提交</span>
|
|
</template>
|
|
</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('status_info', scope.row.handoverType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.handoverType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="电脑款项状态" fixed="right" align="center" field="computerType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="computerHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.computerType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.computerType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="应收账款状态" fixed="right" align="center" field="accountsType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="accountsHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.accountsType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.accountsType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="社保账款状态" fixed="right" align="center" field="securityType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="securityHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.securityType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.securityType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="备用金状态" fixed="right" align="center" field="imprestType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="imprestHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.imprestType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.imprestType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="底稿归档状态" fixed="right" align="center" field="draftType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="draftHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.draftType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.draftType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- <vxe-column min-width="100" title="门卡回收状态" fixed="right" align="center" field="recoveryType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button @click="recoveryHandoverDetail(scope.row)"
|
|
|
|
- :type="$dictUtils.getDictLabel('status_info', scope.row.recoveryType, '')" effect="dark" >
|
|
|
|
- {{$dictUtils.getDictLabel("status", scope.row.recoveryType, '未开始')}} </el-button>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
|
|
+ </vxe-toolbar>
|
|
|
|
+ <div style="height: calc(100% - 90px)">
|
|
|
|
+ <vxe-table border="inner" auto-resize resizable height="auto" :loading="loading" ref="clientTable"
|
|
|
|
+ show-header-overflow show-overflow highlight-hover-row :print-config="{}" :export-config="{
|
|
|
|
+ remote: true,
|
|
|
|
+ filename: `入职登记信息${moment(new Date()).format('YYYY-MM-DD')}`,
|
|
|
|
+ sheetName: '入职登记信息',
|
|
|
|
+ exportMethod: exportMethod,
|
|
|
|
+ types: ['xlsx'],
|
|
|
|
+ modes: ['current', 'selected', 'all']
|
|
|
|
+ }" :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="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('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('status_info', scope.row.handoverType, '')"
|
|
|
|
+ effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.handoverType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="电脑款项状态" fixed="right" align="center" field="computerType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="computerHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.computerType, '')"
|
|
|
|
+ effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.computerType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="应收账款状态" fixed="right" align="center" field="accountsType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="accountsHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.accountsType, '')"
|
|
|
|
+ effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.accountsType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="社保账款状态" fixed="right" align="center" field="securityType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="securityHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.securityType, '')"
|
|
|
|
+ effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.securityType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="备用金状态" fixed="right" align="center" field="imprestType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="imprestHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.imprestType, '')" effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.imprestType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="底稿归档状态" fixed="right" align="center" field="draftType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="draftHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.draftType, '')" effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.draftType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ <vxe-column min-width="100" title="门卡回收状态" fixed="right" align="center" field="recoveryType">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <el-button @click="recoveryHandoverDetail(scope.row)"
|
|
|
|
+ :type="$dictUtils.getDictLabel('status_info', scope.row.recoveryType, '')"
|
|
|
|
+ effect="dark">
|
|
|
|
+ {{ $dictUtils.getDictLabel("status", scope.row.recoveryType, '未开始') }} </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
|
|
- <vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <div v-if="isAdmin">
|
|
|
|
- <el-button v-if="
|
|
|
|
- scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary" @click="edit(scope.row.id)">修改</el-button>
|
|
|
|
- <el-button v-if="
|
|
|
|
- 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="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' || scope.row.type === '3' || scope.row.type === undefined || scope.row.type === '0')" 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) && 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>
|
|
|
|
|
|
+ <vxe-column title="操作" width="200px" fixed="right" align="center">
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <div v-if="isAdmin">
|
|
|
|
+ <el-button v-if="
|
|
|
|
+ scope.row.type === '5' || scope.row.type === '4' || scope.row.type === '3'" text type="primary"
|
|
|
|
+ @click="edit(scope.row.id)">修改</el-button>
|
|
|
|
+ <el-button v-if="
|
|
|
|
+ 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="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' || scope.row.type === '3' || scope.row.type === undefined || scope.row.type === '0')"
|
|
|
|
+ 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) && 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>
|
|
|
|
|
|
|
|
|
|
- <el-button v-if="scope.row.recoveryType === '5' && (scope.row.createById === $store.state.user.id)" text type="primary" @click="toHref(scope.row)">离职证明下载</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ v-if="scope.row.recoveryType === '5' && (scope.row.createById === $store.state.user.id)"
|
|
|
|
+ text type="primary" @click="toHref(scope.row)">离职证明下载</el-button>
|
|
|
|
|
|
- </div>
|
|
|
|
- </template>
|
|
|
|
- </vxe-column>
|
|
|
|
- </vxe-table>
|
|
|
|
- <vxe-pager
|
|
|
|
- background
|
|
|
|
- :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>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- <DepartRegistrationEditForm ref="departRegistrationEditForm" @refreshList="refreshList"></DepartRegistrationEditForm>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ <vxe-pager background :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>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ <DepartRegistrationEditForm ref="departRegistrationEditForm" @refreshList="refreshList">
|
|
|
|
+ </DepartRegistrationEditForm>
|
|
|
|
+ </div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
|
|
|
|
- import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
|
|
- import handoverService from '@/api/human/depart/HandoverService'
|
|
|
|
- import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
|
|
|
|
- import processService from '@/api/flowable/ProcessService'
|
|
|
|
- import userService from '@/api/sys/UserService'
|
|
|
|
- import taskService from '@/api/flowable/TaskService'
|
|
|
|
- import DepartRegistrationEditForm from "./DepartRegistrationEditForm";
|
|
|
|
- import OSSSerivce, {
|
|
|
|
- toHrefByUrlAndName
|
|
|
|
- } from '@/api/sys/OSSService'
|
|
|
|
- import pick from "lodash.pick";
|
|
|
|
- export default {
|
|
|
|
- data () {
|
|
|
|
- return {
|
|
|
|
- haveComplete: false,
|
|
|
|
- num: 0,
|
|
|
|
- searchForm: {
|
|
|
|
- name: '',
|
|
|
|
- department: '',
|
|
|
|
- mobile: '',
|
|
|
|
- },
|
|
|
|
- dataList: [],
|
|
|
|
- tablePage: {
|
|
|
|
- total: 0,
|
|
|
|
- currentPage: 1,
|
|
|
|
- pageSize: 10,
|
|
|
|
- orders: []
|
|
|
|
- },
|
|
|
|
- tableKey: '',
|
|
|
|
- loading: false,
|
|
|
|
- processDefinitionAuditId: '',
|
|
|
|
- procDefAuditKey: '',
|
|
|
|
- handoverDefId: '',
|
|
|
|
- handoverDefAuditKey: '',
|
|
|
|
- isAdmin: false,
|
|
|
|
- create: ''
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- created () {
|
|
|
|
|
|
+import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'
|
|
|
|
+import SelectTree from '@/components/treeSelect/treeSelect.vue'
|
|
|
|
+import handoverService from '@/api/human/depart/HandoverService'
|
|
|
|
+import departRegistrationService from '@/api/human/depart/DepartRegistrationService'
|
|
|
|
+import processService from '@/api/flowable/ProcessService'
|
|
|
|
+import userService from '@/api/sys/UserService'
|
|
|
|
+import taskService from '@/api/flowable/TaskService'
|
|
|
|
+import DepartRegistrationEditForm from "./DepartRegistrationEditForm";
|
|
|
|
+import OSSSerivce, {
|
|
|
|
+ toHrefByUrlAndName
|
|
|
|
+} from '@/api/sys/OSSService'
|
|
|
|
+import pick from "lodash.pick";
|
|
|
|
+export default {
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ haveComplete: false,
|
|
|
|
+ num: 0,
|
|
|
|
+ searchForm: {
|
|
|
|
+ name: '',
|
|
|
|
+ department: '',
|
|
|
|
+ mobile: '',
|
|
|
|
+ },
|
|
|
|
+ dataList: [],
|
|
|
|
+ tablePage: {
|
|
|
|
+ total: 0,
|
|
|
|
+ currentPage: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ orders: []
|
|
|
|
+ },
|
|
|
|
+ tableKey: '',
|
|
|
|
+ loading: false,
|
|
|
|
+ processDefinitionAuditId: '',
|
|
|
|
+ procDefAuditKey: '',
|
|
|
|
+ handoverDefId: '',
|
|
|
|
+ handoverDefAuditKey: '',
|
|
|
|
+ isAdmin: false,
|
|
|
|
+ create: ''
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
this.ossService = new OSSSerivce()
|
|
this.ossService = new OSSSerivce()
|
|
- },
|
|
|
|
- components: {
|
|
|
|
|
|
+ },
|
|
|
|
+ components: {
|
|
SelectTree,
|
|
SelectTree,
|
|
DepartRegistrationEditForm
|
|
DepartRegistrationEditForm
|
|
- },
|
|
|
|
- computed: {
|
|
|
|
- userName () {
|
|
|
|
- return this.$store.state.user.name
|
|
|
|
- },
|
|
|
|
- user () {
|
|
|
|
- this.createName = this.$store.state.user.name
|
|
|
|
- return this.$store.state.user
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- mounted () {
|
|
|
|
|
|
+ },
|
|
|
|
+ computed: {
|
|
|
|
+ userName() {
|
|
|
|
+ return this.$store.state.user.name
|
|
|
|
+ },
|
|
|
|
+ user() {
|
|
|
|
+ this.createName = this.$store.state.user.name
|
|
|
|
+ return this.$store.state.user
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
//将表格和工具栏进行关联
|
|
//将表格和工具栏进行关联
|
|
const $table = this.$refs.clientTable;
|
|
const $table = this.$refs.clientTable;
|
|
const $toolbar = this.$refs.toolbarRef;
|
|
const $toolbar = this.$refs.toolbarRef;
|
|
$table.connect($toolbar);
|
|
$table.connect($toolbar);
|
|
})
|
|
})
|
|
- this.refreshList()
|
|
|
|
- },
|
|
|
|
- activated () {
|
|
|
|
- this.refreshList()
|
|
|
|
- },
|
|
|
|
- methods: {
|
|
|
|
|
|
+ this.refreshList()
|
|
|
|
+ },
|
|
|
|
+ activated() {
|
|
|
|
+ this.refreshList()
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
// 查看
|
|
// 查看
|
|
- view (id) {
|
|
|
|
|
|
+ view(id) {
|
|
this.$refs.departRegistrationEditForm.init('view', id)
|
|
this.$refs.departRegistrationEditForm.init('view', id)
|
|
},
|
|
},
|
|
- // 新增
|
|
|
|
- add () {
|
|
|
|
- },
|
|
|
|
- toHref (row) {
|
|
|
|
- toHrefByUrlAndName(row.dimissionProveUrl,row.name+"离职证明")
|
|
|
|
- },
|
|
|
|
- // 修改
|
|
|
|
- edit (id) {
|
|
|
|
- id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
|
|
|
|
- return item.id
|
|
|
|
- })[0]
|
|
|
|
- this.$refs.departRegistrationEditForm.init('edit', id)
|
|
|
|
- },
|
|
|
|
- // 查询当前用户是否是管理员用户
|
|
|
|
- checkIsAdmin () {
|
|
|
|
- userService.is().then((data) => {
|
|
|
|
- this.isAdmin = data
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 获取数据列表
|
|
|
|
- refreshList () {
|
|
|
|
- this.loading = true
|
|
|
|
- departRegistrationService.list({
|
|
|
|
- '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()
|
|
|
|
- processService.getByName('离职申请').then((data) => {
|
|
|
|
- if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
- this.processDefinitionAuditId = data.id
|
|
|
|
- this.procDefAuditKey = data.key
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- processService.getByName('离职交接申请').then((data) => {
|
|
|
|
- if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
- this.handoverDefId = data.id
|
|
|
|
- this.handoverDefAuditKey = data.key
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- departRegistrationService.selectComplete().then((data) => {
|
|
|
|
|
|
+ // 新增
|
|
|
|
+ add() {
|
|
|
|
+ },
|
|
|
|
+ toHref(row) {
|
|
|
|
+ toHrefByUrlAndName(row.dimissionProveUrl, row.name + "离职证明")
|
|
|
|
+ },
|
|
|
|
+ // 修改
|
|
|
|
+ edit(id) {
|
|
|
|
+ id = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
|
|
|
|
+ return item.id
|
|
|
|
+ })[0]
|
|
|
|
+ this.$refs.departRegistrationEditForm.init('edit', id)
|
|
|
|
+ },
|
|
|
|
+ // 查询当前用户是否是管理员用户
|
|
|
|
+ checkIsAdmin() {
|
|
|
|
+ userService.is().then((data) => {
|
|
|
|
+ this.isAdmin = data
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 获取数据列表
|
|
|
|
+ refreshList() {
|
|
|
|
+ this.loading = true
|
|
|
|
+ departRegistrationService.list({
|
|
|
|
+ '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()
|
|
|
|
+ processService.getByName('离职申请').then((data) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.processDefinitionAuditId = data.id
|
|
|
|
+ this.procDefAuditKey = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ processService.getByName('离职交接申请').then((data) => {
|
|
|
|
+ if (!this.commonJS.isEmpty(data.id)) {
|
|
|
|
+ this.handoverDefId = data.id
|
|
|
|
+ this.handoverDefAuditKey = data.key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ departRegistrationService.selectComplete().then((data) => {
|
|
this.haveComplete = data
|
|
this.haveComplete = data
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 当前页
|
|
|
|
- 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()
|
|
|
|
- },
|
|
|
|
- start () {
|
|
|
|
- //发起流程前判断是否已经完善了个人信息 及 入住登记表中是否有当然登录人的信息
|
|
|
|
- var userId = this.$store.state.user.id
|
|
|
|
- enrollmentRegistrationService.findByUserId(userId).then((data) => {
|
|
|
|
- if (data == 0) {
|
|
|
|
- this.$message.error('请先完善个人信息再发起离职申请!')
|
|
|
|
- throw new Error('请先完善个人信息再发起离职申请!')
|
|
|
|
- } else {
|
|
|
|
- // 读取流程表单
|
|
|
|
- let tabTitle = `发起流程【离职申请】`
|
|
|
|
- let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职申请]`
|
|
|
|
- taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
|
|
|
|
- status: 'startAndHold'}).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: 'startAndHold',
|
|
|
|
- title: tabTitle,
|
|
|
|
- formType: data.formType,
|
|
|
|
- formUrl: data.formUrl,
|
|
|
|
- formTitle: processTitle,
|
|
|
|
- businessId: 'false',
|
|
|
|
- isShow: false,
|
|
|
|
- routePath: '/human/depart/registration/DepartRegistrationList'
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- editForm (row) {
|
|
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ // 当前页
|
|
|
|
+ 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()
|
|
|
|
+ },
|
|
|
|
+ start() {
|
|
|
|
+ //发起流程前判断是否已经完善了个人信息 及 入住登记表中是否有当然登录人的信息
|
|
|
|
+ var userId = this.$store.state.user.id
|
|
|
|
+ enrollmentRegistrationService.findByUserId(userId).then((data) => {
|
|
|
|
+ if (data == 0) {
|
|
|
|
+ this.$message.error('请先完善个人信息再发起离职申请!')
|
|
|
|
+ throw new Error('请先完善个人信息再发起离职申请!')
|
|
|
|
+ } else {
|
|
|
|
+ // 读取流程表单
|
|
|
|
+ let tabTitle = `发起流程【离职申请】`
|
|
|
|
+ let processTitle = `${this.userName} 在 ${this.moment(new Date()).format('YYYY-MM-DD HH:mm')} 发起了 [离职申请]`
|
|
|
|
+ taskService.getTaskDef({
|
|
|
|
+ procDefId: this.processDefinitionAuditId,
|
|
|
|
+ status: 'startAndHold'
|
|
|
|
+ }).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: 'startAndHold',
|
|
|
|
+ title: tabTitle,
|
|
|
|
+ formType: data.formType,
|
|
|
|
+ formUrl: data.formUrl,
|
|
|
|
+ formTitle: processTitle,
|
|
|
|
+ businessId: 'false',
|
|
|
|
+ isShow: false,
|
|
|
|
+ routePath: '/human/depart/registration/DepartRegistrationList'
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ editForm(row) {
|
|
// 暂存修改
|
|
// 暂存修改
|
|
let status = ''
|
|
let status = ''
|
|
if (row.type === '1') {
|
|
if (row.type === '1') {
|
|
@@ -358,7 +364,8 @@
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【离职申请】`
|
|
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')} 发起了 [离职申请]`
|
|
- taskService.getTaskDef({ procDefId: this.processDefinitionAuditId,
|
|
|
|
|
|
+ taskService.getTaskDef({
|
|
|
|
+ procDefId: this.processDefinitionAuditId,
|
|
businessId: row.id,
|
|
businessId: row.id,
|
|
businessTable: 'human_resources_depart_registration',
|
|
businessTable: 'human_resources_depart_registration',
|
|
status: status
|
|
status: status
|
|
@@ -383,7 +390,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 查看离职申请流程结果
|
|
// 查看离职申请流程结果
|
|
- detail (row) {
|
|
|
|
|
|
+ detail(row) {
|
|
if (row.type !== '0' && row.type !== '1') {
|
|
if (row.type !== '0' && row.type !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -406,7 +413,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看离职交接流程结果
|
|
// 查看离职交接流程结果
|
|
- handoverDetail (row) {
|
|
|
|
|
|
+ handoverDetail(row) {
|
|
if (row.handoverType !== '0' && row.handoverType !== '1') {
|
|
if (row.handoverType !== '0' && row.handoverType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -429,7 +436,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看备用金流程结果
|
|
// 查看备用金流程结果
|
|
- imprestHandoverDetail (row) {
|
|
|
|
|
|
+ imprestHandoverDetail(row) {
|
|
if (row.imprestType !== '0' && row.imprestType !== '1') {
|
|
if (row.imprestType !== '0' && row.imprestType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -452,7 +459,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看底稿归档流程结果
|
|
// 查看底稿归档流程结果
|
|
- draftHandoverDetail (row) {
|
|
|
|
|
|
+ draftHandoverDetail(row) {
|
|
if (row.draftType !== '0' && row.draftType !== '1') {
|
|
if (row.draftType !== '0' && row.draftType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -475,7 +482,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看门卡回收流程结果
|
|
// 查看门卡回收流程结果
|
|
- recoveryHandoverDetail (row) {
|
|
|
|
|
|
+ recoveryHandoverDetail(row) {
|
|
if (row.recoveryType !== '0' && row.recoveryType !== '1') {
|
|
if (row.recoveryType !== '0' && row.recoveryType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -498,7 +505,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看电脑款项流程结果
|
|
// 查看电脑款项流程结果
|
|
- computerHandoverDetail (row) {
|
|
|
|
|
|
+ computerHandoverDetail(row) {
|
|
if (row.computerType !== '0' && row.computerType !== '1') {
|
|
if (row.computerType !== '0' && row.computerType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -521,7 +528,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看应收账款流程结果
|
|
// 查看应收账款流程结果
|
|
- accountsHandoverDetail (row) {
|
|
|
|
|
|
+ accountsHandoverDetail(row) {
|
|
if (row.accountsType !== '0' && row.accountsType !== '1') {
|
|
if (row.accountsType !== '0' && row.accountsType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -544,7 +551,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 查看社保账款流程结果
|
|
// 查看社保账款流程结果
|
|
- securityHandoverDetail (row) {
|
|
|
|
|
|
+ securityHandoverDetail(row) {
|
|
if (row.securityType !== '0' && row.securityType !== '1') {
|
|
if (row.securityType !== '0' && row.securityType !== '1') {
|
|
// eslint-disable-next-line eqeqeq
|
|
// eslint-disable-next-line eqeqeq
|
|
taskService.getTaskDef({
|
|
taskService.getTaskDef({
|
|
@@ -566,33 +573,33 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 自定义服务端导出
|
|
|
|
- exportMethod ({ options }) {
|
|
|
|
- // 传给服务端的参数
|
|
|
|
- const params = {
|
|
|
|
- 'current': this.tablePage.currentPage,
|
|
|
|
- 'size': this.tablePage.pageSize,
|
|
|
|
- 'orders': this.tablePage.orders,
|
|
|
|
- ...this.searchForm,
|
|
|
|
- filename: options.filename,
|
|
|
|
- sheetName: options.sheetName,
|
|
|
|
- isHeader: options.isHeader,
|
|
|
|
- original: options.original,
|
|
|
|
- mode: options.mode,
|
|
|
|
- selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
|
|
|
|
- exportFields: options.columns.map(column => column.property)
|
|
|
|
- }
|
|
|
|
- return departRegistrationService.exportExcel(params).then((res) => {
|
|
|
|
- // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
|
- this.$utils.downloadExcel(res, options.filename)
|
|
|
|
- }).catch(function (err) {
|
|
|
|
- if (err.response) {
|
|
|
|
- // console.log(err.response)
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
|
|
+ // 自定义服务端导出
|
|
|
|
+ exportMethod({ options }) {
|
|
|
|
+ // 传给服务端的参数
|
|
|
|
+ const params = {
|
|
|
|
+ 'current': this.tablePage.currentPage,
|
|
|
|
+ 'size': this.tablePage.pageSize,
|
|
|
|
+ 'orders': this.tablePage.orders,
|
|
|
|
+ ...this.searchForm,
|
|
|
|
+ filename: options.filename,
|
|
|
|
+ sheetName: options.sheetName,
|
|
|
|
+ isHeader: options.isHeader,
|
|
|
|
+ original: options.original,
|
|
|
|
+ mode: options.mode,
|
|
|
|
+ selectIds: options.mode === 'selected' ? options.map(item => item.id) : [],
|
|
|
|
+ exportFields: options.columns.map(column => column.property)
|
|
|
|
+ }
|
|
|
|
+ return departRegistrationService.exportExcel(params).then((res) => {
|
|
|
|
+ // 将二进制流文件写入excel表,以下为重要步骤
|
|
|
|
+ this.$utils.downloadExcel(res, options.filename)
|
|
|
|
+ }).catch(function (err) {
|
|
|
|
+ if (err.response) {
|
|
|
|
+ // console.log(err.response)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 删除
|
|
// 删除
|
|
- del (id) {
|
|
|
|
|
|
+ del(id) {
|
|
let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
|
|
let ids = id || this.$refs.clientTable.getCheckboxRecords().map(item => {
|
|
return item.id
|
|
return item.id
|
|
}).join(',')
|
|
}).join(',')
|
|
@@ -610,14 +617,14 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 撤回
|
|
// 撤回
|
|
- reback (row) {
|
|
|
|
|
|
+ reback(row) {
|
|
this.$confirm(`确定撤回流程吗?`, '提示', {
|
|
this.$confirm(`确定撤回流程吗?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
}).then(() => {
|
|
}).then(() => {
|
|
processService.revokeProcIns(row.procInsId).then((data) => {
|
|
processService.revokeProcIns(row.procInsId).then((data) => {
|
|
- let param = {type: '3', id: row.id}
|
|
|
|
|
|
+ let param = { type: '3', id: row.id }
|
|
departRegistrationService.updateStatusById(param)
|
|
departRegistrationService.updateStatusById(param)
|
|
this.$message.success('回退成功')
|
|
this.$message.success('回退成功')
|
|
this.refreshList()
|
|
this.refreshList()
|
|
@@ -625,7 +632,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 审核
|
|
// 审核
|
|
- examine (row) {
|
|
|
|
|
|
+ examine(row) {
|
|
departRegistrationService.findById(row.id).then((data) => {
|
|
departRegistrationService.findById(row.id).then((data) => {
|
|
if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
if (data.type !== '2') { // status的值不等于“审核中”,就弹出提示
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
@@ -636,7 +643,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 审核或重新调整跳转
|
|
// 审核或重新调整跳转
|
|
- todo (row) {
|
|
|
|
|
|
+ todo(row) {
|
|
let cUser = false
|
|
let cUser = false
|
|
taskService.getTaskDefInfo({
|
|
taskService.getTaskDefInfo({
|
|
taskId: row.taskId
|
|
taskId: row.taskId
|
|
@@ -656,7 +663,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 驳回后调整
|
|
// 驳回后调整
|
|
- adjust (row) {
|
|
|
|
|
|
+ adjust(row) {
|
|
departRegistrationService.findById(row.id).then((data) => {
|
|
departRegistrationService.findById(row.id).then((data) => {
|
|
console.log('data', data)
|
|
console.log('data', data)
|
|
if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
@@ -668,7 +675,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 查询当前登录人是否是数据的审核人
|
|
// 查询当前登录人是否是数据的审核人
|
|
- checkIsAudit (row) {
|
|
|
|
|
|
+ checkIsAudit(row) {
|
|
let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
let loginUserId = this.$store.state.user.id // 获取当前登录用户id
|
|
if (this.commonJS.isNotEmpty(row.auditUserIds)) {
|
|
if (this.commonJS.isNotEmpty(row.auditUserIds)) {
|
|
for (const userId of row.auditUserIds) {
|
|
for (const userId of row.auditUserIds) {
|
|
@@ -679,7 +686,7 @@
|
|
}
|
|
}
|
|
return false
|
|
return false
|
|
},
|
|
},
|
|
- handover (row) {
|
|
|
|
|
|
+ handover(row) {
|
|
// 读取流程表单
|
|
// 读取流程表单
|
|
let tabTitle = `发起流程【离职交接】`
|
|
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')} 发起了 [离职交接]`
|
|
@@ -689,8 +696,13 @@
|
|
} else {
|
|
} else {
|
|
businessId = row.id
|
|
businessId = row.id
|
|
}
|
|
}
|
|
- taskService.getTaskDef({ procDefId: this.handoverDefId,
|
|
|
|
- status: 'startAndHold'}).then((data) => {
|
|
|
|
|
|
+ console.log(businessId);
|
|
|
|
+
|
|
|
|
+ taskService.getTaskDef({
|
|
|
|
+ procDefId: this.handoverDefId,
|
|
|
|
+ status: 'startAndHold'
|
|
|
|
+ }).then((data) => {
|
|
|
|
+ console.log(data);
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: '/flowable/task/TaskForm',
|
|
path: '/flowable/task/TaskForm',
|
|
query: {
|
|
query: {
|
|
@@ -710,7 +722,7 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 撤回离职交接
|
|
// 撤回离职交接
|
|
- rebackHandover (row) {
|
|
|
|
|
|
+ rebackHandover(row) {
|
|
this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
this.$confirm(`确定要撤回该申请吗?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
cancelButtonText: '取消',
|
|
@@ -722,7 +734,7 @@
|
|
this.refreshList()
|
|
this.refreshList()
|
|
} else {
|
|
} else {
|
|
processService.revokeProcIns(row.handoverProcInsId).then((data) => {
|
|
processService.revokeProcIns(row.handoverProcInsId).then((data) => {
|
|
- let form = {type: '3', id: row.handoverId}
|
|
|
|
|
|
+ let form = { type: '3', id: row.handoverId }
|
|
handoverService.updateStatusById(form)
|
|
handoverService.updateStatusById(form)
|
|
this.$message.success(data)
|
|
this.$message.success(data)
|
|
this.refreshList()
|
|
this.refreshList()
|
|
@@ -731,7 +743,7 @@
|
|
})
|
|
})
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- adjustHandover (row) {
|
|
|
|
|
|
+ adjustHandover(row) {
|
|
handoverService.findById(row.handoverId).then((data) => {
|
|
handoverService.findById(row.handoverId).then((data) => {
|
|
if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
if (data.type !== '4') { // status的值不等于“驳回”,就弹出提示
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
this.$message.error('数据已发生改变或不存在,请刷新数据')
|
|
@@ -742,6 +754,6 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
+}
|
|
</script>
|
|
</script>
|