Commit a65f6dc3 by wuwenlong

生产入库bugfix

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