<기능개선>

1. PMS NO : 추가 개발건 : 수강생 교육이력 화면 변경건
2. (주요)작업내용 
(1) 수강생 교육이력 화면 변경건
This commit is contained in:
jity7777 2022-03-22 05:26:01 +00:00
parent b624af6e01
commit 2efcb78b4b
5 changed files with 234 additions and 15 deletions

View File

@ -696,6 +696,7 @@
<Content Include="Views\Shared\Partial\ScdScript.cshtml" />
<Content Include="Views\user\pwchange.cshtml" />
<Content Include="Views\user\editinfo.cshtml" />
<Content Include="Views\Shared\Partial\ScdScript2.cshtml" />
</ItemGroup>
<ItemGroup>
<Folder Include="App_Data\" />

View File

@ -67,7 +67,7 @@ namespace NP.BO.Controllers
LogSet(new ActLog() { logtype = 20, logtarget = 21, logdata = vm.User.username + "("+vm.User.userid+")", userno = vm.User.userno, uno = SUserInfo.UserNo, uip = GetUserIP() });
if (vm.viewname == "user")
{
vm.Lects = Dao.Get<Lect>("lect.lects.my", new System.Collections.Hashtable() { { "userno", vm.User.userno } });
vm.Lects = Dao.Get<Lect>("lect.lects.my2", new System.Collections.Hashtable() { { "userno", vm.User.userno } });
}
else if (vm.viewname == "professor")
{

View File

@ -0,0 +1,109 @@
<style type="text/css">
#ulScd {
height: 400px;
overflow-x: hidden;
overflow-y: auto;
}
</style>
<script type="text/javascript">
var selectedcmno;
var selectedLectno;
var selectedCmisno;
function setScd2(cmno) {
capp("/acommon/GetScdForMixEdu", { cmno: cmno, iscmlects : 1 }, "renderScd2");
}
function renderScd2() {
var divedudate = $("#divedudate");
var select = $("<select />", { "class": "form-control dev" , "id": "addstringval4" , "name": "addstringval4" , "onchange": "submit()" });
divedudate.empty();
select.append("<option value=''>교육일정</option>");
$.each(capResult.obj, function (i, d) {
if ("2099-12-31" != "2099-12-31") {
if (d.estartShortDateString == "2099-12-31") {
select.append("<option value='" + d.estartShortDateString + "' selected> " + d.estartShortDateString + "</option > ");
}
else {
select.append("<option value='" + d.estartShortDateString + "'> " + d.estartShortDateString + "</option > ");
}
}
else {
select.append("<option value='" + d.estartShortDateString + "'> " + d.estartShortDateString + "</option > ");
}
});
divedudate.append(select);
}
function setScd() {
capp("/acommon/GetScdForMixEdu", { cmno: selectedcmno }, "renderScd");
}
function renderScd() {
var ulScd = $("#ulScd");
ulScd.empty();
var seq = 0;
$.each(capResult.obj, function (i, d) {
var li = $("<li />");
//if (d.isEnd == true) {
//li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'><span style='color:gray'>" + d.scdInfoSummary + "</span><label style='color: red'> (종료)</label></label>");
//}
//else {
if (d.quota != 0) {
if (d.remainPeople <= 0) {
//li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "' disabled<span style='color:gray'>" + d.scdInfoSummary + "</span><label style='color: red'> (마감)</label></label>");
}
else {
if (seq == 0) {
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
}
else {
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
}
}
}
else {
if (seq == 0) {
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "</label>");
}
else {
li.append("<label style='cursor: pointer'><input type='radio' name='rdoScds' value='" + d.cmisno + "'>" + d.scdInfoSummary + "</label>");
}
}
//}
seq++;
ulScd.append(li);
});
$("input:radio[name='rdoScds']:radio[value='" + selectedCmisno + "']").prop('checked', true);
}
function openScd(cmno, lectno, cmisno) {
selectedcmno = cmno;
selectedLectno = lectno;
selectedCmisno = cmisno;
$.when(
setScd()
).done(function () {
setTimeout(function () {
bglayer();
$("#scdbox").slideDown("fast");
}, 200);
});
}
function updateScd() {
if (confirm("교육일정을 변경하시겠습니까?")) {
var cmisno = $("input:radio[name=rdoScds]:checked").val();
capp("/acommon/LectScdChange", { lectno: selectedLectno, cmisno: cmisno }, "afterUpdateScd");
}
}
function afterUpdateScd() {
if (capResult.code > 0) {
$("#scdbox").slideUp('fast')
msg2("저장되었습니다.", 0, null, "");
}
else {
msg("관리자에게 문의하세요.");
return;
}
}
</script>

View File

