Commit ee990627 by liulei

新增材料,材料名称做输入下拉.工厂与下料组在新增时录入.取消批量派单功能

parent 922bf3cd
...@@ -44,6 +44,8 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -44,6 +44,8 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC005 HPSC005 = new HPSC005(); HPSC005 HPSC005 = new HPSC005();
EiInfo outInfo = super.initLoad(inInfo, HPSC005); EiInfo outInfo = super.initLoad(inInfo, HPSC005);
outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata); outInfo.addBlock(EiConstant.resultBlock).addBlockMeta(HPSC005.eiMetadata);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
} catch (Exception e) { } catch (Exception e) {
LogUtils.setDetailMsg(inInfo, e, "初始化失败"); LogUtils.setDetailMsg(inInfo, e, "初始化失败");
} }
...@@ -72,11 +74,13 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -72,11 +74,13 @@ public class ServiceHPSC006 extends ServiceBase {
//添加返回到前台的块,块名和前台的对应 //添加返回到前台的块,块名和前台的对应
EiBlock eiBlock = outInfo.addBlock("result"); EiBlock eiBlock = outInfo.addBlock("result");
HashMap params = new HashMap(); HashMap params = new HashMap();
params.put("productionOrderNo",inInfo.get("productionOrderNo")); params.put("productionOrderNo",inInfo.get("prodOrderNo"));
List list = dao.query("HPSC006.queryDetail",params,0,-999999); List list = dao.query("HPSC006.queryDetail",params,0,-999999);
outInfo.addBlock("detail").addBlockMeta(HPSC006.eiMetadata); outInfo.addBlock("detail").addBlockMeta(HPSC006.eiMetadata);
outInfo.addBlock("detail").addRows(list); outInfo.addBlock("detail").addRows(list);
outInfo.getBlock("detail").set("limit", list.size()); outInfo.getBlock("detail").set("limit", list.size());
CommonMethod.initBlock(outInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null, false);
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.FACTORY_RECORD_BLOCK_ID), null, false);
return outInfo; return outInfo;
} }
...@@ -106,6 +110,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -106,6 +110,7 @@ public class ServiceHPSC006 extends ServiceBase {
HPSC006.setStatus(CommonConstant.YesNo.NO_0.intValue()); HPSC006.setStatus(CommonConstant.YesNo.NO_0.intValue());
HPSC006.setTotalWt(totalWt); HPSC006.setTotalWt(totalWt);
HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName())); HPSC006.setInventCode(HPPZTools.checkAndSavePZ04(HPSC006.getInventType(),HPSC006.getInventName()));
HPSC006.setStatus(1);
DaoUtils.insert("HPSC006.insert",HPSC006); DaoUtils.insert("HPSC006.insert",HPSC006);
} }
inInfo.setStatus(EiConstant.STATUS_SUCCESS); inInfo.setStatus(EiConstant.STATUS_SUCCESS);
...@@ -166,7 +171,7 @@ public class ServiceHPSC006 extends ServiceBase { ...@@ -166,7 +171,7 @@ public class ServiceHPSC006 extends ServiceBase {
@OperationLogAnnotation(operModul = "生产下料",operType = "删除",operDesc = "删除") @OperationLogAnnotation(operModul = "生产下料",operType = "删除",operDesc = "删除")
public EiInfo delete(EiInfo eiInfo) { public EiInfo delete(EiInfo eiInfo) {
HPSC006 HPSC006 = new HPSC006(); HPSC006 HPSC006 = new HPSC006();
EiBlock eiBlock = eiInfo.getBlock(EiConstant.resultBlock); EiBlock eiBlock = eiInfo.getBlock("detail");
try { try {
for (int i = 0; i < eiBlock.getRowCount(); i++) { for (int i = 0; i < eiBlock.getRowCount(); i++) {
Map<?, ?> map = eiBlock.getRow(i); Map<?, ?> map = eiBlock.getRow(i);
......
...@@ -60,6 +60,7 @@ function query() { ...@@ -60,6 +60,7 @@ function query() {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
/** /**
* 拆单派工 * 拆单派工
* *
...@@ -166,3 +167,8 @@ function showGroupDetail(prodOrderNo) { ...@@ -166,3 +167,8 @@ function showGroupDetail(prodOrderNo) {
window.open("HPSC005B?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo) window.open("HPSC005B?methodName=initLoad&inqu_status-0-prodOrderNo=" + prodOrderNo)
} }
$(window).load(function () {
// 查询
query();
});
ids = []; ids = [];
prdtNameGlobalData = [];
factoryGroupGlobalData = [];
$(function () { $(function () {
$("#QUERY").on("click", function () { $("#QUERY").on("click", function () {
...@@ -60,7 +62,7 @@ $(function () { ...@@ -60,7 +62,7 @@ $(function () {
var projCode = e.model['projCode']; var projCode = e.model['projCode'];
var projName = e.model['projName']; var projName = e.model['projName'];
info.set("prodOrderNo",prodOrderNo); info.set("prodOrderNo",productionOrderNo);
EiCommunicator.send("HPSC006","queryDetail",info,{ EiCommunicator.send("HPSC006","queryDetail",info,{
onSuccess:function(ei){//返回结果集 onSuccess:function(ei){//返回结果集
detailGrid.setEiInfo(ei); detailGrid.setEiInfo(ei);
...@@ -108,10 +110,69 @@ $(function () { ...@@ -108,10 +110,69 @@ $(function () {
} }
},{ },{
field: "inventName", field: "inventName",
query: function (container, options) { title: "材料名称",
template: function (dataItem) {
for (let i = 0; i < prdtNameGlobalData.length; i++) {
if (prdtNameGlobalData[i]['textField'] === dataItem['prdtName']) {
//dataItem["prdtCode"] = prdtNameGlobalData[i]['valueField']
resultGrid.setCellValue(0, "prdtCode", prdtNameGlobalData[i]['valueField']);
return prdtNameGlobalData[i]['textField'];
}
}
return dataItem["inventName"];
},
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(); let eiInfo = new EiInfo();
eiInfo.set("inventType", "7"); eiInfo.set("inventType", 7);
return eiInfo; eiInfo.set("isSplicingSymbol",false);
var dataSource;
EiCommunicator.send("HPPZ004", "queryComboBox", eiInfo, {
onSuccess: function (ei) {
dataSource = ei.getBlock("invent_name_block_id").getMappedRows();
prdtNameGlobalData = dataSource;
},
onFail: function (ei) {
}
}, {async: false});
input.kendoAutoComplete({
valuePrimitive: true,
dataSource: dataSource,
dataTextField: "textField",
dataValueField: "valueField",
required: "true",
optionLabelTemplate: "#:textField#",
valueTemplate: "#:valueField#",
template: "#:textField#",
filter: "contains"
});
}
},
{
field: "orgNo",
template: function (dataItem) {
for (let i = 0; i < factoryGroupGlobalData.length; i++) {
if (factoryGroupGlobalData[i]['valueField'] === dataItem['orgNo']) {
return factoryGroupGlobalData[i]['textField'];
}
}
return "";
},
editor: function (container, options) {
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-factoryCode", options.model["factoryCode"]);
// 1:生产组
inInfo.set("inqu_status-0-groupType", 1);
inInfo.set("serviceName", "HPPZ011");
inInfo.set("methodName", "queryGroupComboBox");
inInfo.set("blockId", "group_record_block_id");
inInfo.set("field", options.field);
refreshSelect(container, inInfo);
} }
} }
], ],
...@@ -119,10 +180,32 @@ $(function () { ...@@ -119,10 +180,32 @@ $(function () {
} }
} }
}); });
query = function () { query = function () {
resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
} }
/**
* 页面加载时执行
*/
$(window).load(function () {
// 生产组名称
let inInfo = new EiInfo();
inInfo.set("inqu_status-0-groupType", 1);
EiCommunicator.send("HPPZ011", "queryGroupComboBox", inInfo, {
onSuccess: function (ei) {
factoryGroupGlobalData = ei.getBlock("group_record_block_id").getMappedRows();
},
onFail: function (ei) {
}
}, {async: false});
});
function showUploadFile(id) { function showUploadFile(id) {
JSColorbox.open({ JSColorbox.open({
href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-id=" + id, href: "HPSC002A?methodName=initLoad&inqu_status-0-bizType=XL&inqu_status-0-id=" + id,
......
...@@ -46,38 +46,44 @@ ...@@ -46,38 +46,44 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="detail" autoDraw="no"> <EF:EFGrid blockId="detail" autoDraw="no">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<%-- <EF:EFComboColumn cname="材料类型" ename="inventType" width="90" align="center" required="true">--%> <EF:EFComboColumn cname="材料类型" ename="inventType" width="80" align="center" required="true" >
<%-- <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>--%> <EF:EFCodeOption codeName="hpjx.hpkc.inventType" condition="ITEM_CODE IN ('7')"/>
<%-- </EF:EFComboColumn>--%> </EF:EFComboColumn>
<EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid" <%-- <EF:EFPopupColumn ename="inventName" cname="材料名称" width="200" popupType="ServiceGrid"
popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id" popupTitle="材料信息" serviceName="HPPZ004" methodName="queryComboBox" resultId="invent_name_block_id"
columnEnames="textField,valueField" columnEnames="textField,valueField"
columnCnames="材料名称,材料编码" columnCnames="材料名称,材料编码"
backFillColumnIds="textField,valueField" backFillColumnIds="textField,valueField"
backFillFieldIds="inventName,inventCode" backFillFieldIds="inventName,inventCode"
valueField="textField" textField="textField"/> valueField="textField" textField="textField"/>--%>
<EF:EFColumn ename="inventName" cname="材料名称" width="200" align="center" required="true" maxLength="50"/>
<EF:EFColumn ename="inventCode" enable="false" cname="材料编码" hidden="true"/> <EF:EFColumn ename="inventCode" enable="false" cname="材料编码" hidden="true"/>
<EF:EFColumn ename="inventLength" cname="长" format="{0:N3}"/> <EF:EFColumn ename="inventLength" width="80" cname="长" format="{0:N3}"/>
<EF:EFColumn ename="inventWidth" cname="宽" format="{0:N3}"/> <EF:EFColumn ename="inventWidth" width="80" cname="宽" format="{0:N3}"/>
<EF:EFColumn ename="inventThick" cname="厚" format="{0:N3}"/> <EF:EFColumn ename="inventThick" width="80" cname="厚" format="{0:N3}"/>
<EF:EFColumn ename="material" cname="材质" /> <EF:EFColumn ename="material" width="80" cname="材质" />
<EF:EFColumn ename="remark" cname="备注" /> <EF:EFColumn ename="remark" cname="备注" />
<EF:EFColumn ename="num" cname="计划数量"/> <EF:EFColumn ename="num" width="80" cname="数量"/>
<EF:EFColumn ename="unitWt" format="{0:N3}" cname="计划单重"/> <EF:EFColumn ename="unitWt" format="{0:N3}" width="80" cname="单重"/>
<EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" cname="计划总重"/> <EF:EFColumn enable="false" format="{0:N3}" ename="totalWt" width="80" cname="总重"/>
<EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150"/> <EF:EFColumn ename="planCompletionDate" required='true' cname="计划完成时间" editType="date" dateFormat="yyyy/MM/dd" width="120"/>
<EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="150" <EF:EFColumn ename="actualCompletionDate" cname="实际完成时间" editType="date" dateFormat="yyyy/MM/dd" width="120"
enable="false"/> enable="false"/>
<EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionNum" cname="实际完工数量" width="100" readonly="true"/>
<EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="实际完工重量" readonly="true"/> <EF:EFColumn enable="false" ename="actualCompletionTotalWt" cname="实际完工重量" width="100" readonly="true"/>
<EF:EFComboColumn enable="false" align="center" ename="status" cname="状态"> <EF:EFComboColumn enable="false" align="center" ename="status" width="80" cname="状态">
<EF:EFOption label="计划中" value="0"/> <EF:EFOption label="计划中" value="0"/>
<EF:EFOption label="生产中" value="1"/> <EF:EFOption label="生产中" value="1"/>
<EF:EFOption label="已完成" value="2"/> <EF:EFOption label="已完成" value="2"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn enable="false" ename="factoryName" cname="厂区名称"/> <EF:EFComboColumn ename="factoryCode" cname="厂区" width="110" align="center" required="true"
<EF:EFColumn enable="false" ename="orgName" cname="生产组"/> filter="contains" readonly="true">
<EF:EFColumn ename="operator" cname="操作" width="100" enable="false" readonly="false"/> <EF:EFOptions blockId="factory_record_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn>
<EF:EFColumn enable="false" ename="factoryName" cname="厂区名称" hidden="true"/>
<EF:EFColumn ename="orgNo" cname="生产组" width="110" align="center" required="true" readonly="true"/>
<EF:EFColumn enable="false" ename="orgName" cname="生产组" hidden="true"/>
<EF:EFColumn ename="operator" cname="操作" width="140" enable="false" readonly="false"/>
</EF:EFGrid> </EF:EFGrid>
</EF:EFRegion> </EF:EFRegion>
</EF:EFPage> </EF:EFPage>
......
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