|
@@ -0,0 +1,384 @@
|
|
|
+<template>
|
|
|
+ <a-card :bordered="false">
|
|
|
+
|
|
|
+ <!-- 查询区域 -->
|
|
|
+ <div class="table-page-search-wrapper" >
|
|
|
+ <a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
|
+ <a-row :gutter="24" v-if="isShow==1||isShow=='1'">
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24" >
|
|
|
+ <a-form-item label="姓名">
|
|
|
+ <a-input placeholder="请输入姓名" v-model="queryParam.userName"></a-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="部门名称">
|
|
|
+ <j-tree-select style="width: 200px" v-model="queryParam.deptId" dict="sys_depart,depart_name,id"
|
|
|
+ pid-field="parent_id" placeholder="请选择部门">
|
|
|
+ </j-tree-select>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <j-dict-select-tag v-model="queryParam.state" placeholder="请选择类型"
|
|
|
+ dictCode="state" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <a-row :gutter="24" v-if="isShow==2||isShow=='2'">
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24" >
|
|
|
+ <a-form-item label="姓名">
|
|
|
+ <j-input placeholder="请输入姓名" v-model="queryParam2.realname"></j-input>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="类型">
|
|
|
+ <j-dict-select-tag v-model="queryParam2.type" placeholder="请选择类型"
|
|
|
+ dictCode="change_type" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <a-form-item label="状态">
|
|
|
+ <j-dict-select-tag v-model="queryParam2.state" placeholder="请选择类型"
|
|
|
+ dictCode="state" />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
|
+ <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
|
|
+ <a-button type="primary" @click="searchQuerys()" icon="search">查询</a-button>
|
|
|
+ </span>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+
|
|
|
+
|
|
|
+ <a-tabs default-active-key="1" @change="callback">
|
|
|
+ <a-tab-pane key="1" tab="离职">
|
|
|
+ <!-- table区域-begin -->
|
|
|
+ <div>
|
|
|
+
|
|
|
+
|
|
|
+ <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns" :dataSource="dataSource"
|
|
|
+ :pagination="ipagination" :loading="loading" class="j-table-force-nowrap"
|
|
|
+ @change="handleTableChange">
|
|
|
+
|
|
|
+ <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
|
|
|
+ <a @click="handleEdits(record,1)">同意</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a @click="handleEdits(record,2)">拒绝</a>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span slot="types" slot-scope="text, record" >
|
|
|
+ <a-tag color="blue" v-if="text=='未审核'" >{{text}}</a-tag>
|
|
|
+ <a-tag color="#87d068" v-if="text=='同意'" >{{text}}</a-tag>
|
|
|
+ <a-tag color="#cd201f" v-if="text=='拒绝'" >{{text}}</a-tag>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+ <!-- table区域-end -->
|
|
|
+</a-tab-pane>
|
|
|
+<a-tab-pane key="2" tab="人事变动">
|
|
|
+ <div>
|
|
|
+
|
|
|
+ <a-table ref="table" size="middle" bordered rowKey="id" :columns="columns2" :dataSource="dataSources"
|
|
|
+ :pagination="ipaginations" :loading="loadings" class="j-table-force-nowrap"
|
|
|
+ @change="handleTableChanges">
|
|
|
+
|
|
|
+ <span slot="action" slot-scope="text, record" v-if="record.state==0||record.state=='0'">
|
|
|
+ <a @click="changeEdit(record,1)">同意</a>
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a @click="changeEdit(record,2)">拒绝</a>
|
|
|
+ </span>
|
|
|
+
|
|
|
+ <span slot="changeType" slot-scope="text, record" >
|
|
|
+ <a-tag color="blue" v-if="text=='未审核'" >{{text}}</a-tag>
|
|
|
+ <a-tag color="#87d068" v-if="text=='同意'" >{{text}}</a-tag>
|
|
|
+ <a-tag color="#cd201f" v-if="text=='拒绝'" >{{text}}</a-tag>
|
|
|
+ </span>
|
|
|
+ </a-table>
|
|
|
+ </div>
|
|
|
+</a-tab-pane>
|
|
|
+</a-tabs>
|
|
|
+ <!-- 表单区域 -->
|
|
|
+ <userContract-modal ref="modalForm" @ok="modalFormOk"></userContract-modal>
|
|
|
+ </a-card>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import '@/assets/less/TableExpand.less'
|
|
|
+ import { httpAction,getAction } from '@/api/manage'
|
|
|
+ import UserContractModal from './modules/UserContractModal'
|
|
|
+ import moment from "moment"
|
|
|
+ import pick from 'lodash.pick'
|
|
|
+ import JInput from '@/components/jeecg/JInput'
|
|
|
+ import {
|
|
|
+ JeecgListMixin
|
|
|
+ } from '@/mixins/JeecgListMixin'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: "UserContractList",
|
|
|
+ mixins: [JeecgListMixin],
|
|
|
+ components: {
|
|
|
+ UserContractModal,
|
|
|
+ JInput
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ description: '人事变动',
|
|
|
+ dataSources:[],
|
|
|
+ isShow:1,
|
|
|
+ loadings:false,
|
|
|
+ queryParam:{
|
|
|
+ state:"0"
|
|
|
+ },
|
|
|
+ queryParam2:{
|
|
|
+ state:"0",
|
|
|
+ type:"工资调整"
|
|
|
+ },
|
|
|
+ // 表头
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ title: '姓名',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'userName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '部门',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'dept'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '职位',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'post'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '预计离职日期',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'endDate',
|
|
|
+ customRender: function(t, r, index) {
|
|
|
+ return moment(t).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '实际离职日期',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'newDate',
|
|
|
+ customRender: function(t, r, index) {
|
|
|
+ return moment(t).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'remarks',
|
|
|
+ ellipsis: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '提交时间',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'applyTime',
|
|
|
+ customRender: function(t, r, index) {
|
|
|
+ return moment(t).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '状态',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'state_dictText',
|
|
|
+ ellipsis: true,
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'types'
|
|
|
+ },
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align: "center",
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ],columns2: [
|
|
|
+ {
|
|
|
+ title: '姓名',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'realname'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '类型',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'type',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '原部门',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'deptName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '新部门',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'newDeptName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '原职位',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'startPost'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '新职位',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'endPost'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '原薪资',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'startWages'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '调整后薪资',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'endWages'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '生效日期',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'time',
|
|
|
+ customRender: function(t, r, index) {
|
|
|
+ return moment(t).format('YYYY-MM-DD');
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '备注',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'demo',
|
|
|
+ ellipsis: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '状态',
|
|
|
+ align: "center",
|
|
|
+ dataIndex: 'state_dictText',
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'changeType'
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作员',
|
|
|
+ dataIndex: 'conmitId_dictText',
|
|
|
+ align: "center",
|
|
|
+
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ align: "center",
|
|
|
+ scopedSlots: {
|
|
|
+ customRender: 'action'
|
|
|
+ },
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ ipaginations:{
|
|
|
+ current: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ pageSizeOptions: ['10', '20', '30'],
|
|
|
+ showTotal: (total, range) => {
|
|
|
+ return range[0] + "-" + range[1] + " 共" + total + "条"
|
|
|
+ },
|
|
|
+ showQuickJumper: true,
|
|
|
+ showSizeChanger: true,
|
|
|
+ total: 0
|
|
|
+ },
|
|
|
+ url: {
|
|
|
+ list: "/userquit/userQuit/list",
|
|
|
+ list2: "/userchange/userChage/list",
|
|
|
+ delete: "/usercontract/userContract/delete",
|
|
|
+ deleteBatch: "/usercontract/userContract/deleteBatch",
|
|
|
+ exportXlsUrl: "usercontract/userContract/exportXls",
|
|
|
+ importExcelUrl: "usercontract/userContract/importExcel",
|
|
|
+ update:"/userquit/userQuit/edit",
|
|
|
+ updateChage:"/userchange/userChage/edit"
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ importExcelUrl: function() {
|
|
|
+ return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ handleEdits(e,a){
|
|
|
+ let formData = Object.assign({},e);
|
|
|
+ formData.state=a;
|
|
|
+ httpAction(this.url.update,formData,"put").then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ this.$message.success(res.message);
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.$options.methods.searchQuery.call(this)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ callback(key) {
|
|
|
+ this.isShow=key;
|
|
|
+ if(key==1||key=='1'){
|
|
|
+ this.$options.methods.searchQuery.call(this)
|
|
|
+ }else if(key==2||key=='2'){
|
|
|
+ this.querys()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ querys(){
|
|
|
+ this.loadings=true;
|
|
|
+ let param = Object.assign({},this.queryParam2);
|
|
|
+ param.pageNo = this.ipaginations.current;
|
|
|
+ param.pageSize = this.ipaginations.pageSize;
|
|
|
+ getAction(this.url.list2,param).then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ this.dataSources = res.result.records||res.result;
|
|
|
+ if(res.result.total)
|
|
|
+ {
|
|
|
+ this.ipaginations.total = res.result.total;
|
|
|
+ }else{
|
|
|
+ this.ipaginations.total = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loadings=false;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ searchQuerys(){
|
|
|
+ this.querys();
|
|
|
+ },
|
|
|
+ changeEdit(e,a){
|
|
|
+ this.loadings=true;
|
|
|
+ let formData = Object.assign({},e);
|
|
|
+ formData.state=a;
|
|
|
+ httpAction(this.url.updateChage,formData,"put").then((res)=>{
|
|
|
+ if(res.success){
|
|
|
+ this.$message.success(res.message);
|
|
|
+ }else{
|
|
|
+ this.$message.warning(res.message);
|
|
|
+ }
|
|
|
+ }).finally(() => {
|
|
|
+ this.loadings=false;
|
|
|
+ this.querys();
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleTableChanges(pagination, filters, sorter) {
|
|
|
+ //分页、排序、筛选变化时触发
|
|
|
+ //TODO 筛选
|
|
|
+ this.ipagination = pagination;
|
|
|
+ this.querys();
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style scoped>
|
|
|
+ @import '~@assets/less/common.less';
|
|
|
+</style>
|