Commit d3af00e7 by wuwenlong

排产opt;

parent 85cd7cac
......@@ -25,6 +25,8 @@ public class ServiceHGSC005A extends ServiceBase {
public EiInfo initLoad(EiInfo inInfo) {
try {
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());
CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.PLAN_PROCESS_BLOCK_ID), new HashMap<String, Object>(){{
put(HGSC005A.FIELD_plan_code,planCode);
......
......@@ -28,28 +28,34 @@ $(function () {
function schedule() {
var planCode = $("#inqu_status-0-planCode").val();
var inInfo=new EiInfo();
inInfo.set("inqu_status-0-planCode",planCode);
IPLAT.confirm({
title:'提交',
message:'自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?',
okFn:function () {
var inInfo=new EiInfo();
inInfo.set("inqu_status-0-planCode",planCode);
EiCommunicator.send("HGSC005A","schedule",inInfo,{
onSuccess: function (ei) {
if (ei.getStatus() >= 0) {
NotificationUtil(ei);
resultGrid.dataSource.query();
} else {
NotificationUtil(ei, "error");
var isSchedule = $("#inqu_status-0-isSchedule").val();
if(isSchedule&&isSchedule==='1'){
message("当前计划已排产,请手动调整计划!");
return;
}else {
var inInfo = new EiInfo();
inInfo.set("inqu_status-0-planCode", planCode);
IPLAT.confirm({
title: '提交',
message: '自动排产将覆盖原排产数据,且只能执行一次,请谨慎操作,确认对当前数据进行排产?',
okFn: function () {
var inInfo = new EiInfo();
inInfo.set("inqu_status-0-planCode", planCode);
EiCommunicator.send("HGSC005A", "schedule", inInfo, {
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 @@
<EF:EFRegion id="inqu" title="查询条件">
<div class="row">
<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:EFSelect cname="工序" ename="inqu_status-0-processName" colWidth="3" filter="contains">
<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