|
@ -46,7 +46,7 @@ |
|
|
var ct11 = document.getElementById("date4"); |
|
|
var ct11 = document.getElementById("date4"); |
|
|
|
|
|
|
|
|
var cols = new Array(); |
|
|
var cols = new Array(); |
|
|
var collast = { label: "主键", name: "ID", hidden: true, key: true }; |
|
|
|
|
|
|
|
|
var collast = { label: "主键", name: "ID", hidden: true , key: true }; |
|
|
cols.push(collast); |
|
|
cols.push(collast); |
|
|
var collast = { label: '单据号', name: 'Code', width: 120, align: 'left' }; |
|
|
var collast = { label: '单据号', name: 'Code', width: 120, align: 'left' }; |
|
|
cols.push(collast); |
|
|
cols.push(collast); |
|
@ -56,8 +56,8 @@ |
|
|
//cols.push(collast); |
|
|
//cols.push(collast); |
|
|
//var collast = { label: '维护人名称', name: 'MUSERName', width: 80, align: 'left' }; |
|
|
//var collast = { label: '维护人名称', name: 'MUSERName', width: 80, align: 'left' }; |
|
|
//cols.push(collast); |
|
|
//cols.push(collast); |
|
|
var collast = { label: '是否合并拣料', name: 'IsNew', width: 80, align: 'left' }; |
|
|
|
|
|
cols.push(collast); |
|
|
|
|
|
|
|
|
//var collast = { label: '是否合并拣料', name: 'IsNew', width: 80, align: 'left' }; |
|
|
|
|
|
//cols.push(collast); |
|
|
var collast = { label: '占料状态', name: 'IsOccupy', width: 80, align: 'left' }; |
|
|
var collast = { label: '占料状态', name: 'IsOccupy', width: 80, align: 'left' }; |
|
|
cols.push(collast); |
|
|
cols.push(collast); |
|
|
var cols1 = new Array(); |
|
|
var cols1 = new Array(); |
|
@ -231,17 +231,30 @@ |
|
|
shrinkToFit: false,//宽度自适应 |
|
|
shrinkToFit: false,//宽度自适应 |
|
|
autowidth: true, |
|
|
autowidth: true, |
|
|
gridComplete: function () { |
|
|
gridComplete: function () { |
|
|
// debugger; |
|
|
|
|
|
//var PickID = $("#PickID").val(); |
|
|
|
|
|
// if (PickID!='') { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var strIds = $("#gridList").jqGrid("getDataIDs"); |
|
|
|
|
|
|
|
|
|
|
|
for (var i = 0; i < strIds.length; i++) { |
|
|
|
|
|
var strValue = $("#gridList").jqGrid("getCell", strIds[i], "IsOccupy");//得到单元格数据 |
|
|
|
|
|
if (strValue == "已占料") { |
|
|
|
|
|
$("#" + strIds[i]).find("td").css("background-color", "yellow"); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
//onLoadComplete: function(data) { |
|
|
|
|
|
// // 设置行选中 |
|
|
|
|
|
// var PickID = $("#PickID").val(); |
|
|
|
|
|
// if (PickID != '') { |
|
|
// var PickID = PickID.split(','); |
|
|
// var PickID = PickID.split(','); |
|
|
// for (var i = 0; i < PickID.length; i++) { |
|
|
// for (var i = 0; i < PickID.length; i++) { |
|
|
// //$("#gridList").jqGrid('setSelection', PickID[i]); |
|
|
// //$("#gridList").jqGrid('setSelection', PickID[i]); |
|
|
// $("#gridList").jqGrid('setSelection', PickID[i]); |
|
|
|
|
|
|
|
|
// // $("#gridList").jqGrid('setSelection', PickID[i]); |
|
|
|
|
|
// $('#gridList').jqGrid('setSelectionState', PickID[i], true); |
|
|
|
|
|
// // $('#gridList').jqGrid('setSelectionState', '17140e8d-5c4d-4f29-9913-5efc256f6e7f', true); |
|
|
|
|
|
|
|
|
// } |
|
|
// } |
|
|
// } |
|
|
// } |
|
|
}, |
|
|
|
|
|
|
|
|
//}, |
|
|
rowNum: 10000, |
|
|
rowNum: 10000, |
|
|
autoScroll: true, |
|
|
autoScroll: true, |
|
|
sortname: 'Code', |
|
|
sortname: 'Code', |
|
@ -580,13 +593,19 @@ |
|
|
function btnMaterial() { |
|
|
function btnMaterial() { |
|
|
debugger; |
|
|
debugger; |
|
|
//var ISFlag = false; |
|
|
//var ISFlag = false; |
|
|
|
|
|
$("#PickID").val(''); |
|
|
var sign = ''; |
|
|
var sign = ''; |
|
|
var objCode = ''; |
|
|
var objCode = ''; |
|
|
var PickIDs = ''; |
|
|
var PickIDs = ''; |
|
|
var arr = []; |
|
|
var arr = []; |
|
|
mark = '拣料'; |
|
|
mark = '拣料'; |
|
|
flag = '1'; |
|
|
flag = '1'; |
|
|
|
|
|
|
|
|
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); |
|
|
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); |
|
|
|
|
|
if (objList.length<=0) { |
|
|
|
|
|
$.modalAlert("请先选择单据!", "warning"); |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
for (var i = 0; i < objList.length; i++) { |
|
|
for (var i = 0; i < objList.length; i++) { |
|
|
var objArr = ''; |
|
|
var objArr = ''; |
|
|
var rowId = objList[i]; |
|
|
var rowId = objList[i]; |
|
@ -596,8 +615,11 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
PickIDs += "'" + rowId + "',"; |
|
|
PickIDs += "'" + rowId + "',"; |
|
|
|
|
|
if (rowData.Code!=undefined) { |
|
|
objCode += "'" + rowData.Code + "',"; |
|
|
objCode += "'" + rowData.Code + "',"; |
|
|
objArr += "'" + rowData.Code + "',"; |
|
|
objArr += "'" + rowData.Code + "',"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
objArr = objArr.slice(0, objArr.length - 1); |
|
|
objArr = objArr.slice(0, objArr.length - 1); |
|
|
objArr = "" + objArr + "|"; |
|
|
objArr = "" + objArr + "|"; |
|
|
arr.push(objArr); |
|
|
arr.push(objArr); |
|
@ -613,7 +635,7 @@ |
|
|
}); |
|
|
}); |
|
|
if (sign == '0') { |
|
|
if (sign == '0') { |
|
|
// PickID = PickIDs; |
|
|
// PickID = PickIDs; |
|
|
//$("#PickID").val(PickIDs); |
|
|
|
|
|
|
|
|
$("#PickID").val(PickIDs); |
|
|
gridList2(flag); |
|
|
gridList2(flag); |
|
|
} |
|
|
} |
|
|
if (sign == '1') { |
|
|
if (sign == '1') { |
|
@ -621,7 +643,10 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (sign == '2') { |
|
|
if (sign == '2') { |
|
|
//$("#PickID").val(PickIDs); |
|
|
|
|
|
|
|
|
$("#PickID").val(PickIDs); |
|
|
|
|
|
// $.modalAlert("所选单据已占料,可直接打印!", "warning"); |
|
|
|
|
|
$.modalMsg("所选单据已占料,可直接打印!", "warning"); |
|
|
|
|
|
|
|
|
gridList3(); |
|
|
gridList3(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -804,7 +829,10 @@ |
|
|
var rowId = objList[i]; |
|
|
var rowId = objList[i]; |
|
|
var rowData = $("#gridList").jqGrid('getRowData', rowId); |
|
|
var rowData = $("#gridList").jqGrid('getRowData', rowId); |
|
|
//if (rowData.IsOccupy == "已占料") { |
|
|
//if (rowData.IsOccupy == "已占料") { |
|
|
|
|
|
if (rowData.Code!=undefined) { |
|
|
objCode += "'" + rowData.Code + "',"; |
|
|
objCode += "'" + rowData.Code + "',"; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// ISFlag = ISFlag + 1; |
|
|
// ISFlag = ISFlag + 1; |
|
|
//} |
|
|
//} |
|
|
} |
|
|
} |
|
|