Commit d939c840 by wuwenlong

物料清单opt

parent d198236a
...@@ -220,9 +220,9 @@ $(function () { ...@@ -220,9 +220,9 @@ $(function () {
input.appendTo(container); input.appendTo(container);
let eiInfo = new EiInfo(); let eiInfo = new EiInfo();
eiInfo.set("inqu_status-0-inventTypes", [3, 4]); eiInfo.set("inqu_status-0-inventTypes", [3, 4]);
eiInfo.set("inventType", options.model["prdtType"]); eiInfo.set("inqu_status-0-inventType", options.model["prdtType"]);
var dataSource; var dataSource;
EiCommunicator.send("HPPZ006", "queryComboBox", eiInfo, { EiCommunicator.send("HPPZ006", "queryPrdtComboBox", eiInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows(); dataSource = ei.getBlock("invent_prdt_name_block_id").getMappedRows();
inventNameGlobalData = dataSource; inventNameGlobalData = dataSource;
...@@ -241,6 +241,21 @@ $(function () { ...@@ -241,6 +241,21 @@ $(function () {
} }
} }
], ],
loadComplete: function (grid) {
// 此grid对象
grid.dataSource.bind("change", function(e) {
if (e.field == "inventRecordId") {
var tr,index;
// 获取此model元素信息
var item = e.items[0];
for (let i = 0; i < inventNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === item.inventRecordId) {
resultGrid.setCellValue(item, 'prdtCode', inventNameGlobalData[i]['textField'])
}
}
}
});
}
}, },
}; };
......
...@@ -15,9 +15,8 @@ ...@@ -15,9 +15,8 @@
<EF:EFOption label="全部" value=""/> <EF:EFOption label="全部" value=""/>
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect ename="inqu_status-0-prdtCode" cname="产品名称" filter="contains" required="false" <EF:EFSelect cname="产品名称" ename="inqu_status-0-prdtCode" filter="contains" defultValue="">
template="#=textField#" valueTemplate="#=valueField#" defaultValue="请选择"> <EF:EFOption label="全部" value=""/>
<EF:EFOption label="请选择" value=""/>
<EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/> <EF:EFOptions blockId="invent_name_block_id" textField="textField" valueField="valueField"/>
</EF:EFSelect> </EF:EFSelect>
<EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3"> <EF:EFSelect cname="状态" optionLabel="全部" ename="inqu_status-0-status" colWidth="3">
...@@ -50,7 +49,7 @@ ...@@ -50,7 +49,7 @@
<EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('3','4')"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/> <EF:EFColumn ename="inventRecordId" required="true" cname="产品名称"/>
<%-- <EF:EFColumn ename="prdtName" required="true" cname="产品名称"/>--%> <EF:EFColumn ename="prdtCode" required="true" cname="产品编码" hidden="true"/>
<EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentId" hidden="true" cname="上级产品名称"/>
<EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/> <EF:EFColumn enable="false" ename="parentPrdtName" cname="上级产品名称"/>
<EF:EFColumn ename="num" required="true" cname="数量"/> <EF:EFColumn ename="num" required="true" cname="数量"/>
......
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