demo20230512/Views/Partial/LCA/DetailSurveyForm/EmployeeCommuting.cshtml

319 lines
15 KiB
Plaintext
Raw Normal View History

2023-05-12 10:20:28 +08:00
<style type="text/css">
.summary {
margin-top: 80px;
}
.td-1 {
width: 300px;
}
</style>
<div ng-controller="LCAEmployeeCommutingCtrl" 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 ng-show="lcaDetail.isProductLCA">
<label for="Allocation">@Resource.Allocation</label>
<select name="AllocationN" id="Allocation"
ng-model="Allocation" style="width:130px"
ng-change="onAllocationChange(Allocation)"
ng-disabled="lcaDetail.Status!=1"
class="table_text_select">
<option value="-1">-- @Resource.StaticLabelGlobal_Select --</option>
<option value="99">@Resource.AllocationNon</option>
<option value="0">@Resource.AllocationWeight</option>
<option value="1">@Resource.AllocationAreaSize</option>
<option value="2">@Resource.AllocationPcsPerYear</option>
<option value="3">@Resource.AllocationEconomic</option>
<option value="4">@Resource.AllocationWorkHour</option>
</select>
<label for="Ratio">@Resource.Ratio {{Ratio * 100}} % </label>
</div>
<div class="header_search" ng-show="!Table_Edit_State">
<input type="text" ng-model="modelBuilder.searchText" ng-class="{ expand: search_box }" class="transition" />
</div>
</div>
</div>
@* end of header *@
@* the body of index *@
<div class="body_content">
<div class="table_overflow">
<table class="table" style="table-layout: fixed;">
<thead>
<tr class="table-active" style="text-align:center">
<th>@Resource.EmployeesNumber</th>
<th>@Resource.WorkingDays</th>
<th>@Resource.RoundTrip</th>
<th>@Resource.MovingDistance</th>
<th>@Resource.SituationDesc</th>
<th>@Resource.Parameter</th>
<th>@Resource.StaticLabelGlobal_Unit</th>
<th>@Resource.Parameter@Resource.Explanation</th>
<th>@Resource.KgCO2e</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 | filter : modelBuilder.searchText | smarterLimitTo : 10 : (currentPage - 1) * 10">
<td ng-bind="row.TotalEmployees" align="right"></td>
<td ng-bind="row.WorkingDays" align="right"></td>
<td ng-bind="row.StrRroundTrip"></td>
<td ng-bind="row.AverageMovingDistance" align="right"></td>
<td ng-bind="row.MovingScenario"></td>
<td ng-bind="row.Coefficient" align="right"></td>
<td ng-bind="row.CoefficienUnit"></td>
<td ng-bind="row.CoefficientNote"></td>
<td ng-bind="row.KgCO2e" align="right"></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.length / 10)" passed-current-page="currentPage"></page>
@* the detail modal form *@
<form name="editForm" ng-submit="save()">
<table-edit-modal display-option="modalFormOption" passed-form="editForm">
@*<div class="row">
<label class="col-sm-4 col-form-label">@Resource.Commuting</label>
<div class="col col-sm-8">
<select name="Commuting"
required
ng-model="selectRow.toBeEdit.Commuting"
class="form-select">
<option value="">-- @Resource.StaticLabelGlobal_Select --</option>
<option value="1">@(Resource.Drive_taxi)</option>
<option value="2">@Resource.Drive_electric_car</option>
<option value="3">@Resource.Ride_motorcycle</option>
<option value="4">@Resource.Take_bus</option>
<option value="5">@Resource.Take_MRT</option>
<option value="6">@Resource.Take_high_speed_rail</option>
</select>
</div>
</div>*@
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.EmployeesNumber</label>
<div class="col col-sm-8">
<input type="number" min="1" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ng-model="selectRow.toBeEdit.TotalEmployees" placeholder="@Resource.RequiredMessage @Resource.IntComapreNote" required>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.WorkingDays</label>
<div class="col col-sm-8">
<input type="number" min="1" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" ng-model="selectRow.toBeEdit.WorkingDays" placeholder="@Resource.RequiredMessage @Resource.IntComapreNote" required>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.RoundTrip</label>
<div class="col col-sm-8">
<select name="RroundTrip"
required
ng-model="selectRow.toBeEdit.RroundTrip"
class="form-select">
<option value="">-- @Resource.StaticLabelGlobal_Select --</option>
<option value="1">@Resource.EmployeeCommuting_Past</option>
<option value="2">@Resource.EmployeeCommuting_Back</option>
<option value="3">@(Resource.EmployeeCommuting_Past + Resource.EmployeeCommuting_Back)</option>
</select>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.MovingDistance</label>
<div class="col col-sm-8">
<input type="number" min="0.0001" step="0.0001" ng-model="selectRow.toBeEdit.AverageMovingDistance" placeholder="@Resource.RequiredMessage @Resource.MovingDistanceNote" required>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.SituationDesc</label>
<div class="col col-sm-8">
<input type="text" ng-model="selectRow.toBeEdit.MovingScenario">
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.Parameter</label>
<div class="col col-sm-8">
<input type="number" min="0.0001" step="0.0001" ng-model="selectRow.toBeEdit.Coefficient" placeholder="@Resource.RequiredMessage @Resource.MovingDistanceNote" required>
<div class="header_image_button simapro-image-button"
ng-click="selectSimaproProcess(selectRow.toBeEdit)">
</div>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.StaticLabelGlobal_Unit</label>
<div class="col col-sm-8">
<input type="text" ng-model="selectRow.toBeEdit.CoefficienUnit" disabled>
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.Parameter@Resource.Explanation</label>
<div class="col col-sm-8">
<input type="text" ng-model="selectRow.toBeEdit.CoefficientNote">
</div>
<div class="validation_block"></div>
</div>
<div class="row">
<label class="col-sm-4 col-form-label">@Resource.KgCO2e</label>
<div class="col col-sm-8">
<input type="text" ng-model="selectRow.toBeEdit.KgCO2e" disabled>
</div>
<div class="validation_block"></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-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 *@
<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>
<simapro display-option="simaproOption">
<div>@Resource.PartNumber : <span ng-bind="selectRow.getSelected().PartNumber"></span></div>
<div>@Resource.MaterialName : <span ng-bind="selectRow.getSelected().Name"></span></div>
</simapro>
<div class="footnote">
</div>
</div>
</div>