@@ -292,7 +292,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return View(); | |||
} | |||
[HttpGet] | |||
public ActionResult PrintScore() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -1282,10 +1286,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult DataFilling(string stuNo) | |||
public ActionResult DataFilling(string keyValue) | |||
{ | |||
//毕业表 | |||
var StuInfoGraduateEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(stuNo); | |||
var StuInfoGraduateEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(keyValue); | |||
if (StuInfoGraduateEntity == null) | |||
{ | |||
return View(new StuInfoBasicEntity()); | |||
@@ -24,34 +24,35 @@ td { | |||
padding: 0 8px; | |||
} | |||
.tableTop > div { | |||
color: #000 !important; | |||
line-height:34px; | |||
} | |||
.tableTop > div { | |||
color: #000 !important; | |||
line-height: 34px; | |||
} | |||
.tableTop span { | |||
color: #000 !important; | |||
} | |||
.tableTop span { | |||
color: #000 !important; | |||
} | |||
.tableBottom > div { | |||
color: #1C71E3 !important; | |||
} | |||
.tableBottom > div { | |||
color: #1C71E3 !important; | |||
} | |||
.tableBottom span { | |||
color: #1C71E3 !important; | |||
} | |||
.tableBottom span { | |||
color: #1C71E3 !important; | |||
} | |||
.title { | |||
text-align: center; | |||
} | |||
.title img{ | |||
height:60px; | |||
} | |||
.title img { | |||
height: 60px; | |||
} | |||
.line { | |||
height: 4px; | |||
width:100%; | |||
margin:22px 0; | |||
width: 100%; | |||
margin: 22px 0; | |||
} | |||
.tableBox { | |||
@@ -78,20 +79,21 @@ tr.header td { | |||
tr:not(.header):nth-child(2n) td { | |||
} | |||
.textBlod{ | |||
font-weight:700 | |||
.textBlod { | |||
font-weight: 700 | |||
} | |||
.bottomImg{ | |||
width:100%; | |||
position:fixed; | |||
bottom:0 | |||
.bottomImg { | |||
width: 100%; | |||
position: fixed; | |||
bottom: 0 | |||
} | |||
@media print { | |||
.noPrint { | |||
display: none; | |||
} | |||
.myPage { | |||
padding: 0px; | |||
} | |||
@@ -99,32 +101,35 @@ tr:not(.header):nth-child(2n) td { | |||
@media (max-width:29.7cm) { | |||
.bottomImg.small{ | |||
display:none; | |||
.bottomImg.small { | |||
display: none; | |||
} | |||
.bottomImg.big { | |||
display: inline-block; | |||
} | |||
} | |||
@media (max-width:21cm) { | |||
.tableTop { | |||
display: block; | |||
} | |||
.tableTop > div { | |||
display: inline-block; | |||
width: 19.6%; | |||
} | |||
.tableTop > div { | |||
display: inline-block; | |||
width: 19.6%; | |||
} | |||
.tableTop > div.col2 { | |||
display: inline-block; | |||
width: auto; | |||
min-width: 19.6%; | |||
} | |||
.tableTop > div.col2 { | |||
display: inline-block; | |||
width: auto; | |||
min-width: 19.6%; | |||
} | |||
.bottomImg.small { | |||
display: inline-block; | |||
} | |||
.bottomImg.big { | |||
display: none; | |||
} | |||
@@ -36,19 +36,15 @@ var bootstrap = function ($, learun) { | |||
}); | |||
//打印 | |||
$('#lr_print').on('click', function () { | |||
var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); | |||
var Semester = $('#Semester').lrselectGet(); | |||
var StuNo = $.trim($('#StuNo').val()); | |||
if (StuNo == null || StuNo == "") { | |||
learun.alert.warning("请输入学号!"); | |||
return; | |||
} | |||
var LessonNo = $('#LessonNo').lrselectGet(); | |||
var Grade = $('#Grade').lrselectGet(); | |||
learun.layerForm({ | |||
id: 'AllStuScoreQueryPrint', | |||
title: '学生成绩单', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester + '&LessonNo=' + LessonNo + '&Grade=' + Grade, | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/PrintScore?StuNo=' + StuNo, | |||
width: 1200, | |||
height: 800, | |||
btn: null | |||
@@ -0,0 +1,122 @@ | |||
@{ | |||
ViewBag.Title = "学生成绩单"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
@Html.AppendCssFile("/Areas/EducationalAdministration/Views/StuScore/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> 打印</a> | |||
<div class="title"><img src="~/Content/images/StuInfoGraduate/header.png" /></div> | |||
<img class="line" src="~/Content/images/StuInfoGraduate/line.png" /> | |||
<div class="tableTop"> | |||
<div>学号:<span id="StuNo"></span></div> | |||
<div>姓名:<span id="StuName"></span></div> | |||
<div>学历:<span id="Crowning"></span></div> | |||
<div>学制:<span id="EduSystem"></span></div> | |||
<div>年级:<span id="Grade"></span></div> | |||
<div class="col2">班级:<span id="ClassName"></span></div> | |||
<div class="col2">专业:<span id="MajorName"></span></div> | |||
</div> | |||
<div class="tableBox"> | |||
<table id="table" border="1"> | |||
<tr class="header tr-AcademicYearNo textBlod"> | |||
<td rowspan="2">课程名称</td> | |||
</tr> | |||
<tr class="header tr-Semester"></tr> | |||
</table> | |||
</div> | |||
<div class="tableBottom"> | |||
<div>共 <span id="Counts"></span> 门课程</div> | |||
<div>打印时间:<span id="printDate"></span></div> | |||
</div> | |||
<img class="bottomImg big" src="~/Content/images/StuInfoGraduate/linebig.png" /> | |||
<img class="bottomImg small" src="~/Content/images/StuInfoGraduate/linesmall.png" /> | |||
</div> | |||
<script> | |||
function getCurrnetDate() { | |||
let date = new Date() | |||
return date.getFullYear() + '年' + date.getMonth() + '月' + date.getDate() + '日' | |||
} | |||
$('#printDate').text(getCurrnetDate()) | |||
$('#lr_print').click(function () { | |||
$('#printBox').print() | |||
}) | |||
var keyValue = request('StuNo') | |||
$.ajax({ | |||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/DataFilling?keyValue=' + keyValue, | |||
type: "get", | |||
dataType: "json", | |||
async: false, | |||
cache: false, | |||
success: function (res) { | |||
if (res.code == 200) { | |||
$.ajax({ | |||
url: "/OnlineRegistrate/GetDataItemMap?code=" + 'EduSystem', | |||
async: false, | |||
success: function (msg) { | |||
var msgObject = $.parseJSON(msg); | |||
if (msgObject.code == 200) { | |||
let obj = msgObject.data.find(e => e.F_ItemValue == res.data.EduSystem) | |||
$('#EduSystem').text(obj ? obj.F_ItemName : res.data.EduSystem) | |||
} | |||
}, | |||
}); | |||
$('#MajorName').text(res.data.MajorName) | |||
$('#ClassName').text(res.data.ClassName) | |||
$('#Grade').text(res.data.Grade) | |||
$('#StuName').text(res.data.StuName) | |||
$('#StuNo').text(res.data.StuNo) | |||
$('#Counts').text(res.data.Counts) | |||
let Crowning = res.data.Crowning | |||
if (Crowning == '0') Crowning = '高职' | |||
if (Crowning == '1') Crowning = '中职' | |||
$('#Crowning').text(Crowning)//0高职 1 中职 | |||
let tableData = res.data.StuInfoGraduateEntity ? res.data.StuInfoGraduateEntity.StuScoreClassOneList : [] | |||
let AcademicYearNoData = [], SemesterData = [], scoreData = []; | |||
tableData.forEach((e,i) => { | |||
//学年 | |||
let AcademicYearNoIndex = AcademicYearNoData.findIndex(ee => ee.text == e.AcademicYearNo) | |||
if (AcademicYearNoIndex == -1) { | |||
AcademicYearNoData.push({ text: e.AcademicYearNo, col: 1 }) | |||
} else { | |||
AcademicYearNoData[AcademicYearNoIndex].col++ | |||
} | |||
//学期 | |||
SemesterData.push({ text: e.Semester }) | |||
//课程学分 | |||
e.StuScoreList.forEach(e1 => { | |||
let scoreIndex = scoreData.findIndex(e2 => e2[0] == e1.LessonName) | |||
if (scoreIndex == -1) { | |||
scoreData.push({ | |||
0: e1.LessonName, | |||
[i + 1]: e1.ScoreFormat | |||
}) | |||
} else { | |||
scoreData[scoreIndex][i + 1] = e1.ScoreFormat | |||
} | |||
}) | |||
}) | |||
AcademicYearNoData.forEach(e => { | |||
$('#table .tr-AcademicYearNo').append($(`<td colspan="${e.col}">${e.text}学年</td>`)) | |||
}); | |||
SemesterData.forEach(e => { | |||
$('#table .tr-Semester').append($(`<td>第${e.text}学期</td>`)) | |||
}); | |||
scoreData.forEach(e => { | |||
let text = '<tr>' | |||
for (let i = 0;i < tableData.length + 1;i++) { | |||
text += `<td>${e[i]||'-'}</td>` | |||
} | |||
text += '</tr>' | |||
$('#table').append($(text)) | |||
}) | |||
} | |||
}, | |||
}); | |||
let date = new Date(); | |||
let year = date.getFullYear(); | |||
let month = date.getMonth()+1; | |||
let day = date.getDate() | |||
$('#printDate').text(year+'年'+month+'月'+day+'日') | |||
</script> |
@@ -0,0 +1,136 @@ | |||
table, | |||
tr, | |||
td, | |||
td { | |||
padding: 0; | |||
margin: 0; | |||
border-collapse: collapse; | |||
} | |||
* { | |||
color: #181819; | |||
font-size: 14px; | |||
} | |||
.myPage { | |||
padding: 30px; | |||
height: 100%; | |||
zoom: 0.8; | |||
} | |||
.tableTop, .tableBottom { | |||
display: flex; | |||
justify-content: space-between; | |||
padding: 0 8px; | |||
} | |||
.tableTop > div { | |||
color: #000 !important; | |||
line-height: 34px; | |||
} | |||
.tableTop span { | |||
color: #000 !important; | |||
} | |||
.tableBottom > div { | |||
color: #1C71E3 !important; | |||
} | |||
.tableBottom span { | |||
color: #1C71E3 !important; | |||
} | |||
.title { | |||
text-align: center; | |||
} | |||
.title img { | |||
height: 60px; | |||
} | |||
.line { | |||
height: 4px; | |||
width: 100%; | |||
margin: 22px 0; | |||
} | |||
.tableBox { | |||
background: #fff !important; | |||
border-radius: 8px; | |||
padding: 8px 0px; | |||
margin: 8px 0; | |||
} | |||
table { | |||
table-layout: fixed; | |||
width: 100%; | |||
text-align: center; | |||
} | |||
tr td { | |||
padding: 3px 0; | |||
} | |||
tr.header td { | |||
padding: 8px 0; | |||
} | |||
tr:not(.header):nth-child(2n) td { | |||
} | |||
.textBlod { | |||
font-weight: 700 | |||
} | |||
.bottomImg { | |||
width: 100%; | |||
position: fixed; | |||
bottom: 0 | |||
} | |||
@media print { | |||
.noPrint { | |||
display: none; | |||
} | |||
.myPage { | |||
padding: 0px; | |||
} | |||
} | |||
@media (max-width:29.7cm) { | |||
.bottomImg.small { | |||
display: none; | |||
} | |||
.bottomImg.big { | |||
display: inline-block; | |||
} | |||
} | |||
@media (max-width:21cm) { | |||
.tableTop { | |||
display: block; | |||
} | |||
.tableTop > div { | |||
display: inline-block; | |||
width: 19.6%; | |||
} | |||
.tableTop > div.col2 { | |||
display: inline-block; | |||
width: auto; | |||
min-width: 19.6%; | |||
} | |||
.bottomImg.small { | |||
display: inline-block; | |||
} | |||
.bottomImg.big { | |||
display: none; | |||
} | |||
} |
@@ -1072,6 +1072,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\InputScoreIndexImport.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreOnline\Monitor.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\PrintScore.css" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreStat.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\StuScoreRank.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\SlowIndex.js" /> | |||
@@ -8368,6 +8369,7 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPass\StuScoreStat.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\StuScoreStat.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OpenLessonPlan\ImportForm.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\StuScore\PrintScore.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||