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,15 +28,20 @@ $(function () { ...@@ -28,15 +28,20 @@ $(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'){
message("当前计划已排产,请手动调整计划!");
return;
}else {
var inInfo = new EiInfo();
inInfo.set("inqu_status-0-planCode", planCode);
IPLAT.confirm({ IPLAT.confirm({
title:'提交', title: '提交',
message:'自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?', message: '自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?',
okFn:function () { okFn: function () {
var inInfo=new EiInfo(); var inInfo = new EiInfo();
inInfo.set("inqu_status-0-planCode",planCode); inInfo.set("inqu_status-0-planCode", planCode);
EiCommunicator.send("HGSC005A","schedule",inInfo,{ EiCommunicator.send("HGSC005A", "schedule", inInfo, {
onSuccess: function (ei) { onSuccess: function (ei) {
if (ei.getStatus() >= 0) { if (ei.getStatus() >= 0) {
NotificationUtil(ei); NotificationUtil(ei);
...@@ -51,5 +56,6 @@ function schedule() { ...@@ -51,5 +56,6 @@ function schedule() {
} }
}); });
} }
}) });
}
} }
...@@ -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