Commit e95c9a5e by wancheng

0402优化

parent 463c9b35
......@@ -155,7 +155,7 @@ public class ServiceHPKC006 extends ServiceBase {
fKc006.setOtherEnterNo(SequenceGenerator.getNextSequence(HPConstant.SequenceId.OTHER_ENTER_NO));
DaoUtils.insert(HPKC006.INSERT, fKc006);
// 修改库存
HPKCTools.updateStock(fKc006.getWhCode(), fKc006.getInventRecordId(), fKc006.getAmount(),
HPKCTools.updateStock(fKc006.getWhCode(), fKc006.getInventRecordId(), fKc006.getAmount(),fKc006.getUnitWeight(),
fKc006.getWeight(), fKc006.getFactoryCode());
}
......
......@@ -121,6 +121,9 @@ public class HPPZTools {
Map queryMap = new HashMap();
queryMap.put("inventCode", inventCode);
List<HPPZ004> pz004s = DaoBase.getInstance().query(HPPZ004.QUERY, queryMap);
if(pz004s!=null&&pz004s.size()==0){
pz004s = null;
}
AssertUtils.isNull(pz004s, String.format("存货编码[%s]不存在", inventCode));
return pz004s.get(0);
}
......
......@@ -61,7 +61,7 @@
<EF:EFColumn ename="amount" cname="数量" enable="false" width="100" align="right" format="{0:N0}"/>
<EF:EFColumn ename="unitWeight" cname="单重(KG)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFColumn ename="weight" cname="总重(T)" enable="false" width="100" align="right" format="{0:N3}"/>
<EF:EFComboColumn ename="isPrint" cname="是否打印" width="80" align="center">
<EF:EFComboColumn ename="isPrint" cname="是否制单" width="80" align="center">
<EF:EFCodeOption codeName="hpjx.hpjx.isPrint"/>
</EF:EFComboColumn>
<EF:EFColumn ename="remark" cname="备注" enable="false" width="100" align="center" />
......
......@@ -50,7 +50,8 @@ $(function() {
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === dataItem['inventName']) {
dataItem['inventCode'] = inventNameGlobalData[i]['valueField']
return inventNameGlobalData[i]['textField'];
dataItem['inventRecordId'] = inventNameGlobalData[i]['param9Field']
return inventNameGlobalData[i]['param1Field'];
} else {
dataItem['inventCode'] = '';
}
......@@ -63,9 +64,9 @@ $(function() {
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-inventType", options.model["inventType"]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
inInfo.set("serviceName", "HPPZ004");
inInfo.set("serviceName", "HPPZ006");
inInfo.set("methodName", "queryComboBox");
inInfo.set("blockId", "invent_name_block_id");
inInfo.set("blockId", "invent_spec_all_block_id");
inInfo.set("field", options.field);
refreshInputSelect(container, inInfo);
}
......@@ -120,6 +121,43 @@ $(function() {
}
}],
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "inventName") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['textField'] === item.inventName) {
resultGrid.setCellValue(item, 'inventName', inventNameGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'spec', inventNameGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'material', inventNameGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'unit', inventNameGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'length', inventNameGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'width', inventNameGlobalData[i]['param6Field']);
resultGrid.setCellValue(item, 'thick', inventNameGlobalData[i]['param7Field']);
resultGrid.setCellValue(item, 'coefficient', inventNameGlobalData[i]['param8Field']);
resultGrid.refresh();
}
}
}
if (e.field == "spec") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventAllGlobalData.length; i++) {
if (inventAllGlobalData[i]['textField'] === item.spec) {
resultGrid.setCellValue(item, 'material', inventAllGlobalData[i]['param1Field']);
resultGrid.setCellValue(item, 'unit', inventAllGlobalData[i]['param2Field']);
resultGrid.setCellValue(item, 'length', inventAllGlobalData[i]['param3Field']);
resultGrid.setCellValue(item, 'width', inventAllGlobalData[i]['param4Field']);
resultGrid.setCellValue(item, 'thick', inventAllGlobalData[i]['param5Field']);
resultGrid.setCellValue(item, 'coefficient', inventAllGlobalData[i]['param6Field']);
resultGrid.refresh();
}
}
}
});
},
onSave: function (e) {
// 阻止后台保存请求,使用自定义保存
......@@ -127,7 +165,7 @@ $(function() {
save();
},
afterEdit: function (e) {
if (e.field == "spec") {
/* if (e.field == "spec") {
var tr,index;
// 获取此model元素信息
var item = e.model;
......@@ -142,7 +180,7 @@ $(function() {
resultGrid.refresh();
}
}
}
}*/
},
onSuccess: function (e) {
if(e.eiInfo.extAttr.methodName == 'save'
......@@ -199,9 +237,9 @@ let initInvent = function () {
// 1.原料,2.耗材,5.废料
inInfo.set("inqu_status-0-inventTypes", [1, 2, 5]);
inInfo.set("inqu_status-0-isSplicingSymbol", false);
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
EiCommunicator.send("HPPZ006", "queryComboBox", inInfo, {
onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = ei.getBlock("invent_spec_all_block_id").getMappedRows();
},
onFail: function (ei) {
}
......
......@@ -62,7 +62,7 @@
</EF:EFComboColumn>
<EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventCode" cname="存货编码" hidden="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="120" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventName" cname="存货名称" width="150" align="center" required="true" readonly="true"/>
<EF:EFColumn ename="inventRecordId" cname="规格Id" width="120" align="center" readonly="true" hidden="true"/>
<EF:EFColumn ename="spec" cname="规格" width="120" align="center" readonly="true"/>
<EF:EFColumn ename="amount" cname="数量" format="{0:N0}" maxLength="20" width="100" align="right"
......
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