YNICTE/BO/Views/croom/cddlist.cshtml

163 lines
9.2 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMCM
@{
@Html.Partial("./Partial/ScriptDate")
}
<header class="panel-heading bg-light" id="thistabbox">
<ul class="pagination pagination-md" style="margin: 0;">
<li><a href="#" onclick="gotab(0);" data-toggle="tab">시험목록</a></li>
<li class="active"><a href="#" data-toggle="tab">합격자명단</a></li>
</ul>
</header>
<form id="mform" method="post" action="/croom/cddlist">
@Html.HiddenFor(m => m.tabidx)
<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">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "cert"), new ViewDataDictionary { { "name", "intval2" }, { "selected", Model.intval2 }, { "df", ":-상위분류" }, { "class", "disp-init" }, { "onchange", "$('#mform').submit();" } })
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "certgrade"), new ViewDataDictionary { { "name", "intval3" }, { "selected", Model.intval3 }, { "df", ":-과정분류" }, { "class", "disp-init" }, { "onchange", "$('#mform').submit();" } })
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval7) ? (DateTime?)null : Convert.ToDateTime(Model.stringval7), new ViewDataDictionary { { "name", "stringval7" } }) ~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval4) ? (DateTime?)null : Convert.ToDateTime(Model.stringval4), new ViewDataDictionary { { "name", "stringval4" } })
@Html.Partial("./Partial/Select", Model.stringval5, new ViewDataDictionary { { "valuetext", ":-검색조건;1:이름;2:ID" }, { "name", "stringval5" }, { "selected", Model.stringval5 } })
@Html.Partial("./Partial/Text", Model.stringval6, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval6", Value = Model.stringval6, PH = "", CssClass = "ff" }))
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search" })
</div>
</div>
</div>
</section>
<div class="tar buttonbox">
@Html.Partial("./Partial/sembtns", "#tbody1;1;1;1;1;0;자격증안내")
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light">
<thead>
<tr>
<th width="20"><input type="checkbox" onclick="javascript: checkall('excel1', this);" /></th>
<th width="20">No</th>
<th>고객사</th>
<th>이름(ID)</th>
<th>자격증</th>
<th>급수</th>
<th>자격증발급일</th>
<th>자격증만료일</th>
<th>갱신</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var d in Model.ExamUsers)
{
<tr>
<td class="userno"><input type="checkbox" class="autocheck" value="@d.userno" data-userno="@d.userno" /><input type="hidden" class="examno" value="@d.exno" data-exno="@d.exno" /></td>
<td>@d.rno</td>
<td class="asname">@d.asname</td>
<td class="usernameid">@string.Format("{0}({1})", d.username, d.userid)</td>
<td class="certcc">@Model.ComCodes.Where(w => w.cgroup == "cert").Where(w => w.ccode == d.certcc).Select(w => w.cname).FirstOrDefault()</td>
<td class="certgradecc">@Model.ComCodes.Where(w => w.cgroup == "certgrade").Where(w => w.ccode == d.certgradecc).Select(w => w.cname).FirstOrDefault()</td>
<td class="certdate" data-certdate="@d.certdate.ToString("yyyy-MM-dd")">@d.certdate.ToString("yyyy-MM-dd")</td>
<td class="certindate" data-certindate="@d.certindate.ToString("yyyy-MM-dd")">@d.certindate.ToString("yyyy-MM-dd")</td>
<td class="link text-center"><a href="#" onclick="javascript:renew(@d.exno,@d.userno)">[갱신]</a></td>
</tr>
}
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</section>
@Html.HiddenFor(m => m.intval)
@Html.HiddenFor(m => m.Exam.exno)
</form>
<form id="dform" method="post" action="/croom/cddlist">
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
</form>
<div id="thisbox" class="findbox draggable regbox" style="width: 700px; z-index: 1041; top: 60px; overflow: auto;">
<strong><i class="fa fa-bars"></i>갱신정보 추가<span class=""></span></strong>
<table class="regtable">
<colgroup><col style="width:150px;" /><col /></colgroup>
<tr>
<th>갱신일자</th>
<td>
<input type="hidden" id="d_userno" /><input type="hidden" name="d_exno" />
<input type="hidden" id="d_exno" /><input type="hidden" name="d_exno" />
@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "d_certdate" } })~
@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "d_certindate" } })
</td>
</tr>
<tr>
<th>사유</th>
<td>
<input type="text" id="d_renewreason" class="form-control disp-init d_renewreason" />
</td>
</tr>
<tr>
</table>
<div class="findboxbtnbox">
<a href="#" class="btn btn-primary" onclick="save();">등록</a>
<a href="#" class="btn btn-default closethisbox">취소</a>
</div>
<br/><br />
@*<table class="table table-striped b-t b-light" id="logtable">
<colgroup><col style="width:150px;" /><col /></colgroup>
<thead>
<tr class="text-left">
<th class="text-left" style="width:175px;">자격증 보증기간</th>
<th class="text-left">사유</th>
</tr>
</thead>
<tbody class="data" id="loglistbox"></tbody>
</table>*@
<ul id="loglistbox"></ul>
<br /><br />
</div>
@section scriptsHeader{
@Html.Partial("./Partial/semscript")
@Html.Partial("./Partial/ScriptDate")
}
@section scripts{
<script>
function gotab(idx, t) {
bglayer();
t = t || 0;
setTimeout(function () {
if (idx == 0) { $("#dform").attr("action", "/croom/certs").submit(); }
else if (idx == 1) { $("#dform").attr("action", "/croom/cddlist").submit(); }
}, t);
}
function renew(exno, userno) {
$.each($("#tbody1 tr td input.autocheck"), function () {
if ($(this).attr("data-userno") == userno && $(this).closest("td").find("input.examno").attr("data-exno")==exno) {
$("#d_userno").val($(this).closest("td").find("input.autocheck").attr("data-userno"));
$("#d_exno").val($(this).closest("td").find("input.examno").attr("data-exno"));
$("#d_certdate").val($(this).closest("tr").find("td.certindate").attr("data-certindate"));
}
});
capp("/acommon/examuserrenews", {exno : exno,userno:userno}, "cbexamuserrenew",null, null, true);
}
function cbexamuserrenew() {
if (capResult.code == 1000) {
$("#loglistbox").html("");
$.each($(capResult.obj), function (i, r) {
$("#loglistbox").append("<li><b>" + r.certprovedate + "</b><br />" + r.reason + "</li>");
});
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
}
}
function save() {
if (check("d_certindate", null, "갱신 기간을 입력해주세요")) { $("#d_certindate").focus(); }
else if (check("d_certdate", null, "갱신 기간을 입력해주세요")) { $("d_certdate").focus(); }
else if (confirm("갱신하시겠습니까?")) {
capp("/acommon/examuserchange", { exno: $("#d_exno").val() , userno: $("#d_userno").val(),certdate: $("#d_certdate").val(), certindate: $("#d_certindate").val(), renewreason: $("#d_renewreason").val() }, "cbexamuserchange", null, null, null, true);
}
}
function cbexamuserchange() {
if (capResult.code == 1000) {
msg2("저장되었습니다.", 0, null, "$('#mform').submit();");
}else if (capResult.code == 1) {
msg(capResult.msg);
}
else {
msgdev();
}
}
</script>
}