Commit a65f6dc3 by wuwenlong

生产入库bugfix

parent 8daa05c3
...@@ -53,8 +53,8 @@ ...@@ -53,8 +53,8 @@
<isNotEmpty prepend=" AND " property="inventName"> <isNotEmpty prepend=" AND " property="inventName">
INVENT_NAME = #inventName# INVENT_NAME = #inventName#
</isNotEmpty> </isNotEmpty>
<isNotEmpty prepend=" AND " property="companCode"> <isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companCode# COMPANY_CODE = #companyCode#
</isNotEmpty> </isNotEmpty>
</sql> </sql>
......
let inventNameGlobalData = []; let inventNameGlobalData = [];
let whNameGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", query); $("#QUERY").on("click", query);
...@@ -11,42 +13,29 @@ $(function () { ...@@ -11,42 +13,29 @@ $(function () {
pageSizes: [10, 20, 30, 50, 100, 200], pageSizes: [10, 20, 30, 50, 100, 200],
}, },
columns: [{ columns: [{
field: "inventCode", field: "whCode",
template: function (dataItem) { template: function (dataItem) {
for (let i = 0; i < inventNameGlobalData.length; i++) { for (let i = 0; i < whNameGlobalData.length; i++) {
if (inventNameGlobalData[i]['valueField'] === dataItem['inventCode']) { if (whNameGlobalData[i]['valueField'] === dataItem['whCode']) {
return inventNameGlobalData[i]['textField']; return whNameGlobalData[i]['textField'];
} }
} }
return ""; return "";
}, },
editor: function (container, options) { editor: function (container, options) {
var grid = container.closest(".k-grid").data("kendoGrid"); let inInfo = new EiInfo();
var cellIndex = grid.cellIndex(container); inInfo.set("inqu_status-0-inventTypes", [3, 4]);
var input = $('<input />'); inInfo.set("inqu_status-0-whType", options.model["inventType"]);
input.attr("name", options.field); inInfo.set("serviceName", "HPPZ007");
input.attr("id", options.field); inInfo.set("methodName", "queryComboBox");
input.appendTo(container); inInfo.set("blockId", "wh_record_block_id");
let eiInfo = new EiInfo(); inInfo.set("field", options.field);
eiInfo.set("inventType", options.model["inventType"]); refreshSelect(container, inInfo);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
inventNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoDropDownList({
valuePrimitive: true,
dataTextField: "textField",
dataValueField: "valueField",
dataSource: dataSource,
template: "#=textField#"
});
} }
}] }],
loadComplete: function (grid) {
// 此grid对象
}
} }
}); });
...@@ -55,8 +44,17 @@ $(function () { ...@@ -55,8 +44,17 @@ $(function () {
* 页面加载时执行 * 页面加载时执行
*/ */
$(window).load(function () { $(window).load(function () {
// 存货名称 // 仓库名称
let inInfo = new EiInfo(); let inInfo = new EiInfo();
inInfo.set("inqu_status-0-inventTypes", [3, 4]);
EiCommunicator.send("HPPZ007", "queryComboBox", inInfo, {
onSuccess: function (ei) {
whNameGlobalData = ei.getBlock("wh_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
// 存货名称
EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, { EiCommunicator.send("HPPZ004", "queryComboBox", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows(); inventNameGlobalData = ei.getBlock("invent_name_block_id").getMappedRows();
......
...@@ -29,14 +29,10 @@ ...@@ -29,14 +29,10 @@
<EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/> <EF:EFColumn ename="productionOrderNo" cname="生产订单号" enable="false" width="130" align="center"/>
<EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true" <EF:EFColumn ename="documentDate" cname="单据日期" width="100" align="center" editType="date" readonly="true"
dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/> dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" required="true"/>
<EF:EFComboColumn cname="仓库名称" ename="whCode" columnTemplate="#=textField#" <EF:EFColumn ename="whCode" cname="仓库名称" width="120" align="center" required="true" readonly="true"/>
itemTemplate="#=textField#" blockName="wh_record_block_id" <EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}"
textField="textField" valueField="valueField" readonly="true"
align="center" filter="contains" width="100">
</EF:EFComboColumn>
<EF:EFColumn cname="数量" ename="amount" width="100" align="right" format="{0:N3}" enable="false"
sumType="all" readonly="true"/> sumType="all" readonly="true"/>
<EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}" enable="false" <EF:EFColumn cname="重量" ename="weight" width="100" align="right" format="{0:N3}"
sumType="all" readonly="true"/> sumType="all" readonly="true"/>
<EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false"> <EF:EFComboColumn cname="存货类型" ename="inventType" width="90" align="center" enable="false">
<EF:EFCodeOption codeName="hpjx.hpkc.inventType"/> <EF:EFCodeOption codeName="hpjx.hpkc.inventType"/>
......
...@@ -26,20 +26,20 @@ $(function () { ...@@ -26,20 +26,20 @@ $(function () {
/** /**
* 生产入库单 * 生产入库单
*/ */
let generateRK = function () { generateRK = function () {
let rows = resultGrid.getCheckedRows(); let rows = resultGrid.getCheckedRows();
if (rows.length < 1) { if (rows.length < 1) {
message("请选择数据"); message("请选择数据");
return; return;
} }
JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据\"取消\"操作? ", { JSUtils.confirm("确定对勾选中的[" + rows.length + "]条数据生成\"入库\"? ", {
ok: function () { ok: function () {
parent.JSColorbox.setValueCallback(rows); parent.JSColorbox.setValueCallback(rows);
} }
}); });
} }
let getOrgCallback = function (orgId) { getOrgCallback = function (orgId) {
$("#inqu_status-0-orgNo").val(orgId); $("#inqu_status-0-orgNo").val(orgId);
JSColorbox.close(); JSColorbox.close();
} }
\ No newline at end of file
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
<EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/> <EF:EFInput blockId="inqu_status" ename="productionOrderNo" cname="生产订单号:" row="0"/>
<EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" /> <EF:EFDatePicker blockId="inqu_status" ename="planCompletionDate" cname="计划完成日期:" row="0" format="yyyy-MM-dd" />
<EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/> <EF:EFInput blockId="inqu_status" ename="orgNo" cname="生产组:" row="0"/>
<EF:EFSelect cname="状态:" optionLabel="全部" blockId="inqu_status" ename="status" row="0" defaultValue=""> <EF:EFInput blockId="inqu_status" ename="status" row="0" value="1" hidden="true"/>
<EF:EFOption label="未派工" value="0"/>
<EF:EFOption label="已派工" value="1"/>
</EF:EFSelect>
</div> </div>
<%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%> <%-- <EF:EFButton ename="QUERY" cname="查询" row="1" class="btn-align-right"></EF:EFButton>--%>
</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