Просмотр исходного кода

打印学生学籍信息 进行中

临城职教中职
ndbs 2 лет назад
Родитель
Сommit
9d5e8dc2a2
2 измененных файлов: 466 добавлений и 419 удалений
  1. +7
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs
  2. +459
    -418
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml

+ 7
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoBasicController.cs Просмотреть файл

@@ -158,11 +158,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult Printxjk(string keyValue)
{
var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntity(keyValue);
ViewBag.PrintDate = DateTime.Now.ToDate();
if (stuInfoBasicEntity == null)
{
return View(new StuInfoBasicEntity());
}
stuInfoBasicEntity.Photo = annexesFileIbll.GetEntityByFolderId(stuInfoBasicEntity.Photo)?.F_FilePath;
if (!string.IsNullOrEmpty(stuInfoBasicEntity.Photo))
{
stuInfoBasicEntity.Photo = stuInfoBasicEntity.Photo.Substring(stuInfoBasicEntity.Photo.IndexOf("Resource") - 1);
}
//#region 获取附件名称
//if (dispatchEntity.AttachmentName != null)
//{


+ 459
- 418
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml Просмотреть файл

@@ -1,487 +1,486 @@
@model Learun.Application.TwoDevelopment.EducationalAdministration.StuInfoBasicEntity
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0051)http://localhost:8080/MDITIP/printOutContent.action -->
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>打印</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>打印</title>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="expires" content="0" />
<style>

<style>
h4 {
font-size: 23px;
font-weight: 400;
width: 50%;
text-align: center;
margin: 0 auto;
}
h4 {
font-size: 23px;
font-weight: 400;
width: 50%;
text-align: center;
margin: 0 auto;
}

em {
font-style: normal
}
em {
font-style: normal
}

b {
margin-left: 20px;
}
b {
margin-left: 20px;
}

input {
border: 0;
outline: none;
cursor: pointer;
}
input {
border: 0;
outline: none;
cursor: pointer;
}

span {
width: 30%;
float: right;
}
span {
width: 30%;
float: right;
}

table {
width: 100%;
border: 1px solid #222;
border-top: none;
border-bottom: none;
}
td {
width: 15%;
height: 44px;
border: 1px solid #222;
text-align: center;
}
table {
width: 100%;
border: 1px solid #222;
border-top: none;
border-bottom: none;
}

#headerInfo td {
width: 15%;
height: 44px;
border: 1px solid #222;
text-align: center;
/* word-wrap: break-word;
word-break: normal; */
page-break-after: always;
}
td {
width: 15%;
height: 44px;
border: 1px solid #222;
text-align: center;
}

</style>
#headerInfo td {
width: 15%;
height: 44px;
border: 1px solid #222;
text-align: center;
/* word-wrap: break-word;
word-break: normal; */
page-break-after: always;
}
media print {
.pageBreak {
page-break-after: always;
}

.noPrint {
display: none;
}
}
</style>
</head>

<body>
<div id="print-content">
<div class="header">
<h4>长阳土家族自治县职业教育中心学生学籍卡</h4>
</div>
<p>
<b><em>经办人:</em><input type="text"></b>
<span>打印日期:</span>
</p>
<!-- 页面记录信息 -->
<table cellpadding="0" cellspacing="0">
<tr>
<td>姓名</td>
<div id="print-content">
<div class="header">
<h4>长阳土家族自治县职业教育中心学生学籍卡</h4>
</div>
<p>
<b><em>经办人:</em><input type="text" /></b>
<span>打印日期:@ViewBag.PrintDate.ToShortDateString().Replace("/", "-")</span>
</p>
<!-- 页面记录信息 -->
<table cellpadding="0" cellspacing="0">
<tr>
<td>姓名</td>
<td>@Model.StuName</td>
<td>性别</td>
<td>性别</td>
<td id="GenderNo">@Model.GenderNo</td>
<td>出生日期</td>
<td>出生日期</td>
<td>@(Model.Birthday.HasValue ? Model.Birthday.Value.ToShortDateString().Replace("/", "-") : "")</td>
<td rowspan="3">照片</td>
</tr>
<tr>
<td>民族</td>
<td id="NationalityNo">@Model.NationalityNo</td>
<td>政治面貌</td>
<td></td>
<td>班级</td>
<td id="ClassNo">@Model.ClassNo</td>

