Commit 949c2f7e by wuwenlong

报工dev;

parent 571a9ee9
......@@ -361,21 +361,38 @@ public class HGSC008 extends DaoEPBase {
eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn);
// eiColumn = new EiColumn("registeredQuantity");
// eiColumn.setDescName("已报工数量");
// eiMetadata.addMeta(eiColumn);
//
// eiColumn = new EiColumn("registeredWeight");
// eiColumn.setDescName("已报工重量");
// eiMetadata.addMeta(eiColumn);
//
// eiColumn = new EiColumn("unregisterQuantity");
// eiColumn.setDescName("未报工数量");
// eiMetadata.addMeta(eiColumn);
//
// eiColumn = new EiColumn("unregisterWeight");
// eiColumn.setDescName("未报工重量");
// eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_registered_quantity);
eiColumn.setDescName("已报工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_registered_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("已报工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_unregister_quantity);
eiColumn.setDescName("未报工数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_unregister_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("未报工重量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_task_quantity);
eiColumn.setDescName("任务数量");
eiMetadata.addMeta(eiColumn);
eiColumn = new EiColumn(FIELD_task_weight);
eiColumn.setType("N");
eiColumn.setScaleLength(3);
eiColumn.setFieldLength(20);
eiColumn.setDescName("任务重量");
eiMetadata.addMeta(eiColumn);
// private Integer registeredQuantity = new Integer(0);
// private BigDecimal registeredWeight = new BigDecimal(0);
......@@ -1011,6 +1028,13 @@ public class HGSC008 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime));
setRegisteredQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_registered_quantity)), registeredQuantity));
setRegisteredWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_registered_weight)), registeredWeight));
setUnregisterQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_unregister_quantity)), unregisterQuantity));
setUnregisterWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_unregister_weight)), unregisterWeight));
setTaskQuantity(NumberUtils.toInteger(StringUtils.toString(map.get(FIELD_task_quantity)), taskQuantity));
setTaskWeight(NumberUtils.toBigDecimal(StringUtils.toString(map.get(FIELD_task_weight)), taskWeight));
}
/**
......@@ -1056,12 +1080,12 @@ public class HGSC008 extends DaoEPBase {
map.put(FIELD_updated_by, StringUtils.toString(updatedBy, eiMetadata.getMeta(FIELD_updated_by)));
map.put(FIELD_updated_name, StringUtils.toString(updatedName, eiMetadata.getMeta(FIELD_updated_name)));
map.put(FIELD_updated_time, StringUtils.toString(updatedTime, eiMetadata.getMeta(FIELD_updated_time)));
map.put(FIELD_registered_quantity, StringUtils.toString(FIELD_registered_quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_registered_weight, StringUtils.toString(FIELD_registered_weight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_unregister_quantity, StringUtils.toString(FIELD_unregister_quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_unregister_weight, StringUtils.toString(FIELD_unregister_weight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_task_quantity, StringUtils.toString(FIELD_task_quantity, eiMetadata.getMeta(FIELD_quantity)));
map.put(FIELD_task_weight, StringUtils.toString(FIELD_task_weight, eiMetadata.getMeta(FIELD_single_weight)));
map.put(FIELD_registered_quantity, StringUtils.toString(registeredQuantity, eiMetadata.getMeta(FIELD_registered_quantity)));
map.put(FIELD_registered_weight, StringUtils.toString(registeredWeight, eiMetadata.getMeta(FIELD_registered_weight)));
map.put(FIELD_unregister_quantity, StringUtils.toString(unregisterQuantity, eiMetadata.getMeta(FIELD_unregister_quantity)));
map.put(FIELD_unregister_weight, StringUtils.toString(unregisterWeight, eiMetadata.getMeta(FIELD_unregister_weight)));
map.put(FIELD_task_quantity, StringUtils.toString(taskQuantity, eiMetadata.getMeta(FIELD_task_quantity)));
map.put(FIELD_task_weight, StringUtils.toString(taskWeight, eiMetadata.getMeta(FIELD_task_weight)));
return map;
}
}
......@@ -57,7 +57,7 @@ function registerWork(id) {
href: "HGSC007A?methodName=initLoad&inqu_status-0-taskId=" + id,
title: "<div style='text-align: center;'>报工</div>",
width: "90%",
height: "40%",
height: "60%",
callbackName: registerWorkCallback
});
}
......
$(function () {
$("#result-0-companyCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-companyCode"));
$("#result-0-companyName").val(textField);
$("#result-0-quantity_textField").on('change',function () {
var quantity = $("#result-0-quantity_textField").val();
if(!isPositiveInteger(quantity)){
message("报工数量必须是大于0的正整数")
}
var singleWeight = $("#result-0-singleWeight_textField").val();
if(isPositiveNumber(singleWeight)) {
$("#result-0-totalWeight_textField").val((parseInt(singleWeight*quantity*100)/100).toFixed(2));
}
})
$("#result-0-depCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-depCode"));
$("#result-0-depName").val(textField);
});
$("#result-0-subcontractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-subcontractCode"));
$("#result-0-subcontractName").val(textField);
loadProjMg(IPLAT.EFSelect.value($("#result-0-subcontractCode")));
});
$("#result-0-genralContractCode").change(function () {
let textField = IPLAT.EFSelect.text($("#result-0-genralContractCode"));
$("#result-0-genralContractName").val(textField);
});
/**
......@@ -31,6 +25,16 @@ $(function () {
* 保存*
*/
$("#btn_save").on("click",function(){
var quantity = $("#result-0-quantity_textField").val();
if(!isPositiveInteger(quantity)){
message("报工数量必须是大于0的正整数");
return ;
}
var registerDate = $("#result-0-registerDate").val();
if(!registerDate){
message("报工日期不能为空!");
return ;
}
JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () {
JSUtils.submitGrid("detail", "HGSC001", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
......
......@@ -15,8 +15,8 @@
</div>
<div class="row">
<EF:EFInput ename="result-0-singleWeight" cname="单重" colWidth="4" format="{0:0.00}" editType="text" readonly="true"/>
<EF:EFInput ename="result-0-orderQuantity" cname="任务数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-orderWeight" cname="任务重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-taskQuantity" cname="任务数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
<EF:EFInput ename="result-0-taskWeight" cname="任务重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
......@@ -30,7 +30,7 @@
format="yyyy-MM-dd" required="true" readonly="false"/>
</div>
<div class="row">
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0}" editType="text" colWidth="4" required="true" readonly="false"/>
<EF:EFInput ename="result-0-quantity" cname="报工数量" format="{0:0}" editType="text" colWidth="4" required="true" />
<EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div>
</EF:EFRegion>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment