demo20230512/Areas/Certification/Views/LCA/OrganizationLcaDetailLifecycleAssmt.cshtml
2023-05-12 10:20:28 +08:00

292 lines
16 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@*
the Comment.Category is defined in ProductLCADetail.cshtml
used by Normal company and Certificate company
possible value of Category:
LCI_Direct_Material,
LCI_Indirect_Material,
LCI_Wrap_Material,
WorkHour,
PowerUsage,
WaterUsage,
Waste_Water,
Waste_Other,
Transport,
WasteTransport,
Vehicle,
GasolineEquipment,
Kitchen_Company,
Kitchen_Outsourcing,
Kitchen_Other,
Refrigerant,
FireEquipment,
SteamUsage,
OtherCompound
*@
@using Resources
@using Weee.Models.ExtensionMethods
@using Weee.Areas.Certification.Supports
@using Weee.Models
@model Weee.Models.OrganizationLCA
@{
ViewBag.Title = Resource.StaticLabelOrganizationLCA;
Layout = "~/Areas/Certification/Views/Shared/_CertificationLayout.cshtml";
var stageOptions = ViewData["StageOptions"] as Dictionary<int, string>;
}
@section PageStyles {
@Styles.Render("~/fancybox/css")
}
@section PageScripts {
@Scripts.Render("~/fancybox")
@Scripts.Render("~/sticky")
@Scripts.Render("~/certification/lca/detail")
}
@*<div class="side-bar-top-empty"></div>*@
@*<div class="side-bar col-xs-2 js-scrollspy">*@
<html style="scroll-behavior: smooth;">
<div class="container-fluid">
<div class="panel row">
<div class="col-md-2 org-split-left side-bar js-scrollspy">
<ul id="docs-scroll-hash-nav" class="navbar-nav nav-pills">
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#lca-detail">@Resource.BasicInfo</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#total-workhour">@Resource.TotalWorkHours</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#power-usage">@Resource.PowerUsage</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#vehicle">@Resource.ParamemterCategoriesVehicle</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#gasoline">@Resource.DieselEquipment</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#kitchen-owned">@Resource.Kitchen</a></li>
<li class="nav-item" style="display:none"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#kitchen-outsourcing">@Resource.Kitchen (@Resource.Outsourcing)</a></li>
<li class="nav-item" style="display:none"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#kitchen-other">@Resource.Kitchen (@Resource.Other)</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#fire-equipment">@Resource.FireEquipment</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#refrigerant">@Resource.ContainsRefrigerant</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#steam-usage">@Resource.SteamUsage</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetail","LCA", new { id = Model.ID })#other-compound">@Resource.OtherCompound</a></li>
<li class="nav-item"><a class="active nav-link" href="#lifecycle-assmt">@Resource.LifecycleStageAssessment</a></li>
<li class="nav-item"><a class="nav-link" href="@Url.Action("OrganizationLcaDetailSignificance","LCA", new { id = Model.ID })">@Resource.RASignificance</a></li>
</ul>
</div>
<div id="docs-scroll-hash-content" class="col-md-10 org-split-right" style="margin-left: auto">
@*<div id="docs-scroll-hash-content" class="col-xs-10 panel panel-default">*@
<div id="lca-detail" class="docs-lca-detail">
<div class="row">
<div class="col-md-4">
<label>@(Resource.Starter): </label>
<span>@Model.LCAStarter</span>
</div>
<div class="col-md-4">
<label>@(Resource.PhoneNumber): </label>
<span>@Model.LCAStarterPhone</span>
</div>
<div class="col-md-4">
<label>@(Resource.LCAStartDate): </label>
<span>@Model.StartDate.ToShortDateString()</span>
</div>
</div>
<div class="row">
<div class="col-md-4">
<label>@(Resource.Job): </label>
<span>@Model.LCAStarterJob</span>
</div>
<div class="col-md-4">
<label>@(Resource.Department): </label>
<span>@Model.LCAStarterDepartment</span>
</div>
<div class="col-md-4">
<label>@(Resource.LCAEndDate): </label>
<span>@Model.EndDate.ToShortDateString()</span>
</div>
</div>
<div class="row">
<div class="col-md-4">
@*<label>@Resource.InterrogationResultReport @Resource.StaticLabelGlobal_And @Resource.CarbonFootprintReport: </label>
@if (ViewData["templates"] != null)
{
<span><a href="@ViewData["templates"]">@Resource.DownloadLink</a></span>
}*@
@*<span><a href="@ViewData["UploadZipReply"]">@Resource.UploadZipReply</a></span>*@
<span><a href="@ViewData["DownloadZipReport"]">@Resource.ZipReport</a></span>
@*<label>@(Resource.InterrogationResultReport): </label>
@if (Model.InterrogationResultUrl != null && Model.InterrogationResultUrl != "")
{
//Start CFT-6
if (Model.InterrogationResultUrl.Contains("Browser_Local"))
{
<span><a href="@Model.InterrogationResultUrl.Substring(Model.InterrogationResultUrl.IndexOf("Browser_Local") - 1)">@Resource.DownloadLink</a></span>
}
else
{
<span><a href="@Model.InterrogationResultUrl">@Resource.DownloadLink</a></span>
}
<!--<span><a href="@Model.InterrogationResultUrl">@Resource.DownloadLink</a></span>-->
//End CFT-6
}
*@
</div>
<div class="col-md-4">
@*<label>@(Resource.CarbonFootprintReport): </label>
@if (Model.CarbonFootprintDocxUrl != null && Model.CarbonFootprintDocxUrl != "")
{
//Start CFT-6
if (Model.CarbonFootprintDocxUrl.Contains("Browser_Local"))
{
<span><a href="@Model.CarbonFootprintDocxUrl.Substring(Model.CarbonFootprintDocxUrl.IndexOf("Browser_Local")-1)">@Resource.DownloadLink</a></span>
}
else
{
<span><a href="@Model.CarbonFootprintDocxUrl">@Resource.DownloadLink</a></span>
}
<!--<span><a href="@Model.CarbonFootprintDocxUrl">@Resource.DownloadLink</a></span>-->
//End CFT -6
}*@
</div>
<div class="col-md-4"></div>
</div>
</div>
<div class="message">
@TempData["successMsg"]
@TempData["errorMsg"]
</div>
@if (Model.Status == Weee.Models.LCAStatus.Waiting)
{
<div class="pull-right docs-btn-group">
<input id="confirm-button" type="button" value="@Resource.Approve" class="header-button" />
@using (Html.BeginForm("OrganizationLcaConfirm", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-confirm", @class = "docs-inline" })) { }
<input id="reject-button" type="button" value="@Resource.Reject" class="header-button" />
@using (Html.BeginForm("OrganizationLcaReject", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-reject", @class = "docs-inline" })) { }
<button class="header-button" id="upload-button" onclick="showModel()">@Resource.StaticLabelGlobal_Upload</button>
</div>
}
@if (Model.Status == Weee.Models.LCAStatus.Processing)
{
<div class="pull-right docs-btn-group">
<input id="refuse-button" type="button" value="@Resource.Refuse" class="header-button" />
@using (Html.BeginForm("OrganizationLcaRefuse", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-refuse", @class = "docs-inline" })) { }
</div>
}
<div>
<div>
<h4 id="lifecycle-assmt" class="docs-inline">@Resource.LifecycleStageAssessment</h4>
<a class="iframe pull-right" href="~/Certification/Comment?lcaId=@(Model.ID)&category=RASignificance" data-fancybox-type="iframe">@Resource.Comment</a>
<table class="table docs-table">
<tr class="certification_table_header">
<th>@Resource.LifecycleStage</th>
<th>@Resource.CategorySubItem</th>
<th>@Resource.EvaluationItem</th>
<th>@Resource.MaterialNo</th>
<th>@Resource.ActivityStrength</th>
<th>@Resource.Parameter (kgCO2e)</th>
<th>@Resource.DeclareUnit</th>
<th>@Resource.CarbonEmitQuan (@Resource.Ton)</th>
<th>@Resource.Percentage</th>
<th>@Resource.ParaDesc</th>
<th>@Resource.UncertaintyAnalysis</th>
</tr>
@foreach (var lifecycleAssmt in Model.LifecycleAssmt.OrderBy(x => x.LifeCycleStage))
{
<tr>
<td>@stageOptions[lifecycleAssmt.LifeCycleStage]</td>
<td>@lifecycleAssmt.categorySubItem</td>
<td>@lifecycleAssmt.GHGEvaluateItem</td>
<td>@lifecycleAssmt.MaterialNo</td>
<td align="right">@lifecycleAssmt.ActivityIntensity.ToString("F4")</td>
<td align="right">@lifecycleAssmt.KgCO2e.ToString("F10")</td>
<td align="right">@lifecycleAssmt.Unit</td>
<td align="right">@lifecycleAssmt.EmissionT.ToString("F4")</td>
<td align="right">@lifecycleAssmt.Percentage</td>
<td>@lifecycleAssmt.Instruction</td>
<td>@lifecycleAssmt.UncertaintyAnalysis</td>
</tr>
}
@if (Model.LifecycleAssmt.Count() == 0)
{
<tr>
<td class="text-center" colspan="11">@Resource.NoData</td>
</tr>
}
</table>
</div>
@if (Model.Status == Weee.Models.LCAStatus.Waiting)
{
<div class="pull-right docs-btn-group">
<input id="confirm-button2" type="button" value="@Resource.Approve" class="header-button" />
@using (Html.BeginForm("OrganizationLcaConfirm", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-confirm2", @class = "docs-inline" })) { }
<input id="reject-button2" type="button" value="@Resource.Reject" class="header-button" />
@using (Html.BeginForm("OrganizationLcaReject", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-reject2", @class = "docs-inline" })) { }
<button class="header-button" id="upload-button" onclick="showModel()">@Resource.StaticLabelGlobal_Upload</button>
</div>
}
@if (Model.Status == Weee.Models.LCAStatus.Processing)
{
<div class="pull-right docs-btn-group">
<input id="refuse-button2" type="button" value="@Resource.Refuse" class="header-button" />
@using (Html.BeginForm("OrganizationLcaRefuse", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { @id = "lca-refuse2", @class = "docs-inline" })) { }
</div>
}
<div class="pull-right docs-btn-group">
<div class="row">
<div class="col-lg-12">&nbsp;</div>
</div>
<div class="row">
<div class="col-lg-12">&nbsp;</div>
</div>
<div class="row">
<div class="col-lg-12">&nbsp;</div>
</div>
</div>
</div>
</div>
</div>
@using (Html.BeginForm("OrganizationLcaUploadFile", "LCA", new { lcaId = Model.ID }, FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<div class="table_edit_wrap transition show_table_edit" id="file-upload" style="display: none; width: 100%; height: calc(100vh + 150px); background-color: rgb(128,128,128, 0.6); position: fixed; z-index: 1001;margin-top: -150px">
<div>
<div class="edit_form" style="z-index: 1001; position: fixed; margin: auto; left: 0; right: 0; top: 30%; background-color: #eeeeee; width: 500px; border: 1px solid #bbb; border-radius: 5px; padding-bottom: 20px; box-shadow: 1px 1px 1px 1px #ddd; height: 140px;">
<div style="float:right;margin: 10px 10px;cursor: pointer;" onclick="cancel()">
<img src="~/Browser_Local/img/header_image7_1.png" alt="close" />
</div>
<div id="upload-file-result-msg" style="padding: 20px 0 10px 10px;">上传文件:</div>
<div style="margin-left: 30px;">
<input id="fileUpload" type="file" name="uploadedFile" />
<input type="submit" value="@Resource.StaticLabelImport" class="btn btn-default" />
</div>
<p style="color:red;margin-top: 0;margin-left:28px;">仅支持的文件类型zip</p>
</div>
</div>
</div>
}
</div>
</html>
<script>
function cancel() {
let box = document.getElementById('file-upload');
box.style.display = 'none';
}
</script>
@Scripts.Render("~/jQuery")
@Scripts.Render("~/bootstrap")
<script>
function showModel() {
var model = document.getElementById("file-upload");
model.style.display = "block";
}
</script>