涉密人员离职,审核。打印

master
dsh 12 months ago
parent 967c27ba6e
commit f5c122bf27

@ -157,7 +157,7 @@ public class TdLeaveController extends BaseController
public String examine(@PathVariable("id") Long id,ModelMap mmap){ public String examine(@PathVariable("id") Long id,ModelMap mmap){
TdLeave leaveuser = tdLeaveService.selectTdLeaveById(id); TdLeave leaveuser = tdLeaveService.selectTdLeaveById(id);
mmap.put("leaveuser", leaveuser); mmap.put("leaveuser", leaveuser);
mmap.put("sysuser",getSysUser().getLoginName()); mmap.put("sysuser",getSysUser());
return prefix + "/leaveexamine"; return prefix + "/leaveexamine";
} }

@ -67,7 +67,7 @@
var downloadFlag = [[${@permission.hasPermi('system:leave:examine')}]]; var downloadFlag = [[${@permission.hasPermi('system:leave:examine')}]];
var examinestateDatas = [[${@dict.getType('sys_examine_state')}]]; var examinestateDatas = [[${@dict.getType('sys_examine_state')}]];
var leavestateData = [[${@dict.getType('sys_user_leave')}]]; var leavestateData = [[${@dict.getType('sys_user_leave')}]];
var workstateData = [[${@dict.getType('sys_examine_state')}]]; var workstateData = [[${@dict.getType('sys_user_work')}]];
var prefix = ctx + "system/leave"; var prefix = ctx + "system/leave";
$(function() { $(function() {
@ -92,7 +92,7 @@
visible: false visible: false
}, },
{ {
field: 'usernName', field: 'userName',
title: '提交人' title: '提交人'
}, },
{ {
@ -146,8 +146,8 @@
formatter: function(value, row, index) { formatter: function(value, row, index) {
var actions = []; var actions = [];
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="leaveAuditing(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> '); actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="leaveAuditing(\'' + row.id + '\')"><i class="fa fa-edit"></i>审核</a> ');
actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="auditingPrint(\'' + row.id + '\')"><i class="fa fa-download"></i>打印</a> '); actions.push('<a class="btn btn-success btn-xs ' + downloadFlag + '" href="javascript:void(0)" onclick="auditingPrint(\'' + row.id + '/' + row.userId + '\')"><i class="fa fa-download"></i>打印</a> ');
actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>'); actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-remove"></i>删除</a>');
return actions.join(''); return actions.join('');
} }
@ -159,7 +159,7 @@
var url ='/system/leave/examine/' + id; var url ='/system/leave/examine/' + id;
$.modal.open("涉密人员离职审核", url); $.modal.open("涉密人员离职审核", url);
} }
function auditingPrint(id){ function auditingPrint(id,userId){
var url ='/system/leave/print/' + id; var url ='/system/leave/print/' + id;
$.modal.openTab("打印", url); $.modal.openTab("打印", url);
} }

@ -7,14 +7,16 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<div id="examineusername" style="display: none;">[[${sysuser.userName}]]</div>
<form class="form-horizontal m" id="form-leave-edit" th:object="${leaveuser}"> <form class="form-horizontal m" id="form-leave-edit" th:object="${leaveuser}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="userId" type="hidden" th:value="*{userId}" id="userId"/>
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">提交人:</label> <label class="col-sm-4 control-label">提交人:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input disabled name="username" th:field="*{username}" class="form-control" type="text"> <input disabled name="userName" th:field="*{userName}" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
@ -35,7 +37,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">脱密期:</label> <label class="col-sm-4 control-label">脱密期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="username" th:field="*{username}" class="form-control" type="text"> <input name="country" th:field="*{country}" class="form-control" type="text">
</div> </div>
</div> </div>
</div> </div>
@ -56,9 +58,9 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">领导意见:</label> <label class="col-sm-4 control-label">领导意见:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="workstate" class="form-control m-b" th:with="type=${@dict.getType('sys_user_opinions')}"> <select name="examinestate" class="form-control m-b" th:with="type=${@dict.getType('sys_examine_state')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{workstate}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{examinestate}"></option>
</select> </select>
</div> </div>
</div> </div>
@ -105,7 +107,12 @@
} }
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
$.operate.save(prefix + "/edit", $('#form-leave-edit').serialize()); var data = $("#form-leave-edit").serializeArray();
var examinedate = new Date().toLocaleDateString().replace(/\//g, '-');
var examinename = document.querySelector('#examineusername').innerHTML;
data.push({"name": "examinedate", "value": examinedate});
data.push({"name": "examinename", "value": examinename});
$.operate.save(prefix + "/examine", data);
} }
} }