</tr>
<tr>
<td>学号</td>
<td rowspan="3"><img src="@Model.Photo" alt="" /></td>
</tr>
<tr>
<td>民族</td>
<td id="NationalityNo">@Model.NationalityNo</td>
<td>政治面貌</td>
<td>@Model.PartyFaceNo</td>
<td>班级</td>
<td id="ClassNo">@Model.ClassNo</td>
</tr>
<tr>
<td>学号</td>
<td>@Model.StuNo</td>
<td>学制</td>
<td></td>
<td>学籍号</td>
<td></td>

</tr>
<tr>
<td>年级</td>
<td>学制</td>
<td>@Model.EduSystem</td>
<td>学籍号</td>
<td>@Model.StuCode</td>
</tr>
<tr>
<td>年级</td>
<td>@Model.Grade</td>
<td>专业</td>
<td id="MajorNo">@Model.MajorNo</td>
<td>身份证号</td>
<td>专业</td>
<td id="MajorNo">@Model.MajorNo</td>
<td>身份证号</td>
<td colspan="2">@Model.IdentityCardNo</td>
</tr>
<tr>
<td>入学年月</td>
<td>@(Model.EntranceDate.HasValue ? Model.EntranceDate.Value.ToShortDateString().Replace("/", "-") : "")</td>
<td>入学方式</td>
<td>@Model.EntranceWay</td>
<td>学习形式</td>
<td colspan="2">@Model.StudyModality</td>
</tr>
<tr>
<td>家庭住址</td>
<td colspan="3">@Model.MailAddress</td>
<td>毕业时间</td>
<td colspan="2">@Model.GraduateYear</td>
</tr>
<tr>
<td>异动情况</td>
<td colspan="7"></td>
</tr>
<tr>
<td colspan="8">学业成绩</td>
</tr>
<tr>
<td>学期</td>
<td>课程名称</td>
<td>成绩</td>
<td>课程名称</td>
<td>成绩</td>
<td>课程名称</td>
<td>成绩</td>
</tr>
</table>

</tr>
<tr>
<td>入学年月</td>
<td></td>
<td>入学方式</td>
<td></td>
<td>学习形式</td>
<td colspan="2"></td>
</tr>
<tr>
<td>家庭住址</td>
<td colspan="3"></td>
<td>毕业时间</td>
<td colspan="2"></td>
</tr>
<tr>
<td>异动情况</td>
<td colspan="7"></td>
</tr>
<tr>
<td colspan="8">学业成绩</td>
</tr>
<tr>
<td>学期</td>
<td>课程名称</td>
<td>成绩</td>
<td>课程名称</td>
<td>成绩</td>
<td>课程名称</td>
<td>成绩</td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="yi">
<tr>
<td rowspan="5">第一学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="er">
<tr>
<td rowspan="5">第二学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="san">
<tr>
<td rowspan="5">第三学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="si">

<tr>
<td rowspan="5">第四学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="wu">
<tr>
<td rowspan="5">第五学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="liu">
<tr>
<td rowspan="5">第六学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>


</table>
</div>
<table cellpadding="0" cellspacing="0" id="yi">
<tr>
<td rowspan="5">第一学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="er">
<tr>
<td rowspan="5">第二学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="san">
<tr>
<td rowspan="5">第三学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="si">
<tr>
<td rowspan="5">第四学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="wu">
<tr>
<td rowspan="5">第五学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
<table cellpadding="0" cellspacing="0" id="liu">
<tr>
<td rowspan="5">第六学期</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>

</table>
</div>
</body>

</html>
<script>
var clientH22 = document.body.clientHeight
var clientH33 = window.screen.availHeight
var scrollH = document.body.scrollHeight
var clientH33 = window.screen.availHeight
var scrollH = document.body.scrollHeight
var yiDom = document.getElementById("yi")
var yiH = yiDom.offsetHeight
var erDom = document.getElementById("er")

