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

delete: 删除薪资模板类型

上级 740526e2
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 index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
matchingLanguage();
form.render();
form.on('submit(formAddBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
nameCn: $("#nameCn").val(),
nameEn: $("#nameEn").val()
};
AjaxPostUtil.request({url: sysMainMation.wagesBasePath + "wagesmodeltype002", params: params, type: 'json', callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
$("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 index = parent.layer.getFrameIndex(window.name);
var $ = layui.$;
showGrid({
id: "showForm",
url: sysMainMation.wagesBasePath + "wagesmodeltype003",
params: {rowId: parent.rowId},
pagination: false,
method: "GET",
template: $("#showBaseTemplate").html(),
ajaxSendLoadBefore: function(hdb) {
},
ajaxSendAfter:function(j){
matchingLanguage();
form.render();
form.on('submit(formEditBean)', function (data) {
if (winui.verifyForm(data.elem)) {
var params = {
nameCn: $("#nameCn").val(),
nameEn: $("#nameEn").val(),
rowId: parent.rowId
};
AjaxPostUtil.request({url: sysMainMation.wagesBasePath + "wagesmodeltype004", params: params, type: 'json', method: "PUT", callback: function (json) {
parent.layer.close(index);
parent.refreshCode = '0';
}});
}
return false;
});
}
});
$("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'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table;
authBtn('1611152616583');
// 薪资模板类型列表
table.render({
id: 'messageTable',
elem: '#messageTable',
method: 'post',
url: sysMainMation.wagesBasePath + 'wagesmodeltype001',
where: getTableParams(),
even: true,
page: true,
limits: getLimits(),
limit: getLimit(),
cols: [[
{ title: systemLanguage["com.skyeye.serialNumber"][languageType], type: 'numbers' },
{ field: 'nameCn', title: '名称(中文)', align: 'left', width: 150 },
{ field: 'nameEn', title: '名称(英文)', align: 'left', width: 150 },
{ field: 'state', title: '状态', align: 'center', width: 60, templet: function (d) {
if(d.state == '2'){
return "<span class='state-down'>禁用</span>";
} else if (d.state == '1'){
return "<span class='state-up'>启用</span>";
}
}},
{ field: 'createName', title: systemLanguage["com.skyeye.createName"][languageType], align: 'left', width: 120 },
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 100 },
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
{ field: 'lastUpdateTime', title: '最后修改时间', align: 'center', width: 100},
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 200, toolbar: '#tableBar'}
]],
done: function(json) {
matchingLanguage();
}
});
table.on('tool(messageTable)', function (obj) {
var data = obj.data;
var layEvent = obj.event;
if (layEvent === 'edit') { //编辑
edit(data);
} else if (layEvent === 'delet') { //删除
delet(data);
} else if (layEvent === 'up') { //启用
up(data);
} else if (layEvent === 'down') { //禁用
down(data);
}
});
form.render();
form.on('submit(formSearch)', function (data) {
if (winui.verifyForm(data.elem)) {
refreshloadTable();
}
return false;
});
//添加
$("body").on("click", "#addBean", function() {
_openNewWindows({
url: "../../tpl/wagesModelType/wagesModelTypeAdd.html",
title: systemLanguage["com.skyeye.addPageTitle"][languageType],
pageId: "wagesModelTypeAdd",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
// 删除
function delet(data) {
layer.confirm(systemLanguage["com.skyeye.deleteOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.deleteOperation"][languageType]}, function (index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.wagesBasePath + "wagesmodeltype005", params: {rowId: data.id}, type: 'json', method: "DELETE", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.deleteOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 禁用
function down(data) {
layer.confirm(systemLanguage["com.skyeye.disableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.disableOperation"][languageType]}, function(index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.wagesBasePath + "wagesmodeltype007", params: {rowId: data.id}, type: 'json', method: "GET", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.disableOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 启用
function up(data) {
layer.confirm(systemLanguage["com.skyeye.enableOperationMsg"][languageType], {icon: 3, title: systemLanguage["com.skyeye.enableOperation"][languageType]}, function(index) {
layer.close(index);
AjaxPostUtil.request({url: sysMainMation.wagesBasePath + "wagesmodeltype006", params: {rowId: data.id}, type: 'json', method: "GET", callback: function (json) {
winui.window.msg(systemLanguage["com.skyeye.enableOperationSuccessMsg"][languageType], {icon: 1, time: 2000});
loadTable();
}});
});
}
// 编辑
function edit(data) {
rowId = data.id;
_openNewWindows({
url: "../../tpl/wagesModelType/wagesModelTypeEdit.html",
title: systemLanguage["com.skyeye.editPageTitle"][languageType],
pageId: "wagesModelTypeEdit",
area: ['90vw', '90vh'],
callBack: function (refreshCode) {
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
loadTable();
}
});
}
// 刷新数据
$("body").on("click", "#reloadTable", function() {
loadTable();
});
function loadTable() {
table.reloadData("messageTable", {where: getTableParams()});
}
function refreshloadTable() {
table.reloadData("messageTable", {page: {curr: 1}, where: getTableParams()});
}
function getTableParams() {
return {
name: $("#name").val(),
state: $("#state").val()
};
}
exports('wagesModelTypeList', {});
});
<!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" autocomplete="off">
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基础信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">中文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="nameCn" name="nameCn" win-verify="required" placeholder="请输入中文名称" class="layui-input" maxlength="200"/>
</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">
<input type="text" id="nameEn" name="nameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input" maxlength="200"/>
</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"><language showName="com.skyeye.save"></language></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/wagesModelType/'}).use('wagesModelTypeAdd');
</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" autocomplete="off">
</form>
</div>
<script type="text/x-handlebars-template" id="showBaseTemplate">
{{#bean}}
<div class="layui-form-item layui-col-xs12">
<span class="hr-title">基础信息</span><hr>
</div>
<div class="layui-form-item layui-col-xs12">
<label class="layui-form-label">中文名称<i class="red">*</i></label>
<div class="layui-input-block">
<input type="text" id="nameCn" name="nameCn" win-verify="required" placeholder="请输入中文名称" class="layui-input" maxlength="200" value="{{nameCn}}"/>
</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">
<input type="text" id="nameEn" name="nameEn" win-verify="required" placeholder="请输入英文名称" class="layui-input" maxlength="200" value="{{nameEn}}"/>
</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="formEditBean"><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/wagesModelType/'}).use('wagesModelTypeEdit');
</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 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">
<input type="text" id="name" name="name" placeholder="请输入名称" class="layui-input" />
</div>
<label class="layui-form-label">状态</label>
<div class="layui-input-inline">
<select lay-filter="state" lay-search="" id="state">
<option value="">全部</option>
<option value="0">禁用</option>
<option value="1">启用</option>
</select>
</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">
<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="1611152616583">
<i class="fa fa-plus" aria-hidden="true"></i>
<language showName="com.skyeye.addBtn"></language>
</button>
</div>
</div>
<div style="margin:auto 10px;">
<table id="messageTable" lay-filter="messageTable"></table>
<script type="text/html" id="tableBar">
{{# if(d.state == 1 && auth('1611152684162')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="down"><language showName="com.skyeye.disableBtn"></language></a>
{{# } else if (d.state == 2){ }}
{{# if(auth('1611152672176')){ }}
<a class="layui-btn layui-btn-xs" lay-event="up"><language showName="com.skyeye.enableBtn"></language></a>
{{# } }}
{{# } }}
{{# if(auth('1611152656914')){ }}
<a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="edit"><language showName="com.skyeye.editBtn"></language></a>
{{# } }}
{{# if(auth('1611152664820')){ }}
<a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="delet"><language showName="com.skyeye.deleteBtn"></language></a>
{{# } }}
</script>
</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/wagesModelType/'}).use('wagesModelTypeList');
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册