<기능개선>

1. PMS NO : 
2. (주요)작업내용 
(1) 추가개발건(1) 완료
This commit is contained in:
jity7777 2022-03-16 01:23:00 +00:00
parent 5395b96686
commit db0d0c8d6a
10 changed files with 214 additions and 81 deletions

View File

@ -56,16 +56,17 @@
<div> <div>
<div> <div>
<ul> <ul>
<li id="lijob"><a href="javascript: schIpt('5', '63', '토목'); ">토목</a></li> <li id="lijob63" name="typejob" data="토목"><a href="javascript: schIpt('5', '63', '토목'); " >토목</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '64', '건축'); ">건축</a></li> <li id="lijob64" name="typejob" data="건축"><a href="javascript: schIpt('5', '64', '건축'); " >건축</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '65', '기계'); ">기계</a></li> <li id="lijob65" name="typejob" data="기계"><a href="javascript: schIpt('5', '65', '기계'); " >기계</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '66', '조경'); ">조경</a></li> <li id="lijob66" name="typejob" data="조경"><a href="javascript: schIpt('5', '66', '조경'); " >조경</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '67', '환경'); ">환경</a></li> <li id="lijob67" name="typejob" data="환경"><a href="javascript: schIpt('5', '67', '환경'); " >환경</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '68', '광업'); ">광업</a></li> <li id="lijob68" name="typejob" data="광업"><a href="javascript: schIpt('5', '68', '광업'); " >광업</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '69', '안전관리'); ">안전관리</a></li> <li id="lijob69" name="typejob" data="안전관리"><a href="javascript: schIpt('5', '69', '안전관리'); " >안전관리</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '70', '도시교통'); ">도시교통</a></li> <li id="lijob70" name="typejob" data="도시교통"><a href="javascript: schIpt('5', '70', '도시교통'); " >도시교통</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '71', '전기전자'); ">전기전자</a></li> <li id="lijob71" name="typejob" data="전기전자"><a href="javascript: schIpt('5', '71', '전기전자'); " >전기전자</a></li>
<li id="lijob"><a href="javascript: schIpt('5', '72', '건설지원'); ">건설지원</a></li> <li id="lijob72" name="typejob" data="건설지원"><a href="javascript: schIpt('5', '72', '건설지원'); " >건설지원</a></li>
<li id="lijob83" name="typejob" data="품질관리"><a href="javascript: schIpt('5', '83', '품질관리'); " >품질관리</a></li>
</ul> </ul>
</div> </div>
</div> </div>
@ -107,7 +108,7 @@
<li id="lijob68"><a href="javascript: schIpt('6', '138', '화약류관리'); ">화약류관리</a></li> <li id="lijob68"><a href="javascript: schIpt('6', '138', '화약류관리'); ">화약류관리</a></li>
<li id="lijob69"><a href="javascript: schIpt('6', '140', '건설안전'); ">건설안전</a></li> <li id="lijob69"><a href="javascript: schIpt('6', '140', '건설안전'); ">건설안전</a></li>
<li id="lijob70"><a href="javascript: schIpt('6', '145', '교통'); ">교통</a></li> <li id="lijob70"><a href="javascript: schIpt('6', '145', '교통'); ">교통</a></li>
<li id="lijob71"><a href="javascript: schIpt('6', '146', '철도신호.'); ">철도신호.</a></li> <li id="lijob71"><a href="javascript: schIpt('6', '146', '철도신호'); ">철도신호</a></li>
<li id="lijob72"><a href="javascript: schIpt('6', '149', '건설 마케팅'); ">건설 마케팅</a></li> <li id="lijob72"><a href="javascript: schIpt('6', '149', '건설 마케팅'); ">건설 마케팅</a></li>
<li id="lijob67"><a href="javascript: schIpt('6', '132', '수질관리'); ">수질관리</a></li> <li id="lijob67"><a href="javascript: schIpt('6', '132', '수질관리'); ">수질관리</a></li>
<li id="lijob68"><a href="javascript: schIpt('6', '139', '광산보안'); ">광산보안</a></li> <li id="lijob68"><a href="javascript: schIpt('6', '139', '광산보안'); ">광산보안</a></li>

View File

@ -15,7 +15,8 @@ namespace NP.BO.Controllers
{ {
public ActionResult lectreg(NP.Model.VMCM vm) public ActionResult lectreg(NP.Model.VMCM vm)
{ {
vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace"); ViewBag.JobTypeItems = "typejob63,typejob64,typejob65,typejob66,typejob67,typejob68,typejob69,typejob70,typejob71,typejob72,typejob83";
vm.ComCodes = GetComCodes("typeman,typeedu,typegrade,typejob,studyplace," + ViewBag.JobTypeItems);
vm.IsAdmin = SUserInfo.IsAdmin; vm.IsAdmin = SUserInfo.IsAdmin;
vm.IsSiteAdmin = SUserInfo.IsSiteAdmin; vm.IsSiteAdmin = SUserInfo.IsSiteAdmin;
return View(vm); return View(vm);

View File

@ -101,7 +101,7 @@
+ r.typeedu + ":" + r.typeedu + ":"
+ r.typegrade + ":" + r.typegrade + ":"
+ r.typejob + ":" + r.typejob + ":"
+ r.typejob + ":" + r.typejobitem + ":"
+ r.isaccommodation + ":" + r.isaccommodation + ":"
+ r.sssetermname + ":" + r.sssetermname + ":"
+ getint(r.accommofee) + getint(r.accommofee)

View File

@ -1,4 +1,7 @@
@model NP.Model.VMCM @model NP.Model.VMCM
@{
string[] jobItems = ViewBag.JobTypeItems.ToString().Split(',');
}
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal"> <form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
<section class="panel panel-default" style="border-top: 1px solid #ddd; margin-top: 5px;"> <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> <header class="panel-heading"><strong><i class="fa fa-bars"></i> 개별등록<span class=""></span></strong></header>
@ -24,7 +27,7 @@
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 col-md-2 control-label">기술인분류</label> <label class="col-sm-4 col-md-2 control-label">기술인분류</label>
<div class="col-sm-8 col-md-10" id="div-typemans"> <div class="col-sm-8 col-md-10" id="div-typemans">
</div> </div>
</div> </div>
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
@ -45,12 +48,18 @@
<div class="col-sm-8 col-md-10" id="div-typejobs"> <div class="col-sm-8 col-md-10" id="div-typejobs">
</div> </div>
</div> </div>
<div class="line line-dashed line-lg pull-in"></div>
<div class="form-group">
<label class="col-sm-4 col-md-2 control-label">전문분야</label>
<div class="col-sm-8 col-md-10" id="div-typejobitems">
</div>
</div>
<div class="div-isaccommodation" style="display:none;"> <div class="div-isaccommodation" style="display:none;">
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 col-md-2 control-label">합숙여부</label> <label class="col-sm-4 col-md-2 control-label">합숙여부</label>
<div class="col-sm-8 col-md-10"> <div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "name", "isaccommodation" }, { "checked", 0} }) @Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:예;0:아니오" }, { "name", "isaccommodation" }, { "checked", 0 } })
</div> </div>
</div> </div>
</div> </div>
@ -59,9 +68,9 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 col-md-2 control-label">환급여부</label> <label class="col-sm-4 col-md-2 control-label">환급여부</label>
<div class="col-sm-8 col-md-10"> <div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:환급;0:비환급" }, { "name", "isrebate" }, { "checked", 1} }) @Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:환급;0:비환급" }, { "name", "isrebate" }, { "checked", 1 } })
</div> </div>
</div> </div>
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 col-md-2 control-label">은행명</label> <label class="col-sm-4 col-md-2 control-label">은행명</label>
@ -108,12 +117,12 @@
</div> </div>
</div> </div>
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 col-md-2 control-label">소속선택</label> <label class="col-sm-4 col-md-2 control-label">소속선택</label>
<div class="col-sm-8 col-md-10"> <div class="col-sm-8 col-md-10">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "0:개인;1:업체" }, { "name", "iscompany" }, { "checked", 0} }) @Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "0:개인;1:업체" }, { "name", "iscompany" }, { "checked", 0 } })
</div>
</div> </div>
</div>
<div class="line line-dashed line-lg pull-in"></div> <div class="line line-dashed line-lg pull-in"></div>
<div id="olduser"> <div id="olduser">
<div class="form-group"> <div class="form-group">
@ -185,15 +194,20 @@
<script> <script>
var cmboxtmno = 0; var cmboxtmno = 0;
var cmboxnotcmno = ""; var cmboxnotcmno = "";
$(document).ready(function () { $(document).ready(function () {
$("input[name='ptype']").on("click", function () { $("[name='typejob']").on("click", function () {
console.log("id : " + $(this).attr("id"))
});
$("input[name='ptype']").on("click", function () {
if ($(this).val() == "6") { if ($(this).val() == "6") {
$("#payamt").val(0); $("#payamt").val(0);
$("#payamt").prop("readonly", true); $("#payamt").prop("readonly", true);
} else { } else {
$("#payamt").prop("readonly", false); $("#payamt").prop("readonly", false);
} }
}); });
$("#btnfindscdshow").on("click", function () { $("#btnfindscdshow").on("click", function () {
var cmno = $("#cmno").val(); var cmno = $("#cmno").val();
if (cmno != "") { if (cmno != "") {
@ -208,12 +222,12 @@
setv("rbankacc", ""); setv("rbankacc", "");
setv("rbankowner", ""); setv("rbankowner", "");
$("#rbankname").prop("readonly", true); $("#rbankname").prop("readonly", true);
$("#rbankacc").prop("readonly", true); $("#rbankacc").prop("readonly", true);
$("#rbankowner").prop("readonly", true); $("#rbankowner").prop("readonly", true);
$("input:radio[name='iscompany']").prop("disabled", false); $("input:radio[name='iscompany']").prop("disabled", false);
} else { } else {
$("#rbankname").prop("readonly", false); $("#rbankname").prop("readonly", false);
$("#rbankacc").prop("readonly", false); $("#rbankacc").prop("readonly", false);
$("#rbankowner").prop("readonly", false); $("#rbankowner").prop("readonly", false);
$("input:radio[name='iscompany'][value='1']").click(); $("input:radio[name='iscompany'][value='1']").click();
$("input:radio[name='iscompany']").prop("disabled", true); $("input:radio[name='iscompany']").prop("disabled", true);
@ -226,69 +240,110 @@
} else { } else {
$("#btnfindassign").prop("disabled", false); $("#btnfindassign").prop("disabled", false);
} }
}); });
}); });
function bindCM(vs) { function bindCM(vs) {
var v = vs.split(':'); var v = vs.split(':');
setv("cmno", v[0]); setv("cmno", v[0]);
$("#cmname").text(v[2] + " | " + v[8] + " | " + v[1]); $("#cmname").text(v[2] + " | " + v[8] + " | " + v[1]);
$("#ssseterm").text("교육일 : " + v[17]); $("#ssseterm").text("교육일 : " + v[17]);
$("#fee").text("교육비 : 수강료 " + bindComma3(v[5]) + "원 | 합숙비용 " + bindComma3(v[18]) + "원"); $("#fee").text("교육비 : 수강료 " + bindComma3(v[5]) + "원 | 합숙비용 " + bindComma3(v[18]) + "원");
$("#layertable tbody tr:gt(0)").remove(); $("#layertable tbody tr:gt(0)").remove();
$("#layertable tbody tr").first().attr("data-cmno", v[0]); $("#layertable tbody tr").first().attr("data-cmno", v[0]);
$("th.cm,th.payamtcash,th.payamtcard,td.payamtcash,td.payamtcard").addClass("hide"); $("th.cm,th.payamtcash,th.payamtcard,td.payamtcash,td.payamtcard").addClass("hide");
var cshape = v[10]; var cshape = v[10];
$("input:radio[name='isrebate'][value='0']").click(); $("input:radio[name='isrebate'][value='0']").click();
$("input:radio[name='isaccommodation'][value='0']").click(); $("input:radio[name='isaccommodation'][value='0']").click();
$(".div-rbankInfo").hide(); $(".div-rbankInfo").hide();
setv("rbankname", ""); setv("rbankname", "");
setv("rbankacc", ""); setv("rbankacc", "");
setv("rbankowner", ""); setv("rbankowner", "");
setv("cmisno", ""); setv("cmisno", "");
if (cshape == 1) { if (cshape == 1) {
$(".div-isrebate").show(); $(".div-isrebate").show();
$(".div-cmscd").hide(); $(".div-cmscd").hide();
$("input:radio[name='isrebate'][value='1']").click(); $("input:radio[name='isrebate'][value='1']").click();
} else if (cshape == 2){ } else if (cshape == 2){
$(".div-isrebate").hide(); $(".div-isrebate").hide();
$(".div-cmscd").show(); $(".div-cmscd").show();
} else { } else {
$(".div-isrebate").hide(); $(".div-isrebate").hide();
$(".div-cmscd").hide(); $(".div-cStringtringscJoind").hide();
} }
var types = @Html.Raw(Json.Encode(Model.ComCodes.Select(s=> new { cgroup = s.cgroup, ccode = s.ccode, cname = s.cname}))); var types = @Html.Raw(Json.Encode(Model.ComCodes.Select(s=> new { cgroup = s.cgroup, ccode = s.ccode, cname = s.cname})));
var typesJobItems = @Html.Raw(Json.Encode(@Model.ComCodes.Where(c => jobItems.Contains(c.cgroup)).Select(s => new { cgroup = s.cgroup, ccode = s.ccode, cname = s.cname })));
var typemans = v[11].split(","); var typemans = v[11].split(",");
var typeedus = v[12].split(","); var typeedus = v[12].split(",");
var typegrades = v[13].split(","); var typegrades = v[13].split(",");
var typejobs = v[14].split(","); var typejobs = v[14].split(",");
var typejobsItems = v[15].split(",");
$("#div-typemans").html(radiohtml(types, typemans)); $("#div-typemans").html(radiohtml(types, typemans));
$("#div-typeedus").html(radiohtml(types, typeedus)); $("#div-typeedus").html(radiohtml(types, typeedus));
$("#div-typegrades").html(radiohtml(types, typegrades)); $("#div-typegrades").html(radiohtml(types, typegrades));
$("#div-typejobs").html(radiohtml(types, typejobs)); $("#div-typejobs").html(radiohtml(types, typejobs));
$("#div-typejobitems").html(radiohtml2(typesJobItems, typejobsItems));
var isaccommodation = v[16]; //let htmlStr = ''
if (isaccommodation == 1) { //for (let idx in typejobs) {
// htmlStr += '<input type='' typejobs[idx].cname
//}
var isaccommodation = v[16];
if (isaccommodation == 1) {
$(".div-isaccommodation").show(); $(".div-isaccommodation").show();
} else { } else {
$(".div-isaccommodation").hide(); $(".div-isaccommodation").hide();
} }
} }
function radiohtml2(types, ccodes) {
var html = "";
$.each(types, function (index, type) {
if (ccodes.indexOf(type.ccode.toString()) > -1) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' style='display:none' /><label style='vertical-align: sub;display:none;padding-right:7px' name='" + type.cgroup + "_names' for='" + type.cgroup + type.ccode + "' >&nbsp;" + type.cname + "</label>";
}
});
return html;
}
function radiohtml(types, ccodes) { function radiohtml(types, ccodes) {
var html = ""; var html = "";
$.each(ccodes, function (index, ccode) { $.each(ccodes, function (index, ccode) {
$.each(types, function (index, type) { $.each(types, function (index, type) {
if (type.ccode == ccode) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;"; if (type.cgroup == "typejob") {
return false; if (type.ccode == ccode) {
} html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' onchange=\"jobItemView(this)\" /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;";
return false;
}
}
else {
if (type.ccode == ccode) {
html += "<input type='radio' id='" + type.cgroup + type.ccode + "' name='" + type.cgroup + "' value='" + type.ccode + "' /><label style='vertical-align: sub;' for='" + type.cgroup + type.ccode + "'>&nbsp;" + type.cname + "</label>&nbsp;";
return false;
}
}
}); });
}); });
return html; return html;
} }
function jobItemView(obj) {
$("#div-typejobitems input:radio").css("display", "none")
$("#div-typejobitems label").css("display", "none")
let name = $(obj).attr("id")
$("[name='" + name + "']").css("display", "")
$("[name='" + name + "_names']").css("display", "")
}
function bindUser(vs) { function bindUser(vs) {
var v = vs.split(':'); var v = vs.split(':');
setv("userid", v[7]); setv("userid", v[7]);
@ -301,7 +356,7 @@
} }
} }
function bindAssign(data) { function bindAssign(data) {
var v = data.split(':')[0]; var v = data.split(':')[0];
setv("asno", v); setv("asno", v);
$("#asbox").html(""); $("#asbox").html("");
$("#asbox").append("<li data-no=\"" + v + "\"><label>" + data.split(':')[1] + "</label><a href=\"#\" class=\"adel\" onclick=\"assigndel(this)\">X</a></li>"); $("#asbox").append("<li data-no=\"" + v + "\"><label>" + data.split(':')[1] + "</label><a href=\"#\" class=\"adel\" onclick=\"assigndel(this)\">X</a></li>");
@ -316,15 +371,15 @@
} }
} }
function bindCMScd(data) { function bindCMScd(data) {
setv("cmisno", data.value); setv("cmisno", data.value);
$("#scdbox").html(""); $("#scdbox").html("");
$("#scdbox").append("<li data-no=\"" + data.value + "\"><label>" + data.text + "</label><a href=\"#\" class=\"adel\" onclick=\"cmscddel(this)\">X</a></li>"); $("#scdbox").append("<li data-no=\"" + data.value + "\"><label>" + data.text + "</label><a href=\"#\" class=\"adel\" onclick=\"cmscddel(this)\">X</a></li>");
} }
function cmscddel(a) { function cmscddel(a) {
setv("cmisno", ""); setv("cmisno", "");
$(a).closest("li").remove(); $(a).closest("li").remove();
} }
function save() { function save() {
var ta = 0; var ta = 0;
var tcash = 0; var tcash = 0;
var tcard = 0; var tcard = 0;
@ -340,13 +395,13 @@
else if ($("input:radio[name='typeedu']").length > 0 && $("input:radio[name='typeedu']:checked").val() == undefined) { msg("교육목적을 선택해주세요."); } else if ($("input:radio[name='typeedu']").length > 0 && $("input:radio[name='typeedu']:checked").val() == undefined) { msg("교육목적을 선택해주세요."); }
else if ($("input:radio[name='typegrade']").length > 0 && $("input:radio[name='typegrade']:checked").val() == undefined) { msg("등급을 선택해주세요."); } else if ($("input:radio[name='typegrade']").length > 0 && $("input:radio[name='typegrade']:checked").val() == undefined) { msg("등급을 선택해주세요."); }
else if ($("input:radio[name='typejob']").length > 0 && $("input:radio[name='typejob']:checked").val() == undefined) { msg("직무분야를 선택해주세요."); } else if ($("input:radio[name='typejob']").length > 0 && $("input:radio[name='typejob']:checked").val() == undefined) { msg("직무분야를 선택해주세요."); }
else if ($(".div-cmscd").css("display") != "none" && $("#cmisno").val() == "") { msg("교육일정을 선택해주세요."); } else if ($(".div-cmscd").css("display") != "none" && $("#cmisno").val() == "") { msg("교육일정을 선택해주세요."); }
else if (isrebate && check("rbankname", null, "은행명을 등록해주세요.")) { } else if (isrebate && check("rbankname", null, "은행명을 등록해주세요.")) { }
else if (isrebate && check("rbankacc", null, "계좌번호를 등록해주세요.")) { } else if (isrebate && check("rbankacc", null, "계좌번호를 등록해주세요.")) { }
else if (isrebate && check("rbankowner", null, "예금주를 등록해주세요.")) { } else if (isrebate && check("rbankowner", null, "예금주를 등록해주세요.")) { }
else if (check("userno", null, "신청자ID를 선택해주세요.")) { } else if (check("userno", null, "신청자ID를 선택해주세요.")) { }
else if (iscompany && check("asno", null, "회사정보를 선택해주세요.")) { } else if (iscompany && check("asno", null, "회사정보를 선택해주세요.")) { }
else if (getrv("ptype") != "6" && getrv("ptype") != "0" && ta < 1) { msg("결제금액을 입력해주세요."); } else if (getrv("ptype") != "6" && getrv("ptype") != "0" && ta < 1) { msg("결제금액을 입력해주세요."); }
else if (confirm("교육생을 등록하시겠습니까?")) { else if (confirm("교육생을 등록하시겠습니까?")) {
var pplog = {}; var pplog = {};
pplog.cmno = val("cmno"); pplog.cmno = val("cmno");
@ -354,6 +409,7 @@
pplog.typeedu = getrv("typeedu"); pplog.typeedu = getrv("typeedu");
pplog.typegrade = getrv("typegrade"); pplog.typegrade = getrv("typegrade");
pplog.typejob = getrv("typejob"); pplog.typejob = getrv("typejob");
pplog.typejobItem = getrv("typejob" + pplog.typejob);
pplog.cmisno = val("cmisno"); pplog.cmisno = val("cmisno");
pplog.isaccommodation = getrv("isaccommodation"); pplog.isaccommodation = getrv("isaccommodation");
pplog.isrebate = getrv("isrebate"); pplog.isrebate = getrv("isrebate");
@ -363,7 +419,9 @@
pplog.iscompany = getrv("iscompany"); pplog.iscompany = getrv("iscompany");
pplog.userno = val("userno"); pplog.userno = val("userno");
pplog.asno = val("asno"); pplog.asno = val("asno");
capp("/acommon/lectreg", { ptype: getrv("ptype"), payamt: intval("payamt"), pplog: pplog }, "cbsave"); capp("/acommon/lectreg", { ptype: getrv("ptype"), payamt: intval("payamt"), pplog: pplog }, "cbsave");
console.log(JSON.stringify(pplog))
} }
} }
function cbsave() { function cbsave() {

View File

@ -625,10 +625,13 @@ namespace NP.Base.Controllers
result += "\t\t\t\t\t<ul>\n"; result += "\t\t\t\t\t<ul>\n";
foreach (var item2 in items) foreach (var item2 in items)
{ {
tempStr = "";
if (item == 4) if (item == 4)
{ {
tempStr = "typejob" + item2.ccode; tempStr = "typejob" + item2.ccode;
item2.refcode = item2.ccode.ToString();
printCheck = true;
/*
tempCount = list.Where(c => c.cgroup == tempStr).Count(); tempCount = list.Where(c => c.cgroup == tempStr).Count();
if (tempCount > 0) if (tempCount > 0)
@ -639,7 +642,7 @@ namespace NP.Base.Controllers
{ {
printCheck = false; printCheck = false;
} }
*/
} }
else else
{ {
@ -648,7 +651,15 @@ namespace NP.Base.Controllers
if (printCheck) if (printCheck)
{ {
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \">" + item2.cname + "</a></li>\n"; if(tempStr != "")
{
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\" name=\"typejob\" data=\"" + item2.cname + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \" >" + item2.cname + "</a></li>\n";
}
else
{
result += "\t\t\t\t\t\t<li id=\"" + item2.cgroup.Replace("type", "li") + item2.refcode + "\"><a href=\"javascript: schIpt('" + (item + 1) + "', '" + item2.ccode + "', '" + item2.cname + "'); \">" + item2.cname + "</a></li>\n";
}
} }
} }

View File

@ -543,7 +543,7 @@ namespace NP.Base.Controllers
int result = 0; // 0 이면 수강 가능, 그외 수강 불가 int result = 0; // 0 이면 수강 가능, 그외 수강 불가
int userno = SUserInfo.UserNo; int userno = SUserInfo.UserNo;
string[] cgcodes = { "103", "104", "105" }; string[] cgcodes = { "103", "104", "105" };
string[] edus = { "53", "54", "58" }; // 최초교육, 계속교육, 승급교육 string[] edus = { "53", "54", "58", "59", "60" }; // 최초교육, 계속교육, 승급교육
// 등급 59: 초급, 60: 중급, 61: 고급, 62: 특급 // 등급 59: 초급, 60: 중급, 61: 고급, 62: 특급
if (man == "51" && cgcodes.Contains(cgcode) && edus.Contains(edu)) if (man == "51" && cgcodes.Contains(cgcode) && edus.Contains(edu))
{ {
@ -580,8 +580,23 @@ from lect t1
where t1.status = 1 and t4.pstatus= 1 where t1.status = 1 and t4.pstatus= 1
and t3.cgcode = 103 -- and t1.userno=82 -- 82,5,31 and t3.cgcode = 103 -- and t1.userno=82 -- 82,5,31
*/ */
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu } });
rst = lectCount.First(); if((edu == "54" || edu == "58") && (grade == "61" || grade == "62")) // 계속교육, 승급교육 && 고급, 특급
{
var lectCount = Dao.Get<int>("lect.count.user2", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu }, { "grade", grade } });
rst = lectCount.First();
}
else if((cgcode == "103" || cgcode == "104") && edu == "53")
{
var lectCount = Dao.Get<int>("lect.count.user3", new Hashtable() { { "userno", userno } });
rst = lectCount.First();
}
else
{
var lectCount = Dao.Get<int>("lect.count.user", new Hashtable() { { "userno", userno }, { "cgcode", cgcode }, { "edu", edu } });
rst = lectCount.First();
}
} }
result = rst == 0 ? 0 : 1;// result = rst == 0 ? 0 : 1;//

