Commit 88101e12 by 江和松

存货档案批量关联工艺流程

parent caceecc1
......@@ -6,7 +6,7 @@ $(function() {
$("#QUERY").on("click", query);
$("#BATCH_FLOW").on("click", function () {
showFlowDetail();
batchFlow();
});
IPLATUI.EFGrid.result = {
......@@ -281,25 +281,45 @@ function showFlowDetail(id,inventCode,flowId) {
});
}
// function showFlowDetail() {
// let rows = resultGrid.getCheckedRows();
// let selectIds = [];
// //selectIds.push(rows[i]['id']);
// if (rows.length < 1) {
// message("请选择数据")
// return;
// }
// $.each(rows, function(index, item) {
// selectIds.push(item.get("id"));
// });
// JSColorbox.open({
// href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentIds=" + selectIds,
// title: "<div style='text-align: center;'>工艺流程</div>",
// width: "75%",
// height: "80%",
// callbackName: cllback2
// });
// }
function batchFlow() {
let rows = resultGrid.getCheckedRows();
let selectIds = [];
if (rows.length < 1) {
message("请选择数据")
return;
}
let inventType;
let flag = true;
$.each(rows, function(index, item) {
selectIds.push(item.get("id"));
//不存在就直接赋值
if(!inventType){
inventType = item.get("inventType")
}else{
//存在就与当前类型对比
if(inventType != item.get("inventType")){
message("只能选择同一个类型存货")
flag = false;
return false;
}
}
if(item.get("flowId") >0 ){
message("只能选择未分配的存货")
flag = false;
return false;
}
});
if(flag){
JSColorbox.open({
href: "HGPZ005B?methodName=initLoad&inqu_status-0-parentIds=" + selectIds,
title: "<div style='text-align: center;'>工艺流程</div>",
width: "75%",
height: "80%",
callbackName: cllback2
});
}
}
/**
* 回调
......
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