Commit 949c2f7e by wuwenlong

报工dev;

parent 571a9ee9
...@@ -361,21 +361,38 @@ public class HGSC008 extends DaoEPBase { ...@@ -361,21 +361,38 @@ public class HGSC008 extends DaoEPBase {
eiColumn.setDescName("更新时间"); eiColumn.setDescName("更新时间");
eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
// eiColumn = new EiColumn("registeredQuantity"); eiColumn = new EiColumn(FIELD_registered_quantity);
// eiColumn.setDescName("已报工数量"); eiColumn.setDescName("已报工数量");
// eiMetadata.addMeta(eiColumn); eiMetadata.addMeta(eiColumn);
//
// eiColumn = new EiColumn("registeredWeight"); eiColumn = new EiColumn(FIELD_registered_weight);
// eiColumn.setDescName("已报工重量"); eiColumn.setType("N");
// eiMetadata.addMeta(eiColumn); eiColumn.setScaleLength(3);
// eiColumn.setFieldLength(20);
// eiColumn = new EiColumn("unregisterQuantity"); eiColumn.setDescName("已报工重量");
// eiColumn.setDescName("未报工数量"); eiMetadata.addMeta(eiColumn);
// eiMetadata.addMeta(eiColumn);
// eiColumn = new EiColumn(FIELD_unregister_quantity);
// eiColumn = new EiColumn("unregisterWeight"); eiColumn.setDescName("未报工数量");
// eiColumn.setDescName("未报工重量"); eiMetadata.addMeta(eiColumn);
// 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 Integer registeredQuantity = new Integer(0);
// private BigDecimal registeredWeight = new BigDecimal(0); // private BigDecimal registeredWeight = new BigDecimal(0);
...@@ -1011,6 +1028,13 @@ public class HGSC008 extends DaoEPBase { ...@@ -1011,6 +1028,13 @@ public class HGSC008 extends DaoEPBase {
setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy)); setUpdatedBy(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_by)), updatedBy));
setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName)); setUpdatedName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_name)), updatedName));
setUpdatedTime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get(FIELD_updated_time)), updatedTime)); 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 { ...@@ -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_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_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_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_quantity, StringUtils.toString(registeredQuantity, eiMetadata.getMeta(FIELD_registered_quantity)));
map.put(FIELD_registered_weight, StringUtils.toString(FIELD_registered_weight, eiMetadata.getMeta(FIELD_single_weight))); map.put(FIELD_registered_weight, StringUtils.toString(registeredWeight, eiMetadata.getMeta(FIELD_registered_weight)));
map.put(FIELD_unregister_quantity, StringUtils.toString(FIELD_unregister_quantity, eiMetadata.getMeta(FIELD_quantity))); map.put(FIELD_unregister_quantity, StringUtils.toString(unregisterQuantity, eiMetadata.getMeta(FIELD_unregister_quantity)));
map.put(FIELD_unregister_weight, StringUtils.toString(FIELD_unregister_weight, eiMetadata.getMeta(FIELD_single_weight))); map.put(FIELD_unregister_weight, StringUtils.toString(unregisterWeight, eiMetadata.getMeta(FIELD_unregister_weight)));
map.put(FIELD_task_quantity, StringUtils.toString(FIELD_task_quantity, eiMetadata.getMeta(FIELD_quantity))); map.put(FIELD_task_quantity, StringUtils.toString(taskQuantity, eiMetadata.getMeta(FIELD_task_quantity)));
map.put(FIELD_task_weight, StringUtils.toString(FIELD_task_weight, eiMetadata.getMeta(FIELD_single_weight))); map.put(FIELD_task_weight, StringUtils.toString(taskWeight, eiMetadata.getMeta(FIELD_task_weight)));
return map; return map;
} }
} }
...@@ -57,7 +57,7 @@ function registerWork(id) { ...@@ -57,7 +57,7 @@ function registerWork(id) {
href: "HGSC007A?methodName=initLoad&inqu_status-0-taskId=" + id, href: "HGSC007A?methodName=initLoad&inqu_status-0-taskId=" + id,
title: "<div style='text-align: center;'>报工</div>", title: "<div style='text-align: center;'>报工</div>",
width: "90%", width: "90%",
height: "40%", height: "60%",
callbackName: registerWorkCallback callbackName: registerWorkCallback
}); });
} }
......
$(function () { $(function () {
$("#result-0-companyCode").change(function () { $("#result-0-quantity_textField").on('change',function () {
let textField = IPLAT.EFSelect.text($("#result-0-companyCode")); var quantity = $("#result-0-quantity_textField").val();
$("#result-0-companyName").val(textField); 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 () { ...@@ -31,6 +25,16 @@ $(function () {
* 保存* * 保存*
*/ */
$("#btn_save").on("click",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("确定对数据做\"保存\"操作? ", { JSUtils.confirm("确定对数据做\"保存\"操作? ", {
ok: function () { ok: function () {
JSUtils.submitGrid("detail", "HGSC001", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback}); JSUtils.submitGrid("detail", "HGSC001", "save", {isAlldata:true,onSuccessCallback:parent.windowCallback});
......
...@@ -15,8 +15,8 @@ ...@@ -15,8 +15,8 @@
</div> </div>
<div class="row"> <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-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-taskQuantity" 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-taskWeight" cname="任务重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div> </div>
<div class="row"> <div class="row">
<EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/> <EF:EFInput ename="result-0-registeredQuantity" cname="已报工数量" format="{0:0}" editType="text" colWidth="4" readonly="true"/>
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
format="yyyy-MM-dd" required="true" readonly="false"/> format="yyyy-MM-dd" required="true" readonly="false"/>
</div> </div>
<div class="row"> <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"/> <EF:EFInput ename="result-0-totalWeight" cname="报工重量" format="{0:0.00}" editType="text" colWidth="4" readonly="true"/>
</div> </div>
</EF:EFRegion> </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