View File

@ -1927,11 +1927,36 @@
inner join cg t3 on t2.cgno= t3.cgno inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode = #cgcode# where t1.status = 1 and t4.pstatus= 1
<isNotNull property="userno">and t1.userno = #userno#</isNotNull> <isNotNull property="userno">and t1.userno = #userno#</isNotNull>
<isNotEmpty property="edu"> <isNotEmpty property="edu">
<isNotEqual property="edu" compareValue="53">and t5.typegrade in (61,62)</isNotEqual> <isNotEqual property="edu" compareValue="53">and t5.typegrade in (61,62)</isNotEqual>
</isNotEmpty> </isNotEmpty>
<isNotEmpty property="cgcode">
<isNotEqual property="cgcode" compareValue="105">and t3.cgcode in (103,104)</isNotEqual>
<Equal property="cgcode" compareValue="105">and t3.cgcode = 105</Equal>
</isNotEmpty>
</select>
<select id="lect.count.user2" parameterClass="hashtable" resultClass="int">
select count(t1.lectno) <!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
from lect t1
inner join cm t2 on t1.cmno = t2.cmno
inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode in (103,104,105) and t5.typegrade = #grade# and t5.typeedu = #edu#
and t1.userno = #userno#
</select>
<select id="lect.count.user3" parameterClass="hashtable" resultClass="int">
select count(t1.lectno) <!--t5.typegrade, t5.typeman, t5.typeedu, t3.cgcode, t1.lectno, t1.userno-->
from lect t1
inner join cm t2 on t1.cmno = t2.cmno
inner join cg t3 on t2.cgno= t3.cgno
inner join pay t4 on t1.payno = t4.payno
inner join pplog t5 on t1.cmno= t5.cmno and t1.userno = t5.userno and t4.pplno = t5.pplno
where t1.status = 1 and t4.pstatus= 1 and t3.cgcode in (103,104) and t5.typeedu = 53
and t1.userno = #userno#
</select> </select>
</statements> </statements>
</sqlMap> </sqlMap>

