469 lines
26 KiB
Plaintext
469 lines
26 KiB
Plaintext
@model NP.Model.VMLect
|
|
@{
|
|
var ev = Model.Lects.FirstOrDefault() ?? new NP.Model.Lect() { };
|
|
}
|
|
<form id="mform" method="post">
|
|
@if (Model.CMEV.isoffabs == 1)
|
|
{
|
|
<span style="padding:10px; font-weight:700; color:red;">집합교육 출석 필수강좌입니다.</span>
|
|
}
|
|
<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;display:none;" /><col style="width: 100px;" /><col /><col /><col /><col /><col /><col /><col /></colgroup>
|
|
<thead>
|
|
<tr><th style="display:none;">기준</th><th>평가항목</th><th>진도율</th>@*<th>진행평가(%)</th>*@<th>최종평가(%)</th><th>과제(%)</th><th style="display:none;">토론(%)</th><th style="display:none;">기타(%)</th><th>합계(총점)</th></tr>
|
|
</thead>
|
|
@if (Model.CM.isrefund == 1)
|
|
{
|
|
<tr>
|
|
<th rowspan="2" style="display:none;">환급</th>
|
|
<th>비율(점수)</th>
|
|
<td>@Model.CMEV.attendrfd</td>
|
|
@*<td>@Model.CMEV.midrfd</td>*@
|
|
<td>@Model.CMEV.finalrfd</td>
|
|
<td>@Model.CMEV.subjectrfd</td>
|
|
<td style="display:none;">@Model.CMEV.discussrfd</td>
|
|
<td style="display:none;">@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 style="display:none;">@Model.CMEV.discusscutrfd</td>
|
|
<td style="display:none;">@Model.CMEV.etccutrfd</td>
|
|
<td>@Model.CMEV.cutrfd</td>
|
|
</tr>
|
|
}
|
|
else
|
|
{
|
|
|
|
<tr>
|
|
<th rowspan="2" style="display:none;">비환급</th>
|
|
<th>비율(점수)</th>
|
|
<td>@Model.CMEV.attend</td>
|
|
@*<td>@Model.CMEV.mid</td>*@
|
|
<td>@Model.CMEV.final</td>
|
|
<td>@Model.CMEV.subject</td>
|
|
<td style="display:none;">@Model.CMEV.discuss</td>
|
|
<td style="display:none;">@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 style="display:none;">@Model.CMEV.discusscut</td>
|
|
<td style="display:none;">@Model.CMEV.etccut</td>
|
|
<td>@Model.CMEV.cut</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 class="step-content">
|
|
<div class="step-pane active form-inline">
|
|
@if (Model.CMEV.cshape != 1)
|
|
{
|
|
@Html.Partial("./Partial/Select", Model.CMinningscds, new ViewDataDictionary { { "special", "reg" }, { "name", "addstringval3" }, { "selected", Model.addstringval3 }, { "df", ":교육일정" }, { "onchange", "findme()" } })
|
|
}
|
|
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":수료여부;1:수료;0:미수료" }, { "name", "addstringval2" }, { "selected", Model.addstringval2 }, { "onchange", "findme()" } })
|
|
<label><input type="checkbox" name="addstringval4" value="1" @(Model.addstringval4 == "1" ? "checked" : "") onchange="findme()" /> 과제제출완료</label>
|
|
<label><input type="checkbox" name="addstringval5" value="1" @(Model.addstringval5 == "1" ? "checked" : "") onchange="findme()" /> 진도율조건충족</label>
|
|
<label><input type="checkbox" name="addstringval6" value="1" @(Model.addstringval6 == "1" ? "checked" : "") onchange="findme()" /> 시험기준충족</label>
|
|
@Html.Partial("./Partial/Text", Model.addstringval7, Helpers.DicText(new NP.Model.TextDic() { Name = "addstringval7", Value = Model.addstringval7, PH = "ID 또는 이름을 입력하세요.", CssClass = "ff" }))
|
|
<button class="btn btn-default btn-s-xs" type="button" onclick="javascript:findme();"><i class="fa fa-search"></i></button>
|
|
</div>
|
|
</div>
|
|
<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;평가안내")
|
|
|
|
@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>
|
|
}
|
|
}
|
|
|
|
<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>
|
|
@if (Model.CMEV.cshape == 2)
|
|
{
|
|
<th width="30">운영기수</th>
|
|
}
|
|
<th>구분</th>
|
|
<th>고객사</th>
|
|
<th>교육생(ID)</th>
|
|
<th>교육시작일</th>
|
|
<th>교육종료일</th>
|
|
<th>진도율</th>
|
|
@*<th>진행평가(@ev.ex0cnt)</th>*@
|
|
<th>최종평가(@ev.ex1cnt)</th>
|
|
<th>과제(@ev.sd0cnt)</th>
|
|
<th style="display:none;">토론(@ev.sd1cnt)</th>
|
|
<th>환산점수</th>
|
|
@if (Model.CMEV.isoffabs == 1)
|
|
{
|
|
<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 (Model.CMEV.cshape == 2)
|
|
{
|
|
<td>@d.sseq</td>
|
|
}
|
|
<td>@d.isrebatename</td>
|
|
<td>@d.asname</td>
|
|
<td>@d.usernameid</td>
|
|
<td>@((Model.CM.cshape == 0 && d.isrebate == 0 ? d.payoktime : d.sdate).Value.ToShortDateString())</td>
|
|
@if (Model.CMEV.cshape == 2)
|
|
{
|
|
if (d.iscomplete != 1)
|
|
{
|
|
<td class="link text-center"><a href="#" onclick="javascript: openScd(@Model.CM.cmno,@d.lectno,@d.cmisno);">@d.eend.ToShortDateString()</a></td>
|
|
}
|
|
else
|
|
{
|
|
<td>@d.eend.ToShortDateString()</td>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<td>@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.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 style="display:none;">@( d.sd1cnt < 1 ? "-" :d.sd1lectcnt < 1 && d.sd1cnt > 0 ? "미제출" : d.sd1lectpoint.ToString())</td>
|
|
<td>@(((d.apoint + d.mpoint + d.fpoint + d.spoint + d.dpoint)).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>*@
|
|
@if (Model.CMEV.isoffabs == 1)
|
|
{
|
|
<td class="link text-center"><a href="#" onclick="save4();">@d.istatusname</a></td>
|
|
}
|
|
@*<td>@(d.rs0lectcnt) / @(d.rs0cnt)</td>*@
|
|
<td>@(d.rs0lectcnt > 0 ? 1 : 0) / @(d.rs0cnt > 0 ? 1 : 0)</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>
|
|
}
|
|
@*<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>*@
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
|
|
@Html.Partial("./Partial/dform", Model)
|
|
</form>
|
|
<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>
|
|
<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>
|
|
@foreach (var d in Model.CMInnings)
|
|
{
|
|
if (Model.CM.cshape == 2)
|
|
{
|
|
<option value="@d.cmino">@string.Format("{0}.{1}", d.iseq, d.ititle)</option>
|
|
}
|
|
else
|
|
{
|
|
<option value="@d.cmino">@string.Format("{0}.{1}({2} {3}:{4}~{5}:{6})", d.iseq, d.ititle, d.idate.ToString("yy-MM-dd"), d.ist.Substring(0, 2), d.ist.Substring(2, 2), d.iet.Substring(0, 2), d.iet.Substring(2, 2))</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>
|
|
@foreach (var d in Model.CMinningscds)
|
|
{
|
|
<option value="@d.cmisno">@d.estart.ToString("yyyy-MM-dd")</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 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.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", { 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();
|
|
}
|
|
}
|
|
function save3() {
|
|
var lectnos = "";
|
|
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
|
|
lectnos += "," + $(this).val();
|
|
});
|
|
if (lectnos == "") {
|
|
msg("강제수료취소할 대상자를 선택해주세요.");
|
|
} else if (confirm("선택한 대상자를 강제 수료취소하시겠습니까?")) {
|
|
capp("/acommon/lectcompletecancel", { cmno: @Model.CM.cmno,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.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 _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(); }
|
|
}
|
|
function save4() {
|
|
bglayer(); $("#thisbox2").slideDown("fast", function () { $("#thisbox2").scrollTop(0); });
|
|
if ($("#cmino option").length > 1) {
|
|
setv("cmino", $("#cmino option:eq(1)").val());
|
|
//setv("cmisno", $("#cmisno option:eq(1)").val());
|
|
getoff();
|
|
}
|
|
}
|
|
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) {
|
|
//if ($(r).find("input.att:checked").val() != $(r).attr("data-attorg")) {
|
|
lis += ";" + $(r).attr("data-no") + ":" + $(r).find("input.att:checked").val();
|
|
//}
|
|
});
|
|
//if (lis == "") {
|
|
// msg2("저장했습니다.");
|
|
//} else {
|
|
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>
|
|
|