parent
c48faf7c4f
commit
07e8e34c12
@ -0,0 +1,79 @@
|
||||
package com.ruoyi.web.controller.system.leave;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.system.domain.apply.TdApplyInfoList;
|
||||
import com.ruoyi.system.domain.apply.dto.TdApplyInfoListDTO;
|
||||
import com.ruoyi.web.controller.manager.ApplyInfoListManager;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* ClassName: ApplyInfoListController
|
||||
* Package: com.ruoyi.web.controller.system.apply
|
||||
* Description:人员离职离岗
|
||||
*
|
||||
* @Author wangxy
|
||||
* @Create 2025/5/14 11:32
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Controller
|
||||
@RequestMapping("/system/leaveList")
|
||||
public class LeaveApplyController extends BaseController {
|
||||
|
||||
|
||||
private String prefix = "system/newdev/leave";
|
||||
|
||||
|
||||
@Resource
|
||||
private ApplyInfoListManager applyInfoListManager;
|
||||
|
||||
@RequiresPermissions("system:leave:view")
|
||||
@GetMapping()
|
||||
public String leaveListInfo() {
|
||||
return prefix + "/leaveList";
|
||||
}
|
||||
/**
|
||||
* 人员离职列表
|
||||
*/
|
||||
@RequiresPermissions("system:leave:list")
|
||||
@PostMapping("/list")
|
||||
@ResponseBody
|
||||
public TableDataInfo list(TdApplyInfoListDTO applyInfoListDTO) {
|
||||
startPage();
|
||||
List<TdApplyInfoList> tdApplyInfoLists = applyInfoListManager.selectPersonLeaveList(applyInfoListDTO);
|
||||
return getDataTable(tdApplyInfoLists);
|
||||
}
|
||||
|
||||
/**
|
||||
* 人员离职
|
||||
*/
|
||||
@RequiresPermissions("system:leave:leaveFile")
|
||||
@GetMapping("/leaveFile/{applyId}")
|
||||
public String leaveFile(@PathVariable("applyId") String applyId, ModelMap mmap) {
|
||||
TdApplyInfoListDTO applyInfoList = applyInfoListManager.getTdApplyInfoList(applyId);
|
||||
mmap.put("applyInfoList", applyInfoList);
|
||||
return prefix + "/leaveFile";
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 离职离岗提交
|
||||
*/
|
||||
@PostMapping("/submitLeave")
|
||||
@ResponseBody
|
||||
public AjaxResult submitLeave(@RequestParam String applyId) {
|
||||
return toAjax(applyInfoListManager.submitLeave(applyId));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,115 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
|
||||
<head>
|
||||
<th:block th:include="include :: header('离职离岗列表')" />
|
||||
</head>
|
||||
<body class="gray-bg">
|
||||
<div class="container-div" id="app">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 search-collapse">
|
||||
<form id="formId">
|
||||
<div class="select-list">
|
||||
<ul>
|
||||
<li>
|
||||
<label style="width: 80px">姓名:</label>
|
||||
<input type="text" name="name"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>性别:</label>
|
||||
<input type="text" name="sex"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>身份证号:</label>
|
||||
<input type="text" name="cerno"/>
|
||||
</li>
|
||||
<li>
|
||||
<label>联系方式:</label>
|
||||
<input type="text" name="phone"/>
|
||||
</li>
|
||||
<li>
|
||||
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a>
|
||||
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i> 重置</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="btn-group-sm" id="toolbar" role="group">
|
||||
</div>
|
||||
<div class="col-sm-12 select-table table-striped">
|
||||
<table id="bootstrap-table"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<th:block th:include="include :: footer" />
|
||||
<script th:inline="javascript">
|
||||
var detailFlag = [[${@permission.hasPermi('system:leave:leaveFile')}]]
|
||||
var applyState = [[${@dict.getType('sys_user_apply_status')}]];
|
||||
var prefix = ctx + "system/leaveList";
|
||||
$(function() {
|
||||
var options = {
|
||||
url: prefix + "/list",
|
||||
detailUrl:prefix + "/leaveFile/{id}",
|
||||
modalName: "离职离岗",
|
||||
type: 0,
|
||||
columns: [
|
||||
{
|
||||
field: 'applyId',
|
||||
title: 'id',
|
||||
visible: false
|
||||
},
|
||||
|
||||
{
|
||||
field: 'name',
|
||||
title: '姓名'
|
||||
},
|
||||
{
|
||||
field: 'sex',
|
||||
title: '性别'
|
||||
},
|
||||
{
|
||||
field: 'nationality',
|
||||
title: '民族',
|
||||
},
|
||||
{
|
||||
field: 'maritalStatus',
|
||||
title: '婚姻状况',
|
||||
},
|
||||
{
|
||||
field: 'cerno',
|
||||
title: '身份证号',
|
||||
},
|
||||
{
|
||||
field: 'phone',
|
||||
title: '联系方式',
|
||||
},
|
||||
{
|
||||
field: 'smPost',
|
||||
title: '已(拟)任涉密岗位',
|
||||
},
|
||||
{
|
||||
field: 'smGrade',
|
||||
title: '涉密等级',
|
||||
},
|
||||
{
|
||||
field: 'createTime',
|
||||
title: '创建时间',
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
formatter: function(value, row, index) {
|
||||
var actions = [];
|
||||
actions.push('<a class="btn btn-info btn-xs ' + detailFlag + '" href="javascript:void(0)" onclick="$.operate.detailTab(\'' + row.applyId + '\')"><i class="fa fa-edit"></i>材料提交</a> ');
|
||||
return actions.join('');
|
||||
}
|
||||
}]
|
||||
};
|
||||
$.table.init(options);
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in new issue