373 lines
17 KiB
Plaintext
373 lines
17 KiB
Plaintext
@model NP.Model.VMLect
|
|
@{
|
|
}
|
|
<form id="mform2" method="post" action="/croom/gradeall">
|
|
<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/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
|
@Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1" : "0;0") + ";1;1;0;평가안내")
|
|
<a href="javascript:;" onclick="javascript:callComment('mform', '/croom/gradeall', 'tbody1', '성적처리전체');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
|
|
|
|
@if (Model.IsAdmin)
|
|
{
|
|
<a href="#" class="btn btn-primary" onclick="save();">수료확인</a>
|
|
if (!ViewBag.IsSubAdmin96)
|
|
{
|
|
<a href="#" class="btn btn-danger" onclick="save2();">수료처리</a>
|
|
<a href="#" class="btn btn-danger" onclick="save3();">수료취소</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>교육장</th>
|
|
<th>과정명</th>
|
|
<th>교육생</th>
|
|
<th>ID</th>
|
|
<th>핸드폰</th>
|
|
<th>교육시작일</th>
|
|
<th>교육종료일</th>
|
|
<th>진도율</th>
|
|
<th>최종평가</th>
|
|
<th>과제</th>
|
|
<th style="display:none;">토론</th>
|
|
<th>환산점수</th>
|
|
<th>집합교육출석여부</th>
|
|
<th>강의평가</th>
|
|
<th>수료여부</th>
|
|
</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>
|
|
@if (d.cshape == 2)
|
|
{
|
|
<td>@d.sseq</td>
|
|
}
|
|
else
|
|
{
|
|
<td>-</td>
|
|
}
|
|
<td>@d.isrebatename</td>
|
|
<td>@d.asname</td>
|
|
<td>@d.studyplacename</td>
|
|
<td>@d.cname</td>
|
|
<td>@d.username</td>
|
|
<td>@d.userid</td>
|
|
<td>@d.mobile</td>
|
|
<td>@((d.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())</td>
|
|
@if (d.cshape > 0)
|
|
{
|
|
if (d.iscomplete != 1)
|
|
{
|
|
<td class="link text-center"><a href="#" onclick="javascript: openScd(@d.cmno,@d.lectno,@d.cmisno,@d.cshape);">@d.eend.ToShortDateString()</a></td>
|
|
}
|
|
else
|
|
{
|
|
<td>@d.eend.ToShortDateString()</td>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<td>
|
|
@((d.cshape == 0 && d.isrebate == 0 ? (d.payoktime).AddDays((double)d.studydays) : d.edate).Value.ToShortDateString())
|
|
</td>
|
|
}
|
|
|
|
@*진도율*@
|
|
@if (!ViewBag.IsSubAdmin96)
|
|
{
|
|
<td class="link text-center"><a onclick="viewatt(@d.lectno)" href="#">@d.attrate %</a></td>
|
|
}
|
|
else
|
|
{
|
|
<td class="link text-center">@d.attrate %</td>
|
|
}
|
|
|
|
@*최종평가*@
|
|
<td>@(d.exfpoint)</td>
|
|
|
|
@*과제*@
|
|
<td>@d.subjectpoint</td>
|
|
|
|
@*토론*@
|
|
<td style="display:none;">@( d.sd1cnt < 1 ? "-" : d.sd1cnt > 0 && d.dblv4 < 1 ? "미제출//" : d.dblv4.ToString())</td>
|
|
|
|
@*환산점수*@
|
|
<td>
|
|
@d.tpoint
|
|
<input type="hidden" id="tpointList" value="(a:@d.apoint / m:@d.mpoint / f:@d.fpoint / s:@d.spoint / d:@d.dpoint)">
|
|
</td>
|
|
|
|
@*@if (d.isoffabs == 1)
|
|
{
|
|
<td class="link text-center"><a href="#" onclick="save4(@d.cmno,@d.lectno);">@d.istatusname</a></td>
|
|
}
|
|
else
|
|
{
|
|
<td class="text-center">-</td>
|
|
}*@
|
|
<td class="link text-center"><a href="#" onclick="save4(@d.cmno,@d.lectno);">@d.istatusname</a></td>
|
|
|
|
<td>@d.rsCount</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>
|
|
@Html.Partial("./Partial/ExcelCommentBox")
|
|
<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>
|
|
<div id="thisbox2" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px; bottom: 30px; overflow: auto;">
|
|
<h4><i class="fa fa-bars"></i> <span id="pcap">OFF출결관리</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
|
<br />
|
|
<table class="regtable">
|
|
<colgroup><col width="100" /><col /></colgroup>
|
|
<tr style="display:none;">
|
|
<th>회차선택</th>
|
|
<td>
|
|
<select id="cmino" class="form-control" onchange="getoff()">
|
|
<option value="">-회차선택</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>근거자료</th>
|
|
<td id="tdfile"></td>
|
|
</tr>
|
|
<tr>
|
|
<td colspan="2">
|
|
<select id="cmisno" class="form-control" onchange="getoff()">
|
|
<option value="">신청교육일</option>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br />
|
|
<section class="panel panel-default">
|
|
<div class="table-responsive">
|
|
<table class="table table-striped b-t b-light">
|
|
<colgroup><col width="50" /><col /><col /><col /><col /><col /><col /><col /></colgroup>
|
|
<thead>
|
|
<tr>
|
|
<th>No</th>
|
|
<th>고객사</th>
|
|
<th>교육생(ID)</th>
|
|
<th>입실</th>
|
|
<th>퇴실</th>
|
|
<th>미입력 <input type="radio" name="attradio" onchange="changeatt('-1')" /></th>
|
|
<th>출석 <input type="radio" name="attradio" onchange="changeatt('2')" /></th>
|
|
<th>결석 <input type="radio" name="attradio" onchange="changeatt('0')" /></th>
|
|
<th>최근수정일 {ID}</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="tbodyoff"></tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
<div class="findboxbtnbox">
|
|
<a href="#" class="btn btn-primary" onclick="saveatt();">저장</a>
|
|
</div>
|
|
<br /><br />
|
|
</div>
|
|
<script>
|
|
|
|
var _no = 0;
|
|
function viewatt(no) {
|
|
_no = no;
|
|
showramemainlayer("/croom/atts?longval=" + no);
|
|
}
|
|
function save() {
|
|
var lectnos = "";
|
|
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
|
|
lectnos += "," + $(this).val();
|
|
});
|
|
if (lectnos == "") {
|
|
msg("수료처리할 대상자를 선택해주세요.");
|
|
} else if (confirm("선택한 대상자를 수료처리하시겠습니까?")) {
|
|
capp("/acommon/lectcomplete", { lectnos: lectnos.substr(1), type: 'calc' }, "cbsave");
|
|
}
|
|
}
|
|
function cbsave() {
|
|
if (capResult.code == 1000) {
|
|
msgf(capResult.obj.completecount + "건을 수료, " + capResult.obj.cancelcount + "건을 미수료 처리했습니다.", "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", { lectnos: lectnos.substr(1), type: 'abs' }, "cbsave2");
|
|
}
|
|
}
|
|
function cbsave2() {
|
|
if (capResult.code == 1000) {
|
|
msgf(capResult.obj + "건을 강제 수료 처리했습니다.", "submit('mform', 0, true)");
|
|
} else {
|
|
msgdev();
|
|
}
|
|
}
|
|
function save3() {
|
|
var lectnos = "";
|
|
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
|
|
lectnos += "," + $(this).val();
|
|
});
|
|
if (lectnos == "") {
|
|
msg("강제수료취소할 대상자를 선택해주세요.");
|
|
} else if (confirm("선택한 대상자를 강제 수료취소하시겠습니까?")) {
|
|
capp("/acommon/lectcompletecancel", { lectnos: lectnos.substr(1) }, "cbsave3");
|
|
}
|
|
}
|
|
function cbsave3() {
|
|
if (capResult.code == 1000) {
|
|
msgf(capResult.obj.cancelcount + "건을 강제 수료 취소했습니다.", "submit('mform', 0, true)");
|
|
} else {
|
|
msgdev();
|
|
}
|
|
}
|
|
|
|
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.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 cmicmno;
|
|
var cmilectno;
|
|
function setcmis(){
|
|
capp("/acommon/GetCmiForMixEdu", { cmno: cmicmno }, "renderCmi", null, null, null, true);
|
|
}
|
|
function renderCmi() {
|
|
var cmi = capResult.obj.cmi;
|
|
$("#cmino").children('option:not(:first)').remove();
|
|
$("#cmisno").children('option:not(:first)').remove();
|
|
$.each(capResult.obj.cmi, function (i, d) {
|
|
if (d.cshape == 2) {
|
|
$("#cmino").append("<option value='" + d.cmino + "'>" + d.iseq + "." + getdb(d.ititle) + "</option>");
|
|
} else {
|
|
$("#cmino").append("<option value='" + d.cmino + "'>" + d.iseq + "." + getdb(d.ititle) + "(" + getdb(d.idateymd2) + " "+ getdb(d.isthh)+":"+getdb(d.istmm)+"~"+getdb(d.iethh)+":"+getdb(d.ietmm)+")</option>");
|
|
|
|
}
|
|
});
|
|
var cmis = capResult.obj.cmis;
|
|
$.each(capResult.obj.cmis, function (i,d) {
|
|
$("#cmisno").append("<option value='" + d.cmisno + "'>" + d.estartShortDateString + "</option>");
|
|
});
|
|
if ($("#cmino option").length > 1) {
|
|
setv("cmino", $("#cmino option:eq(1)").val());
|
|
getoff();
|
|
}
|
|
}
|
|
|
|
function save4(cmno,lectno) {
|
|
cmicmno = cmno;
|
|
cmilectno = lectno;
|
|
bglayer(); $("#thisbox2").slideDown("fast", function () { $("#thisbox2").scrollTop(0); });
|
|
if (cmno != "" && cmno > 0) {
|
|
setcmis();
|
|
}
|
|
}
|
|
function getoff() {
|
|
$("#tdfile").html("");
|
|
$("#tbodyoff tr").remove();
|
|
$("input[name='attradio']:checked").prop("checked", false);
|
|
if ($("#cmino").val() != "" || $("#cmisno").val() != "") {
|
|
capp("/acommon/cminninggetforoff", { cmino: val("cmino"), cmisno: val("cmisno") }, "cbcmiget", null, null, null, true);
|
|
}
|
|
}
|
|
function cbcmiget() {
|
|
var ci = capResult.obj.ci;
|
|
setv("fgnooff", getdb(ci.fgnooff));
|
|
_fgno = ci.fgnooff;
|
|
if (ci.fileno3 > 0) {
|
|
$("#tdfile").html("<div class=\"fileitembox\"><a href=\"/aCommon/DownFile?fno=" + ci.fileno3 + "\" title=\"다운로드\"><i class=\"fa fa-paperclip\"></i> <span class=\"fileitem\">" + ci.orgname3 + "</span></a> " +
|
|
"<a href=\"#\" class=\"btn_txt btn btn-xxs btn-danger\" onclick=\"javascript:fnFileDeleteNew(" + ci.fileno3 + ", this, '', true, 'cbthisfiledel()');\" title=\"삭제\">삭제</a></div>");
|
|
}
|
|
else {
|
|
$("#tdfile").html("<input type=\"file\" id=\"file2\" name=\"file2\" />");
|
|
}
|
|
$.each(capResult.obj.li, function (i, d) {
|
|
$("#tbodyoff").append("<tr data-no=\"" + d.lectno + "\" data-attorg=\"" + getdb(d.istatus) + "\">" +
|
|
"<td>" + d.rnorvt + "</td>" +
|
|
"<td>" + getdb(d.asname) + "</td>" +
|
|
"<td>" + getdb(d.username) + "(" + getdb(d.userid) + ")" + "</td>" +
|
|
"<td>" + d.stimehm + "</td>" +
|
|
"<td>" + d.etimehm + "</td>" +
|
|
"<td><input type=\"radio\" class=\"att att-1\" name=\"istatus" + d.lectno + "\" " + (isnull(d.istatus) ? "checked" : "") + " value=\"\" /></td>" +
|
|
"<td><input type=\"radio\" class=\"att att2\" name=\"istatus" + d.lectno + "\" " + (getdb(d.istatus) == "2" ? "checked" : "") + " value=\"2\" /></td>" +
|
|
"<td><input type=\"radio\" class=\"att att0\" name=\"istatus" + d.lectno + "\" " + (!isnull(d.istatus) && getdb(d.istatus) == "" || getdb(d.istatus) == "1" ? "checked" : "") + " value=\"0\" /></td>"+
|
|
"<td>" + d.udtymdhm +" {"+d.unoid+"} </td ></tr > ");
|
|
|
|
});
|
|
}
|
|
function changeatt(idx) {
|
|
$("input.att" + idx).prop("checked", true);
|
|
}
|
|
function saveatt() {
|
|
if (val("cmino") == "") { focus("cmino"); msg2("회차를 선택해주세요."); }
|
|
else if ($("#tbodyoff tr").length < 1) { msg2("저장할 출석데이터가 없습니다."); }
|
|
else if (confirm("출석데이터를 저장하시겠습니까?")) {
|
|
var data = new FormData();
|
|
data.append("cmino", val("cmino"));
|
|
if ($("#file2").length > 0 && $("#file2")[0].files.length > 0) {
|
|
data.append("file2", $("#file2")[0].files[0]);
|
|
}
|
|
var lis = "";
|
|
$.each($("#tbodyoff tr"), function (i, r) {
|
|
lis += ";" + $(r).attr("data-no") + ":" + $(r).find("input.att:checked").val();
|
|
});
|
|
|
|
data.append("lis", lis.substr(1));
|
|
data.append("fgnooff", _fgno);
|
|
capfile("/acommon/offattsave", data, "cboffattsave", false, null, true, true);
|
|
}
|
|
}
|
|
function cboffattsave() {
|
|
if (capResult.code == 1000) {
|
|
msgf2("저장했습니다.", "submit('mform', 0, true)");
|
|
} else { msgdev(true); }
|
|
}
|
|
</script> |