@ -1,4 +1,9 @@
@model NP.Model.VMUser
@{
string eduLocName = "";
}
<div style="@(Model.User.userno > 0 && Model.viewname !="admin" ? "":"display: none;")">
<ul class="pagination pagination-md" style="margin: 0;">
<li class="@(Model.tabidx == 0 ? "active" : "")"><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
@ -41,7 +46,7 @@
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label req">이름</label>
<div class="col-sm-8 col-md-10">@Html.TextBoxFor(m => m.User.username, new { @class = "form-control disp-init", @style = "width: 300px;", @maxlength = "50" })</div>
@Html.HiddenFor(m=>m.User.jointype)
@Html.HiddenFor(m => m.User.jointype)
</div>
@if (Model.viewname == "user")
{
@ -81,11 +86,11 @@
@if (Model.viewname == "user")
{
<div class="line line-dashed line-lg pull-in"></div><div class="form-group">
<label class="col-sm-4 col-md-2 control-label @(Model.viewname =="user" ? "req" : "") ">생년월일</label>
<label class="col-sm-4 col-md-2 control-label @(Model.viewname =="user" ? "req" : "") ">생년월일</label>
<div class="col-sm-8 col-md-10">
@Html.TextBoxFor(m => m.User.birthday, new { @readonly = "readonly", @style = "width: 300px; background-color: #ddd;", @class = "postno form-control disp-init" })
@Html.TextBoxFor(m => m.User.birthday, new { @readonly = "readonly", @style = "width: 300px; background-color: #ddd;", @class = "postno form-control disp-init" })
</div>
</div>
</div>
}
@if (Model.viewname == "user")
{
@ -232,34 +237,58 @@
@Html.HiddenFor(m => m.intval)
@Html.HiddenFor(m => m.User.userno)
</form>
</div>
<div id="lectbox2" style="display: none;width:100%;text-align:right;margin:10px 10px;">
<a href="#" onclick="javascript:ee(@(Model.User.userno));" class="btn btn-s-xs btn-info" style="margin-right:10px">교육생으로 입장</a>
</div>
<section class="panel panel-default" id="lectbox" style="display: none;">
<div class="table-responsive" id="excel2">
<table class="table table-striped b-t b-light">
<thead>
<tr>
<th width="20">No</th>
<th>기수</th>
<th>과정분류</th>
@*<th>과정분류</th>*@
<th>교육장</th>
<th>교육유형</th>
<th>강좌명(분반)</th>
<th>신청구분</th>
<th>신청일</th>
<th>결제여부</th>
<th>수료여부</th>
<th>교육일정</th>
</tr>
</thead>
<tbody class="data" id="tbody2">
@foreach (var item in Model.Lects)
{
if (item.cshape == 2 && item.scdtype == 1)
{
eduLocName = "온라인";
}
else
{
// 학습자가 수강신청시 선택한 교육일정의 교육장
// 강좌 설정에서 설정한 교육장
eduLocName = item.studyplace;
}
<tr>
<td>@item.rnorvt</td>
<td>@item.tmname</td>
<td>@item.cgname</td>
@*<td>@item.cgname</td>*@
<td>@eduLocName</td>
<td>@item.cshapename</td>
<td>@item.cnameclassno</td>
<td>@item.isrebatename</td>
<td>@item.cdtymd</td>
<td>@item.pstatusname</td>
<td class="link text-center"><a href="#" onclick="gopay(0, @item.payno, @item.userno)">@item.pstatusname</a></td>
<td>@item.iscompletename</td>
<td class="link text-center"><a href="#" onclick="javascript: openScd(@item.cmno,@item.lectno,@item.cmisno);">[변경]</a></td>
</tr>
}
</tbody>
@ -315,21 +344,21 @@
<div class="form-group">
<label class="col-lg-2 control-label">문의구분</label>
<div class="col-lg-10">
@Html.Partial("./Partial/Select", Model.ComCodes2, new ViewDataDictionary { {"class","form-control"} ,{ "name", "Councel.bldgcat" }, { "selected", null }, { "style", "width: 30%;padding:3px 5px;" }, { "df", ":선택" }, { "formgroupstyle", "padding-left:15px" } })
@Html.Partial("./Partial/Select", Model.ComCodes2, new ViewDataDictionary { { "class", "form-control" }, { "name", "Councel.bldgcat" }, { "selected", null }, { "style", "width: 30%;padding:3px 5px;" }, { "df", ":선택" }, { "formgroupstyle", "padding-left:15px" } })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-lg-2 control-label">문의내용</label>
<div class="col-lg-10">
@Html.TextAreaFor(m=>m.Councel.qtext, new { @class = "form-control",@rows="2", @style = "resize:none; width:90%;padding:3px 5px;" })
@Html.TextAreaFor(m => m.Councel.qtext, new { @class = "form-control", @rows = "2", @style = "resize:none; width:90%;padding:3px 5px;" })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-lg-2 control-label">답변내용</label>
<div class="col-lg-10">
@Html.TextAreaFor(m=>m.Councel.atext, new {@class="form-control", @rows = "2", @style="resize:none; width:90%; padding:3px 5px;" })
@Html.TextAreaFor(m => m.Councel.atext, new { @class = "form-control", @rows = "2", @style = "resize:none; width:90%; padding:3px 5px;" })
</div>
</div>
<div class="line line-dashed line-lg pull-in"></div>
@ -384,6 +413,13 @@
<div id="postlayer" class="daumpost">
<a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a>
</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>
@Html.Partial("./Partial/AssignBox", "bindAssign;고객사 검색;1")
@section styles{
@Html.Partial("./Partial/Summernotestyle")
@ -392,12 +428,17 @@
@Html.Partial("./Partial/ScriptPost")
@Html.Partial("./Partial/FileScript")
@Html.Partial("./Partial/ScriptDate")
@Html.Partial("./Partial/ScdScript2")
@Html.Partial("./Partial/CMScdBox2", "bindCMScd;교육일정선택;1")
@if (Model.viewname == "professor")
{
@Html.Partial("./Partial/Summernote")
}
<style type="text/css">
tr.red{border: 2px solid red;}
tr.red {
border: 2px solid red;
}
</style>
}
@section scripts{
@ -405,9 +446,9 @@
<script>
function gotab(idx) {
$("#tabidx").val(idx);
$("#lectbox, #regbox, #profbox, #boardbox").hide();
$("#lectbox, #regbox, #profbox, #boardbox, #lectbox2").hide();
if (idx == 0) { $("#regbox").show();}
else if (idx == 1) { $("#lectbox").show(); }
else if (idx == 1) { $("#lectbox").show(); $("#lectbox2").show(); }
else if (idx == 2) { $("#profbox").show(); }
else if (idx == 3) { $("#boardbox").show(); }
}
@ -421,6 +462,9 @@
$(a).closest("li").remove();
setv("User_asno", "");
}
function gopay(isexamready, pno, userno) {
winopen("/croom/payview?isexamready=" + isexamready + "&payno=" + pno + "&userno=" + userno, 'payview', 1200, screen.height - 200);
}
$(document).ready(function () {
gotab(@Model.tabidx);
if ('@(Model.User.userno)' != '0') {
@ -542,7 +586,7 @@
cdata = cdata == "<p><br></p>" ? "" : cdata;
setv("User_introhtml", cdata);
}
capfileform("/acommon/usersave", "mform", "cbsave");
}
}
@ -679,5 +723,24 @@
msgdev();
}
}
function ee(no) {
capp("/acommon/useree", { userno: no }, "cbee");
}
function cbee() {
if (capResult.code == 1000) {
if ('@Model.viewname' == 'user') {
var w = window.open(capResult.obj, "usersite");
if (w != null) {
w.focus();
}
else {
msg("팝업차단을 해제해주세요.");
}
}
else {
location.href = capResult.obj;
}
}
}
</script>
}

