YNICTE/BO/Views/user/assigns.cshtml

125 lines
6.3 KiB
Plaintext
Raw Normal View History

2020-10-12 14:39:23 +09:00
@model NP.Model.VMUser
<form id="mform" method="post">
<section class="panel panel-default clearfix devsearch" data-cleartbody="tbody1" style="@(Model.IsAdmin?"":"display: none;")">
<div class="table-responsive">
<table class="table b-t b-light viewtable">
<colgroup>
<col width="15%" />
<col width="35%" />
<col width="15%" />
<col width="*" />
</colgroup>
<tbody id="searchtbody">
<tr>
<th>법인명</th>
<td>
@Html.TextBoxFor(m => m.stringval2, new { @class = "form-control disp-init", @style = "width: 208px" })
</td>
<th>상태</th>
<td>
@Html.HiddenFor(m => m.stringval3)
<label><input type="checkbox" name="statuses" @((Model.stringval3 ?? "").Contains("1") ? "checked" : "") value="1" />가입</label>&nbsp;&nbsp;
<label><input type="checkbox" name="statuses" @((Model.stringval3 ?? "").Contains("2") ? "checked" : "") value="2" />탈퇴</label>&nbsp;&nbsp;
<label><input type="checkbox" name="statuses" @((Model.stringval3 ?? "").Contains("9") ? "checked" : "") value="9" />정지</label>
</td>
</tr>
<tr>
<th>대표자</th>
2020-10-16 17:53:04 +09:00
<td>@Html.TextBoxFor(m => m.stringval4, new { @class = "form-control", @style = "width: 208px" })</td>
2020-10-12 14:39:23 +09:00
<th>담당자</th>
2020-10-16 17:53:04 +09:00
<td>@Html.TextBoxFor(m => m.stringval5, new { @class = "form-control disp-init", @style = "width: 208px" })</td>
2020-10-12 14:39:23 +09:00
</tr>
<tr>
2020-10-16 17:53:04 +09:00
<th>등록일</th>
2020-10-12 14:39:23 +09:00
<td>
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval10) ? (DateTime?)null : Convert.ToDateTime(Model.stringval10), new ViewDataDictionary { { "name", "stringval10" } })
&nbsp;&nbsp;~&nbsp;&nbsp;
@Html.Partial("./Partial/Date", string.IsNullOrEmpty(Model.stringval11) ? (DateTime?)null : Convert.ToDateTime(Model.stringval11), new ViewDataDictionary { { "name", "stringval11" } })
</td>
2020-10-16 17:53:04 +09:00
<th>사업자등록번호</th>
<td>@Html.TextBoxFor(m => m.stringval16, new { @class = "form-control int nocomma text-center", @data_zero = "", @style = "width: 208px", @maxlength = "10" })</td>
2020-10-12 14:39:23 +09:00
</tr>
<tr>
<th>사이트생성</th>
<td>@Html.Partial("./Partial/Select", "", new ViewDataDictionary { { "valuetext", ":-선택;1:생성함;0:생성안함" }, { "name", "stringval20" }, { "selected", Model.stringval20 }, { "style", "width: 308px" }, { "class", "disp-init" } })</td>
2020-10-16 17:53:04 +09:00
<th>연락처</th>
<td>@Html.TextBoxFor(m => m.stringval22, new { @class = "form-control mobilefmt nocomma", @data_zero = "1", @style = "width: 208px", @maxlength = "13" })</td>
2020-10-12 14:39:23 +09:00
</tr>
</tbody>
</table>
</div>
</section>
2020-10-16 17:53:04 +09:00
@if (Model.IsAdmin)
{
<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:searchthis();"><i class="fa fa-search"></i></button>
</div><br />
<div class="tar buttonbox">
<a href="#" onclick="javascript:reg(0);" class="btn btn-s-xs btn-info">신규등록</a>
</div>
}
2020-10-12 14:39:23 +09:00
<section class="panel panel-default">
<div class="table-responsive" id="excel1">
<table class="table table-striped b-t b-light">
<thead>
<tr>
2020-10-16 17:53:04 +09:00
<th width="5%">No</th>
<th width="20%">법인명</th>
<th width="20%">대표자</th>
<th width="20%">담당자</th>
<th width="20%">등록일</th>
<th width="15%">상태</th>
2020-10-12 14:39:23 +09:00
</tr>
</thead>
<tbody class="data" id="tbody1">
2020-10-16 17:53:04 +09:00
@foreach (var item in Model.Assigns)
{
<tr>
<td>@item.rnorvt</td>
<td class="link"><a href="#" onclick="reg(@item.asno)">@item.asno @item.asname</a></td>
<td>@item.ceoname</td>
<td>@item.mname</td>
<td>@(item.cdt == null ? "-" : item.cdt.ToString("yy-MM-dd"))</td>
<td>@item.statusname</td>
</tr>
}
2020-10-12 14:39:23 +09:00
</tbody>
</table>
</div>
@Html.Pager((int)Model.pagenum, 10, (int)Model.pagerowcount, Model.pagetotalcount)
</section>
</form>
<form id="dform" method="post" action="/user/asr">
@Html.Partial("./Partial/dform", Model, new ViewDataDictionary { { "preform", 1 } })
</form>
@section scriptsHeader{
@Html.Partial("./Partial/ScriptDate")
}
@section scripts{
<script>
$('body').on('keydown', 'input, select', function(e) {
if (e.key === "Enter") {
searchthis();
}
});
$(document).ready(function () {
$("#stringval16").on("propertychange change keyup paste input", function () {
$("#stringval16").val((val("stringval16")));
});
});
function reg(no) {
setv("dform_intval", no);
2020-10-19 13:30:54 +09:00
$("#dform").attr("action", "/user/asr").submit();
2020-10-12 14:39:23 +09:00
}
function searchthis() {
//고객사 상태
var s3 = "";
$.each($("input[name='statuses']:checked"), function (i, c) {
s3 += "," + $(c).val();
});
setv("stringval3", s3 == "" ? "" : s3.substr(1));
2020-10-16 17:53:04 +09:00
2020-10-12 14:39:23 +09:00
submit();
}
</script>
}