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.

331 lines
13 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 lang="en">
<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/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>
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;
}
.disabled {
pointer-events: none;
border: 1px solid #e6e6e6;
background: #FBFBFB;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
#searchTxt {
width: 164px;
border: 1px solid #dedede;
border-radius: 3px;
height: 37px;
padding-left: 13px;
vertical-align: top;
}
#search {
border: none;
margin-left: 12px;
}
#iconDel {
position: absolute;
right: 92px;
top: 10px;
display: none;
}
.aaa {
background-color: #FBFBFB;
border: 1px solid #e6e6e6;
color: #C9C9C9;
cursor: not-allowed;
opacity: 1;
}
</style>
</head>
<body>
<div class="weadmin-nav">
<span class="layui-breadcrumb" id="super">
<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">
<table border=0 align=left width="100%">
<tr>
<td align=left valign=top style="padding-left:10px">
<div class="layui-form-item inline " id="div3">
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;">
年份
</label>
<div class="layui-input-inline" id="select_3" style="width: 188px"></div>
<script type="text/html" id="test3">
<select name="service_type" id="sel3" onchange="changeYear()">
<% for (var i = 0; i < data.length; i ++) { %>
<option value="<%=data[i].year%>"><%=data[i].year%></option>
<% } %>
</select>
</script>
</div>
<div class="layui-form-item inline " id="div5">
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;">
招生批次
</label>
<div class="layui-input-inline" id="select_5" style="width: 188px"></div>
<script type="text/html" id="test5">
<select name="service_type" id="sel5" onchange="changeBatch()">
<% for (var i = 0; i < data.length; i ++) { %>
<option value="<%=data[i].batch_id%>"><%=data[i].batch_name%></option>
<% } %>
</select>
</script>
</div>
<div class="layui-form-item inline " id="div4">
<label for="" class="layui-form-label" style="padding:9px 0;text-align: left;">
人员类型
</label>
<div class="layui-input-inline" id="select_4" style="width:288px"></div>
<script type="text/html" id="test4">
<select name="service_type" id="sel4" style="width:288px" onchange="changePersonType()">
<% for (var i = 0; i < data.length; i ++) { %>
<option value="<%=data[i].person_type_id%>"><%=data[i].person_type_name%></option>
<% } %>
</select>
</script>
</div>
<div class="layui-form-item inline " id="div8">
<span id="importAcc" style="float:right">
<div class="layui-btn" type="button" id="OneKeyExportPdf" onclick="OneKeyExportPdf();">
<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>
<script type="text/html" id="barDemo">
<a class="layui-btn layui-btn-xs" lay-event="download">打印准考证</a>
{{# if(d.print_count >0){ }}
<a class="layui-btn layui-btn-xs" lay-event="log">查看打印日志</a>
{{# }else { }}
<a class="layui-btn layui-btn-danger layui-btn-xs">没有打印记录</a>
{{# } }}
</script>
</div>
</td>
</tr>
</table>
</div>
<script src="../../../lib/layui/layui.js"></script>
<script src="../../../lib/template.js"></script>
<script src="../../../lib/base64.js"></script>
<script>
layui.extend({
admin: '{/}../../../static/js/admin'
});
layui.use(['form', 'jquery', 'admin', 'table'], function () {
var form = layui.form,
$ = layui.jquery,
admin = layui.admin,
table = layui.table;
// 获取年份
window.getYearList = function () {
$.ajax({
type: "GET",
async: false,
dataType: "json",
url: "/baseService/zhaosheng/getYearListHavingBatch?type_id=4",
success: function (data) {
var html = template.render('test3', data);
document.getElementById('select_3').innerHTML = html;
}
})
}
getYearList();
//绑定批次
window.bindBatch = function () {
var batch_year = $("#sel3").val();
$.ajax({
type: "GET",
async: false,
dataType: "json",
url: "/baseService/zhaosheng/getBatchTable?year=" + batch_year+"&zhaosheng_type=4",
success: function (data) {
var html = template.render('test5', data);
document.getElementById('select_5').innerHTML = html;
}
})
};
bindBatch();
//绑定人员类型
window.getZhaoShengType = function () {
var batch_id=$("#sel5").val();
$.ajax({
type: "GET",
async: false,
dataType: "json",
url: "/baseService/zhaosheng/getPersonType?batch_id="+batch_id,
success: function (data) {
var html = template.render('test4', data);
document.getElementById('select_4').innerHTML = html;
}
})
};
getZhaoShengType();
//年份变更
window.changeYear = function () {
bindBatch();
getZhiYuanTable();
}
//改变批次
window.changeBatch = function () {
getZhiYuanTable();
}
//改变人员类型
window.changePersonType = function () {
getZhiYuanTable();
}
//批量打印准考证
window.OneKeyExportPdf = function () {
var batch_id = $("#sel5").val();
var url = "/baseService/zhaosheng/OneKeyExportPdf";
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) {
console.log(data2);
if (data2.success) {
layer.closeAll('loading'); //关闭loading
WeAdminShow('批量打印准考证', "../../../lib/pdfjs/web/viewer.html?file=/baseService/html/pages/zhaosheng/ZunKaoZhengPdf/" + data2.file, 800, 600);
} else {
showError(data2.message);
}
}
});
}
// 根据志愿学生名单
window.getZhiYuanTable = function () {
var batch_id = $("#sel5").val();
var person_type_id = $("#sel4").val();
if (batch_id == null) {
batch_id = -1;
}
table.render({
elem: '#idTest'
,
url: '/baseService/zhaosheng/getZhiYuanTable?batch_id=' + batch_id + "&person_type_id=" + person_type_id
,
cols: [[
{field: 'id', title: '序号', align: 'center', type: 'numbers', width: 40}
, {field: 'identity_num', title: '身份证号', align: 'center', width: 190}
//, {field: 'kaohao', title: '考生号', align: 'center',width: 150}
, {field: 'student_name', title: '姓名', align: 'center', width: 100}
, {field: 'telephone', title: '联系电话', align: 'center', width: 120}
, {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: 'address', title: '通讯地址', align: 'center'}
, {field: 'fucongtiaoji', title: '服从调剂', align: 'center'}
, {fixed: 'right', title: '操作', toolbar: '#barDemo', align: 'center'}
// , {field: 'receiver', title: '联系人', align: 'center'}
// , {field: 'postcode', title: '邮政编码', align: 'center'}
]]
,
page: true
,
height: 'full'
,
done: function () {
$("[data-field='fucongtiaoji']").children().each(function () {
if ($(this).text() == '1') {
$(this).text("是")
} else if ($(this).text() == '0') {
$(this).text("否")
}
});
}
});
};
table.on('tool(idTest)', function (obj) {
var data = obj.data;
var batch_id = $("#sel5").val();
if (obj.event === 'download') {
var url = "/baseService/zhaosheng/downloadZunKaoZhengPdf";
var postdata = {"batch_id": batch_id, "identity_num": data.identity_num}
//跳转
//ajax调用生成 pdf,然后把地址转给pdf.js
$.ajax({
type: "POST",
async: false,
dataType: "json",
data: postdata,
url: url,
success: function (data2) {
console.log(data2);
if (data2.success) {
WeAdminShow('打印准考证', "../../../lib/pdfjs/web/viewer.html?file=/baseService/html/pages/zhaosheng/ZunKaoZhengPdf/" + data2.file, 800, 600);
} else {
showError(data2.message);
}
}
});
}
if (obj.event === 'log') {
WeAdminShow('查看打印日志', "/baseService/html/pages/zhaosheng/zkz/printlog.html?batch_id=" + batch_id + "&identity_num=" + data.identity_num, 800, 600);
}
});
//绑定志愿表
getZhiYuanTable();
})
</script>
</body>
</html>