You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

292 lines
12 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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>
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 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].year%>"><%=data[i].year%></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 layui-btn-normal" type="button" id="autoButton" onclick="importDBF();">
<span class="layui-icon layui-icon-shrink-right"></span>新生导入
</div>
<div class="layui-btn layui-btn-danger" type="button" id="autoButton" onclick="importDBF();">
<span class="layui-icon layui-icon-shrink-right"></span>报到导入
</div>
<div class="layui-btn layui-btn-warm" type="button" id="autoButton" onclick="exportNoCheckInExcel();">
<span class="layui-icon layui-icon-shrink-right"></span>未报到导出
</div>
</span>
<div class="layui-form-item">
<table class="layui-table" lay-filter="tableStuList" id="tableStuList"></table>
</div>
<div class="layui-form-item">
<table class="layui-table" lay-filter="tableZhaoShengHuiZong" id="tableZhaoShengHuiZong"></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) {
const 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;
};
//获取cookie
function getCookie(name) {
var arr, reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
if (arr = document.cookie.match(reg))
return unescape(arr[2]);
else
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/xueji/common_getYearList",
success: function (data) {
var html = template.render('test1', data);
document.getElementById('select_1').innerHTML = html;
}
})
}
getYearList();
//当三个下拉按钮发生改变时
window.changeSelect = function (i) {
if (i == 1) {
//bindBatch();
//getPersonType();
bindTable();
}
if (i == 2) {
//getPersonType();
bindTable();
}
if (i == 3) {
bindTable();
}
}
//设置显示列
window.setViewColumns = function () {
WeAdminShow('正在设置显示列', 'new_student_setViewColumns.html', 600, 330);
};
// 绑定上部表格
window.bindStuTable = function () {
//年份
var batch_year = $("#sel1").val();
var url = '/baseService/xueji/gz_getXinShengList?batch_year=' + batch_year;
var cols_base = [[
//{type: 'checkbox'},
{field: 'id', title: '序号', align: 'center', type: 'numbers', width: 50}
, {field: 'ksh', title: '考生号', align: 'center'}
, {field: 'xm', title: '姓名', align: 'center', width: 80}
, {field: 'xb', title: '性别', align: 'center', width: 100}
, {field: 'csrq', title: '出生日期', align: 'center', width: 100}
, {field: 'sfzh', title: '身份证号', align: 'center', width: 100}
, {field: 'zymc', title: '专业', align: 'center', width: 100}
, {field: 'batch_id', title: '录取批次', align: 'center', width: 100}
, {field: 'person_type_id', title: '人员类型', align: 'center', width: 100}
, {field: 'zzmm', title: '政治面貌', align: 'center', width: 100}
, {field: 'mz', title: '民族', align: 'center', width: 100}
, {field: 'cc', title: '层次', align: 'center', width: 100}
, {field: 'xxxs', title: '学习形式', align: 'center', width: 100}
, {field: 'xz', title: '学习形式', align: 'center', width: 100}
, {field: 'xh', title: '学号', align: 'center', width: 100}
, {field: 'fy', title: '分院', align: 'center', width: 100}
, {field: 'xsh', title: '系所函', align: 'center', width: 100}
, {field: 'bh', title: '班号', align: 'center', width: 100}
]];
//顺序
var cols = [[]];
var cookieData = getCookie("new_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]);
}
}
}
}
table.render({
elem: '#tableStuList',
url: url,
cols: cols,
page: true,
height: 'full',
done: function () {
}
});
};
bindStuTable();
// 绑定下部汇总表格
window.bindZhaoShengHuiZong = function () {
//年份
var batch_year = $("#sel1").val();
var url = '/baseService/xueji/new_getZhaoShengHuiZongByYear?batch_year=' + batch_year ;
table.render({
elem: '#tableZhaoShengHuiZong',
url: url,
cols: [[
{type: 'radio'},
{field: 'id', title: '序号', align: 'center', type: 'numbers', width: 50}
, {field: 'batch_year', title: '入学年度', align: 'center'}
, {field: 'xqmc', title: '入学学期', align: 'center'}
, {field: 'type_name', title: '招生类别', align: 'center'}
, {field: 'batch_name', title: '批次', align: 'center'}
, {field: 'zymc', title: '专业', align: 'center'}
, {field: 'xz', title: '学制', align: 'center'}
, {field: 'stucount', title: '人数', align: 'center'}
]]
,
page: false,
height: '160px',
done: function (res, a, b) {
var that = this.elem.next();
res.data.forEach(function (item, index) {
if (item.remain_count < 0) {
that.find(".layui-table-box tbody tr[data-index='" + index + "']").find("td:eq(5)").css("background-color", "#FF5722");
that.find(".layui-table-box tbody tr[data-index='" + index + "']").find("td:eq(6)").css("background-color", "#FF5722");
}
});
}
});
//行点击事件
table.on('row(tableZhaoShengHuiZong)', function (obj) {
obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click');//选中行样式
obj.tr.find('input[lay-type="layTableRadio"]').prop("checked", true);
var index = obj.tr.data('index');
var thisData = table.cache.tableZhuanYe;
// //重置数据单选属性
layui.each(thisData, function (i, item) {
if (index === i) {
item.LAY_CHECKED = true;
} else {
delete item.LAY_CHECKED;
}
});
//设置current_zhuanye_jihua_code
current_zhuanye_jihua_code = obj.data['zhuanye_jihua_code'];
bindStuTable();
form.render('radio');
});
};
bindZhaoShengHuiZong();
// 导入excel
window.importDBF = function () {
//年份
var batch_year = $("#sel1").val();
WeAdminShow('新生信息形成', './xinsheng_together.html?batch_year=' + batch_year , 600, 500);
}
//导出excel
window.exportNoCheckInExcel = function () {
//年份
var batch_year = $("#sel1").val();
window.location.href = "/baseService/xueji/new_exportNoCheckInExcel?batch_year=" + batch_year;
};
})
</script>
</body>
</html>