121 lines
4.5 KiB
Plaintext
121 lines
4.5 KiB
Plaintext
|
@using Weee.Models.ExtensionMethods
|
||
|
@using Resources
|
||
|
|
||
|
@model Weee.Models.LCA
|
||
|
|
||
|
@{
|
||
|
ViewBag.Title = Resource.StaticLabelLCAList;
|
||
|
Layout = "~/Areas/admin/Views/Shared/_AdminLayout.cshtml";
|
||
|
var WatingTimeList = Model.StatusHistory
|
||
|
.Where(x => x.NewStatus == Weee.Models.LCAStatus.Waiting)
|
||
|
.Select(x => x.ActionTime).ToList();
|
||
|
}
|
||
|
|
||
|
|
||
|
<div class="col-md-12">
|
||
|
<div>
|
||
|
<h2>LCA</h2>
|
||
|
<hr />
|
||
|
<div class="row">
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.Owner.Name)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@Html.DisplayFor(model => model.Owner.Name)
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.VerifyBy)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@Html.DisplayFor(model => model.VerifyBy.Name)
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.StartDate)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@Model.StartDate.ToShortDateString()
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.EndDate)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@Model.EndDate.ToShortDateString()
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.DeadLine)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@(Model.DeadLine.HasValue ? Model.DeadLine.Value.ToShortDateString() : "")
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
<label>@Html.DisplayNameFor(model => model.Status)</label>
|
||
|
</div>
|
||
|
<div class="col-xs-3">
|
||
|
@Model.Status.DisplayString()
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<h2>@Resource.Log</h2>
|
||
|
<hr />
|
||
|
<table class="table table-bordered text-center">
|
||
|
<tr>
|
||
|
<th>@Resource.ActionDate</th>
|
||
|
<th>@Resource.NewStatus</th>
|
||
|
<th>@Resource.Actor</th>
|
||
|
<th>@Resource.StaticLabelGlobal_Description</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>@Model.CreatedDate</td>
|
||
|
<td>@(Model is Weee.Models.ProductLCA ? (((Weee.Models.ProductLCA)Model).HasProductLifeCycle_MaterialsObtained ? Weee.Models.LCAStatus.New.DisplayString() : Weee.Models.LCAStatus.Processing.DisplayString()) : Weee.Models.LCAStatus.Processing.DisplayString())</td>
|
||
|
<td>@Model.LCAStarter</td>
|
||
|
<td>@Model.Description</td>
|
||
|
</tr>
|
||
|
@foreach (var item in Model.StatusHistory)
|
||
|
{
|
||
|
<tr>
|
||
|
<td>@item.ActionTime</td>
|
||
|
<td>@item.NewStatus.DisplayString()</td>
|
||
|
<td>@item.WhoDidThis</td>
|
||
|
<td>@item.Description</td>
|
||
|
</tr>
|
||
|
}
|
||
|
|
||
|
</table>
|
||
|
|
||
|
<h2>@Resource.Comment</h2>
|
||
|
<hr />
|
||
|
<table class="table table-bordered text-center">
|
||
|
<tr>
|
||
|
<th>@Resource.CommentDate</th>
|
||
|
<th>@Resource.UpdateTime</th>
|
||
|
<th>@Resource.CommentTarget</th>
|
||
|
<th>@Resource.Content</th>
|
||
|
</tr>
|
||
|
@for (int i = 0; i < WatingTimeList.Count(); i++)
|
||
|
{
|
||
|
var nextwaititme = i + 1 < WatingTimeList.Count() ? WatingTimeList[i + 1] : DateTime.Now;
|
||
|
foreach (var item in Model.Comments.Where(x => x.CreateTime > WatingTimeList[i] && x.CreateTime < nextwaititme))
|
||
|
{
|
||
|
<tr class="@(i % 2 == 0 ? "active" : "success")">
|
||
|
<td>@item.CreateTime</td>
|
||
|
<td>@item.UpdateTime</td>
|
||
|
<td>@(item.Category != null ? item.Category : "")</td>
|
||
|
<td>
|
||
|
<textarea readonly="readonly" rows="5" style="resize: none; width: 300px">@item.CommentText</textarea>
|
||
|
</td>
|
||
|
</tr>
|
||
|
}
|
||
|
}
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="text-right">
|
||
|
@Html.ActionLink(Resource.StaticLabelGlobal_BackToList, "Index", new { }, new { @class = "btn btn-default" })
|
||
|
@Html.ActionLink(Resource.DeleteItemMsg, "Delete", new { id = ViewBag.id }, new { @class = "btn btn-default" })
|
||
|
</div>
|
||
|
</div>
|
||
|
<div class="col-md-1"></div>
|