81 lines
3.7 KiB
Plaintext
81 lines
3.7 KiB
Plaintext
@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/sales', 'tbody1', 'CourseSales');" 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>상위분류</th>
|
|
<th>과정분류</th>
|
|
<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.strval4</td>
|
|
<td class="text-right" style="color: red;">@item.strval5</td>
|
|
<td class="text-right">@item.strval6</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> |