YNICTE/FO/Views/Course/ApplyEdu.cshtml

664 lines
34 KiB
Plaintext
Raw Normal View History

2020-11-05 17:02:05 +09:00
@model NP.Model.VMCourse
@{
2021-01-20 14:59:32 +09:00
var isallday = Model.CM.retimeymd == "2099-12-31" ? true : false;
}
<form id="historyForm" method="post">
<input type="hidden" name="cmno" value="@Model.cmno" /> @*강좌번호*@
<input type="hidden" name="stringval" value="@Model.stringval" /> @*법정교육/기타교육*@
<input type="hidden" name="stringval2" value="@Model.stringval2" />@*교육유형*@
<input type="hidden" name="stringval3" value="@Model.stringval3" />@*기술인분류*@
<input type="hidden" name="stringval4" value="@Model.stringval4" />@*교육목적*@
<input type="hidden" name="stringval5" value="@Model.stringval5" />@*등급*@
<input type="hidden" name="stringval6" value="@Model.stringval6" />@*직무분야*@
<input type="hidden" name="pplno" value="@Model.pplno" />@*pplno*@
<input type="hidden" name="selMonth" value="@Model.selMonth" />@*교육일정선택(selMonth)*@
<input type="hidden" name="isCompany" value="@Model.isCompany" />@*업체/개인 선택*@
2021-05-04 10:24:04 +09:00
</form>
2020-11-05 17:02:05 +09:00
<form id="applyEduForm" method="post">
<input type="hidden" name="cmno" id="cmno" value="@Model.cmno" /> @*강좌번호*@
<input type="hidden" name="stringval" id="stringval" value="@Model.stringval" /> @*법정교육/기타교육*@
<input type="hidden" name="stringval2" id="stringval2" value="@Model.stringval2" />@*교육유형*@
<input type="hidden" name="stringval3" id="stringval3" value="@Model.stringval3" />@*기술인분류*@
<input type="hidden" name="stringval4" id="stringval4" value="@Model.stringval4" />@*교육목적*@
<input type="hidden" name="stringval5" id="stringval5" value="@Model.stringval5" />@*등급*@
<input type="hidden" name="stringval6" id="stringval6" value="@Model.stringval6" />@*직무분야*@
2020-11-06 18:04:55 +09:00
<input type="hidden" name="cmisno" id="cmisno" />
<input type="hidden" name="applicableCM" id="applicableCM" />
<input type="hidden" name="cshape" id="cshape" value="@Model.CM.cshape" />
2020-11-05 17:02:05 +09:00
<h4 class="clsTitle">신청강좌</h4>
<ul class="smtList mt0">
<li>
2020-12-16 11:10:47 +09:00
<ul class="smtlChk" style="padding-left:0px;">
2020-11-05 17:02:05 +09:00
<li>
@if (Model.CM.cshape == 0)
{
2021-01-20 14:59:32 +09:00
if (!isallday)
{
<p><label>@(Model.CM.tseq)기 | <span class='gry'>@(Model.CM.ssrename) (@(Convert.ToInt32(Model.CM.ssretimeToDay) * 24)시간) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원</span></label></p>
}
else
{
<p><label>@(Model.CM.tseq)기 | <span class='gry'>신청일로부터 @(Model.CM.studydays)일 (@(Model.CM.studydays * 24)시간) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원</span></label></p>
}
2020-11-05 17:02:05 +09:00
}
else if (Model.CM.cshape == 1)
{
2021-01-20 14:59:32 +09:00
if (!isallday)
{
<p><label>@(Model.CM.tseq)기 | <span class='blu'>[@(Model.CM.studyplacename) 교육장] </span><span class='gry'>@Model.CM.ssrename (@(Model.CM.ssretimeToDay)일) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원</span></label></p>
}
else
{
<p><label>@(Model.CM.tseq)기 | <span class='blu'>[@(Model.CM.studyplacename) 교육장] </span><span class='gry'>신청일로부터 @(Model.CM.studydays)일 (@(Model.CM.studydays * 24)시간) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원</span></label></p>
}
2020-11-05 17:02:05 +09:00
}
else if (Model.CM.cshape == 2)
{
2021-01-20 14:59:32 +09:00
if (!isallday)
{
<p><label>@(Model.CM.tseq)기 | <span class='gry'>@(Model.CM.ssrename) (@(Convert.ToInt32(Model.CM.ssretimeToDay) * 24)시간) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원 ※ 집체교육 선택 필수</span></label></p>
}
else
{
<p><label>@(Model.CM.tseq)기 | <span class='gry'>신청일로부터 @(Model.CM.studydays)일 (@(Model.CM.studydays * 24)시간) </span> | @Model.CM.cname | <span class='red'><span id="spninfee"></span>원 ※ 집체교육 선택 필수</span></label></p>
}
2020-11-05 17:02:05 +09:00
}
2020-11-02 16:59:33 +09:00
2020-11-05 17:02:05 +09:00
@if (Model.CM.applicableCM == "정상접수")
{
<span class="smtlChkBtn smtlChk01">정상접수</span>
}
else
{
<span class="smtlChkBtn smtlChk02">대기접수</span>
}
</li>
</ul>
<div class="apyCost">
2020-12-16 11:10:47 +09:00
결제금액 : <span class="red" id="spninfeecost"></span> 원
2020-11-05 17:02:05 +09:00
</div>
</li>
</ul>
2020-11-02 16:59:33 +09:00
2020-11-06 11:20:26 +09:00
@if (Model.CM.cshape == 2 && Model.CM.applicableCM == "정상접수")
2020-11-05 17:02:05 +09:00
{
<h4 class="clsTitle">교육일정선택</h4>
<select id="selMonth">
@for (int i = 1; i <= 12; i++)
{
<option @(DateTime.Now.Month == i ? "selected" : "") value="@(i)">@(i)월</option>
}
</select>
<span>&nbsp;&nbsp;&nbsp;※지정하신 일자가 수료일자가 됩니다.</span>
2020-11-05 17:30:15 +09:00
<br /><br />
2020-11-06 09:13:04 +09:00
<ul id="ulScd"></ul>
2021-01-07 14:04:52 +09:00
}
@if ((Model.CM.cshape == 1 || Model.CM.cshape == 2) && Model.CM.isaccommodation == 1)
2021-01-07 14:04:52 +09:00
{
<h4 class="clsTitle">합숙여부</h4>
<ul class="bakRadio">
<li>
<input type="radio" name="isaccommodation" id="isaccommodation1" value="1" /><label for="isaccommodation1"> 예 (<span id="spnaccommofee"></span>원 추가)</label>
</li>
<li>
<input type="radio" name="isaccommodation" id="isaccommodation2" value="0" checked /><label for="isaccommodation2"> 아니오</label>
</li>
</ul>
}
@if (Model.CM.cshape == 1)
{
<h4 class="clsTitle">환급여부선택</h4>
2020-11-05 17:02:05 +09:00
<table class="clsTable">
<tbody>
<tr>
<th>환급여부</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="bakRadio">
<li><input type="radio" name="isrebate" id="isrebate1" value="1" checked><label for="isrebate1">환급</label></li>
<li><input type="radio" name="isrebate" id="isrebate0" value="0"><label for="isrebate0">비환급</label></li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
</tbody>
</table>
2020-11-02 16:59:33 +09:00
<p class="subDsc mt10">※ 고용보험에 가입되어 있는 재직자의 경우에만 교육비 중 기준된 일정금액 환급이 가능 하며 고용보험 미 가입자는 환급이 불가 합니다.</p>
}
<div class="div-isCompany">
<h4 class="clsTitle">소속선택</h4>
<table class="clsTable">
<tbody>
<tr>
<th>업체/개인 선택</th>
<td>
<ul class="bakRadio">
<li><input type="radio" name="isCompany" id="isCompany1" value="1" @(Model.Assign.asno != 0 ? "checked" : "") /><label for="isCompany1"> 업체</label></li>
<li><input type="radio" name="isCompany" id="isCompany0" value="0" @(Model.Assign.asno != 0 ? "" : "checked") /><label for="isCompany0"> 개인</label></li>
</ul>
</td>
</tr>
</tbody>
</table>
<p class="subDsc mt10">
※수료증 소속부분에 기재될 내용으로 소속업체가 없으면 개인을 선택해 주세요.
</p>
</div>
@if (Model.CM.cshape == 1)
{
<div class="div-rbankInfo">
<h4 class="clsTitle">환급금 수령계좌 등록</h4>
<p class="subDsc">*는 필수 입력사항입니다.</p>
<table class="clsTable">
<tbody>
<tr>
<th>*은행명</th>
<td><input type="text" name="rbankname" id="rbankname" class="apyIpt" value="@(Model.PPLog != null ? Model.PPLog.rbankname : string.Empty)" /></td>
</tr>
<tr>
<th>*계좌번호</th>
<td><input type="text" name="rbankacc" id="rbankacc" class="apyIpt" value="@(Model.PPLog != null ? Model.PPLog.rbankacc : string.Empty)" /></td>
</tr>
<tr>
<th>*예금주</th>
<td><input type="text" name="rbankowner" id="rbankowner" class="apyIpt" value="@(Model.PPLog != null ? Model.PPLog.rbankowner : string.Empty)" /></td>
</tr>
</tbody>
</table>
<p class="subDsc mt10">※ 환급금액 지급받는 계좌이므로 반드시 소속된 사업장의 법인계좌정보만 입력하여 주시기 바랍니다. (개인계좌 또는 사업주 개인의 계좌로는 환급이 불가합니다)</p>
</div>
2020-11-05 17:02:05 +09:00
}
2020-11-05 17:30:15 +09:00
<div id="postlayer" class="daumpost"><a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a></div>
@if (Model.Assign != null)
{
<div class="div-companyInfo">
<h4 class="clsTitle">회사정보 확인</h4>
<p class="subDsc">*는 필수 입력사항입니다.</p>
@Html.HiddenFor(x => x.Assign.asno)
<table class="clsTable">
<tbody>
<tr>
<th>*회사명</th>
<td>
@Html.TextBoxFor(x => x.Assign.asname, new { @class = "apylpt", @maxlength = "100", @style = "background-color:#ddd;", @readonly = true })
<a href="#" id="btnassign" class="btnassign">검색</a>
</td>
</tr>
<tr>
<th>*사업자등록번호</th>
<td>@Html.TextBoxFor(x => x.Assign.brno, new { @class = "apylpt", @maxlength = "10" })</td>
</tr>
<tr>
<th>*대표자성명</th>
<td>@Html.TextBoxFor(x => x.Assign.ceoname, new { @class = "apylpt", @maxlength = "50" })</td>
</tr>
<tr>
<th>*주소</th>
<td>
<ul class="apyAddr postbox">
<li>
@Html.TextBoxFor(x => x.Assign.post, new { @class = "postno", @style = "background-color:#ddd;", @readonly = true })
</li>
<li>
@Html.TextBoxFor(x => x.Assign.address1, new { @class = "postadr", @style = "background-color:#ddd;", @readonly = true, @placeholder = "주소입력" })
</li>
<li>
@Html.TextBoxFor(x => x.Assign.address2, new { @class = "postadrsub", @placeholder = "나머지 주소입력", @maxlength = "200" })
</li>
<li>
<a href="#" onclick="getpost2(this);">우편번호검색</a>
</li>
</ul>
</td>
</tr>
<tr>
<th>*업태</th>
<td>@Html.TextBoxFor(x => x.Assign.btype, new { @class = "apylpt", @maxlength = "50" })</td>
</tr>
<tr>
<th>*종목</th>
<td>@Html.TextBoxFor(x => x.Assign.bkind, new { @class = "apylpt", @maxlength = "50" })</td>
</tr>
<tr>
<th>*고용보험관리번호</th>
<td>@Html.TextBoxFor(x => x.Assign.eino, new { @class = "apylpt", @maxlength = "30" })</td>
</tr>
<tr>
<th>*담당자성명</th>
<td>@Html.TextBoxFor(x => x.Assign.mname, new { @class = "apylpt", @maxlength = "30" })</td>
</tr>
<tr>
<th>*담당자연락처</th>
<td>
<ul class="usrPhn">
<li>@Html.TextBoxFor(x => x.Assign.mphone1, new { @maxlength = "3" })</li>
<li>-</li>
<li>@Html.TextBoxFor(x => x.Assign.mphone2, new { @maxlength = "4" })</li>
<li>-</li>
<li>@Html.TextBoxFor(x => x.Assign.mphone3, new { @maxlength = "4" })</li>
</ul>
</tr>
<tr>
<th>*계산서받을 이메일</th>
<td>
<ul class="clsMail">
<li>@Html.TextBoxFor(x => x.Assign.taxemail1, new { @maxlength = "100" })</li>
<li></li>
<li>@Html.TextBoxFor(x => x.Assign.taxemail2, new { @maxlength = "30" })</li>
</ul>
</td>
</tr>
<tr>
<th>사업자등록증</th>
<td>
@Html.Partial("./Partial/file", Model.FileList, new ViewDataDictionary { { "fgn", "fgnobno" }, { "fgv", Model.Assign.fgnobno ?? 0 }, { "filename", "file1" }, { "filecount", 1 }, { "fileext", "png,jpg,gif,pdf" }, { "datakey", "assign.fgnobno" } })
</td>
</tr>
</tbody>
</table>
</div>
}
2020-11-05 17:02:05 +09:00
<h4 class="clsTitle">개인정보 확인</h4>
<p class="subDsc">*는 필수 입력사항입니다.</p>
@Html.HiddenFor(x => x.User.userno)
2020-11-05 17:02:05 +09:00
<table class="clsTable">
<tbody>
<tr>
<th>*이름</th>
2020-11-06 18:04:55 +09:00
<td><p>@Html.TextBoxFor(x => x.User.username, new { @class = "apylpt", @maxlength = "10", @style = "background-color:#ddd;", @readonly = true })</p></td>
2020-11-05 17:02:05 +09:00
</tr>
<tr>
<th>*주민등록번호</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="usrNum">
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.userpno1, new { @maxlength = "6" })</li>
2020-11-05 17:02:05 +09:00
<li>-</li>
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.userpno2, new { @maxlength = "7" })</li>
</ul>
</td>
2020-11-05 17:02:05 +09:00
</tr>
<tr>
<th>*휴대전화</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="usrPhn">
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.mobile1, new { @maxlength = "3" })</li>
2020-11-05 17:02:05 +09:00
<li>-</li>
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.mobile2, new { @maxlength = "4" })</li>
2020-11-05 17:02:05 +09:00
<li>-</li>
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.mobile3, new { @maxlength = "4" })</li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
<tr>
<th>*이메일</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="clsMail">
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.email1, new { @maxlength = "100" })</li>
2020-11-06 11:20:26 +09:00
<li></li>
2020-11-06 18:04:55 +09:00
<li>@Html.TextBoxFor(x => x.User.email2, new { @maxlength = "30" })</li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
<tr>
<th>*주소</th>
2020-11-05 17:02:05 +09:00
<td>
2020-11-06 11:20:26 +09:00
<ul class="apyAddr postbox">
<li>
@Html.TextBoxFor(x => x.User.post, new { @class = "postno", @style = "background-color:#ddd;", @readonly = true })
</li>
<li>
@Html.TextBoxFor(x => x.User.address1, new { @class = "postadr", @style = "background-color:#ddd;", @readonly = true, @placeholder = "주소입력" })
</li>
<li>
2020-11-06 18:04:55 +09:00
@Html.TextBoxFor(x => x.User.address2, new { @class = "postadrsub", @placeholder = "나머지 주소입력", @maxlength = "200" })
2020-11-06 11:20:26 +09:00
</li>
2020-11-05 17:30:15 +09:00
<li>
<a href="#" onclick="getpost2(this);">우편번호검색</a>
</li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
<tr style="display:none;">
<th>*채용형태</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="bakRadio">
2020-11-06 11:20:26 +09:00
<li>
@Html.RadioButtonFor(model => model.User.isassignuser, "1", new { @name = "recruit", @checked = "checked" })정규직
</li>
<li>
@Html.RadioButtonFor(model => model.User.isassignuser, "0", new { @name = "recruit" })비정규직
</li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
<tr class="uduty">
<th>*직위</th>
2020-11-06 11:20:26 +09:00
<td>
2020-11-06 18:04:55 +09:00
@Html.TextBoxFor(x => x.User.uduty, new { @class = "apylpt", @maxlength = "20" })
2020-11-06 11:20:26 +09:00
</td>
2020-11-05 17:02:05 +09:00
</tr>
<tr>
<th>*학력</th>
2020-11-05 17:02:05 +09:00
<td>
<ul class="bakRadio">
2020-11-06 11:20:26 +09:00
<li>
@Html.RadioButtonFor(model => model.User.slevel, "0", new { @name = "eduGrade", @checked = "checked" })기타
</li>
<li>
@Html.RadioButtonFor(model => model.User.slevel, "1", new { @name = "eduGrade" })고졸
</li>
<li>
@Html.RadioButtonFor(model => model.User.slevel, "2", new { @name = "eduGrade" })학사
</li>
<li>
@Html.RadioButtonFor(model => model.User.slevel, "3", new { @name = "eduGrade" })석사
</li>
<li>
@Html.RadioButtonFor(model => model.User.slevel, "4", new { @name = "eduGrade" })박사
</li>
2020-11-05 17:02:05 +09:00
</ul>
</td>
</tr>
</tbody>
</table>
2020-11-02 16:59:33 +09:00
<ul class="clsBtn society">
2020-11-06 14:20:19 +09:00
@if (Model.CM.applicableCM == "정상접수")
{
<li><a href="#" onclick="javascript: applyEdu(1);">수강신청</a></li>
}
else
{
2020-11-06 18:04:55 +09:00
<li><a href="#" onclick="javascript:applyEdu(6)">수강대기 신청</a></li>
2020-11-06 14:20:19 +09:00
}
<li><a href="#" id="btnback">뒤로가기</a></li>
2020-11-05 17:02:05 +09:00
</ul>
2020-11-05 17:30:15 +09:00
2020-11-05 17:02:05 +09:00
</form>
@Html.Partial("./Partial/BoxAssign", null, new ViewDataDictionary { { "bindmethod", "bindassign" } })
@section styles{
<style type="text/css">
.btnassign {
display: inline-block;
height: 40px;
line-height: 40px;
text-align: center;
background: #878787;
color: #fff !important;
width: 120px;
vertical-align: top;
margin-left: 7px;
}
</style>
}
2020-11-05 17:30:15 +09:00
@section scriptsHeader{
@Html.Partial("./Partial/ScriptPost")
2020-11-06 18:04:55 +09:00
@Html.Partial("./Partial/filescript")
2020-11-05 17:30:15 +09:00
}
2020-11-05 17:02:05 +09:00
<script type="text/javascript">
var model = {};
model.isloaded = false;
model.islogin = @(ViewBag.SSUserNo > 0 ? "true" :"false");
model.cm = @Html.Raw(Json.Encode(new List<NP.Model.CM>() { Model.CM }.Select(s => new { s.infee, s.accommofee, s.applicableCM, s.cshape, s.cmno }).First()));
model.assign = @Html.Raw(Json.Encode(new List<NP.Model.Assign>() { Model.Assign }.Select(s => new { s.asno, s.asname }).First()));;
model.pplog = @Html.Raw(Json.Encode(new List<NP.Model.PPLog>() { ( Model.PPLog != null ? Model.PPLog : new NP.Model.PPLog {}) }.Select(s => new { s.isrebate, s.isaccommodation, s.cmisno }).First()));;
model.selMonth = @(Model.selMonth != null ? Model.selMonth.ToString() : "null");
model.iscompany = @(Model.isCompany != null ? Model.isCompany.ToString() : "null");
2020-11-05 17:02:05 +09:00
$(document).ready(function () {
$("#selMonth").change(function () {
2020-11-06 09:13:04 +09:00
setScd();
2020-11-05 17:02:05 +09:00
});
2020-11-05 17:30:15 +09:00
2021-05-21 16:16:08 +09:00
$("input:radio[name='isrebate']").on("click",function () {
if ($(this).val() == "1") {
$(".div-isCompany").hide();
$(".div-rbankInfo").show();
$(".div-companyInfo").show();
$(".uduty").show();
}
else {
$(".div-isCompany").show();
$(".div-rbankInfo").hide();
if ($("input:radio[name='isCompany']:checked").val() == "0") {
$(".div-companyInfo").hide();
}
$(".uduty").hide();
}
2020-11-05 17:30:15 +09:00
});
2021-05-21 16:16:08 +09:00
$("input:radio[name='isaccommodation']").on("click",function () {
2021-01-07 14:04:52 +09:00
var total;
if ($(this).val() == "1") {
total = model.cm.infee + model.cm.accommofee;
2021-01-07 14:04:52 +09:00
}
else {
total = model.cm.infee;
2021-01-07 14:04:52 +09:00
}
$("#spninfeecost").html(bindComma(total));
});
$("input:radio[name='isCompany']").on("click", function () {
if ($(this).val() == "0") {
$(".div-companyInfo").hide();
} else {
$(".div-companyInfo").show();
}
});
2021-05-04 10:24:04 +09:00
$("#btnback").on("click", function () {
$("#historyForm").attr("action", "/Course/SmartSearch");
$("#historyForm").submit();
2021-05-04 10:24:04 +09:00
});
$("#btnassign").on("click", function () {
boxassignview(bindassign);
});
initControl();
model.isloaded = true;
2020-11-05 17:02:05 +09:00
});
2020-11-05 17:30:15 +09:00
function initControl() {
$("#spninfee").html(bindComma(model.cm.infee));
$("#spninfeecost").html(bindComma(model.cm.infee));
$("#spnaccommofee").html(bindComma(model.cm.accommofee));
2021-01-07 14:04:52 +09:00
2020-11-06 09:13:04 +09:00
setTimeout(function () {
if (model.cm.cshape == 2) {
2020-11-06 18:04:55 +09:00
setScd();
}
2020-11-06 09:13:04 +09:00
}, 300);
if (model.cm.cshape == 0) {
$(".div-isCompany").show();
$(".uduty").hide();
} else if (model.cm.cshape == 1) {
$(".div-isCompany").hide();
$(".uduty").show();;
} else if (model.cm.cshape == 2) {
$(".div-isCompany").show();
$(".uduty").hide();
}
2021-05-21 17:08:06 +09:00
if (model.assign.asno == 0) {
$("#btnassign").show();
} else {
$("#btnassign").hide();
}
if ($("input:radio[name='isrebate']:checked").val() == "1") {
$(".div-companyInfo").show();
} else {
if ($("input:radio[name='isCompany']:checked").val() == "1") {
$(".div-companyInfo").show();
} else {
$(".div-companyInfo").hide();
}
}
if (model.pplog.isaccommodation != null) {
$("input:radio[name='isaccommodation'][value='" + model.pplog.isaccommodation + "']").click();
}
if (model.pplog.isrebate != null) {
$("input:radio[name='isrebate'][value='" + model.pplog.isrebate + "']").click();
}
if (model.selMonth != null) {
$("#selMonth").val(model.selMonth).trigger('change');
}
if(model.iscompany != null) {
$("input:radio[name='isCompany'][value='" + model.iscompany + "']").click();
2021-05-21 17:08:06 +09:00
}
}
function bindassign(v) {
$("#Assign_asno").val(v.split(':')[0]);
$("#Assign_asname").val(v.split(':')[1]);
capp("/fcommon/getassign", { asno: $("#Assign_asno").val() }, "cbbindassign");
}
function cbbindassign() {
if (capResult.code == 1000) {
var mphone = String(capResult.obj.mphone).split("-");
var mphone1 = mphone.length > 0 ? mphone[0] : "";
var mphone2 = mphone.length > 1 ? mphone[1] : "";
var mphone3 = mphone.length > 2 ? mphone[2] : "";
var taxemail = String(capResult.obj.taxemail).split("@@");
var taxemail1 = taxemail.length > 0 ? taxemail[0] : "";
var taxemail2 = taxemail.length > 1 ? taxemail[1] : "";
setv("Assign_brno", capResult.obj.brno);
setv("Assign_ceoname", capResult.obj.ceoname);
setv("Assign_post", capResult.obj.post);
setv("Assign_address1", capResult.obj.address1);
setv("Assign_address2", capResult.obj.address2);
setv("Assign_btype", capResult.obj.btype);
setv("Assign_bkind", capResult.obj.bkind);
setv("Assign_eino", capResult.obj.eino);
setv("Assign_mname", capResult.obj.mname);
setv("Assign_mphone1", mphone1);
setv("Assign_mphone2", mphone2);
setv("Assign_mphone3", mphone3);
setv("Assign_taxemail1", taxemail1);
setv("Assign_taxemail2", taxemail2);
}
}
2020-11-06 09:13:04 +09:00
function setScd() {
capp("/focommon/GetScdForMixEdu", { cmno: model.cm.cmno, month: $("#selMonth").val() }, "renderScd");
2020-11-06 09:13:04 +09:00
}
function renderScd() {
var ulScd = $("#ulScd");
ulScd.empty();
2020-11-11 16:26:18 +09:00
var seq = 0;
2020-11-06 09:13:04 +09:00
$.each(capResult.obj, function (i, d) {
var li = $("<li />");
2020-11-11 16:26:18 +09:00
if (d.isEnd == true)
2020-11-06 09:13:04 +09:00
{
2020-12-02 16:06:04 +09:00
li.append("<label><input type='radio' name='rdoScds' value='" + d.cmisno + "' disabled> <span style='color:gray'>" + d.scdInfoSummary + "</span><label style='color: red'> (종료)</label></label>");
2020-11-06 09:13:04 +09:00
}
else
{
2020-12-11 16:56:16 +09:00
if (d.quota != 0) {
if (d.remainPeople <= 0) {
li.append("<label><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><input type='radio' name='rdoScds' value='" + d.cmisno + "' checked> " + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
}
else {
li.append("<label><input type='radio' name='rdoScds' value='" + d.cmisno + "'> " + d.scdInfoSummary + "<label style='color: red'> (" + d.remainPeople + "명 남음)</label></label>");
}
}
2020-11-06 18:04:55 +09:00
}
2020-11-11 16:26:18 +09:00
else {
if (seq == 0) {
2020-12-11 16:56:16 +09:00
li.append("<label><input type='radio' name='rdoScds' value='" + d.cmisno + "' checked> " + d.scdInfoSummary + "</label>");
2020-11-11 16:26:18 +09:00
}
else {
2020-12-11 16:56:16 +09:00
li.append("<label><input type='radio' name='rdoScds' value='" + d.cmisno + "'> " + d.scdInfoSummary + "</label>");
2020-11-11 16:26:18 +09:00
}
2020-11-06 18:04:55 +09:00
}
2020-11-06 09:13:04 +09:00
}
2020-11-11 16:26:18 +09:00
seq++;
2020-11-06 09:13:04 +09:00
ulScd.append(li);
});
if (model.pplog.cmisno != null) {
$("input:radio[name='rdoScds'][value='" + model.pplog.cmisno + "']").click();
}
2020-11-06 09:13:04 +09:00
}
2020-11-06 14:20:19 +09:00
function applyEdu() {
var isrebate = $("input:radio[name='isrebate']:checked").val() == "1" ? true : false;
var isCompany= $("input:radio[name='isCompany']:checked").val() == "1" ? true : false;
var assign_mphone = val("Assign_mphone1").replace(/ /, '').replace(/ /, '') + val("Assign_mphone2").replace(/ /, '').replace(/ /, '') + val("Assign_mphone3").replace(/ /, '').replace(/ /, '');
var assign_taxemail = val("Assign_taxemail1") + "@@" + val("Assign_taxemail2");
var user_mobile = val("User_mobile1").replace(/ /, '').replace(/ /, '') + val("User_mobile2").replace(/ /, '').replace(/ /, '') + val("User_mobile3").replace(/ /, '').replace(/ /, '');
var user_email = val("User_email1") + "@@" + val("User_email2");
var isCompanyInfoCheck = false;
if (isrebate) {
isCompanyInfoCheck = true;
}
else if (isCompany) {
isCompanyInfoCheck = true;
}
if (isrebate && check("rbankname", null, "은행명을 등록해주세요.")) { }
else if (isrebate && check("rbankacc", null, "계좌번호를 등록해주세요.")) { }
else if (isrebate && check("rbankowner", null, "예금주를 등록해주세요.")) { }
else if (isCompanyInfoCheck && check("Assign_asname", null, "회사명을 등록해주세요.")) { }
else if (isCompanyInfoCheck && check("Assign_brno", null, "사업자등록번호를 등록해주세요.")) { }
else if (isCompanyInfoCheck && getBytes(val("Assign_brno")) != 10) { focus("Assign_brno"); msg("10자리의 사업자번호를 등록해주세요."); }
else if (isCompanyInfoCheck && check("Assign_ceoname", null, "대표자성명을 등록해주세요.")) { }
else if (isCompanyInfoCheck && (check("Assign_post", null, "우편번호를 등록해주세요.") || check("Assign_address1", null, "주소를 등록해주세요.") || check("Assign_address2", null, "상세주소를 등록해주세요."))) { }
else if (isCompanyInfoCheck && check("Assign_btype", null, "업태를 등록해주세요.")) { }
else if (isCompanyInfoCheck && check("Assign_bkind", null, "종목을 등록해주세요.")) { }
else if (isCompanyInfoCheck && check("Assign_eino", null, "고용보험관리번호를 등록해주세요.")) { }
else if (isCompanyInfoCheck && getBytes(val("Assign_eino")) != 11) { focus("Assign_eino"); msg("11자리의 고용보험관리번호를 등록해주세요."); }
else if (isCompanyInfoCheck && check("Assign_mname", null, "담당자성명을 등록해주세요.")) { }
else if (isCompanyInfoCheck && (check("Assign_mphone1", null, "담당자연락처를 등록해주세요.") || check("Assign_mphone2", null, "담당자연락처를 등록해주세요.") || check("Assign_mphone3", null, "담당자연락처를 등록해주세요."))) { }
else if (isCompanyInfoCheck && !ismobilenumber(assign_mphone)) { focus("Assign_mphone1"); msg("담당자연락처를 확인해주세요."); }
else if (isCompanyInfoCheck && (check("Assign_taxemail1", null, "계산서받을 이메일을 등록해주세요.") || check("Assign_taxemail2", null, "계산서받을 이메일을 등록해주세요."))) { }
else if (isCompanyInfoCheck && !isemail(assign_taxemail)) { focus("Assign_taxemail1"); msg("올바른 이메일주소를 입력해주세요."); }
else if (check("User_userpno1", null, "주민등록번호 앞자리를 입력하십시오.") || check("User_userpno2", null, "주민등록번호 뒷자리를 입력하십시오.")) { }
else if (check("User_mobile1", null, "휴대전화를 등록해주세요.") || check("User_mobile2", null, "휴대전화를 등록해주세요.") || check("User_mobile3", null, "휴대전화를 등록해주세요.")) { }
else if (!ismobilenumber(user_mobile)) { focus("mobile"); msg("휴대전화를 확인해주세요."); }
else if (check("User_email1", null, "이메일을 등록해주세요.") || check("User_email2", null, "이메일을 등록해주세요.")) { }
else if (!isemail(user_email)) { focus("User_email1"); msg("올바른 이메일주소를 입력해주세요."); }
else if (check("User_post", null, "우편번호를 등록해주세요.") || check("User_address1", null, "주소를 등록해주세요.") || check("User_address2", null, "상세주소를 등록해주세요.")) { }
else if ($("input:radio[name='isrebate']:checked").val() == "1" && check("User_uduty", null, "직위를 등록해주세요.")) { }
2020-11-09 10:57:03 +09:00
else {
if (model.islogin > 0) {
2020-12-30 09:21:26 +09:00
$("#cmisno").val($("input:radio[name=rdoScds]:checked").val());
$("#applicableCM").val(model.cm.applicableCM);
2020-12-30 09:21:26 +09:00
capfileform('/fcommon/savePPLog', 'applyEduForm', 'saveResult');
}
else {
msg("로그인 후 신청 할 수 있습니다.");
return;
}
2020-11-09 10:57:03 +09:00
}
2020-11-06 18:04:55 +09:00
}
function saveResult() {
if (capResult.code == 1000 && capResult.obj > 0) {
$("#historyForm > input[name='pplno']").val(capResult.obj);
$("#historyForm > input[name='selMonth']").val($("#selMonth").val());
$("#historyForm > input[name='isCompany']").val($("input:radio[name='isCompany']:checked").val());
$("#historyForm").attr("action", "/Course/ApplyAgree");
$("#historyForm").submit();
2020-11-06 18:04:55 +09:00
} else {
2020-12-28 15:56:16 +09:00
msg("저장을 실패하였습니다.");
2020-11-06 18:04:55 +09:00
}
return;
2020-11-06 14:20:19 +09:00
}
</script>