237 lines
12 KiB
Plaintext
237 lines
12 KiB
Plaintext
@model NP.Model.VMCRoom
|
|
@{
|
|
var sv4 = "," + (Model.stringval4 ?? "") + ",";
|
|
}
|
|
|
|
<form id="mform" method="post">
|
|
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
|
|
<div class="step-content">
|
|
<div class="step-pane active form-inline">
|
|
<div class="form-groupx">
|
|
<table class="table table-striped b-t b-light no-odd">
|
|
<colgroup>
|
|
<col width="150" />
|
|
<col width="*" />
|
|
</colgroup>
|
|
<tr>
|
|
<th>기간별조회</th>
|
|
<td class="text-left">
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(1)" class="btn btn-select btn-xxs">오늘</a>
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(7)" class="btn btn-select btn-xxs">7일</a>
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(15)" class="btn btn-select btn-xxs">15일</a>
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(30)" class="btn btn-select btn-xxs">1개월</a>
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(60)" class="btn btn-select btn-xxs">2개월</a>
|
|
<a href="#" style="padding: 6px 12px;" onclick="setdate(0)" class="btn btn-select btn-xxs">전체</a>
|
|
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval) ? (DateTime?)null : Convert.ToDateTime(Model.stringval), new ViewDataDictionary { { "name", "stringval" } }) ~ @Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval2) ? (DateTime?)null : Convert.ToDateTime(Model.stringval2), new ViewDataDictionary { { "name", "stringval2" } })
|
|
</td>
|
|
</tr>
|
|
@if (!ViewBag.IsSiteAdmin)
|
|
{
|
|
<tr>
|
|
<th>고객사명</th>
|
|
<td class="text-left">
|
|
@Html.Partial("./Partial/Text", Model.stringval3, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval3", Value = Model.stringval3, PH = "고객사명", CssClass = "" }))
|
|
</td>
|
|
</tr>
|
|
}
|
|
<tr>
|
|
@Html.HiddenFor(m => m.stringval4)
|
|
<th>환급여부</th>
|
|
<td class="text-left">
|
|
<label><input type="checkbox" name="rebate" value="1" @(sv4.Contains(",1,") ? "checked" : "") /> 환급</label>
|
|
<label><input type="checkbox" name="rebate" value="0" @(sv4.Contains(",0,") ? "checked" : "") /> 비환급</label>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>검색어</th>
|
|
<td class="text-left">
|
|
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", ":전체검색;username:이름;userid:ID;itemname:상품명" }, { "name", "stringval5" }, { "selected", Model.stringval5 } })
|
|
@Html.Partial("./Partial/Text", Model.stringval6, Helpers.DicText(new NP.Model.TextDic() { Name = "stringval6", Value = Model.stringval6, PH = "", CssClass = "ff" }))
|
|
@Html.Partial("./Partial/Button", new NP.Model.Button() { Special = "search", OnClick = "searchthis()" })
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
<div class="tar buttonbox">
|
|
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
|
|
<a href="#" onclick="javascript: printcontract();" class="btn btn-s-xs btn-success" style="margin-left: 5px;">위탁계약서 일괄인쇄</a>
|
|
<a href="#" onclick="javascript: printannotation();" class="btn btn-s-xs btn-success" style="margin-left: 5px;">입교통지서 일괄인쇄</a>
|
|
<a href="#" onclick="javascript: printcertification();" class="btn btn-s-xs btn-success" style="margin-left: 5px;">수료증 일괄인쇄</a>
|
|
</div>
|
|
<section class="panel panel-default">
|
|
<div class="table-responsive" id="excel1">
|
|
<table class="table table-striped b-t b-light no-odd">
|
|
<thead>
|
|
<tr>
|
|
<th><input type="checkbox" onclick="javascript: checkall('excel1', this);" /></th>
|
|
<th width="100">신청자(ID)<br />회사명</th>
|
|
<th>상품명</th>
|
|
<th>신청일</th>
|
|
<th width="100">위탁계약서</th>
|
|
<th width="100">입교통지서</th>
|
|
<th width="100">수료증</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-lectno="@d.lectno" data-cshape="@(d.cshape == 0 ? 0 : 1)" data-iscomplete="@d.iscomplete" /></td>
|
|
<td>@string.Format("{0}({1}){2}", d.username, d.userid, d.asname)</td>
|
|
<td>@d.cname</td>
|
|
<td>@d.cdtymd</td>
|
|
<td>
|
|
@if (d.cshape != 0)
|
|
{
|
|
<a href="#" onclick="javascript: educontract(@d.lectno);">[인쇄]</a>
|
|
}
|
|
</td>
|
|
<td><a href="#" onclick="javascript:eduannotation(@d.lectno)">[인쇄]</a></td>
|
|
<td>
|
|
@if (d.iscomplete == 1)
|
|
{
|
|
<a href="#" onclick="javascript:certification(@d.lectno)">[인쇄]</a>
|
|
}
|
|
</td>
|
|
</tr>
|
|
}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
|
|
</section>
|
|
</form>
|
|
<form id="dform" method="post" action="">
|
|
@Html.Partial("./Partial/dform", Model, new ViewDataDictionary { { "preform", 1 } })
|
|
</form>
|
|
@section styles{
|
|
<style type="text/css">
|
|
tr.error{
|
|
color:red;
|
|
}
|
|
</style>
|
|
}
|
|
@section scriptsHeader{
|
|
@Html.Partial("./Partial/ScriptDate")
|
|
}
|
|
@section scripts{
|
|
<script>
|
|
var now = '@DateTime.Now.ToString("yyyy-MM-dd")';
|
|
var ds = '@(Model.stringval20)'.split(';');
|
|
$(document).ready(function () {
|
|
$("#stringval6").on("keydown", function (e) {
|
|
if (e.keyCode == 13) {
|
|
searchthis();
|
|
}
|
|
});
|
|
});
|
|
function setdate(idx) {
|
|
switch (idx) {
|
|
case 1: setv("stringval", now); setv("stringval2", now); break;
|
|
case 7: setv("stringval", ds[0]); setv("stringval2", now); break;
|
|
case 15: setv("stringval", ds[1]); setv("stringval2", now); break;
|
|
case 30: setv("stringval", ds[2]); setv("stringval2", now); break;
|
|
case 60: setv("stringval", ds[3]); setv("stringval2", now); break;
|
|
default:
|
|
setv("stringval", ""); setv("stringval2", ""); break;
|
|
}
|
|
$("#stringval,#stringval2").css("background-color", "#25313e");
|
|
setTimeout(function () {
|
|
$("#stringval,#stringval2").css("background-color", "#fafafa");
|
|
}, 300);
|
|
//submit();
|
|
}
|
|
function searchthis() {
|
|
setv("stringval4", getcheckv("rebate"));
|
|
submit();
|
|
}
|
|
function certification(lectno) {
|
|
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("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
|
}
|
|
}
|
|
function educontract(lectno) {
|
|
var pop = window.open('@ViewBag.reporturl/educontract.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("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
|
}
|
|
}
|
|
function eduannotation(lectno) {
|
|
var pop = window.open('@ViewBag.reporturl/eduannotation.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("팝업이 차단되어 있습니다. 차단을 해제해 주세요.");
|
|
}
|
|
}
|
|
function printcontract() {
|
|
//시작하기전에 errorclass 제거
|
|
$("#tbody1 tr").removeClass("error");
|
|
var isOK = true;
|
|
var cnt = 0;
|
|
var lectnos = "";
|
|
if ($("#tbody1 tr input.autocheck:checked").length < 1) {
|
|
var isOK = false;
|
|
msg("선택된 인원이 없습니다.");
|
|
} else {
|
|
$.each($("#tbody1 tr input.autocheck:checked"), function (i, c) {
|
|
if ($(c).attr("data-cshape") == 0) {
|
|
$(c).closest("tr").addClass("error");
|
|
cnt++;
|
|
} else {
|
|
lectnos += ","+$(c).attr("data-lectno");
|
|
}
|
|
});
|
|
if (cnt > 0) {
|
|
isOK = false;
|
|
}
|
|
if (isOK) {
|
|
educontract(lectnos.substring(1));
|
|
} else {
|
|
msg("교육장 교육만 조회하실 수 있습니다.");
|
|
}
|
|
}
|
|
}
|
|
function printannotation() {
|
|
var lectnos = "";
|
|
if ($("#tbody1 tr input.autocheck:checked").length < 1) {
|
|
msg("선택된 인원이 없습니다.");
|
|
} else {
|
|
$.each($("#tbody1 tr input.autocheck:checked"), function (i, c) {
|
|
lectnos += "," + $(c).attr("data-lectno");
|
|
});
|
|
eduannotation(lectnos.substring(1));
|
|
}
|
|
}
|
|
function printcertification() {
|
|
//시작하기전에 errorclass 제거
|
|
$("#tbody1 tr").removeClass("error");
|
|
var isOK = true;
|
|
var cnt = 0;
|
|
var lectnos = "";
|
|
if ($("#tbody1 tr input.autocheck:checked").length < 1) {
|
|
var isOK = false;
|
|
msg("선택된 인원이 없습니다.");
|
|
} else {
|
|
$.each($("#tbody1 tr input.autocheck:checked"), function (i, c) {
|
|
if ($(c).attr("data-iscomplete") == 0) {
|
|
$(c).closest("tr").addClass("error");
|
|
cnt++;
|
|
} else {
|
|
lectnos += "," + $(c).attr("data-lectno");
|
|
}
|
|
});
|
|
if (cnt > 0) {
|
|
isOK = false;
|
|
}
|
|
if (isOK) {
|
|
certification(lectnos.substring(1));
|
|
} else {
|
|
msg("수료가 완료된 강좌만 출력할 수 있습니다.");
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
} |