View File

@ -56,6 +56,52 @@
<include refid="sql.pagedynamic"></include>
order by a.rno
</select>
<select id="lect.lects.my2" parameterClass="hashtable" resultClass="lect">
select a.*
from (
select a.lectno,a.cmno,a.payno,a.pino,a.userno,a.status,a.iscomplete,a.isrebate,a.cdt, a.cmisno
,pi.pstatus,pi.rstatus
,b.cname,b.classno,b.studytime,b.sstime,b.setime
,bc.refcode
,cg.cgname
,pcg.cgcode pcgcode
,c.tyear,c.tseq
,u.username,u.uduty
,case when uc.cname = '기타' then u.ccpositionetc else uc.cname end ccpositionname
,ua.asname
,row_number() over(order by <isNotNull property="orderby">$orderby$</isNotNull><isNull property="orderby">a.cdt desc</isNull>) rno
,count(a.cdt) over() pagetotalcount
, b.cshape, ifnull(e.scdtype, 1) as scdtype
, (case when e.scdtype is null then h.cname else g.cname end ) as studyplace
, (case when b.cshape=0 then '온라인' when b.cshape=1 then '교육장교육' else '온라인교육' end) cshapename
from lect a
left outer join payitem pi on pi.pino=a.pino
inner join cm b on b.cmno=a.cmno
left outer join comcode bc on bc.ccode=b.certgradecc
inner join cg cg on cg.cgno=b.cgno
inner join cg pcg on pcg.cgno=cg.pcgno
inner join term c on c.tmno=b.tmno
inner join users u on u.userno=a.userno
left outer join comcode uc on uc.ccode=u.ccposition
left outer join assign ua on ua.asno=u.asno
left outer join (
select lectno,max(cmino) as cmino
from lectinning t
group by lectno
) d on a.lectno = d.lectno
left outer join cminning e on b.cmno = e.cmno and d.cmino = d.cmino and e.userno = a.userno
left outer join cminningscd f on a.cmisno = f.cmisno
left outer join comcode g on f.studyplace = g.ccode
left outer join comcode h on b.studyplace = h.ccode
where a.ischanged=0
<isNotNull property="lectno">and a.lectno=#lectno#</isNotNull>
<isNotNull property="userno">and a.userno=#userno#</isNotNull>
) a
<include refid="sql.pagedynamic"></include>
order by a.rno
</select>
<select id="lect.check.lectinning.hascminning" parameterClass="hashtable" resultClass="long">
select a.lectno
from lect a