109 lines
6.1 KiB
Plaintext
109 lines
6.1 KiB
Plaintext
|
|
@model NP.Model.VMUser
|
||
|
|
<div>
|
||
|
|
<ul class="pagination pagination-md" style="margin: 0;">
|
||
|
|
<li><a href="#" onclick="gotab(0);" data-toggle="tab">기본정보</a></li>
|
||
|
|
<li class="active"><a href="#" data-toggle="tab">회비정보</a></li>
|
||
|
|
<li><a href="#" onclick="gotab(2);" data-toggle="tab">사이트설정</a></li>
|
||
|
|
</ul>
|
||
|
|
</div>
|
||
|
|
<div class="row mgclear" id="regbox">
|
||
|
|
<form id="mform" method="post" enctype="multipart/form-data" class="form-horizontal">
|
||
|
|
<section class="panel panel-default">
|
||
|
|
<header class="panel-heading"><strong><i class="fa fa-bars"></i> 회비정보<span class=""></span></strong></header>
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table b-t b-light viewtable thisleft">
|
||
|
|
<colgroup>
|
||
|
|
<col style="width: 100px" />
|
||
|
|
<col style="width: 200px" />
|
||
|
|
<col style="width: 200px" />
|
||
|
|
<col />
|
||
|
|
<col style="width: 200px" />
|
||
|
|
<col style="width: 200px" />
|
||
|
|
</colgroup>
|
||
|
|
<thead><tr><th>년도</th><th>회비</th><th>납부일자</th><th>메모</th><th>상태</th><th>관리</th></tr></thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach (var d in Model.AssignFees)
|
||
|
|
{
|
||
|
|
<tr>
|
||
|
|
<td class="fyear">@d.fyear</td>
|
||
|
|
<td class="fprice"><input type="text" class="form-control int text-right" value="@d.fprice.ToString("#,0")" /></td>
|
||
|
|
<td class="fdate">@Html.Partial("./Partial/Date", d.fdate, new ViewDataDictionary { { "name", "fdate" + (Model.AssignFees.IndexOf(d)) } })</td>
|
||
|
|
<td class="fmemo"><input type="text" class="form-control" maxlength="200" value="@d.fmemo" /></td>
|
||
|
|
<td class="status"><select class="form-control"><option value="1" @(d.status == 1 ? "selected" : "")>납부</option><option value="0" @(d.status == 0 ? "selected" : "")>미납</option></select></td>
|
||
|
|
<td><a href="#" class="btn btn-primary" onclick="save(@d.fyear, this)">수정</a> <a href="#" class="btn btn-danger" onclick="delfee(@d.fyear, this)">삭제</a></td>
|
||
|
|
</tr>
|
||
|
|
}
|
||
|
|
<tr>
|
||
|
|
<td>@Html.Partial("./Partial/Select", "fyear", new ViewDataDictionary { { "special", "fromtodesc" }, { "textadd", "년" }, { "start", DateTime.Now.Year - 5 }, { "end", DateTime.Now.Year + 5 }, { "name", "fyear" }, { "selected", DateTime.Now.Year } })</td>
|
||
|
|
<td><input type="text" class="form-control int text-right" value="0" id="fprice" /></td>
|
||
|
|
<td><input type="text" class="form-control input-sm input-s datepicker-input form-control dev" value="" id="fdate" /></td>
|
||
|
|
<td><input type="text" class="form-control" maxlength="200" value="" id="fmemo" /></td>
|
||
|
|
<td><select class="form-control" id="status"><option value="">-선택</option><option value="1">납부</option><option value="0">미납</option></select></td>
|
||
|
|
<td><a href="#" class="btn btn-primary" onclick="save(0, this)">추가</a></td>
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
</section>
|
||
|
|
@Html.HiddenFor(m => m.intval)
|
||
|
|
@Html.HiddenFor(m => m.Assign.asno)
|
||
|
|
</form>
|
||
|
|
</div>
|
||
|
|
<form id="dform" method="post" action="/user/assigns">
|
||
|
|
@Html.Partial("./Partial/DForm", Model, new ViewDataDictionary { { "preform", 1 } })
|
||
|
|
</form>
|
||
|
|
@*<h4><i class="fa fa-bars"></i> Comment</h4>
|
||
|
|
@Html.Partial("./Partial/CommentBox", Model, new ViewDataDictionary { { "commenttype", "0" }, { "baseno", Model.Assign.asno } })*@
|
||
|
|
@section styles{
|
||
|
|
<style type="text/css">
|
||
|
|
table.viewtable.thisleft tr td {
|
||
|
|
text-align: center
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
}
|
||
|
|
@section scriptsHeader{
|
||
|
|
@Html.Partial("./Partial/ScriptDate")
|
||
|
|
}
|
||
|
|
@section scripts{
|
||
|
|
<script>
|
||
|
|
function gotab(idx) {
|
||
|
|
$("#dform").attr("action", "/user/" + (idx == 0 ? "asv" : "assite")).submit();
|
||
|
|
}
|
||
|
|
$(document).ready(function () {
|
||
|
|
|
||
|
|
});
|
||
|
|
function save(no, a) {
|
||
|
|
if (no < 1) {
|
||
|
|
if ($("#status").val() == "") {
|
||
|
|
$("#status").focus(); msg("납부여부를 선택해주세요.");
|
||
|
|
} else {
|
||
|
|
capp("/acommon/assignfeesave", { isin: true, asno: @Model.Assign.asno, fyear: val("fyear"), fprice: getint(val("fprice")), fdate: val("fdate"), fmemo: val("fmemo"), status: val("status") }, "cbsave");
|
||
|
|
}
|
||
|
|
} else {
|
||
|
|
capp("/acommon/assignfeesave", { isin: false, asno: @Model.Assign.asno, fyear: no, fprice: getint($(a).closest("tr").find("td.fprice input").val()), fdate: $(a).closest("tr").find("td.fdate input").val(), fmemo: $(a).closest("tr").find("td.fmemo input").val(), status: getint($(a).closest("tr").find("td.status select").val()) }, "cbsave");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function cbsave() {
|
||
|
|
if (capResult.code == 1000) {
|
||
|
|
msg("저장했습니다.", null, null, null, true);
|
||
|
|
$("#dform").attr("action", "/user/asfee");
|
||
|
|
submit("dform", 500);
|
||
|
|
} else {
|
||
|
|
msg("추가하려는 년도는 이미 등록된 데이터입니다.");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function delfee(y, a) {
|
||
|
|
if (confirm("삭제하시겠습니까?")) {
|
||
|
|
capp("/acommon/assignfeesave", { isin: false, asno: @Model.Assign.asno, fyear: y, isdel: true }, "cbdelfee");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
function cbdelfee() {
|
||
|
|
if (capResult.code == 1000) {
|
||
|
|
msg("삭제했습니다.", null, null, null, true);
|
||
|
|
$("#dform").attr("action", "/user/asfee");
|
||
|
|
submit("dform", 500);
|
||
|
|
} else { msgadmin(); }
|
||
|
|
}
|
||
|
|
</script>
|
||
|
|
}
|