YNICTE/BO/Views/croom/completions.cshtml

616 lines
34 KiB
Plaintext
Raw Normal View History

@model NP.Model.VMCRoom
<form id="mform" method="post">
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1">
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col style="width:15%" />
<col style="width:35%" />
<col style="width:15%" />
<col />
</colgroup>
<tbody id="searchtbody">
<tr>
<th>교육년도</th>
<td>
<div class="col-md-12">
<select id="stringval" name="stringval" class="form-control">
<option value="">-년도선택</option>
2021-06-25 13:40:31 +09:00
@for (int i = 2021; i <= DateTime.Now.Year; i++)
{
<option value="@i" @(Model.stringval == i.ToString() ? "selected" : "")>@(i)년</option>
}
</select>
</div>
</td>
<th>과정분류</th>
<td>
<div class="col-md-6">
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno == null), new ViewDataDictionary { { "name", "stringval2" }, { "selected", Model.stringval2 }, { "style", "width: 100%" }, { "df", ":-상위분류" } })
</div>
<div class="col-md-6">
@Html.Partial("./Partial/Select", Model.CGs.Where(w => w.pcgno != null && w.pcgno.ToString() == Model.stringval2), new ViewDataDictionary { { "name", "stringval3" }, { "selected", Model.stringval3 }, { "style", "width: 100%;" }, { "df", ":-분류" } })
</div>
</td>
</tr>
<tr>
<th>교육유형</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "1:교육장교육;2:온라인교육" }, { "name", "stringval4" }, { "selected", Model.stringval4 }, { "style", "width: 100%" }, { "df", ":-유형선택" } })
</div>
</td>
<th>기술인분류</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeman"), new ViewDataDictionary { { "name", "stringval5" }, { "selected", Model.stringval5 }, { "style", "width: 100%" }, { "df", ":-기술인분류" } })
</div>
</td>
</tr>
<tr>
<th>교육장</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "studyplace"), new ViewDataDictionary { { "name", "stringval6" }, { "selected", Model.stringval6 }, { "style", "width: 100%" }, { "df", ":-교육장구분" } })
</div>
2021-06-25 13:40:31 +09:00
</td>
<th>직무분야</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typejob"), new ViewDataDictionary { { "name", "stringval7" }, { "selected", Model.stringval7 }, { "style", "width: 100%" }, { "df", ":-직무분야" } })
</div>
</td>
</tr>
2021-06-25 13:40:31 +09:00
<tr>
<th>학습기간</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval8) ? (DateTime?)null : Convert.ToDateTime(Model.stringval8), new ViewDataDictionary { { "name", "stringval8" } }) ~
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval9) ? (DateTime?)null : Convert.ToDateTime(Model.stringval9), new ViewDataDictionary { { "name", "stringval9" } })
</div>
</td>
2021-06-25 13:40:31 +09:00
<th>등급</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typegrade"), new ViewDataDictionary { { "name", "stringval10" }, { "selected", Model.stringval10 }, { "style", "width: 100%" }, { "df", ":-등급" } })
</div>
2021-06-25 13:40:31 +09:00
</td>
</tr>
<tr>
<th>검색단어</th>
<td>
2021-06-25 13:40:31 +09:00
<div class="col-md-4">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "userid:ID;username:이름;userpno:주민등록번호;completeno:수료번호;asname:업체명;brno:사업자등록번호;payno:주문번호" }, { "name", "searchtype" }, { "selected", Model.searchtype }, { "style", "width: 100%" }, { "df", ":-유형선택" } })
</div>
2021-06-25 13:40:31 +09:00
<div class="col-md-8">
@Html.Partial("./Partial/Text", Model.stringval12, Helpers.DicText(new NP.Model.TextDic() { Name = "searchtext", Value = Model.searchtext, PH = "단어를 입력하세요.", CssClass = "ff" }))
</div>
</td>
<th>교육목적</th>
<td>
<div class="col-md-12">
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeedu"), new ViewDataDictionary { { "name", "stringval11" }, { "selected", Model.stringval11 }, { "style", "width: 100%" }, { "df", ":-교육목적" } })
</div>
2021-06-25 13:40:31 +09:00
</td>
</tr>
</table>
</div>
</section>
<div style="text-align: right; border-bottom: 1px solid #ddd; padding-bottom: 5px;">
<button class="btn btn-default btn-s-xs" type="button" onclick="javascript:submit();"><i class="fa fa-search"></i></button>
@* <a href="#" onclick="javascript:exceldown('mform', '/croom/completions', 'tbody1', 'completions');" class="btn btn-default btn-s-xs" style="margin-left: 5px;">엑셀다운로드</a>*@
<a href="#" onclick="javascript:callComment('mform', '/croom/completions', 'tbody1', 'completions');" class="btn btn-s-xs btn-success" style="margin-left: 5px;">엑셀다운로드</a>
</div><br />
<div class="tar buttonbox">
@Html.Partial("./Partial/pagerow", new ViewDataDictionary { { "tbodyid", "tbody1" }, { "searchmethod", "submit()" }, { "pagesize", Model.pagerowcount } })
</div>
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light" style="width:5000px">
<thead>
<tr>
2021-07-09 17:29:36 +09:00
<th style="min-width:65px;">수정</th>
2021-06-30 15:31:47 +09:00
<th>등록/수정일자</th>
<th>사용자ID</th>
<th>이름</th>
<th>주민번호</th>
2021-06-29 13:59:12 +09:00
<th>교육생연락처</th>
<th>교육유형</th>
<th>교육구분</th>
2021-06-29 13:59:12 +09:00
<th>기술인분류</th>
<th>직무분야</th>
<th>교육목적</th>
<th>등급</th>
2021-08-23 15:10:15 +09:00
<th>교육신청일</th>
2021-06-29 13:59:12 +09:00
<th>교육종료일</th>
<th>과정명</th>
<th>수료번호</th>
</tr>
</thead>
<tbody class="data" id="tbody1">
@foreach (var item in Model.Completions)
{
<tr>
2021-06-25 13:40:31 +09:00
<td class="link"><a href="#" onclick="viewcompletion(@item.lectno)">[수정]</a></td>
2021-06-30 15:31:47 +09:00
<td>@(item.udt == null ? "-" : item.udt.ToString("yyyy-MM-dd"))</td>
<td>@item.userid</td>
<td>@item.username</td>
<td>@item.userpnostr</td>
2021-06-29 13:59:12 +09:00
<td>@item.mobile</td>
<td>@item.cshapename</td>
<td>@item.edukind</td>
2021-06-29 13:59:12 +09:00
<td>@item.typemanName</td>
<td>@item.typejobName</td>
<td>@item.typeeduName</td>
<td>@item.typegradeName</td>
2021-08-23 15:10:15 +09:00
<td>@Convert.ToDateTime(item.cshape == 1 ? item.sdate : item.paycdt).ToShortDateString()</td>
<td>@Convert.ToDateTime(item.cshape == 1 ? item.edate : item.estart).ToShortDateString()</td>
<td>@item.cname</td>
<td>@item.completeno</td>
</tr>
}
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</section>
</form>
2021-06-25 13:40:31 +09:00
<div id="completionbox" class="findbox draggable regbox" style="width: 800px; z-index: 1041; top: 60px;bottom: 30px; 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>
<input type="hidden" id="completion_lectno" name="completion.lectno" />
<input type="hidden" id="completion_userno" name="completion.userno" />
<input type="hidden" id="completion_pino" name="completion.pino" />
<input type="hidden" id="completion_pplno" name="completion.pplno" />
<input type="hidden" id="completion_asno" name="completion.asno" />
<input type="hidden" id="completion_cmno" name="completion.cmno" />
<input type="hidden" id="completion_cmisno" name="completion.cmisno" />
2021-06-25 13:40:31 +09:00
<h5>ㆍ강좌정보/수료정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
2021-06-25 13:40:31 +09:00
<col style="width:30%" />
</colgroup>
<tr>
2021-06-25 13:40:31 +09:00
<th>교육상위분류</th>
<td id="completion_pcgname"></td>
<th>교육하위분류</th>
<td id="completion_cgname"></td>
</tr>
<tr>
<th>교육유형</th>
2021-06-25 13:40:31 +09:00
<td id="completion_cshapename"></td>
<th>과정명</th>
<td id="completion_cname"></td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>교육이수시간</th>
<td id="completion_studytime"></td>
<th>교육장</th>
<td id="completion_studyplaceName"></td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>수료번호</th>
<td id="completion_completeno"></td>
<th>교육연도</th>
<td id="completion_tyear"></td>
</tr>
<tr>
<th>주문번호</th>
<td id="completion_payno" colspan="3"></td>
</tr>
2021-06-25 13:40:31 +09:00
</table>
<h5>ㆍ사용자정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col style="width:30%" />
</colgroup>
<tr>
2021-06-25 13:40:31 +09:00
<th>사용자ID</th>
<td id="completion_userid"></td>
<th>이름 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.username", Style = "width:100%;" }))</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>주민번호 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.userpno", Style = "width:100%;" }))</td>
<th>학력</th>
<td>@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "0:기타;1:고졸;2:학사;3:석사;4:박사" }, { "name", "completion.slevel" }, { "style", "width: 100%" }, { "df", ":-선택" } })</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>직위</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.uduty", Style = "width:100%;" }))</td>
<th>연락처 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.mobile", Style = "width:100%;", CssClass = "mobilefmt nocomma" }))</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>소속협회</th>
<td colspan="3">@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.association", Style = "width:100%;" }))</td>
</tr>
2021-06-25 13:40:31 +09:00
</table>
<h5>ㆍ신청정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col style="width:30%" />
</colgroup>
<tr id="trcshape1">
2021-06-25 13:40:31 +09:00
<th>교육시작일 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "completion.sdate" } })</td>
<th>교육종료일 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "completion.edate" } })</td>
</tr>
<tr id="trcshape2">
2021-08-23 15:10:15 +09:00
<th>교육시작일<spn style="color:red;">*</spn></th>
<td id="completion_payoktime"></td>
<th>교육종료일(집체교육일) <spn style="color:red;">*</spn></th>
<td>
<div class="col-sm-10" style="padding-left:0px;">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.estart", Style = "width:100%;", IsReadOnly = true }))
</div>
<div class="col-sm-2" style="padding-left: 0px;margin-top: 4px;margin-left: -10px;">
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" id="btnfindscdshow"><i class="fa fa-search"></i></a>
</div>
</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>기술인분류 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeman"), new ViewDataDictionary { { "name", "completion.typeman" }, { "style", "width: 100%" }, { "df", ":-기술인분류" } })</td>
<th>직무분야 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typejob"), new ViewDataDictionary { { "name", "completion.typejob" }, { "style", "width: 100%" }, { "df", ":-직무분야" } })</td>
</tr>
<tr>
<th>전문분야 <spn style="color:red;">*</spn></th>
<td>
<select class="form-control dev" id="completion_typejobItem" name="completion.typejobItem">
@{
List<string> tempList = ((string)ViewBag.JobTypeItems).Split(',').ToList();
foreach (var t in Model.ComCodes.Where(w => tempList.Contains(w.cgroup)))
{
<option value="@t.ccode" class="jobTypeItems" name="@t.cgroup">@t.cname</option>
}
}
</select>
</td>
2021-06-25 13:40:31 +09:00
<th>교육목적 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typeedu"), new ViewDataDictionary { { "name", "completion.typeedu" }, { "style", "width: 100%" }, { "df", ":-교육목적" } })</td>
</tr>
<tr>
<th>등급 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "typegrade"), new ViewDataDictionary { { "name", "completion.typegrade" }, { "style", "width: 100%" }, { "df", ":-등급" } })</td>
2021-06-25 13:40:31 +09:00
<th>결제금액</th>
<td id="completion_payamt"></td>
</tr>
<tr>
<th>교육구분</th>
<td id="completion_edukind"></td>
2021-06-25 13:40:31 +09:00
<th>수료여부 <spn style="color:red;">*</spn></th>
<td>@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "0:미수료;1:수료" }, { "name", "completion.iscomplete" }, { "style", "width: 100%" } })</td>
</tr>
2021-06-25 13:40:31 +09:00
</table>
<h5>ㆍ환급정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col style="width:30%" />
</colgroup>
<tr>
2021-06-25 13:40:31 +09:00
<th>환급액</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.rbankamt", Style = "width:100%;", CssClass = "int" }))</td>
2021-06-25 13:40:31 +09:00
<th>환급은행명</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.rbank", Style = "width:100%;" }))</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>환급계좌</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.rbankaccnum", Style = "width:100%;" }))</td>
<th>환급계좌예금주</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.rbankuser", Style = "width:100%;" }))</td>
</tr>
2021-06-25 13:40:31 +09:00
</table>
<h5>ㆍ회사정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col style="width:30%" />
</colgroup>
<tr>
2021-06-25 13:40:31 +09:00
<th>업체명</th>
<td colspan="3">
<div class="col-sm-8" style="padding-left:0px;">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.asname", Style = "width:100%;", IsReadOnly = true }))
</div>
<div class="col-sm-4" style="padding-left: 0px;margin-top: 4px;margin-left: -10px;">
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" onclick="findassignshow()"><i class="fa fa-search"></i></a>
</div>
</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>업체주소</th>
<td colspan="3" class="postbox">
<div class="col-md-2" style="padding-left:0px;padding-right:5px;">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.post", Style = "width:100%;", IsReadOnly = true, CssClass = "postno" }))
</div>
<div class="col-sm-9" style="padding-left:0px;padding-right:0px;">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.address1", Style = "width:100%;", IsReadOnly = true, CssClass = "postadr" }))
</div>
<div class="col-sm-1" style="padding-left:5px;margin-top:4px;">
<a href="#" class="btn btn-info btn-find btn-xs data-find data-find-float" onclick="getpost2(this);bglayer2();"><i class="fa fa-search"></i></a>
</div>
<div class="col-sm-12" style="padding-left:0px;padding-top:5px;padding-right:0px;">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.address2", Style = "width:100%;", CssClass = "postadrsub" }))
</div>
</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>사업자등록번호</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.brno", Style = "width:100%;" }))</td>
<th>고용보험관리번호</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.eino", Style = "width:100%;" }))</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>업태</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.btype", Style = "width:100%;" }))</td>
<th>종목</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.bkind", Style = "width:100%;" }))</td>
</tr>
<tr>
<th>대표자</th>
<td colspan="3">@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.ceoname", Style = "width:100%;" }))</td>
2021-06-25 13:40:31 +09:00
</tr>
</table>
<h5>ㆍ계산서정보</h5>
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col style="width:30%" />
</colgroup>
2021-06-25 13:40:31 +09:00
<tr>
<th>업체담당자</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.mname", Style = "width:100%;" }))</td>
2021-06-25 13:40:31 +09:00
<th>업체담당자연락처</th>
<td>@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.mphone", Style = "width:100%;" }))</td>
</tr>
<tr>
2021-06-25 13:40:31 +09:00
<th>계산서이메일</th>
<td colspan="3">@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "completion.taxemail", Style = "width:100%;" }))</td>
</tr>
</table>
<div class="findboxbtnbox" id="btnsave">
<a href="#" class="btn btn-primary" onclick="update();">수정</a>
</div>
</div>
<div id="bglayer2" style="display: none;">
<div class="progress progress-xs progress-striped active" style="position: absolute; top: 40%; left: 30%; right: 30%; height: 20px; display: none;">
<div class="progress-bar progress-bar-danger" data-toggle="tooltip" data-original-title="30%" style="width: 100%">processing...</div>
</div>
</div>
2021-06-25 13:40:31 +09:00
<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: 2001; top: 100px;left:300px; overflow: auto;">
<h4><i class="fa fa-bars"></i> <span id="pcap">교육일정변경</span><a href="#" class="btn btn-default btn-xs f-r closethisbox2">닫기</a></h4>
<ul id="ulScd"></ul>
<div class="findboxbtnbox" id="btnsavelect">
<a href="#" class="btn btn-primary" onclick="updateScd();">선택완료</a>
</div>
</div>
2021-06-25 13:40:31 +09:00
@Html.Partial("./Partial/AssignBox2", "bindAssign;고객사 검색;1")
@*@Html.Partial("./Partial/CMScdBox2", "bindCMScd;교육일정선택;1")*@
@Html.Partial("./Partial/ScdScript", "bindCMScd;교육일정선택;1")
@section scriptsHeader{
@Html.Partial("./Partial/ScriptDate")
@Html.Partial("./Partial/ScriptPost")
@Html.Partial("./Partial/ExcelCommentBox")
}
@section scripts{
<script src="~/js/moment.js"></script>
<script>
// /Partial/ScdScript의 완료시 표현방식 구분
scdReturnType = "completions";
var _cgs = '@(string.Join(";", Model.CGs.Select(s=>string.Format("{0}:{1}:{2}", s.pcgno??0, s.cgno, s.cgname))))';
$(document).ready(function () {
$("#stringval2").on("change", function () {
bindcgno("stringval2", "stringval3");
});
/*기존 scd
$("#btnfindscdshow").on("click", function () {
var cmno = $("#completion_cmno").val();
if (cmno != "") {
findcmscdshow(cmno);
}
});*/
$("#btnfindscdshow").on("click", function () {
var cmno = $("#completion_cmno").val();
var lectno = $("#completion_lectno").val();
var cmisno = $("#completion_cmisno").val();
if (cmno != "") {
$("#bglayer2").show()
openScd(cmno,lectno,cmisno)
}
});
$("#completion_typejob").on("change", function () {
$(".jobTypeItems").css("display", "none")
let seltypeJobGroup = "typejob" + $(this).val();
$("[name='" + seltypeJobGroup + "']").each(function () {
$(this).css("display", "")
})
})
$(".closethisbox2").on("click", function () {
$("#bglayer2").hide()
$("#scdbox").hide();
})
2021-06-25 13:40:31 +09:00
});
function bindCMScd(data) {
$("#completion_cmisno").val(data.value);
//$("#completion_estart").val(moment(data.estart).format('YYYY-MM-DD'));
$("#completion_estart").val(data.estart);
}
2021-06-25 13:40:31 +09:00
function bindAssign(data) {
$("#completion_asno").val(data.asno);
$("#completion_asname").val(data.asname);
$("#completion_post").val(data.post);
$("#completion_address1").val(data.address1);
$("#completion_address2").val(data.address2);
$("#completion_brno").val(data.brno);
$("#completion_eino").val(data.eino);
$("#completion_bkind").val(data.bkind);
$("#completion_btype").val(data.btype);
$("#completion_ceoname").val(data.ceoname);
//$("#completion_mname").val(data.mname);
//$("#completion_mphone").val(data.mphone);
//$("#completion_taxemail").val(data.taxemail);
2021-06-25 13:40:31 +09:00
}
var _bindcdnocid = "";
function bindcgno(id, cid) {
_bindcdnocid = cid;
$("#" + cid + " option:gt(0)").remove();
if ($("#" + id).val() != "") {
$.each(_cgs.split(';'), function (i, d) {
if (d.split(':')[0] == $("#" + id).val()) {
$("#" + _bindcdnocid).append("<option value=\"" + d.split(':')[1] + "\">" + d.split(':')[2] + "</option>");
}
});
}
}
2021-06-25 13:40:31 +09:00
function viewcompletion(lectno) {
capp("/acommon/completion", { lectno: lectno }, "cbviewcompletion",null,null,true);
}
2021-06-25 13:40:31 +09:00
function cbviewcompletion() {
if (capResult.code == 1000) {
for (key in capResult.obj) {
if (key == "sdate" || key == "edate" || key == "payoktime" || key == "estart") {
capResult.obj[key] = moment(capResult.obj[key]).format('YYYY-MM-DD');
} else if (key == "userpno") {
capResult.obj[key] = capResult.obj[key].substr(0, 6) + "-" + capResult.obj[key].substr(6);
2021-06-25 13:40:31 +09:00
} else if (key == "payamt") {
capResult.obj[key] = bindComma3(capResult.obj[key]);
}
2021-06-25 13:40:31 +09:00
if ($("#completion_" + key).prop('tagName') == "TD") {
$("#completion_" + key).html(capResult.obj[key]);
} else {
$("#completion_" + key).val(capResult.obj[key]);
}
}
$("#completion_typejobItem").val(capResult.obj.typejobitem)
$(".jobTypeItems").css("display", "none");
$("[name='typejob" + $("#completion_typejob").val() + "']").each(function () {
$(this).css("display", "");
})
if (capResult.obj.cshape == 2) {
$("#trcshape1").hide();
$("#trcshape2").show();
} else {
$("#trcshape1").show();
$("#trcshape2").hide();
}
2021-06-25 13:40:31 +09:00
bglayer(); $("#completionbox").slideDown("fast");
} else {
msgadmin2();
}
}
function update() {
2021-06-25 13:40:31 +09:00
if ($("#completion_username").val() == "") {
$("#completion_username").focus();
msg2("이름을 입력해주세요.");
} else if ($("#completion_userpno").val() == "") {
$("#completion_userpno").focus();
msg2("주민번호를 입력해주세요.");
2021-06-25 13:40:31 +09:00
} else if (!$.isNumeric($("#completion_userpno").val().replace(/-/gi, "")) || $("#completion_userpno").val().replace(/-/gi, "").length != 13) {
$("#completion_userpno").focus();
msg2("잘못된 주민번호입니다.");
2021-06-25 13:40:31 +09:00
} else if (!moment($("#completion_userpno").val().substr(0,6), 'YYMMDD',true).isValid()) {
$("#completion_userpno").focus();
msg2("잘못된 주민번호입니다.");
} else if ($("#completion_mobile").val() == "") {
$("#completion_mobile").focus();
msg2("연락처를 입력해주세요.");
} else if (!ismobile($("#completion_mobile").val()) && !isphone($("#completion_mobile").val())) {
$("#completion_mobile").focus();
msg2("잘못된 연락처입니다.");
} else if ($("#completion_sdate").val() == "") {
$("#completion_sdate").focus();
msg2("교육시작일을 입력해주세요.");
} else if ($("#completion_edate").val() == "") {
$("#completion_edate").focus();
msg2("교육종료일을 입력해주세요.");
} else if ($("#completion_typeman").val() == "") {
$("#completion_typeman").focus();
msg2("기술인분류를 선택해주세요.");
} else if ($("#completion_typejob").val() == "") {
$("#completion_typejob").focus();
msg2("직무분야를 선택해주세요.");
} else if ($("#completion_typeedu").val() == "") {
$("#completion_typeedu").focus();
msg2("교육목적을 선택해주세요.");
} else if ($("#completion_typegrade").val() == "") {
$("#completion_typegrade").focus();
msg2("등급을 선택해주세요.");
} else if (!$.isNumeric($("#completion_rbankamt").val().replace(/,/gi, ""))) {
$("#completion_rbankamt").focus();
msg2("환급액은 숫자만 입력가능합니다.");
2021-06-25 13:40:31 +09:00
} else if ($("#completion_rbankaccnum").val() != "" && !$.isNumeric($("#completion_rbankaccnum").val())) {
$("#completion_rbankaccnum").focus();
msg2("환급계좌는 숫자만 입력가능합니다.");
2021-06-25 13:40:31 +09:00
} else if ($("#completion_brno").val() != "" && !$.isNumeric($("#completion_brno").val())) {
$("#completion_brno").focus();
msg2("사업자등록번호는 숫자만 입력가능합니다.");
} else if ($("#completion_eino").val() != "" && !$.isNumeric($("#completion_eino").val())) {
$("#completion_eino").focus();
msg2("고용보험관리번호는 숫자만 입력가능합니다.");
} else if ($("#completion_mphone").val() != "" && !ismobile($("#completion_mphone").val()) && !isphone($("#completion_mphone").val())) {
$("#completion_mphone").focus();
msg2("잘못된 업체담당자연락처입니다.");
} else if ($("#completion_taxemail").val() != "" && !isemail($("#completion_taxemail").val())) {
$("#completion_taxemail").focus();
msg2("잘못된 계산서이메일입니다.");
} else {
if (confirm("수료정보를 수정하시겠습니까??")) {
var data = {};
2021-06-25 13:40:31 +09:00
$.each($("#completionbox input, #completionbox select"), function () {
if (this.name == "completion.rbankamt") {
data[this.name.replace(/completion./gi, "")] = this.value.replace(/,/gi, "");
} else {
data[this.name.replace(/completion./gi, "")] = this.value;
}
});
2021-06-25 13:40:31 +09:00
capp("/acommon/completionupdate", data, "cbupdate");
}
}
}
function cbupdate() {
2021-06-25 13:40:31 +09:00
if (capResult.code == 1000) {
msgok(1, "", true);
submit("mform", 800, true);
} else {
2021-06-25 13:40:31 +09:00
msgadmin2(capResult.msg);
}
2021-06-25 13:40:31 +09:00
}
</script>
}