提交 cfb81c35 编写于 作者: doc_wei's avatar doc_wei

离职申请第一版完成

上级 80e4d446
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool', 'laydate'], function(exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
laydate = layui.laydate,
textool = layui.textool,
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
// 离职类型
$("#leaveType").html(getDataUseHandlebars(selOption, {rows: bossUtil.getLeaveTypeList()}));
// 离职日期
laydate.render({elem: '#leaveTime', type: 'date'});
textool.init({
eleId: 'remark',
maxlength: 200,
tools: ['count', 'copy', 'reset']
});
// 获取当前登录员工信息
systemCommonUtil.getSysCurrentLoginUserMation(function (data) {
$("#applyUser").html(data.bean.jobNumber + '_' + data.bean.userName);
});
skyeyeEnclosure.init('enclosureUpload');
matchingLanguage();
form.render();
// 保存为草稿
form.on('submit(formAddBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData("1", "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(sysActivitiModel["bossInterviewQuit"]["key"], function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
function saveData(subType, approvalId){
var params = {
leaveTime: $("#leaveTime").val(),
leaveType: $("#leaveType").val(),
remark: $("#remark").val(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "insertBossInterviewQuit", params: params, type: 'json', method: "POST", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
$("body").on("click", "#cancle", function() {
parent.layer.close(index);
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui'], function (exports) {
winui.renderColor();
layui.use(['form'], function (form) {
var $ = layui.$;
showGrid({
id: "showForm",
url: flowableBasePath + "queryBossInterviewQuitDetailsById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#beanTemplate").html(),
ajaxSendLoadBefore: function(hdb, json){
json.bean.remark = stringManipulation.textAreaShow(json.bean.remark);
json.bean.leaveTypeName = bossUtil.getLeaveTypeNameById(json.bean.leaveType);
},
ajaxSendAfter: function(json){
// 附件回显
skyeyeEnclosure.showDetails({'enclosureUpload': json.bean.enclosureInfo});
matchingLanguage();
}
});
$("body").on("click", ".enclosureItem", function(){
download(fileBasePath + $(this).attr("rowpath"), $(this).html());
});
});
});
\ No newline at end of file
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'jquery', 'winui', 'form', 'textool', 'laydate'], function (exports) {
winui.renderColor();
var index = parent.layer.getFrameIndex(window.name);
var $ = layui.$,
laydate = layui.laydate,
textool = layui.textool,
form = layui.form;
var selOption = getFileContent('tpl/template/select-option.tpl');
showGrid({
id: "showForm",
url: flowableBasePath + "queryBossInterviewQuitToEditById",
params: {id: parent.rowId},
pagination: false,
method: "GET",
template: $("#beanTemplate").html(),
ajaxSendAfter: function(json){
// 离职类型
$("#leaveType").html(getDataUseHandlebars(selOption, {rows: bossUtil.getLeaveTypeList()}));
$("#leaveType").val(json.bean.leaveType);
// 离职日期
laydate.render({elem: '#leaveTime', type: 'date'});
textool.init({
eleId: 'remark',
maxlength: 200,
tools: ['count', 'copy', 'reset']
});
// 附件回显
skyeyeEnclosure.initTypeISData({'enclosureUpload': json.bean.enclosureInfo});
if(json.bean.state == '1'){
$(".typeTwo").removeClass("layui-hide");
}else{
$(".typeOne").removeClass("layui-hide");
}
matchingLanguage();
form.render();
}
});
// 保存为草稿
form.on('submit(formEditBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('1', "");
}
return false;
});
// 提交审批
form.on('submit(formSubBean)', function(data) {
if(winui.verifyForm(data.elem)) {
activitiUtil.startProcess(sysActivitiModel["bossInterviewQuit"]["key"], function (approvalId) {
saveData("2", approvalId);
});
}
return false;
});
// 工作流中保存
form.on('submit(subBean)', function(data) {
if(winui.verifyForm(data.elem)) {
saveData('3', "");
}
return false;
});
function saveData(subType, approvalId){
var params = {
leaveTime: $("#leaveTime").val(),
leaveType: $("#leaveType").val(),
remark: $("#remark").val(),
enclosureInfo: skyeyeEnclosure.getEnclosureIdsByBoxId('enclosureUpload'),
subType: subType, // 表单类型 1.保存草稿 2.提交审批
approvalId: approvalId,
id: parent.rowId
};
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewQuit", params: params, type: 'json', method: "PUT", callback: function(json) {
if(json.returnCode == 0) {
parent.layer.close(index);
parent.refreshCode = '0';
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
}
$("body").on("click", "#cancle", function(){
parent.layer.close(index);
});
});
\ No newline at end of file
var rowId = "";
// 离职申请申请
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
laydate = layui.laydate,
table = layui.table;
// 新增
authBtn('1650894715778');
laydate.render({
elem: '#createTime',
range: '~'
});
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: flowableBasePath + 'queryBossInterviewQuitList',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'createName', title: '申请人', width: 120},
{ field: 'leaveType', title: '离职类型', width: 100, templet: function(d){
return bossUtil.getLeaveTypeNameById(d.leaveType);
}},
{ field: 'leaveTime', title: '离职日期', width: 100},
{ field: 'processInstanceId', title: '流程ID', width: 100, templet: function(d){
return '<a lay-event="processDetails" class="notice-title-click">' + d.processInstanceId + '</a>';
}},
{ field: 'stateName', title: '状态', width: 90, templet: function(d){
return activitiUtil.showStateName2(d.state, 1);
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'}
]],
done: function(){
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'details') { // 详情
details(data);
}else if (layEvent === 'edit') { // 编辑
edit(data);
}else if (layEvent === 'subApproval') { // 提交审批
subApproval(data);
}else if(layEvent === 'cancellation') { // 作废
cancellation(data);
}else if(layEvent === 'processDetails') { // 流程详情
activitiUtil.activitiDetails(data);
}else if(layEvent === 'revoke') { // 撤销申请
revoke(data);
}
});
// 添加
$("body").on("click", "#addBean", function(){
_openNewWindows({
url: "../../tpl/bossInterviewQuit/bossInterviewQuitAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "bossInterviewQuitAdd",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}});
});
// 撤销
function revoke(data){
layer.confirm('确认撤销该申请吗?', { icon: 3, title: '撤销操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "revokeBossInterviewQuit", params: {processInstanceId: data.processInstanceId}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
// 编辑申请
function edit(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewQuit/bossInterviewQuitEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "bossInterviewQuitEdit",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
if (refreshCode == '0') {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1,time: 2000});
loadTable();
} else if (refreshCode == '-9999') {
winui.window.msg(systemLanguage["com.skyeye.operationFailed"][languageType], {icon: 2,time: 2000});
}
}
});
}
// 提交审批
function subApproval(data){
layer.confirm(systemLanguage["com.skyeye.approvalOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.approvalOperation"][languageType]}, function (index) {
layer.close(index);
activitiUtil.startProcess(sysActivitiModel["bossInterviewQuit"]["key"], function (approvalId) {
var params = {
id: data.id,
approvalId: approvalId
};
AjaxPostUtil.request({url: flowableBasePath + "editBossInterviewQuitToSubApproval", params: params, type: 'json', method: "POST", callback: function(json){
if(json.returnCode == 0){
winui.window.msg("提交成功", {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
});
}
// 作废
function cancellation(data){
layer.confirm('确认作废该申请吗?', { icon: 3, title: '作废操作' }, function (index) {
layer.close(index);
AjaxPostUtil.request({url: flowableBasePath + "updateBossInterviewQuitToCancellation", params: {id: data.id}, type: 'json', method: "PUT", callback: function(json){
if(json.returnCode == 0){
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}else{
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}});
});
}
// 详情
function details(data){
rowId = data.id;
_openNewWindows({
url: "../../tpl/bossInterviewQuit/bossInterviewQuitDetails.html",
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
pageId: "bossInterviewQuitDetails",
area: ['90vw', '90vh'],
callBack: function(refreshCode){
}
});
}
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
table.reload("messageTable", {page: {curr: 1}, where: getTableParams()});
}
return false;
});
// 刷新
$("body").on("click", "#reloadTable", function(){
loadTable();
});
function loadTable(){
table.reload("messageTable", {where: getTableParams()});
}
function getTableParams(){
var startTime = "", endTime = "";
if(!isNull($("#createTime").val())){
startTime = $("#createTime").val().split('~')[0].trim() + ' 00:00:00';
endTime = $("#createTime").val().split('~')[1].trim() + ' 23:59:59';
}
return {
state: $("#state").val(),
startTime: startTime,
endTime: endTime
};
}
exports('bossInterviewQuitList', {});
});
......@@ -33,7 +33,7 @@ layui.config({
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'createName', title: '申请人', width: 140},
{ field: 'createName', title: '申请人', width: 120},
{ field: 'departmentName', title: '转正部门', width: 140},
{ field: 'jobName', title: '转正岗位', width: 150 },
{ field: 'regularTime', title: '转正日期', align: 'center', width: 100 },
......@@ -43,7 +43,10 @@ layui.config({
{ field: 'stateName', title: '状态', width: 90, templet: function(d) {
return activitiUtil.showStateName2(d.state, 1);
}},
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], width: 150},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 257, toolbar: '#messageTableBar'}
]],
done: function(){
......
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">申请人<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="applyUser">
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职日期<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="leaveTime" name="leaveTime" win-verify="required" placeholder="请输入离职日期" class="layui-input"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="leaveType" name="leaveType" lay-search="" win-verify="required" lay-filter="leaveType">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">离职原因<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="remark" name="remark" win-verify="required" placeholder="请输入离职原因" class="layui-textarea" style="height: 100px;"></textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn" lay-submit lay-filter="formAddBean">保存为草稿</button>
<button class="winui-btn" lay-submit lay-filter="formSubBean">提交审批</button>
</div>
</div>
</form>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossInterviewQuit/'}).use('bossInterviewQuitAdd');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<!-- beanTemplate -->
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">申请人</label>
<div class="layui-input-block ver-center">
{{userName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职日期</label>
<div class="layui-input-block ver-center">
{{leaveTime}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职类型</label>
<div class="layui-input-block ver-center">
{{leaveTypeName}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">离职原因</label>
<div class="layui-input-block ver-center">
{{{remark}}}
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件</label>
<div class="layui-input-block ver-center" id="enclosureUpload">
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossInterviewQuit/'}).use('bossInterviewQuitDetails');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto;padding:20px;">
<form class="layui-form" action="" id="showForm">
</form>
</div>
<!-- beanTemplate -->
<script type="text/x-handlebars-template" id="beanTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基本信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">申请人<i class="red">*</i></label>
<div class="layui-input-block ver-center" id="applyUser">
{{userName}}
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职日期<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="leaveTime" name="leaveTime" win-verify="required" placeholder="请输入离职日期" class="layui-input" value="{{leaveTime}}"/>
</div>
</div>
<div class="layui-form-item layui-col-xs6">
<label class="layui-form-label">离职类型<i class="red">*</i></label>
<div class="layui-input-block">
<select id="leaveType" name="leaveType" lay-search="" win-verify="required" lay-filter="leaveType">
</select>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">离职原因<i class="red">*</i></label>
<div class="layui-input-block">
<textarea id="remark" name="remark" win-verify="required" placeholder="请输入离职原因" class="layui-textarea" style="height: 100px;">{{remark}}</textarea>
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">附件</label>
<div class="layui-input-block" id="enclosureUpload">
</div>
</div>
<div class="layui-form-item layui-col-xs12">
<div class="layui-input-block">
<button class="winui-btn" id="cancle"><language showName="com.skyeye.cancel"></language></button>
<button class="winui-btn typeOne layui-hide" lay-submit lay-filter="formEditBean">保存为草稿</button>
<button class="winui-btn typeOne layui-hide" lay-submit lay-filter="formSubBean">提交审批</button>
<button class="winui-btn typeTwo layui-hide" lay-submit lay-filter="subBean"><language showName="com.skyeye.save"></language></button>
</div>
</div>
{{/bean}}
</script>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossInterviewQuit/'}).use('bossInterviewQuitEdit');
</script>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link href="../../assets/lib/layui/css/layui.css" rel="stylesheet" />
<link href="../../assets/lib/winui/css/winui.css" rel="stylesheet" />
</head>
<body>
<div style="margin:0 auto; height: 100%;">
<div class="txtcenter" style="margin:0 auto; padding-top: 10px;">
<form class="layui-form layui-form-pane" action="" autocomplete="off">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select id="state">
<option value="">全部</option>
<option value="0">草稿</option>
<option value="1">审核中</option>
<option value="2">审核通过</option>
<option value="3">审核不通过</option>
<option value="4">作废</option>
<option value="5">撤销</option>
</select>
</div>
<label class="layui-form-label">申请时间</label>
<div class="layui-input-inline">
<input type="text" id="createTime" name="createTime" placeholder="请选择申请时间" class="layui-input" />
</div>
<button type="reset" class="layui-btn layui-btn-primary list-form-search"><language showName="com.skyeye.reset"></language></button>
<button class="layui-btn list-form-search" lay-submit lay-filter="formSearch"><language showName="com.skyeye.search2"></language></button>
</div>
</div>
</form>
</div>
<div class="winui-toolbar">
<div class="winui-tool" style="text-align: left;">
<button id="reloadTable" class="winui-toolbtn"><i class="fa fa-refresh" aria-hidden="true"></i><language showName="com.skyeye.refreshDataBtn"></language></button>
<button id="addBean" class="winui-toolbtn" auth="1650894715778"><i class="fa fa-plus" aria-hidden="true"></i>录入申请</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="messageTableBar">
{{# if(d.editRow == '1'){ }}
{{# if(auth('1650894727526')){ }}
<a class="layui-btn layui-btn-xs" lay-event="subApproval">提交审批</a>
{{# } }}
{{# if(auth('1650894737984')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="cancellation">作废</a>
{{# } }}
{{# } }}
{{# if(d.editRow == '1' || d.editRow == '2'){ }}
{{# if(auth('1650894756557')){ }}
<a class="layui-btn layui-btn-xs" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# } }}
{{# if(d.editRow == '2'){ }}
{{# if(auth('1650894765559')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="revoke">撤销</a>
{{# } }}
{{# } }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="details">详情</a>
</script>
</div>
</div>
<script src="../../assets/lib/layui/layui.js"></script>
<script src="../../assets/lib/layui/custom.js"></script>
<script type="text/javascript">
layui.config({base: '../../js/bossInterviewQuit/'}).use('bossInterviewQuitList');
</script>
</body>
</html>
\ No newline at end of file
......@@ -14,8 +14,6 @@ layui.config({
var jsCreateClick = false;//是否检索生成
var editId = "";//当前编辑的模板id
var list = [];//存储模板生成集合
//集合内容
//{
......@@ -116,7 +114,6 @@ layui.config({
if(isNull(s)){
winui.window.msg('请先转换模板', {icon: 2,time: 2000});
}else{
editId = row.id;
var mode = returnModel(row.modelType);
if (!isNull(mode.length)) {
textEditor.setOption('mode', mode);
......@@ -153,13 +150,7 @@ layui.config({
// txtcenter DIV内的输入框内容变化事件
$("body").on("keyup", ".txtcenter input", function(e){
for(var i = 0; i < list.length; i++) {
list[i].content = codeDocUtil.replaceModelContent(list[i].modelContent);
list[i].fileName = $("#tableZhName").val() + list[i].modelName;
if(list[i].modelId == editId){
textEditor.setValue(list[i].content);
}
}
transformResult();
});
// 检索数据
......@@ -170,7 +161,6 @@ layui.config({
AjaxPostUtil.request({url: reqBasePath + "codemodel012", params: {tableName: $("#tableName").val()}, type: 'json', callback: function(json){
if(json.returnCode == 0) {
jsCreateClick = true;
editId = "";
textEditor.setValue('');
$("#tableZhName").val(json.bean.tableName);
$("#tableFirstISlowerName").val(json.bean.tableFirstISlowerName);
......@@ -180,16 +170,7 @@ layui.config({
$("#DaoPackageName").val(json.bean.DaoPackageName);
$("#tableISlowerName").val(json.bean.tableISlowerName);
$("#tableBzName").val(json.bean.tableBzName);
// 遍历模板赋值文件名
$('#modelList').find('li').each(function() {
var label = $(this).find("label");
var modelType = label.attr('modeltype');
if(modelType == 'Java' || modelType == 'xml') {
label.html(json.bean.tableName + label.attr("thiscontent"));
}else{
label.html(json.bean.tableFirstISlowerName + label.attr("thiscontent"));
}
});
transformResult();
winui.window.msg('检索成功', {icon: 1,time: 2000});
}else{
......@@ -212,6 +193,7 @@ layui.config({
}else{
fileName = $("#tableFirstISlowerName").val() + row.modelName;
}
$("#modelList").find("li").find("label[relation='" + row.id + "']").html(fileName);
var s = {
modelId: row.id,
content: content,
......
......@@ -8,7 +8,7 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form'], function (exports) {
winui.renderColor();
//模板分组ID
// 模板分组ID
groupId = parent.rowId;
var $ = layui.$,
form = layui.form,
......@@ -22,8 +22,8 @@ layui.config({
where:{groupId:groupId},
even:true,
page: true,
limits: [8, 16, 24, 32, 40, 48, 56],
limit: 8,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers'},
{ field: 'tableName', title: '表名', width: 180 },
......
......@@ -130,4 +130,24 @@ var bossUtil = {
}});
},
// 离职类型状态
leaveTypeList: {
"automaticResignation": {"id": 1, "name": "自动离职"},
"retire": {"id": 2, "name": "退休"},
"diseaseWords": {"id": 3, "name": "病辞"},
"dismiss": {"id": 4, "name": "辞退"},
"resignation": {"id": 5, "name": "辞职"}
},
getLeaveTypeList: function () {
var list = [];
$.each(bossUtil.leaveTypeList, function (key, value) {
list.push(value);
});
return list;
},
getLeaveTypeNameById: function (id){
var list = bossUtil.getLeaveTypeList();
return getInPoingArr(list, "id", id, "name");
}
};
\ No newline at end of file
......@@ -35,5 +35,6 @@
"incomeOrder": {"name": "财务明细账", "key": "../../tpl/income/incomeAdd.html", "complate": true},
"bossPersonRequire": {"name": "人员需求申请", "key": "../../tpl/bossPersonRequire/bossPersonRequireAdd.html", "complate": true},
"bossInterviewRegularWorker": {"name": "转正申请", "key": "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html", "complate": true}
"bossInterviewRegularWorker": {"name": "转正申请", "key": "../../tpl/bossInterviewRegularWorker/bossInterviewRegularWorkerAdd.html", "complate": true},
"bossInterviewQuit": {"name": "离职申请", "key": "../../tpl/bossInterviewQuit/bossInterviewQuitAdd.html", "complate": true}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册