demo20230512/Areas/admin/Views/AccessKey/Index.cshtml

210 lines
9.9 KiB
Plaintext
Raw Normal View History

2023-05-12 10:20:28 +08:00
@using Weee.Models.ExtensionMethods
@using Resources
@using PagedList.Mvc
@using PagedList
@model Qcarbon.ViewModels.admin.accessKeyIndexVM
@{
ViewBag.Title = Resource.AccessKey;
Layout = "~/Areas/Admin/Views/Shared/_AdminLayout.cshtml";
}
<div class="col-md-12">
<div class="row docs-row">
<div class="col-xs-5">
<h2 class="docs-h2">@ViewBag.Title</h2>
</div>
</div>
<div class="row docs-row">
<div class="col-xs-6">
<div class="form-group">
<div class="col-xs-4">
@Html.DisplayNameFor(model => model.curAdminAccess.functionScope)
</div>
<div class="col-xs-4">
@Html.DisplayNameFor(model => model.curAdminAccess.activeStartDate)
</div>
<div class="col-xs-4">
@Html.DisplayNameFor(model => model.curAdminAccess.activeEndDate)
</div>
</div>
<div class="form-group row">
@if (Model.curAdminAccess != null)
{
<div class="col-xs-4" style="color:blue">
@Model.curAdminAccess.functionScope.ToString()
</div>
<div class="col-xs-4" style="color:blue">
@if (Model.curAdminAccess.activeStartDate != null)
{
@Model.curAdminAccess.activeStartDate.Value.ToString("yyyy/MM/dd")
}
</div>
<div class="col-xs-4" style="color:blue">
@if (Model.curAdminAccess.activeEndDate!=null)
{
@Model.curAdminAccess.activeEndDate.Value.ToString("yyyy/MM/dd")
}
</div>
}
</div>
<div class="form-group">
<div class="col-xs-4">
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.companyAdminLimit)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.lcaLimit)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.listReportLimit)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.certifyCompanyLimit)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.lcaUserLimit)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccess.supplierLimit)
</div>
</div>
<div class="col-xs-2">
@if (Model.curAdminAccess != null)
{
<div class="form-group" style="color:blue">
@Model.curAdminAccess.companyAdminLimit
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccess.lcaLimit
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccess.listReportLimit
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccess.certifyCompanyLimit
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccess.lcaUserLimit
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccess.supplierLimit
</div>
}
</div>
<div class="col-xs-4">
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.companyAdminQuantity)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.lcaQuantity)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.listReportQuantity)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.certifyCompanyQuantity)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.lcaUserQuantity)
</div>
<div class="form-group">
@Html.DisplayNameFor(model => model.curAdminAccessUsage.supplierQuantity)
</div>
</div>
<div class="col-xs-2">
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.companyAdminQuantity
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.lcaQuantity
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.listReportQuantity
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.certifyCompanyQuantity
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.lcaUserQuantity
</div>
<div class="form-group" style="color:blue">
@Model.curAdminAccessUsage.supplierQuantity
</div>
</div>
</div>
</div>
<div class="col-xs-6">
@using (Html.BeginForm("Index", "AccessKey", FormMethod.Post, new { id = "importKey", @class = "form-horizontal" }))
{
@Html.AntiForgeryToken()
<div class="form-group">
<div class="col-sm-3">金鑰文字段</div>
<div class="col-sm-7">
@Html.ValidationSummary(true, "", new { @class = "text-danger font-weight-bold" })
@if (!string.IsNullOrWhiteSpace(ViewBag.OKmsg))
{
<div class="alert alert-success" role="alert">
@ViewBag.OKmsg
</div>
}
else if (!string.IsNullOrWhiteSpace(ViewBag.errMsg))
{
<div class="alert alert-danger" role="alert">
@ViewBag.errMsg
</div>
}
</div>
<div class="col-sm-2">
<input type="submit" value="匯入金鑰" class="btn btn-default" />
</div>
</div>
<div class="form-group">
@Html.TextAreaFor(m => m.keyText, new { @class = "form-control", @rows = 10, style = "overflow-y: scroll" })
</div>
}
</div>
</div>
<div>
<table class="table text-center">
<tr>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.functionScope)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.activeStartDate)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.activeEndDate)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.companyAdminLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.lcaLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.listReportLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.certifyCompanyLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.lcaUserLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.supplierLimit)</th>
<th>@Html.DisplayNameFor(model => model.curAdminAccess.encJsonAppliedtime)</th>
<th></th>
</tr>
@if (Model.adminAccessHis != null)
{
foreach (var item in Model.adminAccessHis)
{
<tr>
<td>@Html.DisplayFor(modelItem => item.functionScope)</td>
<td>@item.activeStartDate.Value.ToString("yyyy/MM/dd")</td>
<td>@item.activeEndDate.Value.ToString("yyyy/MM/dd")</td>
<td>@Html.DisplayFor(modelItem => item.companyAdminLimit)</td>
<td>@Html.DisplayFor(modelItem => item.lcaLimit)</td>
<td>@Html.DisplayFor(modelItem => item.listReportLimit)</td>
<td>@Html.DisplayFor(modelItem => item.certifyCompanyLimit)</td>
<td>@Html.DisplayFor(modelItem => item.lcaUserLimit)</td>
<td>@Html.DisplayFor(modelItem => item.supplierLimit)</td>
<td>@item.encJsonAppliedtime.ToString("yyyy/MM/dd")</td>
</tr>
}
}
</table>
</div>
@*<div class="text-center">
@Html.PagedListPager((IPagedList)Model.adminAccessHis, page => Url.Action("Index", new { page @ *, searchString = ViewBag.SearchString* @ }))
</div>*@
</div>
<div class="col-md-1"></div>