YNICTE/BO/Views/user/asr.cshtml

168 lines
8.8 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(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="450" />
<col width="140" />
<col />
</colgroup>
<tbody>
<tr style="display:none">
<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>
</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.eino, new { @class = "form-control int nocomma", @maxlength = "13" })</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 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.TextBoxFor(m => m.Assign.mname, new { @class = "form-control", @maxlength = "50" })</td>
</tr>
<tr>
<th>기본담당자연락처</th>
<td colspan="3">@Html.TextBoxFor(m => m.Assign.mphone, new { @class = "form-control mobilefmt nocomma", @data_zero = "1", @maxlength = "13" })</td>
</tr>
<tr>
<th>계산서이메일</th>
<td colspan="3">@Html.TextBoxFor(m => m.Assign.taxemail, new { @class = "form-control", @maxlength = "50" })</td>
</tr>
<tr>
<th>상태</th>
<td colspan="3">
@Html.Partial("./Partial/Radio", null, new ViewDataDictionary() { { "valuetext", "1:가입;2:탈퇴;9:정지" }, { "checked", Model.Assign.status }, { "name", "Assign.status" } })
</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");
}
});
function save() {
setv("Assign_brno", val("Assign_brno").replace(/-/gi, ''));
setv("Assign_grno", val("Assign_grno").replace(/-/gi, ''));
if (check("Assign_asname", null, "법인명을 입력해주세요.")) { }
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>
}