Commit d3af00e7 by wuwenlong

排产opt;

parent 85cd7cac
...@@ -25,6 +25,8 @@ public class ServiceHGSC005A extends ServiceBase { ...@@ -25,6 +25,8 @@ public class ServiceHGSC005A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) { public EiInfo initLoad(EiInfo inInfo) {
try { try {
String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code); String planCode = inInfo.getCellStr(EiConstant.queryBlock,0,HGSC005A.FIELD_plan_code);
HGSC005 hgsc005 = HGSCTools.THGSC005.queryByPlanCode(planCode);
inInfo.setCell(EiConstant.queryBlock,0,HGSC005.FIELD_is_schedule,hgsc005.getIsSchedule());
inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A()); inInfo = super.query(inInfo, HGSC005A.QUERY, new HGSC005A());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{ CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{
put(HGSC005A.FIELD_plan_code,planCode); put(HGSC005A.FIELD_plan_code,planCode);
......
...@@ -28,28 +28,34 @@ $(function () { ...@@ -28,28 +28,34 @@ $(function () {
function schedule() { function schedule() {
var planCode = $("#inqu_status-0-planCode").val(); var planCode = $("#inqu_status-0-planCode").val();
var inInfo=new EiInfo(); var isSchedule = $("#inqu_status-0-isSchedule").val();
inInfo.set("inqu_status-0-planCode",planCode); if(isSchedule&&isSchedule==='1'){
IPLAT.confirm({ message("当前计划已排产,请手动调整计划!");
title:'提交', return;
message:'自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?', }else {
okFn:function () { var inInfo = new EiInfo();
var inInfo=new EiInfo(); inInfo.set("inqu_status-0-planCode", planCode);
inInfo.set("inqu_status-0-planCode",planCode); IPLAT.confirm({
EiCommunicator.send("HGSC005A","schedule",inInfo,{ title: '提交',
onSuccess: function (ei) { message: '自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?',
if (ei.getStatus() >= 0) { okFn: function () {
NotificationUtil(ei); var inInfo = new EiInfo();
resultGrid.dataSource.query(); inInfo.set("inqu_status-0-planCode", planCode);
} else { EiCommunicator.send("HGSC005A", "schedule", inInfo, {
NotificationUtil(ei, "error"); onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
}
},
onFail: function (ei) {
// 发生异常
NotificationUtil("操作失败,原因[" + ei + "]", "error");
} }
}, });
onFail: function (ei) { }
// 发生异常 });
NotificationUtil("操作失败,原因[" + ei + "]", "error"); }
}
});
}
})
} }
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
<EF:EFRegion id="inqu" title="查询条件"> <EF:EFRegion id="inqu" title="查询条件">
<div class="row"> <div class="row">
<EF:EFInput ename="inqu_status-0-planCode" cname="计划编码" type="hidden"/> <EF:EFInput ename="inqu_status-0-planCode" cname="计划编码" type="hidden"/>
<EF:EFInput ename="inqu_status-0-isSchedule" cname="是否排产" type="hidden"/>
<EF:EFInput ename="inqu_status-0-productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/> <EF:EFInput ename="inqu_status-0-productName" cname="产品名称" placeholder="模糊查询" colWidth="3"/>
<EF:EFSelect cname="工序" ename="inqu_status-0-processName" colWidth="3" filter="contains"> <EF:EFSelect cname="工序" ename="inqu_status-0-processName" colWidth="3" filter="contains">
<EF:EFOptions blockId="plan_process_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="plan_process_block_id" valueField="valueField" textField="textField"/>
......
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