Browse Source

web毕业成绩打印

黑艺新账号
yxq 1 year ago
parent
commit
8a3f0daa37
5 changed files with 204 additions and 197 deletions
  1. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoGraduateController.cs
  2. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/Index.cshtml
  3. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/Index.js
  4. +149
    -148
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.cshtml
  5. +45
    -48
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.css

+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuInfoGraduateController.cs View File

@@ -42,7 +42,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
}

[HttpGet]
public ActionResult Print(string keyValue)
public ActionResult PrintScore(string keyValue)
{
//毕业表
var StuInfoGraduateEntity = stuInfoGraduateIBLL.GetEntity(keyValue);


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/Index.cshtml View File

@@ -37,6 +37,7 @@
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;毕业成绩单打印</a>
</div>
<div class=" btn-group btn-group-sm" learun-authorize="yes">
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;查看</a>


+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/Index.js View File

@@ -20,6 +20,14 @@ var bootstrap = function ($, learun) {

//打印简历表
$('#lr_print').on('click', function () {
learun.layerForm({
id: 'print',
title: '毕业成绩单',
url: top.$.rootUrl + '/EducationalAdministration/StuInfoGraduate/PrintScore',
width: 1100,
height: 800,
btn: null
});
var keyValue = $('#gridtable').jfGridValue('StuId');
if (learun.checkrow(keyValue)) {
learun.layerForm({


+ 149
- 148
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.cshtml View File

@@ -1,150 +1,151 @@
@model Learun.Application.TwoDevelopment.EducationalAdministration.StuInfoBasicEntity
@*第一行不可删除*@
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>学生简历表</title>
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.css")
@*此行不可删除*@
<style>
.StuScoreBox {
text-align: left;
}
.StuScoreBox .tableTxt {
display: inline-block;
}
</style>
</head>
<body>
<div id="table">
<div class="tableBox">
<div class="tableT">学生简历表</div>
<table class="table">
<tr>
<td>姓名</td>
<td>@Model.StuName</td>
<td>学号</td>
<td>@Model.StuNo</td>
<td>性别</td>
<td id="GenderNo">@Model.GenderNo.ToString()</td>
<td rowspan="3">
<div class="tableImg"><img src="@Model.Photo" alt=""></div>
</td>
</tr>
<tr>
<td>出生日期</td>
<td>@(Model.Birthday.HasValue ? Model.Birthday.Value.ToShortDateString().Replace("/", "-") : "")</td>
<td>民族</td>
<td id="NationalityNo">@Model.NationalityNo</td>
<td>年级</td>
<td>@Model.Grade</td>
</tr>
<tr>
<td>系</td>
<td id="DeptNo">@Model.DeptNo</td>
<td>专业</td>
<td id="MajorNo">@Model.MajorNo</td>
<td>班级</td>
<td id="ClassNo">@Model.ClassNo</td>
</tr>
<tr>
<td>身份证号</td>
<td colspan="3">@Model.IdentityCardNo</td>
<td>报到日期</td>
<td colspan="2">@(Model.RegisterDate.HasValue ? Model.RegisterDate.Value.ToShortDateString().Replace("/", "-") : "")</td>
</tr>
<tr>
<td>奖罚情况</td>
<td colspan="6">
@foreach (var item in Model.StuEncourgementList)
{
<div class="tableTxt">@(Model.StuEncourgementList.IndexOf(item) + 1)、@item.AcademicYearNo 学年第 @item.Semester 学期:@item.EncourgeDate.Value.ToShortDateString().Replace("/", "-") @item.EncourgeName @item.Fee</div>
}
@foreach (var item in Model.StuPunishmentList)
{
<div class="tableTxt">@(Model.StuPunishmentList.IndexOf(item) + 1 + Model.StuEncourgementList.Count())、@item.AcademicYearNo 学年第 @item.Semester 学期:@item.PunishDate.Value.ToShortDateString().Replace("/", "-") @item.PunishName</div>
}
</td>
</tr>
<tr>
<td>学习成绩</td>
<td colspan="6" style="padding: 0;" class="StuScoreBox">
@foreach (var item in Model.StuScoreClassOneList)
{
<div>@item.AcademicYearNo 学年第 @item.Semester 学期</div>
foreach (var i in item.StuScoreList)
{
<div class="tableTxt"><span>@i.LessonName</span>:<span>@i.Score</span>分; </div>
}
}
</td>
</tr>

</table>
</div>

@{
ViewBag.Title = "学生学籍";
Layout = "~/Views/Shared/_Index.cshtml";
}
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.css")
@Html.AppendJsFile("/Content/jquery/plugin/jqprint/jQuery.print.js")
<div class="myPage" id="printBox">
<a id="lr_print" class="btn btn-default noPrint"><i class="fa fa-print"></i>&nbsp;打印</a>
<div class="title">黑龙江艺术职业学院学生毕业成绩单</div>
<div class="tableTop">
<div>学号:<span id=""></span></div>
<div>姓名:<span id=""></span></div>
<div>学历:<span id=""></span></div>
<div>学制:<span id=""></span></div>
<div>年级:<span id=""></span></div>
<div>班级:<span id=""></span></div>
<div>专业:<span id=""></span></div>
</div>
<div class="tableBox">
<table id="table">
<tr class="header">
<td rowspan="2">课程名称</td>
<td colspan="2">第一学年</td>
<td colspan="2">第二学年</td>
<td colspan="2">第三学年</td>
<td colspan="2">第四学年</td>
<td colspan="2">第五学年</td>
<td colspan="2">第六学年</td>
</tr>
<tr class="header">
<td>第1学期</td>
<td>第2学期</td>
<td>第1学期</td>
<td>第2学期</td>
<td>第1学期</td>
<td>第2学期</td>
<td>第1学期</td>
<td>第2学期</td>
<td>第1学期</td>
<td>第2学期</td>
<td>第1学期</td>
<td>第2学期</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
<tr>
<td>大学生创新创业</td>
<td>22</td>
<td>22</td>
<td>22</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>22</td>
<td>-</td>
<td>-</td>
</tr>
</table>
</div>
<div class="btn">打印</div>
<script src="~/Content/jquery/plugin/fullcalendar/js/jquery-1.7.2.min.js"></script>
<script src="~/Content/jquery/plugin/jqprint/jquery.jqprint-0.3.js"></script>
<script>
$('.btn').click(function () {
$('.tableBox').jqprint();
})
</script>
<script>
//绑定字典或源的值
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({
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.toLocaleLowerCase()) {
$(box).html(item["F_ItemName"]);
return;
}
});
} else {
layer.msg(msgObject.info);
}
},
});
return;
};
GetDataItemStr("usersexbit", "@Model.GenderNo","#GenderNo");
GetDataItemStr("National", "@Model.NationalityNo","#NationalityNo");
GetDataSourceStr("CdDeptInfo", "deptno", "deptname", "@Model.DeptNo", "#DeptNo");
GetDataSourceStr("CdMajorInfo", "majorno", "majorname", "@Model.MajorNo", "#MajorNo");
GetDataSourceStr("bjsj", "classno", "classname", "@Model.ClassNo", "#ClassNo");

</script>
</body>
</html>
<div class="tableBottom">
<div>共 <span id=""></span> 门课程</div>
<div>打印时间:<span id="printDate"></span></div>
</div>
</div>
<script>
function getCurrnetDate() {
let date = new Date()
return date.getFullYear() + '年' + date.getMonth() + '月' + date.getDate() + '日'
}
$('#printDate').text(getCurrnetDate())
$('#lr_print').click(function () {
$('#printBox').print()
})
</script>

+ 45
- 48
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoGraduate/PrintScore.css View File

@@ -1,81 +1,78 @@
table,
tr,
td,
td {
padding: 0;
margin: 0;
border-collapse: collapse;
}

table {
table-layout: fixed;
* {
color: #181819;
font-size: 14px;
}

.tableT {
text-align: center;
font-size: 20px;
margin-bottom: 15px;
.myPage {
background: linear-gradient(to bottom,#43A7FD,#5A8EFB) !important;
padding: 30px;
height: 100%;
zoom: 0.8;
}

.table {
width: 100%;
text-align: center;
border-top: 1px solid #000;
border-right: 1px solid #000;
.tableTop, .tableBottom {
display: flex;
justify-content: space-between;
padding: 0 8px;
}

.table tr {
border-bottom: 1px solid #000;
.tableTop > div, .tableBottom > div {
color: #fff !important;
}

.table td {
border-left: 1px solid #000;
line-height: 20px;
padding: 8px 5px;
.tableTop span, .tableBottom span {
color: #fff !important;
}

.tableImg {
height: 0;
overflow: hidden;
padding-bottom: 140%;
.title {
font-size: 20px;
color: #fff !important;
text-align: center;
margin-bottom: 12px;
width: 100%;
}

.tableBox {
background: #fff !important;
border-radius: 8px;
padding: 8px 24px;
margin: 8px 0;
}

.table img {
table {
table-layout: fixed;
width: 100%;
text-align: center;
}

.tableTxt {
text-align: left;
tr td {
padding: 3px 0;
}

.table .table {
border: 0;
tr.header td {
padding: 8px 0;
border: 1px solid #fff;
background: #DFE9F2 !important;
}

.table .table tr:last-child {
border-bottom: 0;
}
tr:not(.header):nth-child(2n) td {
background: #DFE9F2 !important;
}

.table .table td:first-child {
border-left: 0;
}

.btn {
width: 100px;
height: 34px;
line-height: 34px;
text-align: center;
margin: 30px auto;
border: 1px solid #ccc;
cursor: pointer;
border-radius: 4px;
}

.tableBox {
width: 90%;
margin: 30px auto;
}

#table {
/* display: none; */
@media print {
.noPrint {
display: none;
}
}

Loading…
Cancel
Save