YNICTE/BO/Views/data/learns3.cshtml

125 lines
8.1 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMMM
<br />
<form id="mform" method="post">
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
@Html.Partial("./Partial/SearchCaption")
<div class="step-content">
<div class="step-pane active form-inline">
<div class="form-group">
<select id="year" name="stringval" class="form-control disp-init">
<option value="">-년도선택</option>
@foreach (var y in Model.Terms.Select(s => s.tyear).Distinct())
{
<option value="@y" @(Model.stringval == y.ToString() ? "selected" : "")>@y 년</option>
}
</select>
<select id="tmno" name="stringval2" class="form-control disp-init">
<option value="">-기수선택</option>
@foreach (var t in Model.Terms.Where(w => w.tyear == DateTime.Now.Year))
{
<option value="@t.tmno" @(Model.stringval2 == t.tmno.ToString() ? "selected":"")>@t.tseq 기</option>
}
</select>
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search", OnClick = "" })
</div>
</div>
</div>
</section>
<div class="tar buttonbox">
<a href="#" onclick="javascript:exceldown('mform', '/data/learns', 'tbody1', 'JobPositionLearns');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light no-odd">
<thead>
<tr>
<th rowspan="2">상위분류</th>
<th rowspan="2">과정분류</th>
<th rowspan="2">과정명</th>
<th colspan="2">총계</th>
@foreach(var c in Model.ComCodes)
{
<th colspan="2">@c.text</th>
}
<th colspan="2">분류없음</th>
</tr>
<tr>
<th>신청완료</th>
<th>수료</th>
@foreach(var c in Model.ComCodes)
{
<th>신청완료</th>
<th>수료</th>
}
<th>신청완료</th>
<th>수료</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var item in Model.Datas)
{
<tr>
<td colspan="@(item.dtype == 1?3:1)">@item.strval</td>
@if (item.dtype < 1)
{
<td>@item.strval2</td>
<td class="text-left">@item.strval3</td>
}
<td class="text-right">@item.intval.ToString("#,0")</td>
<td class="text-right">@item.intval2.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 0?"":"display: none;")">@item.intval3.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 0?"":"display: none;")">@item.intval4.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 1?"":"display: none;")">@item.intval5.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 1?"":"display: none;")">@item.intval6.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 2?"":"display: none;")">@item.intval7.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 2?"":"display: none;")">@item.intval8.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 3?"":"display: none;")">@item.intval9.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 3?"":"display: none;")">@item.intval10.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 4?"":"display: none;")">@item.intval11.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 4?"":"display: none;")">@item.intval12.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 5?"":"display: none;")">@item.intval13.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 5?"":"display: none;")">@item.intval14.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 6?"":"display: none;")">@item.intval15.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 6?"":"display: none;")">@item.intval16.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 7?"":"display: none;")">@item.intval17.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 7?"":"display: none;")">@item.intval18.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 8?"":"display: none;")">@item.intval19.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 8?"":"display: none;")">@item.intval20.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 9?"":"display: none;")">@item.intval21.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 9?"":"display: none;")">@item.intval22.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 10?"":"display: none;")">@item.intval23.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 10?"":"display: none;")">@item.intval24.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 11?"":"display: none;")">@item.intval25.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 11?"":"display: none;")">@item.intval26.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 12?"":"display: none;")">@item.intval27.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 12?"":"display: none;")">@item.intval28.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 13?"":"display: none;")">@item.intval29.ToString("#,0")</td>
<td class="text-right" style="@(Model.ComCodes.Count > 13?"":"display: none;")">@item.intval30.ToString("#,0")</td>
<td class="text-right">@item.intvaletc.ToString("#,0")</td>
<td class="text-right">@item.intvaletc2.ToString("#,0")</td>
</tr>
}
</tbody>
</table>
</div>
</section>
@Html.HiddenFor(m=>m.tabidx)
</form>
<script>
var terms = '@(string.Join(";", Model.Terms.Select(s=>string.Format("{0}:{1}:{2}", s.tmno, s.tyear, s.tseq))))';
$(document).ready(function () {
$("#year").on("change", function () {
$("#tmno option:gt(0)").remove();
$("#Memo_cmno option:gt(0)").remove();
var y = $(this).val();
if (y != "") {
$.each(terms.split(';'), function (i, t) {
if (t.split(':')[1] == y) {
$("#tmno").append("<option value=\"" + t.split(':')[0] + "\">" + t.split(':')[2] + " 기</optoin>");
}
});
}
});
});
</script>