|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<head>
|
|
|
<meta charset="UTF-8">
|
|
|
<title>成绩管理</title>
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
|
|
<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/layui/css/layui.css">
|
|
|
<script src="../../lib/jquery-1.12.4.min.js"></script>
|
|
|
<script src="../../lib/ztree/jquery.ztree.core-3.5.min.js"></script>
|
|
|
<!-- 让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>
|
|
|
select {
|
|
|
width: 180px;
|
|
|
height: 38px;
|
|
|
line-height: 38px;
|
|
|
border: 1px solid #ccc;
|
|
|
border-radius: 3px;
|
|
|
font-size: 15px;
|
|
|
padding-left: 6px;
|
|
|
color: #666;
|
|
|
}
|
|
|
|
|
|
.inline {
|
|
|
display: inline-block;
|
|
|
vertical-align: top;
|
|
|
}
|
|
|
|
|
|
ul.log li {
|
|
|
color: #666666;
|
|
|
list-style: none;
|
|
|
padding-left: 10px;
|
|
|
}
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
<div class="weadmin-nav">
|
|
|
<span class="layui-breadcrumb">
|
|
|
<a href="">首页</a>
|
|
|
<a href="">高职扩招</a>
|
|
|
<a>
|
|
|
<cite>成绩管理</cite></a>
|
|
|
</span>
|
|
|
<a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right"
|
|
|
href="javascript:location.reload();" title="刷新">
|
|
|
<i class="layui-icon layui-icon-refresh-3" style="line-height:30px"></i></a>
|
|
|
</div>
|
|
|
<div class="weadmin-body">
|
|
|
<div class="layui-form-item" style="float:right">
|
|
|
<span id="importAcc">
|
|
|
<div class="layui-btn" type="button" id="downloadTemplate" onclick="downloadTemplate();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>下载成绩导入模板
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-btn layui-btn-normal" type="button" id="importButton"
|
|
|
onclick="importExcel()">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>导入excel
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-btn layui-btn-danger" type="button" id="ClearButton"
|
|
|
onclick="ClearChengJi()">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>清空成绩
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-btn layui-btn-warm" type="button" id="finishButton"
|
|
|
onclick="onFinish();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>终止录入
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-btn layui-btn-normal" type="button" id="resetButton" onclick="reset();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>开启录入
|
|
|
</div>
|
|
|
</span>
|
|
|
</div>
|
|
|
<div class="layui-form-item">
|
|
|
<table class="layui-table" lay-filter="idTest" id="idTest"></table>
|
|
|
</div>
|
|
|
</div>
|
|
|
<script src="../../lib/layui/layui.js"></script>
|
|
|
<script src="../../lib/template.js"></script>
|
|
|
<script src="../../lib/base64.js"></script>
|
|
|
<script>
|
|
|
window.GetQueryString = function (name, istop) {
|
|
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
|
|
var r = window.location.search.substr(1).match(reg);
|
|
|
if (typeof (istop) != "undefined") r = top.location.search.substr(1).match(reg);
|
|
|
|
|
|
if (r != null) return unescape(r[2]);
|
|
|
return null;
|
|
|
};
|
|
|
|
|
|
layui.extend({
|
|
|
admin: '{/}../../static/js/admin'
|
|
|
});
|
|
|
layui.use(['form', 'jquery', 'laytpl', 'admin', 'layer', 'table'], function () {
|
|
|
var form = layui.form,
|
|
|
$ = layui.jquery,
|
|
|
admin = layui.admin,
|
|
|
layer = layui.layer,
|
|
|
table = layui.table,
|
|
|
laytpl = layui.laytpl;
|
|
|
|
|
|
var batch_id = 0;
|
|
|
//绑定批次
|
|
|
window.getCurrentBatchByTypeId = function () {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
url: "/baseService/zhaosheng/getCurrentBatchByTypeId?type_id=" + GetQueryString("zhaosheng_type"),
|
|
|
success: function (data) {
|
|
|
if (data.success) {
|
|
|
batch_id = data.record.batch_id;
|
|
|
} else {
|
|
|
layer.msg("本类型招生还没有正确设置当前批次,请配置后继续!", {
|
|
|
icon: 1,
|
|
|
time: 1000,
|
|
|
shade: [0.5, '#000', true]
|
|
|
}, function () {
|
|
|
return;
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
getCurrentBatchByTypeId();
|
|
|
|
|
|
|
|
|
// 导入excel
|
|
|
window.importExcel = function () {
|
|
|
//批次
|
|
|
WeAdminShow('正在导入成绩', './importChengJiExcel.html?batch_id=' + batch_id, 600, 300);
|
|
|
};
|
|
|
//下载成绩导入模板
|
|
|
window.downloadTemplate = function () {
|
|
|
window.location = "/baseService/html/pages/zhaosheng/ExcelTemplate/ChengJiTemplate.xls";
|
|
|
}
|
|
|
//结束本批次的导入工作
|
|
|
window.onFinish = function () {
|
|
|
layer.confirm('执行本操作后,录入的成绩将不能再修改,您确定要继续吗?', {
|
|
|
btn: ['确定', '取消']
|
|
|
}, function (index, layero) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
url: "/baseService/xueji/setEventIsFinishByBatchId?batch_id=" + batch_id + "&event_id=2",
|
|
|
success: function (data) {
|
|
|
//处理一下是不是显示导入按钮
|
|
|
showAcc();
|
|
|
//无法关闭这个消息框
|
|
|
layer.closeAll('dialog'); //加入这个信息点击确定 会关闭这个消息框
|
|
|
layer.msg("保存成功!", {icon: 1, time: 1000});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
//清空成绩
|
|
|
window.ClearChengJi = function () {
|
|
|
layer.confirm('执行本操作后,本批次下各科成绩都将被清除,您确定要继续吗?', {
|
|
|
btn: ['确定', '取消']
|
|
|
}, function (index, layero) {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
url: "/baseService/zhaosheng/deleteChengJiByBatchId?batch_id=" + batch_id,
|
|
|
success: function (data) {
|
|
|
if (data.success) {
|
|
|
layer.msg("清空成功!", {icon: 1, time: 1000});
|
|
|
bindChengJi();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
};
|
|
|
|
|
|
//是不是隐藏起来导入按钮
|
|
|
window.showAcc = function () {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
dataType: "json",
|
|
|
async: false,
|
|
|
url: "/baseService/xueji/getEventIsFinishByBatchId?batch_id=" + batch_id + "&event_id=2",
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
if (data.is_finish) {
|
|
|
$("#importButton").hide();
|
|
|
$("#finishButton").hide();
|
|
|
$("#ClearButton").hide();
|
|
|
$("#resetButton").show();
|
|
|
$("#downloadTemplate").hide();
|
|
|
} else {
|
|
|
$("#resetButton").hide();
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
showAcc();
|
|
|
|
|
|
//重置状态
|
|
|
window.reset = function () {
|
|
|
var data = {"batch_id": batch_id, "event_id": 2};
|
|
|
layer.confirm('执行本操作后,成绩录入将会开放,您确定要继续吗?', {
|
|
|
btn: ['确定', '取消']
|
|
|
}, function (index, layero) {
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
data: data,
|
|
|
url: "/baseService/xueji/deleteEventIsFinishByBatchIdEventId",
|
|
|
success: function (data) {
|
|
|
layer.msg("保存成功", {icon: 1, time: 1000, shade: [0.5, '#000', true]}, function () {
|
|
|
location.reload();
|
|
|
});
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
|
|
|
// 绑定面试成绩
|
|
|
window.bindChengJi = function () {
|
|
|
table.render({
|
|
|
elem: '#idTest',
|
|
|
url: '/baseService/zhaosheng/getChengJiByBatchId?batch_id=' + batch_id + "&luqu_type=0",
|
|
|
cols: [[
|
|
|
{field: 'id', title: '序号', align: 'center', type: 'numbers', width: 80}
|
|
|
, {field: 'identity_num', title: '身份证号', align: 'center', width: 200}
|
|
|
, {field: 'kaohao', title: '考号', align: 'center'}
|
|
|
, {field: 'person_type_name', title: '考生类型', align: 'center'}
|
|
|
, {field: 'student_name', title: '姓名', align: 'center'}
|
|
|
, {field: 'zhuanye_name', title: '第一志愿报考专业', align: 'center'}
|
|
|
, {field: 'score', title: '总分', align: 'center'}
|
|
|
]]
|
|
|
, page: true
|
|
|
, height: 'full'
|
|
|
, done: function () {
|
|
|
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
//绑定成绩表
|
|
|
bindChengJi();
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |