Commit fc7ddf93 by 江和松

材料清单单重靠计算,不能手填

parent 3d47ca38
......@@ -92,7 +92,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框 (不默认状态)
* 编写:
*/
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","status","id","inventType","spec","material","unit", "length", "width", "thick","HGPZ005.queryInventCodeBox"),
INVENT_RECORD_BOX_BLOCK_ID("invent_record_box_block_id","inventCode","inventName","status","id","inventType","spec","material","unit", "length", "width", "thick","coefficient","HGPZ005.queryInventCodeBox"),
/**
* 模块:存货档案
......@@ -520,9 +520,27 @@ public enum DdynamicEnum {
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3, String param4,
String param5, String param6,String param7,String param8,String param9,String param10,String dbSource) {
this.blockId = blockId;
this.value = value;
this.text = text;
this.param1 = param1;
this.param2 = param2;
this.param3 = param3;
this.param4 = param4;
this.param5 = param5;
this.param6 = param6;
this.param7 = param7;
this.param8 = param8;
this.param9 = param9;
this.param10 = param10;
this.dbSource = dbSource;
}
DdynamicEnum(String blockId, String value, String text, String param1, String param2, String param3,
String param4, String param5, String param6, String param7, String param8, String param9,
String param4, String param5, String param6, String param7, String param8, String param9,String param10,
String dbSource, Map paramMap) {
this.blockId = blockId;
this.value = value;
......@@ -536,6 +554,7 @@ public enum DdynamicEnum {
this.param7 = param7;
this.param8 = param8;
this.param9 = param9;
this.param10 = param10;
this.dbSource = dbSource;
this.paramMap = paramMap;
}
......
......@@ -327,7 +327,8 @@
LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 -->
STATUS as "status"
STATUS as "status",
COEFFICIENT as "coefficient" <!-- 系数 -->
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode">
......
......@@ -226,10 +226,12 @@ function INSERTCG() {
$.each(rows, function(index, item) {
if (item.get("status")==0){
message("未提交,无法选中!");
flag = false;
return false;
}
ids.push(item.planMaterialCode)
});
if(flag) {
inEiInfo.set("planMaterialCodes",ids.join(','));
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
ok: function () {
......@@ -248,6 +250,7 @@ function INSERTCG() {
}
});
}
inEiInfo.set("planMaterialCodes", ids.join(','));
}
......
......@@ -82,6 +82,9 @@ $(function () {
resultGrid.setCellValue(e.items[0], 'length', inventRecordBoxBlockId[i]['param7Field'])
resultGrid.setCellValue(e.items[0], 'width', inventRecordBoxBlockId[i]['param8Field'])
resultGrid.setCellValue(e.items[0], 'thick', inventRecordBoxBlockId[i]['param9Field'])
//系数
let coefficient = inventRecordBoxBlockId[i]['param10Field']
calUnitWeight(e.items[0],e.items[0].length,e.items[0].width,e.items[0].thick,coefficient);
}
}
}
......@@ -203,3 +206,10 @@ let deleteFunc = function () {
});
}
let calUnitWeight = function (item,length,width,thick,coefficient) {
if(length && width && thick && coefficient){
let amount = length * width * thick * coefficient/1000000;
//item['amount'] = amount.toString();
resultGrid.setCellValue(item, 'singleWeight', amount);
}
}
......@@ -58,7 +58,7 @@
<EF:EFColumn ename="singleWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!"/>
data-errorprompt="请输入数字,该值最大可设置17位整数和3位小数!" enable="false"/>
<EF:EFColumn ename="grossAmount" cname="总重" width="120" align="right" enable="false" format="{0:N3}"/>
<EF:EFColumn ename="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" cname="零件编码" enable="false" width="120" align="center" hidden="true"/>
......
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