342 lines
14 KiB
Plaintext
342 lines
14 KiB
Plaintext
|
|
@model NP.Model.VMLect
|
||
|
|
@{
|
||
|
|
int idx = 1;
|
||
|
|
}
|
||
|
|
<form id="mform" method="post">
|
||
|
|
@if (Model.CMSDs.Count() < 1)
|
||
|
|
{
|
||
|
|
@:*등록된 과제가 없습니다.
|
||
|
|
}
|
||
|
|
else
|
||
|
|
{
|
||
|
|
<table class="regtable" style="margin-top: 0;">
|
||
|
|
<colgroup><col width="200" /><col /></colgroup>
|
||
|
|
<tr>
|
||
|
|
<th>회차선택</th>
|
||
|
|
<td>
|
||
|
|
<select name="addstringval" id="addstringval" class="form-control disp-init" onchange="changeex(this)">
|
||
|
|
@foreach (var e in Model.CMSDs)
|
||
|
|
{
|
||
|
|
<option value="@e.sdno" @(Model.addstringval == e.sdno.ToString() ? "selected" : "")>@(e.rno) 회</option>
|
||
|
|
}
|
||
|
|
</select>
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
@foreach (var e in Model.CMSDs)
|
||
|
|
{
|
||
|
|
<tr class="extr hidden ex@(e.rno)"><th>평가명</th><td>@e.sdname</td></tr>
|
||
|
|
<tr class="extr hidden ex@(e.rno)"><th>만점/조건</th><td>@string.Format("{0}점 만점 / 진도율 {1}% 이상", e.tpoint, e.sdcondition)</td></tr>
|
||
|
|
<tr class="extr hidden ex@(e.rno)"><th>평가내용</th><td>@Html.Raw((e.sddesc ?? "").Replace(System.Environment.NewLine, "<br/>"))</td></tr>
|
||
|
|
<tr class="extr hidden ex@(e.rno)">
|
||
|
|
<th>첨부파일</th>
|
||
|
|
<td>
|
||
|
|
@Html.Partial("./Partial/File", Model.FileList.Where(w => w.fgno == e.fgno).ToList(), new ViewDataDictionary {
|
||
|
|
{ "name", "fgno" },{"value", 0 },{ "fname", "file"},
|
||
|
|
{"width", null },{"folder", "Resume" },{"filecount", 5 },
|
||
|
|
{"readmode", 1 },{"hidemode", 0 },
|
||
|
|
{ "isimage", 0 },{ "imageid", "" },{ "dftsrc", "" },
|
||
|
|
{ "fileext", "" }
|
||
|
|
})
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
}
|
||
|
|
</table>
|
||
|
|
}
|
||
|
|
<br />
|
||
|
|
<section class="panel panel-default">
|
||
|
|
<div style="padding: 10px 10px">
|
||
|
|
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-환급여부;1:환급;0:비환급" }, { "name", "addstringval2" }, { "selected", Model.addstringval2 }, { "style", (Model.CM.isrefund == 1 ? "" : "display:none;") }, { "onchange", "findme()" } })
|
||
|
|
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":-참여횟수;0:0회;1:1회;2:2회;3:3회이상" }, { "name", "addstringval3" }, { "selected", Model.addstringval3 }, { "onchange", "findme()" } })
|
||
|
|
<a href="#" class="f-r btn btn-default" onclick="golist();" style="margin-left: 20px;">목록</a>
|
||
|
|
<a href="#" class="f-r btn btn-info" onclick="batchsd();" style="margin-left: 10px;">일괄평가</a>
|
||
|
|
@Html.Partial("./Partial/sembtns", "#tbody1;" + (Model.IsAdmin ? "1;1;1" : "0;0;0") + ";1;right;평가안내")
|
||
|
|
</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>첨삭</th>
|
||
|
|
<th>최근제출일(IP)</th>
|
||
|
|
<th>최근평가일(IP)</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody class="data" id="tbody1">
|
||
|
|
@foreach (var d in Model.LectSDs)
|
||
|
|
{
|
||
|
|
<tr data-sdno="@d.sdno" data-lectno="@d.lectno">
|
||
|
|
<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>@d.ccount</td>
|
||
|
|
<td><a class="btn btn-xxs btn-select" onclick="viewsd(@d.sdno, @d.lectno, @(idx++))" href="#">@d.cpoint2</a></td>
|
||
|
|
<td>@d.feedbox</td>
|
||
|
|
<td>@Html.Raw(d.submittimeip)</td>
|
||
|
|
<td>@Html.Raw(d.checktimeip)</td>
|
||
|
|
</tr>
|
||
|
|
}
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
@Html.Partial("./Partial/dform", Model)
|
||
|
|
</form>
|
||
|
|
<div id="thisbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px; overflow: auto; bottom: 30px;">
|
||
|
|
<h4><i class="fa fa-bars"></i> <span id="pcap">개별 평가</span><a href="#" class="btn btn-default btn-xs f-r closethisbox">닫기</a></h4>
|
||
|
|
<br />
|
||
|
|
<h5><i class="fa fa-bars"></i> 개요</h5>
|
||
|
|
<table class="regtable" id="exsummary">
|
||
|
|
<tr>
|
||
|
|
<th>참여자</th>
|
||
|
|
<td id="userinfo"></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>점수</th>
|
||
|
|
<td><input type="text" class="form-control int disp-init text-center" style="width: 70px;" max="3" id="cpoint" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>피드백</th>
|
||
|
|
<td><textarea class="form-control" id="feedb" style="resize: none; height: 250px;" maxlength="800"></textarea></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<br />
|
||
|
|
<div class="text-center">
|
||
|
|
<a href="#" id="btnpre" class="btn btn-info btn-xs" onclick="save(-1)">◀이전</a>
|
||
|
|
<a href="#" class="btn btn-primary btn-xs" onclick="save(0)">저장</a>
|
||
|
|
<a href="#" id="btnnext" class="btn btn-info btn-xs" onclick="save(1)">다음▶</a>
|
||
|
|
<a href="#" class="btn btn-default btn-xs closethisbox">닫기</a>
|
||
|
|
</div>
|
||
|
|
<h5><i class="fa fa-bars"></i> 참여내용</h5>
|
||
|
|
<ul id="discusses"></ul>
|
||
|
|
<br />
|
||
|
|
</div>
|
||
|
|
<div id="thisbox2" class="findbox draggable regbox" style="width: 800px; 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>
|
||
|
|
<br />
|
||
|
|
<table class="regtable" id="exsummary2">
|
||
|
|
<tr>
|
||
|
|
<th>점수</th>
|
||
|
|
<td><input type="text" class="form-control int disp-init text-center" style="width: 70px;" max="3" id="cpoint2" /></td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>피드백</th>
|
||
|
|
<td><textarea class="form-control" id="feedb2" style="resize: none; height: 250px;" maxlength="800"></textarea></td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
<br /><br /><br />
|
||
|
|
<div class="text-center">
|
||
|
|
<a href="#" class="btn btn-primary btn-xs" onclick="savebatch()">저장</a>
|
||
|
|
<a href="#" class="btn btn-default btn-xs closethisbox">닫기</a>
|
||
|
|
</div>
|
||
|
|
<br /><br />
|
||
|
|
</div>
|
||
|
|
<style type="text/css">
|
||
|
|
td.estate0 {
|
||
|
|
background-color: #ffd7bb !important;
|
||
|
|
color: red;
|
||
|
|
}
|
||
|
|
|
||
|
|
td a.iscopy1 {
|
||
|
|
background-color: red !important;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tablea0 {
|
||
|
|
word-break: break-all;
|
||
|
|
width: 100%;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tablea0 tr td {
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
|
||
|
|
.tablea0 tr td.qi {
|
||
|
|
text-align: left;
|
||
|
|
}
|
||
|
|
|
||
|
|
.regtable tr td .tablea0 tr td {
|
||
|
|
padding: 6px 5px;
|
||
|
|
}
|
||
|
|
/*#exsummary tr td{text-align: center;}*/
|
||
|
|
td.qi div.imgbox.active {
|
||
|
|
position: fixed;
|
||
|
|
left: 10%;
|
||
|
|
top: 10%;
|
||
|
|
height: 80%;
|
||
|
|
width: 80%;
|
||
|
|
z-index: 3000;
|
||
|
|
background-color: #999;
|
||
|
|
text-align: center;
|
||
|
|
padding-top: 10%;
|
||
|
|
}
|
||
|
|
|
||
|
|
td.qi div.imgbox.active img {
|
||
|
|
height: 60%;
|
||
|
|
max-width: 60%;
|
||
|
|
}
|
||
|
|
|
||
|
|
#discusses li {
|
||
|
|
border: 1px solid #ddd;
|
||
|
|
margin-bottom: 5px;
|
||
|
|
padding: 5px 10px;
|
||
|
|
}
|
||
|
|
|
||
|
|
.thissubject {
|
||
|
|
text-decoration: underline;
|
||
|
|
font-weight: bold;
|
||
|
|
}
|
||
|
|
|
||
|
|
.thisgray {
|
||
|
|
color: #999;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
<script>
|
||
|
|
$(document).ready(function () {
|
||
|
|
$("tr.ex" + ($("#addstringval").find("option").index($("#addstringval").find("option:selected")) + 1)).removeClass("hidden");
|
||
|
|
$("body").on("click", "td.qi div.imgbox", function () {
|
||
|
|
$(this).toggleClass("active");
|
||
|
|
});
|
||
|
|
});
|
||
|
|
function findme() {
|
||
|
|
bglayer(); submit();
|
||
|
|
}
|
||
|
|
function changeex(s) {
|
||
|
|
$("tr.extr").addClass("hidden");
|
||
|
|
$("tr.ex" + ($(s).find("option").index($(s).find("option:selected")) + 1)).removeClass("hidden");
|
||
|
|
$("#tbody1 tr").remove();
|
||
|
|
getsds(false);
|
||
|
|
}
|
||
|
|
var _isprenext = false;
|
||
|
|
function getsds(isprenext) {
|
||
|
|
_isprenext = isprenext;
|
||
|
|
if (isprenext) {
|
||
|
|
$("#tbody1 tr").remove();
|
||
|
|
capp("/acommon/lectdiscusses", { cmno: @Model.CM.cmno, sdno: $("#addstringval").val(), isrebate: valnull("addstringval2"), lectdiscusses: valnull("addstringval3") }, "cblectsds", null, null, null, true);
|
||
|
|
} else {
|
||
|
|
capp("/acommon/lectdiscusses", { cmno: @Model.CM.cmno, sdno: $("#addstringval").val(), isrebate: valnull("addstringval2"), lectdiscusses: valnull("addstringval3") }, "cblectsds");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function cblectsds() {
|
||
|
|
$.each(capResult.obj, function (i, d) {
|
||
|
|
$("#tbody1").append(("<tr data-sdno=\"{8}\" data-lectno=\"{0}\">" +
|
||
|
|
"<td><input type=\"checkbox\" class=\"autocheck\" value=\"{0}\" data-userno=\"{1}\" /></td>" +
|
||
|
|
"<td>{2}</td>" +
|
||
|
|
"<td>{3}</td>" +
|
||
|
|
"<td>{4}</td>" +
|
||
|
|
"<td>{5}</td>" +
|
||
|
|
"<td>{7}</td>" +
|
||
|
|
"<td><a class=\"btn btn-xxs btn-select viewsd\" onclick=\"viewsd({8}, {0}, {13})\" href=\"#\">{9}</a></td>" +
|
||
|
|
"<td>{10}</td>" +
|
||
|
|
"<td>{11}</td>" +
|
||
|
|
"<td>{12}</td>").format(d.lectno, d.userno, d.rnorvt, d.isrebatename, d.asname
|
||
|
|
, d.usernameid, d.sdstate, d.ccount, d.sdno, d.cpoint2
|
||
|
|
, d.feedbox, d.submittimeip, d.checktimeip, (i+1)));
|
||
|
|
});
|
||
|
|
if (_isprenext) {
|
||
|
|
viewsd($("#tbody1 tr:eq(" + (_ridx + _saveidx - 1) + ")").attr("data-sdno"), $("#tbody1 tr:eq(" + (_ridx + _saveidx - 1) + ")").attr("data-lectno"), _ridx + _saveidx);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
var _sdno = 0;
|
||
|
|
var _lectno = 0;
|
||
|
|
var _ridx=0;
|
||
|
|
function viewsd(sdno, lectno, ridx) {
|
||
|
|
_sdno = sdno;
|
||
|
|
_lectno = lectno;
|
||
|
|
_ridx = ridx;
|
||
|
|
capp("/acommon/lectdiscuss", { lectno: lectno, sdno: sdno }, "cblectsd");
|
||
|
|
}
|
||
|
|
function cblectsd() {
|
||
|
|
var sd = capResult.obj.sd;
|
||
|
|
var ds = capResult.obj.ds;
|
||
|
|
$("#userinfo").text("[{0}]{1} | {2}".format(sd.isrebatename, getdb(sd.asname), sd.usernameid));
|
||
|
|
setv("cpoint", sd.cpoint);
|
||
|
|
$("#feedb").val(sd.feedb);
|
||
|
|
$("#btnpre,#btnnext").show();
|
||
|
|
if (_ridx == 1) {
|
||
|
|
$("#btnpre").hide();
|
||
|
|
}
|
||
|
|
if (_ridx == $("#tbody1 tr").length) {
|
||
|
|
$("#btnnext").hide();
|
||
|
|
}
|
||
|
|
$("#discusses").html("");
|
||
|
|
if (ds.length < 1) {
|
||
|
|
$("#discusses").append("<li>-참여내용이 없습니다.</li>");
|
||
|
|
} else {
|
||
|
|
$.each(ds, function (i, d) {
|
||
|
|
$("#discusses").append("<li><p class=\"thissubject\">" + d.subject + "</p><div class=\"thiscontent\">" + d.contents + "</div><p class=\"thisgray\">" + d.cdtymdhms + "(" + d.cip + ")</p></li>");
|
||
|
|
});
|
||
|
|
}
|
||
|
|
setTimeout(function () {
|
||
|
|
bglayer(); $("#thisbox").slideDown("fast", function () { $("#thisbox").scrollTop(0); });
|
||
|
|
bglayer2(false);
|
||
|
|
$("#cpoint").focus();
|
||
|
|
}, 10);
|
||
|
|
}
|
||
|
|
var _saveidx = 0;
|
||
|
|
function save(idx) {
|
||
|
|
if (confirm("저장하시겠습니까?")) {
|
||
|
|
_saveidx = idx;
|
||
|
|
capp("/acommon/lectsdsave", { ccount: 1, lectno: _lectno, sdno: val("addstringval"), iscopy: 0, cpoint: val("cpoint"), feedb: val("feedb") }, "cbsave", null, null, null, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function cbsave() {
|
||
|
|
if (capResult.code == 1000) {
|
||
|
|
if (_saveidx == 0) {
|
||
|
|
msg2("저장했습니다.", null, null, null, true);
|
||
|
|
submit("mform", 500);
|
||
|
|
} else {
|
||
|
|
//리스트 갱신 후 다음 또는 이전 수강생과제 표시
|
||
|
|
msg2("저장했습니다.", null, null, null, true);
|
||
|
|
setTimeout(function () {
|
||
|
|
hidelayermsg2(true);
|
||
|
|
getsds(true);
|
||
|
|
}, 300);
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
msgdev(true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function batchsd() {
|
||
|
|
var lectnos = "";
|
||
|
|
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
|
||
|
|
lectnos += "," + $(this).val();
|
||
|
|
});
|
||
|
|
if (lectnos == "") {
|
||
|
|
msg("일괄평가할 대상자를 선택해주세요.");
|
||
|
|
} else {
|
||
|
|
setv("cpoint2", "");
|
||
|
|
setv("feedb2", "");
|
||
|
|
bglayer(); $("#thisbox2").slideDown("fast", function () { $("#thisbox2").scrollTop(0); });
|
||
|
|
$("#cpoint2").focus();
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function savebatch() {
|
||
|
|
var lectnos = "";
|
||
|
|
$.each($("#tbody1 tr td input.autocheck:checked"), function () {
|
||
|
|
lectnos += "," + $(this).val();
|
||
|
|
});
|
||
|
|
if (lectnos == "") {
|
||
|
|
msg("일괄평가할 대상자를 선택해주세요.");
|
||
|
|
} else if (check("cpoint2", null, "점수를 입력해주세요.", true, true)) { }
|
||
|
|
else if (check("feedb2", null, "피드백 내용을 입력해주세요.", true, true)) { }
|
||
|
|
else if (confirm("선택한 대상자를 일괄평가하시겠습니까?")) {
|
||
|
|
capp("/acommon/lectsdsave", { ccount: 1, cmno: @Model.CM.cmno, lectnos: lectnos.substr(1), cpoint: val("cpoint2"), sdno: val("addstringval"), feedb: val("feedb2") }, "cblectsdsave", null, null, null, true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function cblectsdsave() {
|
||
|
|
if (capResult.code == 1000) {
|
||
|
|
msg2("일괄평가했습니다.", null, null, null, true);
|
||
|
|
submit("mform", 500);
|
||
|
|
} else {
|
||
|
|
msgdev(true);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
</script>
|