Commit fc7ddf93 by 江和松

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

parent 3d47ca38
...@@ -92,7 +92,7 @@ public enum DdynamicEnum { ...@@ -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 { ...@@ -520,9 +520,27 @@ public enum DdynamicEnum {
this.dbSource = dbSource; 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, 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) { String dbSource, Map paramMap) {
this.blockId = blockId; this.blockId = blockId;
this.value = value; this.value = value;
...@@ -536,6 +554,7 @@ public enum DdynamicEnum { ...@@ -536,6 +554,7 @@ public enum DdynamicEnum {
this.param7 = param7; this.param7 = param7;
this.param8 = param8; this.param8 = param8;
this.param9 = param9; this.param9 = param9;
this.param10 = param10;
this.dbSource = dbSource; this.dbSource = dbSource;
this.paramMap = paramMap; this.paramMap = paramMap;
} }
......
...@@ -327,7 +327,8 @@ ...@@ -327,7 +327,8 @@
LENGTH as "length", <!-- 长 --> LENGTH as "length", <!-- 长 -->
WIDTH as "width", <!-- 宽 --> WIDTH as "width", <!-- 宽 -->
THICK as "thick", <!-- 厚 --> THICK as "thick", <!-- 厚 -->
STATUS as "status" STATUS as "status",
COEFFICIENT as "coefficient" <!-- 系数 -->
FROM ${hggpSchema}.HGPZ005 FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0 WHERE DELETE_FLAG = 0
<isNotEmpty prepend=" AND " property="accountCode"> <isNotEmpty prepend=" AND " property="accountCode">
......
...@@ -226,28 +226,31 @@ function INSERTCG() { ...@@ -226,28 +226,31 @@ function INSERTCG() {
$.each(rows, function(index, item) { $.each(rows, function(index, item) {
if (item.get("status")==0){ if (item.get("status")==0){
message("未提交,无法选中!"); message("未提交,无法选中!");
flag = false;
return false; return false;
} }
ids.push(item.planMaterialCode) ids.push(item.planMaterialCode)
}); });
inEiInfo.set("planMaterialCodes",ids.join(',')); if(flag) {
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", { inEiInfo.set("planMaterialCodes",ids.join(','));
ok: function () { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据做\"保存\"操作? ", {
EiCommunicator.send('HGSC009A', 'insertcg', inEiInfo, { ok: function () {
onSuccess(response) { EiCommunicator.send('HGSC009A', 'insertcg', inEiInfo, {
NotificationUtil(response.msg); onSuccess(response) {
query(); NotificationUtil(response.msg);
}, query();
onFail(errorMessage, status, e) { },
NotificationUtil("执行失败!", "error"); onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
}, {
async: false
} }
}, { );
async: false
}
);
} }
}); });
}
inEiInfo.set("planMaterialCodes", ids.join(',')); inEiInfo.set("planMaterialCodes", ids.join(','));
} }
......
...@@ -82,6 +82,9 @@ $(function () { ...@@ -82,6 +82,9 @@ $(function () {
resultGrid.setCellValue(e.items[0], 'length', inventRecordBoxBlockId[i]['param7Field']) resultGrid.setCellValue(e.items[0], 'length', inventRecordBoxBlockId[i]['param7Field'])
resultGrid.setCellValue(e.items[0], 'width', inventRecordBoxBlockId[i]['param8Field']) resultGrid.setCellValue(e.items[0], 'width', inventRecordBoxBlockId[i]['param8Field'])
resultGrid.setCellValue(e.items[0], 'thick', inventRecordBoxBlockId[i]['param9Field']) 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 () { ...@@ -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 @@ ...@@ -58,7 +58,7 @@
<EF:EFColumn ename="singleWeight" cname="单重" width="120" align="right" format="{0:N3}" <EF:EFColumn ename="singleWeight" cname="单重" width="120" align="right" format="{0:N3}"
defaultValue="0" defaultValue="0"
data-regex="/^-?[0-9]{1,17}([.][0-9]{1,3})?$/" 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="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="prdtCode" cname="部件编码" enable="false" width="120" align="center" hidden="true"/>
<EF:EFColumn ename="partCode" 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