|
|
<!DOCTYPE html>
|
|
|
<html>
|
|
|
<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/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 type="text/css">
|
|
|
/* 设置table每一行的height */
|
|
|
.layui-table-cell {
|
|
|
height: 23px;
|
|
|
line-height: 23px;
|
|
|
}
|
|
|
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" style="margin:-5px 0px 0px 0px">
|
|
|
<div class="layui-form-item" style="margin:0px 5px 0px 5px">
|
|
|
<span id="showCurrentBatch"></span>
|
|
|
<div class="layui-form-item inline " id="div1">
|
|
|
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;">
|
|
|
年份
|
|
|
</label>
|
|
|
<div class="layui-input-inline" id="select_1" style="width: 188px"></div>
|
|
|
<script type="text/html" id="test1">
|
|
|
<select name="service_type" id="sel1" lay-filter="top1" onchange="changeSelect(1)">
|
|
|
<% for (var i = 0; i < data.length; i ++) { %>
|
|
|
<option value="<%=data[i].batch_year%>"><%=data[i].batch_year%></option>
|
|
|
<% } %>
|
|
|
</select>
|
|
|
</script>
|
|
|
</div>
|
|
|
<div class="layui-form-item inline " id="div2">
|
|
|
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;">
|
|
|
招生批次
|
|
|
</label>
|
|
|
<div class="layui-input-inline" id="select_2" style="width: 188px"></div>
|
|
|
<script type="text/html" id="test2">
|
|
|
<select name="service_type" id="sel2" onchange="changeSelect(2)">
|
|
|
<% for (var i = 0; i < data.length; i ++) { %>
|
|
|
<option value="<%=data[i].batch_id%>"><%=data[i].batch_name%></option>
|
|
|
<% } %>
|
|
|
</select>
|
|
|
</script>
|
|
|
</div>
|
|
|
|
|
|
<span id="importAcc" style="float:right">
|
|
|
<div class="layui-btn layui-btn-primary" type="button" id="setViewColumns" onclick="setViewColumns();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>设置显示列
|
|
|
</div>
|
|
|
|
|
|
<div class="layui-btn" type="button" id="batchButton" onclick="batchPrint();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>批量打印通知书
|
|
|
</div>
|
|
|
<div class="layui-btn layui-btn-normal" type="button" id="exportLuQuExcel" onclick="exportLuQuExcel();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>导出录取名单
|
|
|
</div>
|
|
|
<div class="layui-btn layui-btn-warm" type="button" id="exportLowScore" onclick="exportLowScore();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>导出录取分数线
|
|
|
</div>
|
|
|
<div class="layui-btn layui-btn-normal" type="button" id="exportTuiDangExcel" onclick="exportTuiDangExcel();">
|
|
|
<span class="layui-icon layui-icon-shrink-right"></span>导出退档名单
|
|
|
</div>
|
|
|
</span>
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
<table class="layui-table" lay-filter="tableZhuanYe" id="tableZhuanYe"></table>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
<table class="layui-table" lay-filter="idTest" id="idTest"></table>
|
|
|
<script type="text/html" id="barDemo">
|
|
|
<a class="layui-btn layui-btn-xs" lay-event="print">打印通知书</a>
|
|
|
</script>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
</span>
|
|
|
</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;
|
|
|
// 获取年份
|
|
|
window.getYearList = function () {
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
url: "/baseService/zhaosheng/getYearListHavingBatch?type_id=4",
|
|
|
success: function (data) {
|
|
|
console.log(data);
|
|
|
var html = template.render('test1', data);
|
|
|
document.getElementById('select_1').innerHTML = html;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
getYearList();
|
|
|
//绑定批次
|
|
|
window.bindBatch = function () {
|
|
|
var batch_year = $("#sel1").val();
|
|
|
$.ajax({
|
|
|
type: "GET",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
url: "/baseService/zhaosheng/getBatchTable?year=" + batch_year + "&zhaosheng_type=" + GetQueryString("zhaosheng_type"),
|
|
|
success: function (data) {
|
|
|
var html = template.render('test2', data);
|
|
|
document.getElementById('select_2').innerHTML = html;
|
|
|
}
|
|
|
})
|
|
|
};
|
|
|
bindBatch();
|
|
|
//设置显示列
|
|
|
window.setViewColumns = function () {
|
|
|
WeAdminShow('正在设置显示列', 'setViewColumns.html', 600, 250);
|
|
|
};
|
|
|
//当四个下拉按钮发生改变时
|
|
|
window.changeSelect = function (i) {
|
|
|
if (i == 1) {
|
|
|
bindBatch();
|
|
|
bindTable();
|
|
|
}
|
|
|
if (i == 2) {
|
|
|
bindTable();
|
|
|
}
|
|
|
};
|
|
|
//导出分数线
|
|
|
window.exportLowScore = function () {
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
//导出EXCEL
|
|
|
window.location.href = "/baseService/zhaosheng/exportLowScore?batch_id=" + batch_id;
|
|
|
};
|
|
|
//导出录取名单
|
|
|
window.exportLuQuExcel = function () {
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var url = "/baseService/zhaosheng/exportLuQuExcel";
|
|
|
window.location.href = url + "?batch_id=" + batch_id;
|
|
|
};
|
|
|
//导出退档名单
|
|
|
window.exportTuiDangExcel = function () {
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var url = "/baseService/zhaosheng/exportTuiDangExcel";
|
|
|
window.location.href = url + "?batch_id=" + batch_id;
|
|
|
};
|
|
|
//批量打印通知书
|
|
|
window.batchPrint = function () {
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var url = "/baseService/zhaosheng/PrintLuQuPdf";
|
|
|
var postdata = {"batch_id": batch_id}
|
|
|
//跳转
|
|
|
layer.load(); //上传loading
|
|
|
//ajax调用生成 pdf,然后把地址转给pdf.js
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
data: postdata,
|
|
|
url: url,
|
|
|
success: function (data2) {
|
|
|
if (data2.success) {
|
|
|
layer.closeAll('loading'); //关闭loading
|
|
|
WeAdminShow('批量打印录取通知书', "../../lib/pdfjs/web/viewer.html?file=/baseService/html/pages/zhaosheng/LuQuPdf/" + data2.file, 640, 480);
|
|
|
} else {
|
|
|
showError(data2.message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
function getCookie(name) {
|
|
|
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
|
|
|
if (arr = document.cookie.match(reg))
|
|
|
return unescape(arr[2]);
|
|
|
else
|
|
|
return null;
|
|
|
}
|
|
|
// 绑定表格
|
|
|
window.bindTable = function () {
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var url = '/baseService/zhaosheng/WaitLuQu?batch_id=' + batch_id + "&luqu_type=1";
|
|
|
//列
|
|
|
var cols_base = [[
|
|
|
{field: 'id', title: '序号', align: 'center', type: 'numbers', width: 50}
|
|
|
, {field: 'person_type_name', title: '考生类型', align: 'center'}
|
|
|
, {
|
|
|
field: 'student_name', title: '姓名', align: 'center',
|
|
|
templet: function (d) {
|
|
|
var str = '<div><a href="#" class="layui-table-link" onclick="showStudentPdf(\'' + d.identity_num + '\')">' + d.student_name + '</a></div>';
|
|
|
return str;
|
|
|
}
|
|
|
}
|
|
|
, {
|
|
|
field: 'score', title: '总分', align: 'center', width: 100
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_I_name', title: '第一志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_II_name', title: '第二志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_III_name', title: '第三志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_IV_name', title: '第四志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_V_name', title: '第五志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'zhuanye_jihua_code_VI_name', title: '第六志愿', align: 'center'
|
|
|
}
|
|
|
, {
|
|
|
field: 'fucongtiaoji', title: '服从调剂', align: 'center', width: 100
|
|
|
,
|
|
|
templet: function(d){
|
|
|
if(d.fucongtiaoji === '1'){
|
|
|
return '服从'
|
|
|
} else { return '不服从'}
|
|
|
|
|
|
}
|
|
|
}
|
|
|
, {field: 'zhuanye_name', title: '已录取专业', align: 'center'}
|
|
|
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', width: 160}
|
|
|
]];
|
|
|
//顺序
|
|
|
var cols = [[]];
|
|
|
var cookieData = getCookie("showColumns");
|
|
|
if(cookieData!=null)
|
|
|
{
|
|
|
var show_columns = cookieData.split(",");
|
|
|
for (var i = 0; i < show_columns.length; i++) {
|
|
|
for (var j = 0; j < cols_base.length; j++) {
|
|
|
for (var k = 0; k < cols_base[j].length; k++) {
|
|
|
if (cols_base[j][k].field != null) {
|
|
|
if (show_columns[i] === cols_base[j][k].field) {
|
|
|
cols[0].push(cols_base[j][k]);
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
else {
|
|
|
for (var j = 0; j < cols_base.length; j++) {
|
|
|
for (var k = 0; k < cols_base[j].length; k++) {
|
|
|
if (cols_base[j][k].field != null) {
|
|
|
cols[0].push(cols_base[j][k]);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
//增加按钮列
|
|
|
cols[0].push({fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center', width: 160});
|
|
|
|
|
|
table.render({
|
|
|
elem: '#idTest',
|
|
|
url: url,
|
|
|
cols: cols
|
|
|
,
|
|
|
page: true,
|
|
|
height: 'full',
|
|
|
done: function () {
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
|
|
|
table.on('tool(idTest)', function (obj) {
|
|
|
var data = obj.data;
|
|
|
if (obj.event === "print") {
|
|
|
var identity_num = data.identity_num;
|
|
|
var batch_id = $("#sel2").val();
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var url = "/baseService/zhaosheng/PrintLuQuPdf";
|
|
|
var postdata = {"batch_id": batch_id, "identity_num": identity_num}
|
|
|
//跳转
|
|
|
layer.load(); //上传loading
|
|
|
//ajax调用生成 pdf,然后把地址转给pdf.js
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
data: postdata,
|
|
|
url: url,
|
|
|
success: function (data2) {
|
|
|
console.log(data2);
|
|
|
layer.closeAll('loading'); //关闭loading
|
|
|
WeAdminShow('打印录取通知书', "../../lib/pdfjs/web/viewer.html?file=/baseService/html/pages/zhaosheng/LuQuPdf/" + data2.file, 720, window.innerHeight-50);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
//显示考生的信息
|
|
|
window.showStudentPdf = function (identity_num) {
|
|
|
var url = "/baseService/zhaosheng/showStudentPdf";
|
|
|
//批次
|
|
|
var batch_id = $("#sel2").val();
|
|
|
if (batch_id == null) {
|
|
|
batch_id = -1;
|
|
|
}
|
|
|
var postdata = {"identity_num": identity_num, "batch_id": batch_id};
|
|
|
layer.load(); //上传loading
|
|
|
$.ajax({
|
|
|
type: "POST",
|
|
|
async: false,
|
|
|
dataType: "json",
|
|
|
data: postdata,
|
|
|
url: url,
|
|
|
success: function (data2) {
|
|
|
if (data2.success) {
|
|
|
WeAdminShow('考生信息', "../../lib/pdfjs/web/viewer.html?file=/baseService/html/pages/zhaosheng/PersonInfoPdf/" + data2.file, 720, 505);
|
|
|
layer.closeAll('loading'); //关闭loading
|
|
|
} else {
|
|
|
alert(data2.message);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
};
|
|
|
bindTable();
|
|
|
})
|
|
|
</script>
|
|
|
</body>
|
|
|
</html> |