YNICTE/BO/Views/user/asr.cshtml

216 lines
13 KiB
Plaintext

@model NP.Model.VMUser
<div style="@(Model.Assign.asno > 0 && Model.IsAdmin ? "":"display: none;")">
<ul class="pagination pagination-md" style="margin: 0;">
<li class="active"><a href="#" data-toggle="tab">기본정보</a></li>
<li><a href="#" onclick="gotab(1);" 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">
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col width="140" />
<col width="350" />
<col width="120" />
<col />
</colgroup>
<tbody>
<tr>
<th>회원번호</th>
<td>
@if (!Model.IsAdmin)
{
@Html.HiddenFor(m=>m.Assign.ascode)@Model.Assign.ascode
}
else
{
@Html.TextBoxFor(m => m.Assign.ascode, new { @class = "form-control int nocomma text-center" })
}
</td>
<th>구분/회비</th>
<td>
@if (!Model.IsAdmin && Model.Assign.asno > 0)
{
@:@Model.Assign.isjoinname / @(Model.Assign.joinyear ?? "-")년 / @Model.Assign.joinprice.ToString("#,0")
}
else
{
@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "valuetext", "1:회원;0:비회원" }, { "name", "Assign.isjoin" }, { "selected", Model.Assign.isjoin }, { "style", "width: auto" }, { "class", "disp-init" } })
@Html.Partial("./Partial/Select", Model.Assign.joinyear, new ViewDataDictionary { { "special", "fromtodesc" }, { "textadd", "년" }, { "start", DateTime.Now.Year - 5 }, { "end", DateTime.Now.Year + 5 }, { "name", "Assign.joinyear" }, { "selected", DateTime.Now.Year }, { "style", "width: 120px" } })
@Html.TextBoxFor(m => m.Assign.joinprice, new { @class = "form-control disp-init int text-right", @placeholder = "회비", @style = "width: 150px" })
}
</td>
</tr>
<tr>
<th>법인명</th>
<td>@Html.TextBoxFor(m => m.Assign.asname, new { @class = "form-control", @maxlength = "100" })</td>
<th>대표자</th>
<td>@Html.TextBoxFor(m => m.Assign.ceoname, new { @class = "form-control", @maxlength = "50" })</td>
</tr>
<tr>
<th>사업자등록번호</th>
<td>@Html.TextBoxFor(m => m.Assign.brno, new { @class = "form-control int nocomma", @maxlength = "10" })</td>
<th>법인등록번호</th>
<td>@Html.TextBoxFor(m => m.Assign.grno, new { @class = "form-control int nocomma", @maxlength = "14" })</td>
</tr>
<tr>
<th>업태</th>
<td>@Html.TextBoxFor(m => m.Assign.btype, new { @class = "form-control", @maxlength = "50" })</td>
<th>업종</th>
<td>@Html.TextBoxFor(m => m.Assign.bkind, new { @class = "form-control", @maxlength = "50" })</td>
</tr>
<tr>
<th>매출액</th>
<td>@Html.TextBoxFor(m => m.Assign.salesamount, new { @class = "form-control int" })</td>
<th>홈페이지</th>
<td>@Html.TextBoxFor(m => m.Assign.homeurl, new { @class = "form-control", @maxlength = "100" })</td>
</tr>
<tr>
<th>상시종업원수</th>
<td>@Html.TextBoxFor(m => m.Assign.mcount, new { @class = "form-control int" })</td>
<th>창립일</th>
<td>@Html.Partial("./Partial/Date", Model.Assign.aday, new ViewDataDictionary { { "name", "Assign.aday" } })</td>
</tr>
<tr>
<th>회원사구분/계열</th>
<td>
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "astype"), new ViewDataDictionary { {"special","reg" }, { "df", ":-선택" }, { "name", "Assign.astype" }, { "selected", Model.Assign.asno < 1 ? "" : Model.Assign.astype.ToString() }, { "style", "width: auto" }, { "class", "disp-init" } })
@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "asctg"), new ViewDataDictionary { { "special", "reg" }, { "df", ":-선택" }, { "name", "Assign.asctg" }, { "selected", Model.Assign.asno < 1 ? "" : Model.Assign.asctg.ToString() }, { "style", "width: auto" }, { "class", "disp-init" } })
</td>
<th>주요키워드</th>
<td>@Html.Partial("./Partial/Select", Model.ComCodes.Where(w => w.cgroup == "askey"), new ViewDataDictionary { { "special", "reg" }, { "df", ":-선택" }, { "name", "Assign.askey" }, { "selected", Model.Assign.asno < 1 ? "" : Model.Assign.askey.ToString() }, { "style", "width: auto" }, { "class", "disp-init" } })</td>
</tr>
<tr>
<th>주소</th>
<td colspan="3" class="postbox">
@Html.TextBoxFor(m => m.Assign.post, new { @readonly = "readonly", @style = "width: 70px; background-color: #ddd;", @class = "postno form-control disp-init" }) <a href="#" onclick="javascript: getpost2(this);" title="주소찾기"><i class="fa fa-map-marker" style="font-size: 13px;"></i> 주소찾기(클릭 후 상단검색)</a>
<br />@Html.TextBoxFor(m => m.Assign.address1, new { @readonly = "readonly", @style = "background-color: #ddd; width: 300px;", @class = "postadr form-control disp-init", @placeholder = "주소" })
@Html.TextBoxFor(m => m.Assign.address2, new { @class = "postadrsub form-control disp-init", @placeholder = "상세주소", @style = "width: 400px;" })
</td>
</tr>
<tr>
<th>사업자등록증</th>
<td colspan="3">
@Html.Partial("./Partial/File", Model.FileList.Where(w=>w.fgno==Model.Assign.fgnobno).ToList(), new ViewDataDictionary {
{ "name", "Assign.fgnobno" },{"value", Model.Assign.fgnobno },{ "fname", "fgnobno"},
{"width", null },{"table", "assign" },{ "column", "fgnobno"},{"filecount", 1 },
{"readmode", 0 },{"hidemode", 0 },
{ "isimage", 0 },{ "imageid", "" },{ "dftsrc", "/img/common/profile_sample.jpg" },
{ "fileext", "png,jpg,gif,pdf" }, { "loginfo",Model.Assign.asno+"|9"}})
</td>
</tr>
<tr>
<th>통장사본</th>
<td colspan="3">
@Html.Partial("./Partial/File", Model.FileList.Where(w=>w.fgno==Model.Assign.fgnobank).ToList(), new ViewDataDictionary {
{ "name", "Assign.fgnobank" },{"value", Model.Assign.fgnobank },{ "fname", "fgnobank"},
{"width", null },{"table", "assign" },{ "column", "fgnobank"},{"filecount", 1 },
{"readmode", 0 },{"hidemode", 0 },
{ "isimage", 0 },{ "imageid", "" },{ "dftsrc", "/img/common/profile_sample.jpg" },
{ "fileext", "png,jpg,gif,pdf" }, { "loginfo",Model.Assign.asno+"|9"}})
</td>
</tr>
<tr>
<th>가입/탈퇴일</th>
<td colspan="3">@Html.Partial("./Partial/Date", Model.Assign.joindate, new ViewDataDictionary { { "name", "Assign.joindate" } })~@Html.Partial("./Partial/Date", Model.Assign.exitdate, new ViewDataDictionary { { "name", "Assign.exitdate" } })</td>
</tr>
<tr>
<th>상태</th>
<td colspan="3">
@if (Model.IsAdmin)
{
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:가입;2:탈퇴;9:정지" }, { "checked", Model.Assign.status }, { "name", "Assign.status" } })
}
else
{
@Model.Assign.statusname
}
</td>
</tr>
</tbody>
</table>
</div>
</section>
<div class="botfixempty">&nbsp;</div>
<div class="form-group botfix">
<a href="#" class="btn btn-primary" onclick="save();">저장</a>
@if (Model.Assign.asno > 0 && Model.IsAdmin && Model.Assign.ismain != 1 )
{
<a href="#" class="btn btn-danger" onclick="del();">삭제</a>
}
<a href="#" class="btn btn-default" onclick="golist();">목록</a>
</div>
@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>
<div id="postlayer" class="daumpost">
<a href="#" class="btn btn-xxs btn-select closedaumpost" onclick="closeDaumPostcode();">close</a>
</div>
@section styles{
}
@section scriptsHeader{
@Html.Partial("./Partial/ScriptPost")
@Html.Partial("./Partial/FileScript")
@Html.Partial("./Partial/ScriptDate")
}
@section scripts{
<script>
function gotab(idx) {
$("#dform").attr("action", "/user/" + (idx == 1 ? "asfee":"assite")).submit();
}
$(document).ready(function () {
if ('@(Model.IsAdmin ? 1 : 0)' == '0') {
$("#Assign_astype,#Assign_asctg,#Assign_askey").attr("disabled", "disabled");
$("#Assign_joindate,#Assign_exitdate").attr("readonly", "readonly");
}
});
function save() {
setv("Assign_brno", val("Assign_brno").replace(/-/gi, ''));
setv("Assign_grno", val("Assign_grno").replace(/-/gi, ''));
if (check("Assign_ascode", null, "회원번호를 입력해주세요.")) { }
else if (check("Assign_asname", null, "법인명을 입력해주세요.")) { }
else if (($("#Assign_status1").prop("checked") && val("Assign_exitdate") != "") ||($("#Assign_status9").prop("checked") && val("Assign_exitdate") != "")) { msg("가입과 정지상태는 탈퇴일을 등록할 수 없습니다."); }
else if ((!$("#Assign_status2").prop("checked") && val("Assign_exitdate") != "") || ($("#Assign_status2").prop("checked") && val("Assign_exitdate") == "")) { msg("탈퇴일자와 상태를 확인해주세요."); }
else if (confirm("저장하시겠습니까?")) {
capfileform("/acommon/assignsave", "mform", "cbsave");
}
}
function cbsave() {
if (capResult.code == 1000) {
msgok(1, "", true);
if ('@Model.Assign.asno' == '0') {
setv("dform_intval", capResult.obj)
}
$("#dform").attr("action", "/user/asr");
submit("dform", 500);
} else if (capResult.code == 1) {
focus("Assign_ascode");
msg("이미 사용중인 회원번호입니다.");
} else if (capResult.code == 2) {
focus("Assign_brno");
msg("이미 사용중인 사업자등록번호입니다.");
}
else { msgdev(); }
}
function del() {
if (confirm("삭제하시겠습니까?")) {
capp("/acommon/assigndel", { asno: @Model.Assign.asno}, "cbdel");
}
}
function cbdel() {
if (capResult.code == 1000) {
msg("삭제되었습니다.", 1, true, null, true);
golist(500, true);
} else { msgdev(); }
}
</script>
}