YNICTE/BO/Views/croom/grade0.cshtml

240 lines
13 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMLect
@{
var ev = Model.Lects.FirstOrDefault() ?? new NP.Model.Lect() { };
}
<form id="mform" method="post">
2020-11-12 15:01:40 +09:00
@if(Model.CMEV.isoffabs == 1)
{
<span style="padding:10px; font-weight:700; color:red;">집합교육 출석 필수강좌입니다.</span>
}
2020-10-12 14:39:23 +09:00
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;">
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 평가기준 및 비율<span class=""></span></strong></header>
<table class="table table-striped b-t b-light no-odd">
<colgroup><col style="width: 80px;" /><col style="width: 100px;" /><col /><col /><col /><col /><col /><col /><col /></colgroup>
<thead>
<tr><th>기준</th><th>평가항목</th><th>출석(%)</th><th>진행평가(%)</th><th>최종평가(%)</th><th>과제(%)</th><th>토론(%)</th><th>기타(%)</th><th>합계(총점)</th></tr>
</thead>
<tr>
<th rowspan="2">비환급</th>
<th>비율(점수)</th>
<td>@Model.CMEV.attend</td>
<td>@Model.CMEV.mid</td>
<td>@Model.CMEV.final</td>
<td>@Model.CMEV.subject</td>
<td>@Model.CMEV.discuss</td>
<td>@Model.CMEV.etc</td>
<td>@(Model.CMEV.attend + Model.CMEV.mid + Model.CMEV.final + Model.CMEV.subject + Model.CMEV.discuss + Model.CMEV.etc )</td>
</tr>
<tr>
<th>수료기준</th>
<td>@Model.CMEV.attendcut</td>
<td>@Model.CMEV.midcut</td>
<td>@Model.CMEV.finalcut</td>
<td>@Model.CMEV.subjectcut</td>
<td>@Model.CMEV.discusscut</td>
<td>@Model.CMEV.etccut</td>
<td>@Model.CMEV.cut</td>
</tr>
@if (Model.CM.isrefund == 1)
{
<tr>
<th rowspan="2">환급</th>
<th>비율(점수)</th>
<td>@Model.CMEV.attendrfd</td>
<td>@Model.CMEV.midrfd</td>
<td>@Model.CMEV.finalrfd</td>
<td>@Model.CMEV.subjectrfd</td>
<td>@Model.CMEV.discussrfd</td>
<td>@Model.CMEV.etcrfd</td>
<td>@(Model.CMEV.attendrfd + Model.CMEV.midrfd + Model.CMEV.finalrfd + Model.CMEV.subjectrfd + Model.CMEV.discussrfd + Model.CMEV.etcrfd)</td>
</tr>
<tr>
<th>수료기준</th>
<td>@Model.CMEV.attendcutrfd</td>
<td>@Model.CMEV.midcutrfd</td>
<td>@Model.CMEV.finalcutrfd</td>
<td>@Model.CMEV.subjectcutrfd</td>
<td>@Model.CMEV.discusscutrfd</td>
<td>@Model.CMEV.etccutrfd</td>
<td>@Model.CMEV.cutrfd</td>
</tr>
}
</table>
</section>
<section class="panel panel-default">
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 교육생 평가현황<span class=""></span></strong></header>
<div style="padding: 5px 10px; text-align: right;">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":전체;1:환급;0:비환급" }, { "name", "addstringval" }, { "selected", Model.addstringval }, { "style", "position: absolute; left: 0; margin-left: 50px;" + (Model.CM.isrefund == 1 ? "" : "display:none;") }, { "onchange", "findme()" } })
@Html.Partial("./Partial/sembtns", "#tbody1;"+(Model.IsAdmin?"1;1":"0;0")+ ";1;1;0;평가안내")
&nbsp;&nbsp;&nbsp;
@if (Model.IsAdmin)
{
<a href="#" class="btn btn-primary" onclick="save();">수료처리</a>
<a href="#" class="btn btn-danger" onclick="save2();">강제수료처리</a>
}
&nbsp;&nbsp;&nbsp;
<a href="#" class="btn btn-default" onclick="golist();">목록</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>구분</th>
<th>고객사</th>
<th>교육생(ID)</th>
<th>교육시작일</th>
<th>진도율</th>
<th>진행평가(@ev.ex0cnt)</th>
<th>최종평가(@ev.ex1cnt)</th>
<th>과제(@ev.sd0cnt)</th>
<th>토론(@ev.sd1cnt)</th>
2020-11-12 15:01:40 +09:00
@if(Model.CMEV.isoffabs == 1)
{
<th>OFF출석</th>
}
2020-10-12 14:39:23 +09:00
<th>환산점수</th>
<th>수료여부</th>
2020-11-17 16:57:10 +09:00
<th>수료일변경</th>
2020-10-12 14:39:23 +09:00
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var d in Model.Lects)
{
<tr>
<td><input type="checkbox" class="autocheck" value="@d.lectno" data-userno="@d.userno" /></td>
<td>@d.rnorvt</td>
<td>@d.isrebatename</td>
<td>@d.asname</td>
<td>@d.usernameid</td>
<td>@((Model.CM.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sstime).Value.ToShortDateString())</td>
<td class="link text-center"><a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
<td>@( d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>
<td>@(d.ex1cnt < 1 ? "-" :d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>@(d.sd0cnt < 1 ? "-" :d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td>@( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
@*<td>@((d.isrebate == 1 && Model.CMEV.midrfd < 1) || (d.isrebate == 0 && Model.CMEV.mid < 1) ? "-" : d.ex0cnt < 1 ? "-" : d.ex0lectcnt < 1 && d.ex0cnt > 0 ? "미제출" : d.ex0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.finalrfd < 1) || (d.isrebate == 0 && Model.CMEV.final < 1) ? "-" : d.ex1cnt < 1 ? "-" : d.ex1lectcnt < 1 && d.ex1cnt > 0 ? "미제출" : d.ex1lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.subjectrfd < 1) || (d.isrebate == 0 && Model.CMEV.subject < 1) ? "-" : d.sd0cnt < 1 ? "-" : d.sd0lectcnt < 1 && d.sd0cnt > 0 ? "미제출" : d.sd0lectpoint.ToString())</td>
<td>@((d.isrebate == 1 && Model.CMEV.discussrfd < 1) || (d.isrebate == 0 && Model.CMEV.discuss < 1) ? "-" : d.sd1cnt < 1 ? "-" : d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>*@
2020-11-13 09:09:52 +09:00
@if(Model.CMEV.isoffabs == 1)
{
<th>@(d.ispassat == 1 ? "O" : "X")</th>
}
2020-10-12 14:39:23 +09:00
<td>@(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).ToString())</td>
<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>
2020-11-17 16:57:10 +09:00
<td><a style="@(d.iscomplete == 1 ? "":"display:none;")" href="#" class="btn btn-select btn-xxs" onclick="changecompt('@(d.completetime != null ? d.completetime.Value.ToString("yyyy-MM-dd") : "0001-01-01")','@d.username','@d.userid',@d.lectno,'@d.cshape')">변경</a></td>
2020-10-12 14:39:23 +09:00
</tr>
}
</tbody>
</table>
</div>
</section>
@Html.Partial("./Partial/dform", Model)
</form>
2020-11-17 16:57:10 +09:00
<div id="thisbox" class="findbox draggable regbox" style="width: 600px; z-index: 1041; top: 30%; left:30%; 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>
<table class="regtable">
<colgroup><col style="width:150px;" /><col /></colgroup>
<tr><th>이름(ID)</th><td id="usernameid"></td></tr>
<tr><th id="thcshape">수료일자/교육종료일</th><td>@Html.Partial("./Partial/Date", (DateTime?)null, new ViewDataDictionary { { "name", "completetime" } })</td></tr>
</table>
<div class="findboxbtnbox" id="btnsavelect">
<a href="#" class="btn btn-primary" onclick="change();">저장</a>
</div>
<br /><br />
</div>
2020-10-12 14:39:23 +09:00
<script>
var _no = 0;
function viewatt(no) {
_no = no;
showramemainlayer("/croom/atts?longval=" + no);
}
function childsaved() {
//showramemainlayer("/croom/atts?longval=" + _no + "&IsSavedForParent=1");
$("#mainlayerframe")[0].contentWindow.location.replace("/croom/atts?longval=" + _no + "&IsSavedForParent=1");
}
function findme() {
bglayer(); submit();
}
function save() {
var lectnos = "";
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
lectnos += "," + $(this).val();
});
if (lectnos == "") {
msg("수료처리할 대상자를 선택해주세요.");
} else if (confirm("선택한 대상자를 수료처리하시겠습니까?")) {
capp("/acommon/lectcomplete", { cmno: @Model.CM.cmno, lectnos: lectnos.substr(1), type: 'calc' }, "cbsave");
}
}
function cbsave() {
if (capResult.code == 1000) {
msgf(capResult.obj + "건을 수료 처리했습니다.", "submit('mform', 0, true)");
} else {
msgdev();
}
}
function save2() {
var lectnos = "";
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
lectnos += "," + $(this).val();
});
if (lectnos == "") {
msg("강제수료처리할 대상자를 선택해주세요.");
} else if (confirm("선택한 대상자를 강제 수료처리하시겠습니까?")) {
capp("/acommon/lectcomplete", { cmno: @Model.CM.cmno,lectnos: lectnos.substr(1), type: 'abs' }, "cbsave2");
}
}
function cbsave2() {
if (capResult.code == 1000) {
msgf(capResult.obj + "건을 강제 수료 처리했습니다.", "submit('mform', 0, true)");
} else {
msgdev();
}
}
var _authtype = 1;
2020-11-17 16:57:10 +09:00
var _lectno;
2020-10-12 14:39:23 +09:00
function viewcert(lectno) {
2020-11-17 16:57:10 +09:00
_lectno = lectno;
2020-10-12 14:39:23 +09:00
capp("/acommon/authkey", { authtype: _authtype, jobkey: lectno }, "cbauthkey");
}
function cbauthkey() {
if (capResult.code == 1000) {
2020-11-17 16:57:10 +09:00
@*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");
2020-10-12 14:39:23 +09:00
if (pop == null) {
msg("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
}
}
}
2020-11-17 16:57:10 +09:00
var _lectno;
var _cshape;
function changecompt(time, username, userid, lectno, cshape) {
_lectno = lectno;
_cshape = cshape;
if (cshape == 1) { $("#thcshape").text("교육종료일"); }
else { $("#thcshape").text("수료일자"); }
$("#usernameid").text(username + "(" + userid + ")");
$("#completetime").val(time);
bglayer();
$("#thisbox").slideDown("fast");
}
function change() {
if ($("#completetime").val == null) {
msg2("수료일자를 입력한 후 저장해주세요.");
} else if (confirm("수료일자를 수정하시겠습니까?")) {
capp("/acommon/lecttimechange", { lectno: _lectno, completetime: $("#completetime").val(), cshape: _cshape }, "cblecttimechange", null, null, null, true);
}
}
function cblecttimechange() {
if (capResult.code == 1000) {
msg2("수료일자를 변경했습니다.", null, null, null, true);
submit("mform", 500, true);
} else { msgadmin2(); }
}
2020-10-12 14:39:23 +09:00
</script>