var erDom = document.getElementById("er")
var erH = erDom.offsetHeight
var sanDom = document.getElementById("san")
var sanDom = document.getElementById("san")
var sanH = sanDom.offsetHeight
var siDom = document.getElementById("si")
var siDom = document.getElementById("si")
var siH = siDom.offsetHeight
var wuDom = document.getElementById("wu")
var wuDom = document.getElementById("wu")
var wuH = wuDom.offsetHeight
var liuDom = document.getElementById("liu")
var liuDom = document.getElementById("liu")
var liuH = liuDom.offsetHeight
var siNumH = erH + sanH + siH
erDom.classList.add("pageBreak")
if(yiH>230){
if (yiH > 230) {
yiDom.classList.add("pageBreak")
wuDom.classList.add("pageBreak")
}
if(erH > 230){

if (erH > 230) {
yiDom.classList.add("pageBreak")
erDom.classList.remove("pageBreak")
}
if(sanH > 300){

if (sanH > 300) {
erDom.classList.remove("pageBreak")
sanDom.classList.add("pageBreak")
siDom.classList.remove("pageBreak")
wuDom.classList.remove("pageBreak")
}
if(siH > 400){
if (siH > 400) {
siDom.classList.add("pageBreak")
liuDom.classList.remove("pageBreak")
wuDom.classList.remove("pageBreak")
}
if(wuH > 400){
if (wuH > 400) {
wuDom.classList.add("pageBreak")
liuDom.classList.remove("pageBreak")
}
if(liuH > 400){
if (liuH > 400) {
wuDom.classList.add("pageBreak")
}

if((erH + sanH)>600){
if ((erH + sanH) > 600) {
sanDom.classList.add("pageBreak")
siDom.classList.remove("pageBreak")
wuDom.classList.remove("pageBreak")
liuDom.classList.remove("pageBreak")
}else
if((sanH +siH)>700){
// siDom.classList.add("pageBreak")
wuDom.classList.remove("pageBreak")
liuDom.classList.remove("pageBreak")
}
if((siH + wuH) >700){
} else
if ((sanH + siH) > 700) {
// siDom.classList.add("pageBreak")
wuDom.classList.remove("pageBreak")
liuDom.classList.remove("pageBreak")
}
if ((siH + wuH) > 700) {
wuDom.classList.add("pageBreak")
liuDom.classList.remove("pageBreak")
}
console.log("erH",erH)
console.log("sanH",sanH)
console.log("siH",siH)
console.log("wuH",wuH)
console.log("liuH",liuH)
console.log("erH", erH)
console.log("sanH", sanH)
console.log("siH", siH)
console.log("wuH", wuH)
console.log("liuH", liuH)

if((erH + sanH + siH)>700){
if ((erH + sanH + siH) > 700) {
sanDom.classList.add("pageBreak")
siDom.classList.remove("pageBreak")
wuDom.classList.add("pageBreak")
@@ -511,6 +510,48 @@
});
return;
};
function GetDataItemStr(code, valueStr, box) {
$(box).html("");
$.ajax({
url: "/OnlineRegistrate/GetDataItemMap?code=" + code,
async: false,
success: function (msg) {
var msgObject = $.parseJSON(msg);
if (msgObject.code == 200) {
$.each(msgObject.data, function (i, item) {
if (item["F_ItemValue"] == valueStr) {
$(box).html(item["F_ItemName"]);
return;
}
});
} else {
layer.msg(msgObject.info);
}
},
});
return;
};//绑定字典或源的值
function GetDataSourceStr(code, value, text, valueStr, box) {
$(box).html("");
$.ajax({
url: "/OnlineRegistrate/GetDataSourceMap?code=" + code,
async: false,
success: function (msg) {
var msgObject = $.parseJSON(msg);
if (msgObject.code == 200) {
$.each(msgObject.data, function (i, item) {
if (item[value] == valueStr) {
$(box).html(item[text]);
return;
}
});
} else {
layer.msg(msgObject.info);
}
},
});
return;
};
function GetDataItemStr(code, valueStr, box) {
$(box).html("");
$.ajax({


Загрузка…
Отмена
Сохранить