黄海 1 year ago
commit 7cc2e76664

@ -122,7 +122,7 @@
time: 1300
}, function () {
parent.layer.close(parent.layer.getFrameIndex(window.name));
// parent.layui.table.reload("data-table");
parent.layui.table.reload("data-table");
});
} else {
layer.msg(result.message, {

@ -0,0 +1,193 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="../../../component/pear/css/pear.css" />
<style>
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
}
.woo-theme-color {
color: #1e9fff !important;
}
.woo-theme-color-none {
color: #cccccc !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
}
.layui-card-body .layui-form {
margin-top: 0 !important;
}
</style>
</head>
<body class="pear-container layui-form">
<div class="layui-card" style="margin-bottom: 10px !important;">
<div class="layui-card-body">
<div class="layui-form-item" style="margin: 10px 0 5px 0 !important;">
<div class="layui-form-item layui-inline">
<label class="layui-form-label" style="width: 65px;">人员姓名</label>
<div class="layui-input-inline">
<input type="text" id="personName" lay-affix="clear" lay-filter="clear" placeholder="请输入人员姓名"
class="layui-input">
</div>
</div>
<div class="layui-form-item layui-inline">
<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="user-query">
<i class="layui-icon layui-icon-search"></i>
查询
</button>
</div>
</div>
</div>
</div>
<div class="layui-card">
<div class="layui-card-body">
<table id="data-table"></table>
</div>
</div>
<script type="text/html" id="table-bar">
{{# if(d.status_id == 1){ }}
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="cancel"><a
class="woo-theme-color">取消</a></span>
{{# } else { }}
<span class="woo-tool-span woo-tool-text-span" style="cursor:default"><a
class="woo-theme-color-none">取消</a></span>
{{# } }}
</script>
<script src="../../../component/layui/layui.js"></script>
<script src="../../../component/pear/pear.js"></script>
<script src="../../../component/pear/base64.js"></script>
<script>
layui.use(['table', 'form', 'jquery'], function () {
var table = layui.table;
var form = layui.form;
var $ = layui.jquery;
tableRender();
function tableRender() {
table.render({
elem: '#data-table',
url: '/QingLong/teacherYd/getTeacherTransferApplyList',
where: {
person_name: $("#personName").val()
},
height: 'full-135',
page: {
limit: 15
, layout: ['count', 'prev', 'page', 'next', 'skip']
, prev: "上一页"
, next: "下一页"
},
cols: [[
{ title: '序号', align: 'center', width: "5%", type: 'numbers' },
{ title: '姓名', field: 'person_name', align: 'center', width: "15%" },
{ title: '转入学校', field: 'source_bureau_name', align: 'center', width: "20%" },
{ title: '调转说明', field: 'apply_message', align: 'center' },
{ title: '状态', field: 'apply_status_name', align: 'center', width: "5%" },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "10%" }
]],
skin: 'line',
defaultToolbar: [{
title: '刷新',
layEvent: 'refresh',
icon: 'layui-icon-refresh',
}, 'filter', 'print', 'exports']
});
}
table.on('tool(data-table)', function (obj) {
if (obj.event === 'cancel') {
window.cancel(obj);
}
});
window.cancel = function (obj) {
layer.confirm('确定要取消吗?', {
icon: 3,
title: '提示'
}, function (index) {
$.ajax({
url: "/QingLong/teacherYd/deleteTransferInfoById",
data: {
"id": obj.data.id
},
type: 'post',
success: function (result) {
if (result.success) {
layer.msg("已取消!", {
icon: 1,
time: 1300
}, function () {
table.reload("data-table");
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
}
}
});
});
}
form.on('submit(user-query)', function () {
tableRender();
// 阻止表单的默认提交行为
return false;
});
window.refresh = function (param) {
table.reload('data-table');
}
//获取随机数
window.randomFrom = function (lowerValue, upperValue) {
return Math.floor(Math.random() * (upperValue - lowerValue + 1) + lowerValue);
}
//点击任何地方关闭下拉树
$("body").on("click", function (event) {
$("div[dtree-id][dtree-select]").removeClass("layui-form-selected");
$("div[dtree-id][dtree-card]").removeClass("dtree-select-show layui-anim layui-anim-upbit");
});
});
</script>
</body>
</html>

@ -18,6 +18,10 @@
color: #1e9fff !important;
}
.woo-theme-color-none {
color: #cccccc !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
@ -60,12 +64,21 @@
</div>
<script type="text/html" id="table-bar">
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="pass"><a
class="woo-theme-color">通过</a></span>
<i class="woo-tool-text-delimiter"></i>
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="nopass"><a
class="woo-theme-color">拒绝</a></span>
{{# if(d.status_id == 1){ }}
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="pass"><a
class="woo-theme-color">通过</a></span>
<i class="woo-tool-text-delimiter"></i>
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="nopass"><a
class="woo-theme-color">拒绝</a></span>
{{# } else { }}
<span class="woo-tool-span woo-tool-text-span" style="cursor:default"><a
class="woo-theme-color-none">通过</a></span>
<i class="woo-tool-text-delimiter"></i>
<span class="woo-tool-span woo-tool-text-span" style="cursor:default"><a
class="woo-theme-color-none">拒绝</a></span>
{{# } }}
</script>
@ -100,7 +113,7 @@
{ title: '姓名', field: 'person_name', align: 'center', width: "15%" },
{ title: '转出学校', field: 'source_bureau_name', align: 'center', width: "20%" },
{ title: '调转说明', field: 'apply_message', align: 'center' },
{ title: '状态', field: 'status_name', align: 'center', width: "5%" },
{ title: '状态', field: 'apply_status_name', align: 'center', width: "5%" },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: "10%" }
]],
skin: 'line',
@ -135,29 +148,35 @@
}
window.nopass = function (obj) {
$.ajax({
url: "/QingLong/teacherYd/checkTeacherTransfer",
data: {
"id": obj.data.id,
"status_id": 3
},
type: 'post',
success: function (result) {
if (result.success) {
layer.msg("已拒绝!", {
icon: 1,
time: 1300
}, function () {
table.reload("data-table");
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
layer.confirm('确定要拒绝吗?', {
icon: 3,
title: '提示'
}, function (index) {
$.ajax({
url: "/QingLong/teacherYd/checkTeacherTransfer",
data: {
"id": obj.data.id,
"status_id": 3,
"echo_message": "拒绝"
},
type: 'post',
success: function (result) {
if (result.success) {
layer.msg("已拒绝!", {
icon: 1,
time: 1300
}, function () {
table.reload("data-table");
});
} else {
layer.msg(result.message, {
icon: 2,
time: 2000
});
}
}
}
});
});
}

Loading…
Cancel
Save