YNICTE/BO/Views/croom/completions.cshtml

495 lines
24 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>
@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>
</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>
<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>
<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>
</td>
</tr>
<tr>
<th>검색단어</th>
<td>
<div class="col-md-4">
@Html.Partial("./Partial/Select", null, new ViewDataDictionary { { "valuetext", "username:이름;userpno:주민등록번호;completeno:수료번호;asname:업체명;brno:사업자등록번호" }, { "name", "searchtype" }, { "selected", Model.searchtype }, { "style", "width: 100%" }, { "df", ":-유형선택" } })
</div>
<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>
</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>
</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>
<th>수정</th>
<th>교육상위분류</th>
<th>교육하위분류</th>
<th>교육유형</th>
<th>사용자ID</th>
<th>이름</th>
<th>주민번호</th>
<th>기술인분류</th>
<th>교육구분</th>
<th>교육목적</th>
<th>등급</th>
<th>직무분야</th>
<th>과정명</th>
<th>수료번호</th>
<th>업체명</th>
<th>업체주소</th>
<th>사업자등록번호</th>
<th>고용보험관리번호</th>
<th>업태</th>
<th>종목</th>
<th>대표자</th>
<th>교육시작일</th>
<th>교육종료일</th>
<th>교육이수시간</th>
<th>소속협회</th>
<th>학력</th>
<th>직위</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="tbody1">
@foreach (var item in Model.Completions)
{
<tr>
<td class="link"><a href="#" onclick="viewdocument(@item.lectno)">[수정]</a></td>
<td>@item.pcgname</td>
<td>@item.cgname</td>
<td>@item.cshapename</td>
<td>@item.userid</td>
<td>@item.username</td>
<td>@item.userpnostr</td>
<td>@item.typemanName</td>
<td>@item.edukind</td>
<td>@item.typeeduName</td>
<td>@item.typegradeName</td>
<td>@item.typejobName</td>
<td>@item.cname</td>
<td>@item.completeno</td>
<td>@item.asname</td>
<td>@item.companyaddr </td>
<td>@item.brno</td>
<td>@item.eino</td>
<td>@item.btype</td>
<td>@item.bkind</td>
<td>@item.ceoname</td>
<td>@Convert.ToDateTime(@item.sdate).ToShortDateString()</td>
<td>@Convert.ToDateTime(@item.edate).ToShortDateString()</td>
<td>@item.studytime</td>
<td>@item.association</td>
<td>@item.slevelName</td>
<td>@item.uduty</td>
<td>@item.mobile</td>
<td>@item.mname</td>
<td>@item.mphone</td>
<td>@item.payamt</td>
<td>@item.rbankamt</td>
<td>@item.rbank</td>
<td>@item.rbankaccnum</td>
<td>@item.tbankuser</td>
<td>@item.taxemail</td>
<td>@item.tyear</td>
<td>@item.studyplaceName</td>
</tr>
}
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, Model.pagerowcount, Model.pagetotalcount)
</section>
</form>
<div id="documentbox" 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="document_no" name="document.no" />
<table class="regtable">
<colgroup>
<col style="width:20%" />
<col style="width:30%" />
<col style="width:20%" />
<col />
</colgroup>
<tr>
<th>과정분류</th>
<td>
</td>
<th>교육유형</th>
<td>
</td>
</tr>
<tr>
<th>이름</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.username", Style = "width:100%;" }))
</td>
<th>주민번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.userpno", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>기술인분류</th>
<td>
</td>
<th>교육구분</th>
<td>
</td>
</tr>
<tr>
<th>교육목적</th>
<td>
</td>
<th>등급</th>
<td>
</td>
</tr>
<tr>
<th>직무분야</th>
<td>
</td>
<th>과정명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.cgname", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>수료번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.completeno", Style = "width:100%;" }))
</td>
<th>업체명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.companyname", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업체주소</th>
<td colspan="3">
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.companyaddr", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>사업자등록번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.brno", Style = "width:100%;" }))
</td>
<th>고용보험관리번호</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.eino", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업태</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.btype", Style = "width:100%;" }))
</td>
<th>종목</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.bkind", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>대표자</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.ceoname", Style = "width:100%;" }))
</td>
<th>교육일시작일</th>
<td>
@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "document.ssdate" } })
</td>
</tr>
<tr>
<th>교육일종료일</th>
<td>
@Html.Partial("./Partial/Date", null, new ViewDataDictionary { { "name", "document.sedate" } })
</td>
<th>교육이수시간</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.sctime", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>소속협회</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.assign", Style = "width:100%;" }))
</td>
<th>학력</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.slevel", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>직위</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.uduty", Style = "width:100%;" }))
</td>
<th>교육생연락처</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.phone", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>업체담당자</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.mname", Style = "width:100%;" }))
</td>
<th>업체담당자연락처</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.mphone", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>교육비</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.sprice", Style = "width:100%;" }))
</td>
<th>환급액</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rprice", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>환급은행명</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbank", Style = "width:100%;" }))
</td>
<th>환급계좌</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbankno", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>환급계좌예금주</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.rbankuser", Style = "width:100%;" }))
</td>
<th>계산서이메일</th>
<td>
@Html.Partial("./Partial/Text", null, Helpers.DicText(new NP.Model.TextDic() { Name = "document.taxemail", Style = "width:100%;" }))
</td>
</tr>
<tr>
<th>교육연도</th>
<td>
</td>
<th>구분</th>
<td>
</td>
</tr>
</table>
<div class="findboxbtnbox" id="btnsave">
<a href="#" class="btn btn-primary" onclick="update();">수정</a>
</div>
</div>
@section scriptsHeader{
@Html.Partial("./Partial/ScriptDate")
}
@section scripts{
<script>
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");
});
});
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>");
}
});
}
}
function jsonDateToString(jsonDate) {
var date = new Date(parseInt(jsonDate.replace(/(^.*\()|([+-].*$)/g, '')));
var yyyy = String(date.getFullYear());
var MM = (date.getMonth() + 1) < 10 ? "0" + (date.getMonth() + 1) : String(date.getMonth() + 1);
var dd = date.getDate() < 10 ? "0" + date.getDate() : String(date.getDate());
return yyyy + "-" + MM + "-" + dd;;
}
function viewdocument(no) {
//capp("/acommon/DocumnetsPast", { no: no }, "cbviewdocument",null,null,true);
}
function cbviewdocument() {
if (capResult.code == 1000) {
for (key in capResult.obj) {
if (key == "ssdate" || key == "sedate") {
capResult.obj[key] = jsonDateToString(capResult.obj[key]);
} else if (key == "userpno") {
capResult.obj[key] = capResult.obj[key].substr(0, 6) + "-" + capResult.obj[key].substr(6);
}
$("#document_" + key).val(capResult.obj[key]);
}
bglayer(); $("#documentbox").slideDown("fast");
} else {
msgadmin2();
}
}
function update() {
if ($("#document_username").val() == "") {
$("#document_username").focus();
msg2("이름을 입력해주세요.");
} else if ($("#document_userpno").val() == "") {
$("#document_userpno").focus();
msg2("주민번호를 입력해주세요.");
} else if (!$.isNumeric($("#document_userpno").val().replace(/-/gi, "")) || $("#document_userpno").val().replace(/-/gi, "").length != 13) {
$("#document_userpno").focus();
msg2("잘못된 주민번호입니다.");
} else if (!$.isNumeric($("#document_brno").val())) {
$("#document_brno").focus();
msg2("사업자등록번호는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_eino").val())) {
$("#document_eino").focus();
msg2("고용보험관리번호는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_sctime").val())) {
$("#document_sctime").focus();
msg2("교육이수시간은 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_sprice").val())) {
$("#document_sprice").focus();
msg2("교육비는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_rprice").val())) {
$("#document_rprice").focus();
msg2("환급액은 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_rbankno").val())) {
$("#document_rbankno").focus();
msg2("환급계좌는 숫자만 입력가능합니다.");
} else if (!$.isNumeric($("#document_syear").val())) {
$("#document_syear").focus();
msg2("교육년도는 숫자만 입력가능합니다.");
} else {
if (confirm("과거 증빙서류를 수정하시겠습니까??")) {
var data = {};
$.each($("#documentbox input, #documentbox select"), function () {
data[this.name.replace(/document./gi, "")] = this.value;
});
capp("/acommon/DocumnetsPastUpdate", data, "cbupdate");
}
}
}
function cbupdate() {
if (capResult.code == 1000) {
msgok(1, "", true);
submit("mform", 800, true);
} else {
msgadmin2();
}
}
</script>
}