|
|
<!DOCTYPE html>
|
|
|
<html lang="en">
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>教师、学生调转申请列表</title>
|
|
|
<meta name="renderer" content="webkit">
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
<meta name="viewport"
|
|
|
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
|
|
<link rel="stylesheet" href="../../static/css/font.css">
|
|
|
<link rel="stylesheet" href="../../static/css/weadmin.css">
|
|
|
<link rel="stylesheet" href="../../lib/ztree/zTreeStyle.css">
|
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
|
<!--[if lt IE 9]>
|
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
|
<![endif]-->
|
|
|
<style>
|
|
|
.layui-btn-sm {
|
|
|
height: 26px;
|
|
|
line-height: 26px;
|
|
|
width: 80px;
|
|
|
text-align: center;
|
|
|
}
|
|
|
#searchTxt {
|
|
|
width: 180px;
|
|
|
border: 1px solid #dedede;
|
|
|
border-radius: 3px;
|
|
|
height: 36px;
|
|
|
margin-left: 20px;
|
|
|
padding-left: 13px;
|
|
|
}
|
|
|
#search {
|
|
|
border: none;
|
|
|
margin-left: 12px;
|
|
|
|
|
|
}
|
|
|
#iconDel {
|
|
|
position: absolute;
|
|
|
right:92px;
|
|
|
top:10px;
|
|
|
display: none;
|
|
|
}
|
|
|
.layui-table-view .layui-table td{
|
|
|
cursor: pointer!important;
|
|
|
}
|
|
|
.layui-btn-disabled {
|
|
|
pointer-events: none;
|
|
|
background-color: #FBFBFB;
|
|
|
border:1px solid #e6e6e6;
|
|
|
color:#C9C9C9;
|
|
|
cursor: not-allowed;
|
|
|
opacity: 1;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="weadmin-body">
|
|
|
<div class="layui-input-inline" style="float: right;margin:0 0 5px 0">
|
|
|
<input type="text" value="" id="searchTxt" placeholder="请输入教师姓名"><i class="layui-icon" id="iconDel">×</i>
|
|
|
<buttin class="layui-btn" id="search">搜索</buttin>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<table class="layui-table" lay-filter="demo" id="idTest"></table>
|
|
|
<!--<script type="text/html" id="barDemo">-->
|
|
|
<!--<a class="layui-btn layui-btn-xs hide" lay-event="echo">查看</a>-->
|
|
|
<!--<a class="layui-btn layui-btn-sm" lay-event="del">删除</a>-->
|
|
|
<!--</script>-->
|
|
|
|
|
|
<script type="text/html" id="barDemo">
|
|
|
{{#if(d.status_id=="1"){ }}
|
|
|
<a class="layui-btn layui-btn-sm" lay-event="del">删除</a>
|
|
|
{{#}else{ }}
|
|
|
<a class="layui-btn layui-btn-sm layui-btn-disabled" lay-event="del">删除</a>
|
|
|
{{#} }}
|
|
|
</script>
|
|
|
</div>
|
|
|
</div>
|
|
|
<input type="hidden" id="dep_id">
|
|
|
|
|
|
|
|
|
|
|
|
<script src="../../lib/layui/layui.js"></script>
|
|
|
<script>
|
|
|
|
|
|
layui.extend({
|
|
|
admin: '{/}../../static/js/admin'
|
|
|
});
|
|
|
layui.use(['jquery', 'admin', 'table'], function () {
|
|
|
var $ = layui.jquery,
|
|
|
admin = layui.admin,
|
|
|
table = layui.table;
|
|
|
var info=getcookie();
|
|
|
|
|
|
// 获取教师 学生调转申请列表
|
|
|
getTransferApplyList();
|
|
|
|
|
|
function getTransferApplyList() {
|
|
|
if(GetQueryString("stu")){
|
|
|
table.render({
|
|
|
elem: '#idTest'
|
|
|
, url:"/FengHuang/studentYd/getStudentTransferApplyList"
|
|
|
, where: {
|
|
|
bureau_id: info.bureau_id,
|
|
|
person_name:$("#searchTxt").val()
|
|
|
}
|
|
|
, cols: [[
|
|
|
{field: '', title: '序号', align: 'center', type: 'numbers',fixed: true}
|
|
|
, {field: 'person_name', title: '学生姓名', align: 'center'}
|
|
|
, {field: 'target_bureau_name', title: '调转学校', align: 'center'}
|
|
|
, {field: 'apply_time', title: '申请时间', align: 'center',width:180}
|
|
|
, {field: 'status_id', title: '审核状态', align: 'center'}
|
|
|
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', fixed: 'right',width:150}
|
|
|
]]
|
|
|
, page: true
|
|
|
, done: function () {
|
|
|
$("[data-field='status_id']").children().each(function () {
|
|
|
if($(this).text()=="2"){
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius\">审核通过</button>");
|
|
|
}else if($(this).text()=="3"){
|
|
|
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-danger\">审核未通过</button>");
|
|
|
}else if($(this).text()=="1"){
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">未审核</button>");
|
|
|
}
|
|
|
|
|
|
})
|
|
|
this.elem.next().find('.layui-table-body').on('click', '[lay-event]', function (event) {
|
|
|
layui.stope(event);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}else{
|
|
|
table.render({
|
|
|
elem: '#idTest'
|
|
|
, url:"/FengHuang/teacherYd/getTeacherTransferApplyList"
|
|
|
, where: {
|
|
|
bureau_id: info.bureau_id,
|
|
|
person_name:$("#searchTxt").val()
|
|
|
}
|
|
|
, cols: [[
|
|
|
{field: '', title: '序号', align: 'center', type: 'numbers',fixed: true}
|
|
|
, {field: 'person_name', title: '教师姓名', align: 'center'}
|
|
|
, {field: 'target_bureau_name', title: '调转单位', align: 'center'}
|
|
|
, {field: 'apply_time', title: '申请时间', align: 'center',width:180}
|
|
|
, {field: 'status_id', title: '审核状态', align: 'center'}
|
|
|
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', fixed: 'right',width:150}
|
|
|
]]
|
|
|
, page: true
|
|
|
, done: function () {
|
|
|
$("[data-field='status_id']").children().each(function () {
|
|
|
if($(this).text()=="2"){
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius\">审核通过</button>");
|
|
|
}else if($(this).text()=="3"){
|
|
|
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-danger\">审核未通过</button>");
|
|
|
}else if($(this).text()=="1"){
|
|
|
$(this).html("<button class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">未审核</button>");
|
|
|
}
|
|
|
})
|
|
|
this.elem.next().find('.layui-table-body').on('click', '[lay-event]', function (event) {
|
|
|
layui.stope(event);
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
table.on('tool(demo)', function (obj) {
|
|
|
var data = obj.data;
|
|
|
console.log(data)
|
|
|
if (obj.event === 'echo') {
|
|
|
// WeAdminShow("选择调转部门","./teaApplyDep.html?id="+data.id+"&status="+data.status_id+"&bureau_id="+info.bureau_id+"&dep_id="+$("#dep_id").val(),400,300);
|
|
|
// WeAdminShow("教师调转审核","./echo.html?id="+data.id+"&status="+data.status_id+"&bureau_id="+info.bureau_id+"&dep_id="+$("#dep_id").val(),550,450);
|
|
|
// WeAdminShow(data.person_name+"调转申请","./applyDetail.html?id="+data.id+"&status="+data.status_id+"&bureau_id="+info.bureau_id+"&dep_id="+$("#dep_id").val(),550,450);
|
|
|
|
|
|
}else if(obj.event==="del"){
|
|
|
|
|
|
layer.confirm("确定删除"+data.person_name+"的调转申请吗?",{icon:0},function () {
|
|
|
del(data.id);
|
|
|
})
|
|
|
event.stopPropagation();
|
|
|
}
|
|
|
|
|
|
});
|
|
|
//监听行单击事件(单击事件为:rowDouble)
|
|
|
table.on('row(demo)', function(obj){
|
|
|
var data = obj.data;
|
|
|
console.log(data);
|
|
|
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');
|
|
|
WeAdminShow(data.person_name+"调转申请","./applyDetail.html?id="+data.id,550,480);
|
|
|
});
|
|
|
|
|
|
// 删除调转申请
|
|
|
function del(id){
|
|
|
var url="";
|
|
|
if(GetQueryString("stu")){
|
|
|
url="/FengHuang/studentYd/deleteTransferInfoById";
|
|
|
}else{
|
|
|
url='/FengHuang/teacherYd/deleteTransferInfoById';
|
|
|
}
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
url: url,
|
|
|
data:{
|
|
|
"id":id
|
|
|
},
|
|
|
dataType: "json",
|
|
|
success: function (data) {
|
|
|
if(data.success){
|
|
|
layer.msg("删除成功",{icon:1});
|
|
|
reloadtable();
|
|
|
}else{
|
|
|
layer.alert(data.message, {icon:0});
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
// 表格重载
|
|
|
window.reloadtable = function () {
|
|
|
console.log("sel1=" + $("#sel1").val())
|
|
|
table.reload('idTest', {
|
|
|
where: {
|
|
|
org_id: $("#sel1").val(),
|
|
|
person_name:$("#searchTxt").val()
|
|
|
}
|
|
|
, page: {
|
|
|
curr: 1
|
|
|
}
|
|
|
});
|
|
|
|
|
|
}
|
|
|
// 搜索
|
|
|
$("#search").click(function () {
|
|
|
reloadtable();
|
|
|
})
|
|
|
$("#iconDel").click(function () {
|
|
|
if($("#searchTxt").val()!==""){
|
|
|
$("#searchTxt").val("");
|
|
|
$(this).hide();
|
|
|
}
|
|
|
reloadtable();
|
|
|
})
|
|
|
$("#searchTxt").blur(function () {
|
|
|
if($("#searchTxt").val()!==""){
|
|
|
$("#iconDel").show();
|
|
|
}else{
|
|
|
$("#iconDel").hide();
|
|
|
}
|
|
|
})
|
|
|
// 回车搜索
|
|
|
$("#searchTxt").keyup(function (e) {
|
|
|
if(e.keyCode==13){
|
|
|
reloadtable();
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
|
</html> |