demo20230512/Views/Partial/LCA/DetailSurveyForm/RiskAssmtForm/WasteMaterial.cshtml
2023-05-12 10:20:28 +08:00

513 lines
26 KiB
Plaintext

<style type="text/css">
.table-th-qty {
width: 100px;
}
</style>
@* the select function is provided by select-row directive*@
<div ng-controller="WasteMaterialController" select-row lca-detail>
@* header *@
@* header's button style is controlled by header-content-layout, the business logic(ng-show) is controlled here *@
<div class="body_content container" style="margin-top: 10px;">
<div header-content-layout>
@*header content layout provide the general function like mouse over and background image*@
<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image1 }"
ng-show="lcaDetail.Status==1"
ng-click="createProcess()"
ng-mouseover="headerLayout.headerImageChange(1, 2)"
ng-mouseleave="headerLayout.headerImageChange(1, 1)">
<div class="tooltip" ng-show="headerLayout.show1">
<div ng-style="{ width: headerLayout.tooltipWidth(1) }">
@Resource.StaticLabelAddNew
</div>
</div>
</div>
<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image4 }"
ng-click="editProcess(selectRow.getSelected())"
ng-mouseover="headerLayout.headerImageChange(4, 2)"
ng-mouseleave="headerLayout.headerImageChange(4, 1)"
ng-show="selectRow.getSelected() != null">
<div class="tooltip" ng-show="headerLayout.show4">
<div ng-style="{ width: headerLayout.tooltipWidth(4) }">
@Resource.StaticLabelGlobal_Edit
</div>
</div>
</div>
<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image6 }"
ng-click="deleteProcess(selectRow.getSelected())"
ng-mouseover="headerLayout.headerImageChange(6, 2)"
ng-mouseleave="headerLayout.headerImageChange(6, 1)"
ng-show="selectRow.getSelected() != null">
<div class="tooltip" ng-show="headerLayout.show6">
<div ng-style="{ width: headerLayout.tooltipWidth(6) }">
@Resource.StaticLabelGlobal_Delete
</div>
</div>
</div>
@*<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image8 }"
ng-click="modelBuilder.export(model)"
ng-mouseover="headerLayout.headerImageChange(8, 2)"
ng-mouseleave="headerLayout.headerImageChange(8, 1)">
<div class="tooltip" ng-show="headerLayout.show8">
<div ng-style="{ width: tooltipWidth(8) }">
@Resource.StaticLabelExportBOM
</div>
</div>
</div>*@
@*<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image9 }"
ng-click="fileImportModal.show = true;"
ng-mouseover="headerLayout.headerImageChange(9, 2)"
ng-mouseleave="headerLayout.headerImageChange(9, 1)">
<div class="tooltip" ng-show="headerLayout.show9">
<div ng-style="{ width: tooltipWidth(9) }">
@Resource.StaticLabelImprotBOM
</div>
</div>
</div>*@
@*<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image17 }"
ng-click="quoteModal.show = true;"
ng-mouseover="headerLayout.headerImageChange(17, 2)"
ng-mouseleave="headerLayout.headerImageChange(17, 1)">
<div class="tooltip" ng-show="headerLayout.show17">
<div ng-style="{ width: tooltipWidth(17) }">
@Resource.StaticLabelReferenceData
</div>
</div>
</div>*@
@*<div class="header_image_button"
ng-style="{ backgroundImage: headerLayout.header_image11 }"
ng-click="search_box = !search_box"
ng-mouseover="headerLayout.headerImageChange(11, 2)"
ng-mouseleave="headerLayout.headerImageChange(11, 1)">
<div class="tooltip" ng-show="headerLayout.show11">
<div ng-style="{ width: tooltipWidth(11) }">
@Resource.StaticLabelGlobal_Search
</div>
</div>
</div>*@
<div class="header_search" ng-show="!Table_Edit_State">
<input type="text" class="transition" ng-model="searchText" ng-class="{ expand: search_box }" />
</div>
</div>
</div>
@* end of header *@
@* the body of index *@
<div class="body_content" ng-model="currentPage" ng-init="currentPage = 1">
<div class="table_overflow">
<table class="table">
<thead>
<tr class="table-active" style="text-align:center">
<th>@Resource.RAWasteMaterialName</th>
<th>@Resource.RAWasteMaterialUnit</th>
<th class="table-th-qty">@Resource.RAWasteMaterialTotal</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty1</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty2</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty3</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty4</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty5</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty6</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty7</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty8</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty9</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty10</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty11</th>
<th class="table-th-qty">@Resource.RAWasteMaterialQty12</th>
</tr>
</thead>
<tbody ng-mouseleave="setHoverColumnRow(-1, -1, -1)">
<tr class="survey_order_table_row"
ng-class="{ selected: row == selectRow.getSelected() }"
ng-click="selectRow.select(row)"
ng-dblclick="editProcess(row)"
ng-repeat="row in model">
<td ng-bind="row.MaterialName"></td>
<td ng-bind="row.Unit"></td>
<td ng-bind="row.TotalQuantity"></td>
<td ng-bind="row.JanQuantity"></td>
<td ng-bind="row.FebQuantity"></td>
<td ng-bind="row.MarQuantity"></td>
<td ng-bind="row.AprQuantity"></td>
<td ng-bind="row.MayQuantity"></td>
<td ng-bind="row.JunQuantity"></td>
<td ng-bind="row.JulQuantity"></td>
<td ng-bind="row.AugQuantity"></td>
<td ng-bind="row.SeptQuantity"></td>
<td ng-bind="row.OctQuantity"></td>
<td ng-bind="row.NovQuantity"></td>
<td ng-bind="row.DecQuantity"></td>
</tr>
<tr ng-show="model.length > 0">
<td colspan="2" style="text-align:right;vertical-align:middle;">@Resource.RAWasteMaterialAgg</td>
<td>
<input type="number" step="any"
readonly="readonly"
ng-model="lca.WasteMaterialTotalQuantity" />
</td>
<td colspan="2" style="text-align:right;vertical-align:middle;">@Resource.RAWasteMaterialDistanceKM</td>
<td>
<input type="number" step="any"
ng-model="lca.WasteMaterialShippingDistance"
ng-change="changeShippingDistance()"/>
</td>
<td colspan="2" style="text-align:right;vertical-align:middle;">TKM</td>
<td>
<input type="number" step="any"
readonly="readonly"
ng-model="lca.WasteMaterialTKM1" />
</td>
</tr>
<tr style="border-bottom: solid 1px rgb(214, 214, 214);">
<td ng-show="model.length == 0">
@Resource.NoData
</td>
</tr>
</tbody>
</table>
</div>
@* end of the body of index *@
@*<page passed-total-page="Math.ceil((model | filter : searchText).length / 10)" passed-current-page="currentPage"></page>*@
@* the detail modal form *@
<form name="editForm" novalidate>
<table-edit-modal display-option="modalFormOption" passed-form="editForm">
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialName</label>
<div class="col col-sm-8">
<input type="text"
required
placeholder="@Resource.RequiredMessage"
ng-model="selectRow.toBeEdit.MaterialName" />
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialUnit</label>
<div class="col col-sm-8">
<input type="text"
readonly="readonly"
ng-model="selectRow.toBeEdit.Unit" />
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialTotal</label>
<div class="col col-sm-8">
<input type="number" step="any"
readonly="readonly"
ng-model="selectRow.toBeEdit.TotalQuantity" />
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty1</label>
<div class="col col-sm-8">
<input name="janQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.JanQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.janQuantity.$dirty">
<small ng-show="editForm.janQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty2</label>
<div class="col col-sm-8">
<input name="febQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.FebQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.febQuantity.$dirty">
<small ng-show="editForm.febQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty3</label>
<div class="col col-sm-8">
<input name="marQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.MarQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.marQuantity.$dirty">
<small ng-show="editForm.marQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty4</label>
<div class="col col-sm-8">
<input name="aprQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.AprQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.aprQuantity.$dirty">
<small ng-show="editForm.aprQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty5</label>
<div class="col col-sm-8">
<input name="mayQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.MayQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.mayQuantity.$dirty">
<small ng-show="editForm.mayQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty6</label>
<div class="col col-sm-8">
<input name="junQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.JunQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.junQuantity.$dirty">
<small ng-show="editForm.junQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty7</label>
<div class="col col-sm-8">
<input name="julQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.JulQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.julQuantity.$dirty">
<small ng-show="editForm.julQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty8</label>
<div class="col col-sm-8">
<input name="augQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.AugQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.augQuantity.$dirty">
<small ng-show="editForm.augQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty9</label>
<div class="col col-sm-8">
<input name="septQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.SeptQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.septQuantity.$dirty">
<small ng-show="editForm.septQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty10</label>
<div class="col col-sm-8">
<input name="octQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.OctQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.octQuantity.$dirty">
<small ng-show="editForm.octQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty11</label>
<div class="col col-sm-8">
<input name="novQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.NovQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.novQuantity.$dirty">
<small ng-show="editForm.novQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RAWasteMaterialQty12</label>
<div class="col col-sm-8">
<input name="decQuantity"
type="number" step="any"
max="{{CONSTANTS.MAXNUMVALUE}}"
ng-change="changeQuantity(selectRow.toBeEdit)"
ng-model="selectRow.toBeEdit.DecQuantity">
</div>
<div class="validation_block">
<div ng-show="editForm.decQuantity.$dirty">
<small ng-show="editForm.decQuantity.$error.max">@Resource.MaxValidateMsg {{CONSTANTS.MAXNUMVALUE}}</small>
</div>
</div>
</div>
<div class="survey_btn_wrap">
<div class="survey_content" style="float: right">
<div class="row">
<button class="header_button"
style="float: left; margin-left: 16px;"
ng-click="save()"
ng-show="lcaDetail.Status==1"
ng-disabled="editForm.$invalid">
@Resource.StaticLabelGlobal_Save
</button>
</div>
</div>
</div>
</table-edit-modal>
</form>
@* end of the detail modal form *@
<div style="margin-right: 1rem">
<form name="lcaWasteMaterial">
<div class="form-row">
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialBucketNumber</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialNumOfBarrels"
ng-change="changeWasteMaterial()" />
</div>
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialWeightKg</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialWeight"
ng-change="changeWasteMaterial()" />
</div>
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialWorkingDays</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialWorkingDays"
ng-change="changeWasteMaterial()" />
</div>
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialTotalOutputKg</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialTotalOutputKg"
readonly="readonly" />
</div>
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialTotalOutputT</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialTotalOutputT"
readonly="readonly" />
</div>
<div class="col">
<label class="col-form-label">@Resource.RAWasteMaterialFactoryDistance</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialTreatmentPlantShippingDistance"
ng-change="changeTreatmentPlantShippingDistance()" />
</div>
<div class="col">
<label class="col-form-label">TKM</label>
<input type="number" step="any"
ng-model="lca.WasteMaterialTKM2"
readonly="readonly" />
</div>
</div>
<div class="survey_btn_wrap">
<div class="survey_content" style="float: right">
<div class="row">
<button class="header_button"
style="float: left; margin-left: 16px;"
ng-click="updateLCA()"
ng-show="lcaDetail.Status==1"
ng-disabled="lcaWasteMaterial.$invalid">
@Resource.StaticLabelGlobal_Save
</button>
</div>
</div>
</div>
</form>
</div>
@*<table-edit-modal display-option="fileImportModal">
<div file-import-process import-option="fileImportOptions"></div>
</table-edit-modal>*@
<table-edit-modal display-option="quoteModal">
<div></div>
<div quote quote-options="quoteOptions"></div>
</table-edit-modal>
@*<div class="footnote">
@Html.Raw(@Resource.FootnoteRefrigerant.Replace("\r\n", "<br>"))
</div>*@
</div>
</div>