YNICTE/BO/Views/croom/attscds.cshtml

196 lines
10 KiB
Plaintext
Raw Normal View History

2021-11-03 15:19:08 +09:00
@model NP.Model.VMLect
<form id="mform" method="post">
<input type="hidden" id="mform_tabidx" name="tabidx" value="@Model.tabidx" />
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
@*@Html.Partial("./Partial/SearchCaption")*@
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col width="15%" />
<col width="35%" />
<col width="15%" />
<col width="*" />
<col />
</colgroup>
<tbody id="searchtbody">
<tr>
<th>교육종료일</th>
<td>
<div class="col-md-6">
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval) ? (DateTime?)null : Convert.ToDateTime(Model.stringval), new ViewDataDictionary { { "name", "stringval" } })
</div>
</td>
<th>교육생</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "name", "searchtype" }, { "selected", Model.searchtype }, { "valuetext", "usernamestr:이름;useridstr:ID" } })
@Html.Partial("./Partial/Text", Model.searchtext, Helpers.DicText(new NP.Model.TextDic() { Name = "searchtext", Style = "width:70%; display:inline-block;", Value = Model.searchtext, CssClass = "ff" }))
</div>
</td>
</tr>
<tr>
<th>과정명</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Text", Model.stringval2, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval2", Value = Model.stringval2 }))
</div>
</td>
<th>교육장</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary { { "name", "stringval3" }, { "selected", Model.stringval3 }, { "style", "width: 100%" }, { "df", ":교육장선택" } })
</div>
</td>
</tr>
</table>
</div>
</section>
<div style="text-align: left; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
<span style="color:red; font-weight:bold;">* 온라인 교육만 해당되며, 교육장교육은 검색되지 않습니다. 교육장교육은 <u>성적처리</u> 기능을 이용해주세요.</span>
<div style="text-align:right;">
<button class="btn btn-default btn-s-xs" type="button" onclick="javascript:submit();"><i class="fa fa-search"></i></button>
2021-11-03 15:19:08 +09:00
</div>
</div>
<br />
<section class="panel panel-default">
<div style="padding:5px 10px; text-align:right;">
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
<a href="#" class="btn btn-primary" onclick="save(2);">출석처리</a>
<a href="#" class="btn btn-danger" onclick="save(0);">결석처리</a>
<a href="#" class="btn btn-danger" onclick="save(-1);">미입력처리</a>
</div>
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light">
<thead>
<tr>
<th><input type="checkbox" onclick="javascript: checkall('excel1', this);" /></th>
<th width="20">No</th>
<th width="30">운영기수</th>
<th>교육장</th>
<th>과정명</th>
<th>교육생(ID)</th>
<th>교육시작일</th>
<th>교육종료일</th>
<th>집합교육출석여부</th>
<th>수료여부</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var d in Model.Lects)
{
2021-11-03 15:19:08 +09:00
<tr>
<td><input type="checkbox" class="autocheck" value="@d.lectno" data-usernameid="@d.usernameid" data-userno="@d.userno" data-cmino="@d.cmino" /></td>
<td>@d.rnorvt</td>
@if (d.cshape == 2)
{
<td>@d.sseq</td>
}
else
{
<td>-</td>
}
<td>@d.studyplacename</td>
<td>@d.cname</td>
<td>@d.usernameid</td>
<td>@((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())</td>
@if (d.cshape == 2)
{
if (d.estart != null && d.estart > Convert.ToDateTime("1900-01-01") && d.estart.ToShortDateString() != "0001-01-01" && d.estart >= DateTime.Now)
2021-11-03 15:19:08 +09:00
{
<td class="link text-center"><a href="#" onclick="javascript: openScd(@d.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
2021-11-03 15:19:08 +09:00
}
else
{
<td>@d.eend.ToShortDateString()</td>
2021-11-03 15:19:08 +09:00
}
}
else
{
<td>@d.edate.Value.ToShortDateString()</td>
}
<td>@d.istatusname</td>
@if (!ViewBag.IsSubAdmin96)
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("<a href=\"#\" onclick=\"viewcert({0})\">{1}</a>", d.lectno, "수료") : d.iscompletename)</td>
}
else
{
<td class="@(d.iscomplete == 1 ? "link text-center" : "")">@Html.Raw(d.iscomplete == 1 ? string.Format("{1}", d.lectno, "수료") : d.iscompletename)</td>
}
</tr>
}
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</section>
</form>
2021-11-03 15:19:08 +09:00
<div id="scdbox" class="findbox draggable regbox" style="width: 400px; z-index: 1041; top: 60px; overflow: auto;">
<h4><i class="fa fa-bars"></i> <span id="pcap">교육일정변경</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
<ul id="ulScd"></ul>
<div class="findboxbtnbox" id="btnsavelect">
<a href="#" class="btn btn-primary" onclick="updateScd();">선택완료</a>
</div>
</div>
@section styles{
<style type="text/css">
</style>
}
@section scriptsHeader{
@Html.Partial("./Partial/FileScript")
@Html.Partial("./Partial/ScriptDate")
@Html.Partial("./Partial/ScdScript")
2021-11-03 15:19:08 +09:00
}
@section scripts{
<script>
var _authtype = 1;
var _lectno;
function viewcert(lectno) {
_lectno = lectno;
capp("/acommon/authkey", { authtype: _authtype, jobkey: lectno }, "cbauthkey");
}
function cbauthkey() {
if (capResult.code == 1000) {
@*var pop = window.open('@ViewBag.fronturl/Open/CertPrint?userno=@ViewBag.SSUserNo&authtype=' + _authtype + '&randkey=' + capResult.obj, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");*@
var pop = window.open('@ViewBag.reporturl/certification.aspx?lectno='+_lectno, "certprint", "width=" + (screen.availWidth) + ", height=" + (screen.availHeight) + ", scrollbars=yes, resizable=yes, status=no, location=no, left=0, top=0");
if (pop == null) {
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
}
}
}
var amsg;
function save(no) {
if (no == 2) { amsg = "출석"; }
else if (no == 0) { amsg = "결석"; }
else { amsg = "미입력"; }
if ($("#tbody1 tr input.autocheck:checked").length < 1) {
msg(amsg + "처리할 교육생을 선택해주세요.");
} else if (confirm("선택한 교육생을 " + amsg + "처리하시겠습니까?")) {
var userinfos = "";
var cuis = "";
2021-11-03 15:19:08 +09:00
$.each($("#tbody1 tr input.autocheck:checked"), function (i, c) {
if ($(c).attr("data-cmino") == "" || $(c).attr("data-cmino") < 1) {
cuis += "," + $(c).attr("data-usernameid");
} else {
userinfos += "," + $(c).attr("data-cmino") + ":" + $(c).val();
}
});
userinfos = userinfos.substr(1);
cuis = cuis.substr(1);
if (cuis != "") {
msg(cuis + "교육생들은 " + amsg + "처리가 불가능합니다.");
} else {
capp("/acommon/offattscdsave", { userinfos: userinfos, istatus: no }, "cboffattscdsave");
2021-11-03 15:19:08 +09:00
}
}
}
function cboffattscdsave() {
if (capResult.code == 1000) {
msgf2("저장했습니다.", "submit('mform', 0, true)");
} else { msgdev(true); }
}
</script>
}