ソースを参照

学生学籍打印

临城职教中职
ndbs 2年前
コミット
283f42270f
1個のファイルの変更128行の追加341行の削除
  1. +128
    -341
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml

+ 128
- 341
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuInfoBasic/printxjk.cshtml ファイルの表示

@@ -1,4 +1,6 @@
@model Learun.Application.TwoDevelopment.EducationalAdministration.StuInfoBasicEntity
@using Learun.Util
@using Microsoft.Practices.ObjectBuilder2
@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">
<!-- saved from url=(0051)http://localhost:8080/MDITIP/printOutContent.action -->
@@ -66,23 +68,23 @@
page-break-after: always;
}

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

.tableBox {
width: 90%;
margin: 30px auto;
.pageBreak {
page-break-after: always;
}

/* .tablehtml{
width: 100%;
height: 2000px;
background: rgb(221, 161, 161);
} */
</style>
</head>


<body>
<div id="print-content">
<div class="header">
@@ -143,7 +145,7 @@
</tr>
<tr>
<td>异动情况</td>
<td colspan="7"><input type="text" style="width: 100% ;" /></td>
<td colspan="7"><input type="text" style="width: 90% ;" /></td>
</tr>
<tr>
<td colspan="8">学业成绩</td>
@@ -158,261 +160,13 @@
<td>成绩</td>
</tr>
</table>
@if (Model.StuScoreClassOneList.Count > 0)
{
for (int i = 0; i < Model.StuScoreClassOneList.Count; i++)
{
if (i == 0)
{
<table cellpadding="0" cellspacing="0" id="yi">
@for (int j = 0; j < Model.StuScoreClassOneList[i].StuScoreList.Count; j++)
{

if (j == 0)
{
<tr>
<td rowspan="5">第一学期</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</td>
@*<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</td>*@
</tr>
}
else
{
<tr>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</td>
@*<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].LessonName</td>
<td>@Model.StuScoreClassOneList[i].StuScoreList[j].Score</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>
</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>
<div class="tablehtml">

</table>
<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>
</div>
</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>
//绑定字典或源的值
function GetDataSourceStr(code, value, text, valueStr, box) {
$(box).html("");
@@ -459,91 +213,124 @@
GetDataItemStr("usersexbit", "@Model.GenderNo.ToString().ToLower()", "#GenderNo");
GetDataItemStr("National", "@Model.NationalityNo", "#NationalityNo");
GetDataItemStr("PolityStatus", "@Model.PartyFaceNo", "#PartyFaceNo");
//GetDataItemStr("EntranceWay", "@Model.EntranceWay", "#EntranceWay");
GetDataItemStr("StudyModality", "@Model.StudyModality", "#StudyModality");
GetDataSourceStr("CdMajorInfo", "majorno", "majorname", "@Model.MajorNo", "#MajorNo");
GetDataSourceStr("bjsj", "classno", "classname", "@Model.ClassNo", "#ClassNo");
</script>
<script>
var clientH22 = document.body.clientHeight
var clientH33 = window.screen.availHeight
var scrollH = document.body.scrollHeight
var yiDom = document.getElementById("yi")
var yiH = yiDom.offsetHeight
$(window).load(function () {
var listData1 = "@Model.StuScoreClassOneList.ToJson()";
var listData = JSON.parse(listData1.replace(/&quot;/g, "\""));
console.log(listData, "listData");
// 有六个学期
var tableHtml = ""
var str = ""
var std = ""
for (var j = 0; j < listData.length; j++) {
var str = ""
var std = ""
tableHtml += "<table cellpadding='0' cellspacing='0' id='table"+j+"'>"
// 循环其五行tr
for (var i = 0; i < listData[j].StuScoreList.length; i++) {
console.log(listData[j].StuScoreList.length,"length");
std = ""
str+="<tr>"
for(var k =0;k<7;k++){
// std +=`<td rowspan='5'>第${j}学期</td>`
if(k==0){
if(i==0){
std +=`<td rowspan='5'>第${j+1}学期</td>`
}

var erDom = document.getElementById("er")
var erH = erDom.offsetHeight
var sanDom = document.getElementById("san")
var sanH = sanDom.offsetHeight
var siDom = document.getElementById("si")
var siH = siDom.offsetHeight
var wuDom = document.getElementById("wu")
var wuH = wuDom.offsetHeight
var liuDom = document.getElementById("liu")
var liuH = liuDom.offsetHeight
var siNumH = erH + sanH + siH
erDom.classList.add("pageBreak")
if (yiH > 230) {
yiDom.classList.add("pageBreak")
wuDom.classList.add("pageBreak")
}
}else{
if (k % 2 == 0) {
std += `<td>${listData[j].StuScoreList[i].Score}</td>`
}else{
std += `<td>${listData[j].StuScoreList[i].LessonName}</td>`
}
// if(k==2){
// std +=`<td>${listData[j].text}</td>`
// }
// std +=`<td></td>`
}

if (erH > 230) {
yiDom.classList.add("pageBreak")
erDom.classList.remove("pageBreak")
}
str+= std + "</tr>"
}
tableHtml+= str + "</table>"
}
$(".tablehtml").html(tableHtml)

if (sanH > 300) {
erDom.classList.remove("pageBreak")
sanDom.classList.add("pageBreak")
siDom.classList.remove("pageBreak")
wuDom.classList.remove("pageBreak")
}
if (siH > 400) {
siDom.classList.add("pageBreak")
liuDom.classList.remove("pageBreak")
wuDom.classList.remove("pageBreak")
}
if (wuH > 400) {
wuDom.classList.add("pageBreak")
liuDom.classList.remove("pageBreak")
var yiH = $("#table0").height()
var erH = $("#table1").height()
var sanH = $("#table2").height()
var siH = $("#table3").height()
var wuH = $("#table4").height()
var liuH = $("#table5").height()
var siNumH = erH + sanH + siH
// erDom.classList.add("pageBreak")
$("#table1").addClass("pageBreak")
// removeClass()
if(yiH>300){

}
if (liuH > 400) {
wuDom.classList.add("pageBreak")
$("#table0").addClass("pageBreak")
$("#table5").addClass("pageBreak")
}

}
if(erH > 300){
$("#table0").addClass("pageBreak")
$("#table1").removeClass("pageBreak")
}

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(sanH > 300){
$("#table1").removeClass("pageBreak")
$("#table2").addClass("pageBreak")
$("#table3").removeClass("pageBreak")
$("#table4").removeClass("pageBreak")
}
if(siH > 400){
$("#table3").addClass("pageBreak")
$("#table5").removeClass("pageBreak")
$("#table4").removeClass("pageBreak")
}
if(wuH > 400){
$("#table4").addClass("pageBreak")
liuDom.removeClass("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)
}
if(liuH > 400){
$("#table4").addClass("pageBreak")

if ((erH + sanH + siH) > 700) {
sanDom.classList.add("pageBreak")
siDom.classList.remove("pageBreak")
wuDom.classList.add("pageBreak")
}
}
if((yiH + erH)>200){
$("#table1").addClass("pageBreak")
$("#table2").removeClass("pageBreak")
$("#table3").removeClass("pageBreak")
$("#table4").removeClass("pageBreak")
$("#table5").removeClass("pageBreak")
}
if((erH + sanH)>600){
$("#table2").addClass("pageBreak")
$("#table3").removeClass("pageBreak")
$("#table4").removeClass("pageBreak")
$("#table5").removeClass("pageBreak")
}
if((sanH +siH)>700){
// siDom.classList.add("pageBreak")
$("#table4").removeClass("pageBreak")
$("#table5").removeClass("pageBreak")
}

</script>
</table>
</div>
if((siH + wuH) >700){
$("#table4").addClass("pageBreak")
$("#table5").removeClass("pageBreak")
}

if((erH + sanH + siH)>700){
$("#table2").addClass("pageBreak")
$("#table3").removeClass("pageBreak")
$("#table4").classList.add("pageBreak")
}
})
</script>
</body>

</html>

読み込み中…
キャンセル
保存