View File

@ -762,13 +762,13 @@
<VisualStudio> <VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties> <WebProjectProperties>
<UseIIS>False</UseIIS> <UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>49399</DevelopmentServerPort> <DevelopmentServerPort>49399</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>https://ynicte.com</IISUrl> <IISUrl>https://www.ynicte.com</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>True</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl>https://ynicte.com</CustomServerUrl> <CustomServerUrl>https://ynicte.com</CustomServerUrl>
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties> </WebProjectProperties>

View File

@ -368,7 +368,7 @@
function applyClass(cmno, pcmno) { function applyClass(cmno, pcmno) {
if (@ViewBag.SSUserNo > 0) { if (@ViewBag.SSUserNo > 0) {
checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval5", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), "chkLect"); checkLectComplete(cmno, "@Model.stringval3", "@Model.stringval4", "@Model.stringval5", $("#pcmno_" + pcmno + "_cgcode").val(), "chkLect");
} }
else { else {
msg("로그인 후 신청 할 수 있습니다."); msg("로그인 후 신청 할 수 있습니다.");

View File

@ -301,7 +301,7 @@
if ($("#stringval4").val() == "") { msg("교육목적을 입력하세요."); $("#stringval4").focus(); return; } if ($("#stringval4").val() == "") { msg("교육목적을 입력하세요."); $("#stringval4").focus(); return; }
if ($("#stringval5").val() == "") { msg("등급을 입력하세요."); $("#stringval5").focus(); return; } if ($("#stringval5").val() == "") { msg("등급을 입력하세요."); $("#stringval5").focus(); return; }
if ($("#stringval6").val() == "") { msg("직무분야를 입력하세요."); $("#stringval6").focus(); return; } if ($("#stringval6").val() == "") { msg("직무분야를 입력하세요."); $("#stringval6").focus(); return; }
if ($("#stringval7").val() == "") { msg("전문분야를 입력하세요."); $("#stringval6").focus(); return; } if ($("#stringval7").val() == "" && $("#msSel6 div").css("display") != 'none') { msg("전문분야를 입력하세요."); $("#stringval6").focus(); return; }
} }
else if ($("#stringval").val() == "1") { else if ($("#stringval").val() == "1") {
if ($("#stringval2").val() == "") { msg("교육유형을 입력하세요."); $("#stringval2").focus(); return; } if ($("#stringval2").val() == "") { msg("교육유형을 입력하세요."); $("#stringval2").focus(); return; }
@ -331,7 +331,7 @@
msg('교육목적을 선택해주세요.'); msg('교육목적을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel5') { } else if ($(this).parent().attr('id') == 'msSel5') {
msg('등급을 선택해주세요.'); msg('등급을 선택해주세요.');
} else if ($(this).parent().attr('id') == 'msSel6') { } else if ($(this).parent().attr('id') == 'msSel6' ) {
msg('전문분야를 선택해주세요.'); msg('전문분야를 선택해주세요.');
} }
} }
@ -341,7 +341,7 @@
} }
}); });
function schIpt(num, code, name) { function schIpt(num, code, name) {
let tempStr = "";
switch (num) { switch (num) {
case '1': case '1':
$('#msSel2 > span').text("기술인분류"); $('#msSel2 > span').text("기술인분류");
@ -378,7 +378,22 @@
$('.msSel > span').removeClass('on'); $('.msSel > span').removeClass('on');
$('#msSel' + (Number(num) + 1)).removeClass('disable'); $('#msSel' + (Number(num) + 1)).removeClass('disable');
$('#msSel' + (Number(num) + 1)).addClass('active'); $('#msSel' + (Number(num) + 1)).addClass('active');
$('#msSel' + (Number(num) + 1) + ' > div').slideDown(300);
let tempCnt = 0;
$('#msSel' + (Number(num) + 1) + ' div ul li').each(function(){
if ($(this).css("display") != 'none') {
++tempCnt;
}
})
if (tempCnt > 0) {
$('#msSel' + (Number(num) + 1)).removeClass("disable")
$('#msSel' + (Number(num) + 1) + ' > div').slideDown(300);
}
else {
$('#msSel' + (Number(num) + 1)).addClass("disable")
}
if (num == 2) { if (num == 2) {
$("#liedu04").hide(); $("#liedu04").hide();
@ -402,14 +417,21 @@
$("#liedu04").show(); $("#liedu04").show();
} }
if (num == 2 && name == "품질관리기술인") { if (num == 2 && name == "품질관리기술인") {
$("#msSel5 li a").each(function (i, d) { /*$("#msSel5 li a").each(function (i, d) {
if (d.text != "품질관리") { if (d.text != "품질관리") {
var item = d.closest("li").id; //var item = d.closest("li").id;
$("#" + item).hide(); $("#lijob" + code).hide();
} }
});*/
$("#msSel5 li").each(function () {
$(this).hide();
}); });
$("[name='typejob'][data='품질관리']").show()
} else if (num == 2 && name != "품질관리기술인") { } else if (num == 2 && name != "품질관리기술인") {
$("#lijob11").hide(); $("#msSel5 li").each(function () {
$(this).show();
});
$("[name='typejob'][data='품질관리']").hide()
} }
if (num == 3) { if (num == 3) {
@ -432,7 +454,7 @@
}); });
} }
} }// else if (num == 5 &&
} }
function initSearch() { function initSearch() {