Commit 5c8f8386 by yukang

自动排产

parent dad2c8e1
...@@ -135,7 +135,17 @@ $(function () { ...@@ -135,7 +135,17 @@ $(function () {
* e.preventDefault 阻止事件发生 * e.preventDefault 阻止事件发生
*/ */
beforeAdd: function (e) { beforeAdd: function (e) {
var lv = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId.lv;
var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true; var logic = IPLATUI.EFTree.materialTree.selectTreeNode.nodeId ? false : true;
if (lv === 3) {
IPLAT.alert({
message: '<b>不能在零件下进行新增</b>',
okFn: function (e) {
},
title: '提示'
});
e.preventDefault();
} else {
if (logic) { // 通过业务逻辑判断, 控制是否进行新增 if (logic) { // 通过业务逻辑判断, 控制是否进行新增
IPLAT.alert({ IPLAT.alert({
message: '<b>请选择项目列表</b>', message: '<b>请选择项目列表</b>',
...@@ -145,6 +155,7 @@ $(function () { ...@@ -145,6 +155,7 @@ $(function () {
}); });
e.preventDefault(); e.preventDefault();
} }
}
}, },
/** /**
* EFGrid新增行时触发的事件,此时数据行tr元素还未渲染 * EFGrid新增行时触发的事件,此时数据行tr元素还未渲染
......
...@@ -135,87 +135,87 @@ function showUploadFile(id) { ...@@ -135,87 +135,87 @@ function showUploadFile(id) {
}); });
} }
function check(id, auditStatus,planInfoNo) { function check(id, auditStatus,planInfoNo) {
// const inEiInfo = new EiInfo(); const inEiInfo = new EiInfo();
// inEiInfo.set("id", id); inEiInfo.set("id", id);
// inEiInfo.set("planInfoNo",planInfoNo); inEiInfo.set("planInfoNo",planInfoNo);
// //先判断本身是否填写 //先判断本身是否填写
// EiCommunicator.send('HPSC003', 'getInfo', inEiInfo, { EiCommunicator.send('HPSC003', 'getInfo', inEiInfo, {
// onSuccess(ei) { onSuccess(ei) {
// var model=ei.get("model"); var model=ei.get("model");
// if(!(model.planCompletionDate).trim()) { if(!(model.planCompletionDate).trim()) {
// NotificationUtil("提交失败!原因:基本信息中计划完成日期未填写", "error"); NotificationUtil("提交失败!原因:基本信息中计划完成日期未填写", "error");
// return; return;
// } else { } else {
// //提交 //提交
// //提交前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行提交 //提交前先判断明细信息中的计划开始和计划结束时间是否都已经填写,只有填写了之后才能进行提交
// if (auditStatus == 1) { if (auditStatus == 1) {
// EiCommunicator.send('HPSC004', 'inspectDetail', inEiInfo, { EiCommunicator.send('HPSC004', 'inspectDetail', inEiInfo, {
// onSuccess(ei) { onSuccess(ei) {
// var list=ei.get("list"); var list=ei.get("list");
// if(list) { if(list) {
// var count = list[0]; var count = list[0];
// if (count > 0) { if (count > 0) {
// NotificationUtil("提交失败!原因:明细信息中有未填写的计划开始时间或计划结束时间", "error"); NotificationUtil("提交失败!原因:明细信息中有未填写的计划开始时间或计划结束时间", "error");
// } else { } else {
// EiCommunicator.send('HPSC004','queryDetail',inEiInfo,{ EiCommunicator.send('HPSC004','queryDetail',inEiInfo,{
// onSuccess(ei){ onSuccess(ei){
// var rows = ei.blocks.detail.rows; var rows = ei.blocks.detail.rows;
// var res = check_time(model,rows); var res = check_time(model,rows);
// if (!res){ if (!res){
// NotificationUtil("计划结束时间应该大于计划开始时间!", "error"); NotificationUtil("计划结束时间应该大于计划开始时间!", "error");
// } }
// else { else {
// // 提交通过,生成 // 提交通过,生成
// EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, { EiCommunicator.send('HPSC003', 'submitPlan', inEiInfo, {
// onSuccess(response) { onSuccess(response) {
// NotificationUtil(response.msg); NotificationUtil(response.msg);
// console.log(response) console.log(response)
// autoProductionschedul(response.get('planInfoNo')); autoProductionschedul(response.get('planInfoNo'));
// resultGrid.dataSource.page(1); resultGrid.dataSource.page(1);
// }, },
// onFail(errorMessage, status, e) { onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error"); NotificationUtil("执行失败!", "error");
// } }
// }, },
// { {
// async: false async: false
// } }
// ); );
// } }
//
//
// }
// })
//
// }
// } else {
// NotificationUtil("提交失败!未找到明细信息", "error");
// }
// },
// onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error");
// }
// },
// {
// async: false
// }
// );
// } else {
// // 撤回
//
// }
// }
// },
// onFail(errorMessage, status, e) {
// NotificationUtil("执行失败!", "error");
// }
// },
// {
// async: false
// }
// );
autoProductionschedul('SCJH24030700006'); }
})
}
} else {
NotificationUtil("提交失败!未找到明细信息", "error");
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
} else {
// 撤回
}
}
},
onFail(errorMessage, status, e) {
NotificationUtil("执行失败!", "error");
}
},
{
async: false
}
);
// autoProductionschedul('SCJH24030700006');
} }
/** /**
...@@ -305,6 +305,7 @@ function saveResult(btn) { ...@@ -305,6 +305,7 @@ function saveResult(btn) {
JSUtils.submitGridsData("result", "HPSC003", "update", true); JSUtils.submitGridsData("result", "HPSC003", "update", true);
//释放禁用按钮 //释放禁用按钮
btn.attr("disabled", false); btn.attr("disabled", false);
query();
} }
}); });
} }
......
...@@ -43,14 +43,14 @@ ...@@ -43,14 +43,14 @@
<EF:EFInput ename="productionOrderNo" type="hidden"/> <EF:EFInput ename="productionOrderNo" type="hidden"/>
<EF:EFGrid blockId="result" autoDraw="override" checkMode="row"> <EF:EFGrid blockId="result" autoDraw="override" checkMode="row">
<EF:EFColumn ename="id" cname="主键" hidden="true"/> <EF:EFColumn ename="id" cname="主键" hidden="true"/>
<EF:EFColumn ename="actualCompletionDate" editType="date" cname="完成日期" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" /> <EF:EFColumn ename="actualCompletionDate" editType="date" required="true" cname="完成日期" dateFormat="yyyy-MM-dd" parseFormats="['yyyyMMdd']" />
<EF:EFColumn ename="hpsc006Id" cname="生产下料ID" hidden="true"/> <EF:EFColumn ename="hpsc006Id" cname="生产下料ID" hidden="true"/>
<EF:EFComboColumn ename="userId" cname="完成人" width="100" align="center" <EF:EFComboColumn ename="userId" cname="完成人" width="100" align="center"
filter="contains" readonly="true"> filter="contains" readonly="true" required="true">
<EF:EFOptions blockId="worker_block_id" valueField="valueField" textField="textField"/> <EF:EFOptions blockId="worker_block_id" valueField="valueField" textField="textField"/>
</EF:EFComboColumn> </EF:EFComboColumn>
<EF:EFColumn ename="userName" cname="完成名称" hidden="true"/> <EF:EFColumn ename="userName" cname="完成名称" hidden="true"/>
<EF:EFColumn ename="actualCompletionNum" cname="完成数量" format="{0:N3}" maxLength="12" displayType="0.000" <EF:EFColumn ename="actualCompletionNum" cname="完成数量" required="true" format="{0:N3}" maxLength="12" displayType="0.000"
data-regex="/^-?[0-9]{1,9}$/" data-regex="/^-?[0-9]{1,9}$/"
data-errorprompt="请输入数字,该值最大可设置9位整数!"/> data-errorprompt="请输入数字,该值最大可设置9位整数!"/>
<EF:EFColumn ename="actualCompletionTotalWt" cname="完成重量(T)" enable="false" format="{0:N3}" maxLength="12" displayType="0.000" <EF:EFColumn ename="actualCompletionTotalWt" cname="完成重量(T)" enable="false" format="{0:N3}" maxLength="12" displayType="0.000"
......
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