增加月工效和项目工效
This commit is contained in:
@@ -54,27 +54,9 @@
|
||||
HeaderText="材料消耗量(净量+损耗量)" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="afteredit" Handler="onGridAfterEdit" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
var hdIdClientID = '<%= hdId.ClientID %>';
|
||||
|
||||
function onGridAfterEdit(event, value, params) {
|
||||
var me = this, columnId = params.columnId, rowId = params.rowId;
|
||||
if (columnId.indexOf('ConsumeHours') != -1) {
|
||||
var physicalCompletionQuantity = me.getCellValue(rowId, 'PhysicalCompletionQuantity');
|
||||
var hours = me.getCellValue(rowId, columnId);
|
||||
var workEfficiencyId = columnId.replace('ConsumeHours', 'WorkEfficiency');
|
||||
if (physicalCompletionQuantity.toString() != "" && hours.toString() != "") {
|
||||
me.updateCellValue(rowId, workEfficiencyId, (physicalCompletionQuantity / hours).toFixed(2));
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user