@ -612,15 +612,15 @@
<td colspan=6 height=38 class=x26 width=666 style='height:28.5pt;'>人员离职登记表</td> <td colspan=6 height=38 class=x26 width=666 style='height:28.5pt;'>人员离职登记表</td>
</tr> </tr>
<tr height=37 style='mso-height-source:userset;height:28pt' id='r1'> <tr height=37 style='mso-height-source:userset;height:28pt' id='r1'>
<td colspan=6 height=36 class=x27 style='border-bottom:1px solid windowtext;height:27.25pt;' id="leavedate">[[${leaveuser.leavedate}]]</td> <td colspan=6 height=36 class=x27 style='border-bottom:1px solid windowtext;height:27.25pt;'>申请日期:</td>
</tr> </tr>
<tr height=37 style='mso-height-source:userset;height:28pt' id='r2'> <tr height=37 style='mso-height-source:userset;height:28pt' id='r2'>
<td height=35 class=x25 style='height:26.5pt;'>姓名</td> <td height=35 class=x25 style='height:26.5pt;'>姓名</td>
<td class=x25>[[${leaveuser.username}]]</td> <td class=x25>[[${leaveuser.userName}]]</td>
<td class=x25>单位</td> <td class=x25>单位</td>
<td class=x25>[[${leaveuser.depart}]]</td> <td class=x25>[[${leaveuser.depart}]]</td>
<td class=x25>入职日期</td> <td class=x25>入职日期</td>
<td class=x25 id="entryDate">[[${leaveuser.leavedate}]]</td> <td class=x25 id="entryDate">[[${user.startdate}]]</td>
</tr> </tr>
<tr height=75 style='mso-height-source:userset;height:56.5pt' id='r3'> <tr height=75 style='mso-height-source:userset;height:56.5pt' id='r3'>
<td height=73 class=x21 style='height:55pt;'>离职原因</td> <td height=73 class=x21 style='height:55pt;'>离职原因</td>
@ -668,17 +668,16 @@
var day = String(date.getDate()).padStart(2, '0'); // 日可能是个位数,需要补零 var day = String(date.getDate()).padStart(2, '0'); // 日可能是个位数,需要补零
return year + '-' + month + '-' + day return year + '-' + month + '-' + day
} }
document.querySelector('#leavedate').innerHTML ='申请日期:' + conversionDate(new Date(document.querySelector('#leavedate').innerHTML))
document.querySelector('#entryDate').innerHTML =conversionDate(new Date(document.querySelector('#entryDate').innerHTML)) document.querySelector('#entryDate').innerHTML =conversionDate(new Date(document.querySelector('#entryDate').innerHTML))
document.querySelector('.liquidate').innerHTML ='离职日期:' + conversionDate(new Date(document.querySelector('.liquidate').innerHTML)) document.querySelector('.liquidate').innerHTML ='离职日期:' + conversionDate(new Date(document.querySelector('.liquidate').innerHTML))
//领导意见 //领导意见
var examinestateDatas = [[${@dict.getType(' sys_user_opinions')}]]; var examinestateDatas = [[${@dict.getType('sys_examine_state')}]];
var examinestateToFind = document.querySelector('#examinestate').innerHTML; var examinestateToFind = document.querySelector('#examinestate').innerHTML;
const foundObject = examinestateDatas.find(obj => obj.dictValue === examinestateToFind); const foundObject = examinestateDatas.find(obj => obj.dictValue === examinestateToFind);
const result = foundObject ? foundObject.dictLabel : ""; const result = foundObject ? foundObject.dictLabel : "";
document.querySelector('#examinestate').innerHTML = result document.querySelector('#examinestate').innerHTML = result
//工作交接 //工作交接
var workstateData = [[${@dict.getType('sys_examine_state')}]]; var workstateData = [[${@dict.getType('sys_user_work')}]];
var workstateToFind = document.querySelector('#workstate').innerHTML; var workstateToFind = document.querySelector('#workstate').innerHTML;
var workstateObject = workstateData.find(obj => obj.dictValue === workstateToFind); var workstateObject = workstateData.find(obj => obj.dictValue === workstateToFind);
var workstateresult = workstateObject ? workstateObject.dictLabel : ""; var workstateresult = workstateObject ? workstateObject.dictLabel : "";

Loading…
Cancel
Save