|
|
@ -5,6 +5,8 @@ |
|
|
|
<script> |
|
|
|
debugger; |
|
|
|
var flag = '1'; |
|
|
|
var mark = ''; |
|
|
|
var Arguments = ''; |
|
|
|
$(function () { |
|
|
|
gridList(); |
|
|
|
gridList2(flag); |
|
|
@ -243,22 +245,31 @@ |
|
|
|
|
|
|
|
function btnMaterial() { |
|
|
|
debugger; |
|
|
|
var objArr = ''; |
|
|
|
var arr = []; |
|
|
|
mark = '拣料'; |
|
|
|
flag = '1'; |
|
|
|
var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); |
|
|
|
for (var i = 0; i < objList.length; i++) { |
|
|
|
var rowId = objList[i]; |
|
|
|
var rowData = $("#gridList").jqGrid('getRowData', rowId); |
|
|
|
if (rowData.IsNew=="已合并") { |
|
|
|
if (rowData.IsNew == "已合并") { |
|
|
|
$.modalAlert("该单据已合并拣料,无法重复拣料!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
objArr += "'" + rowData.Code + "',"; |
|
|
|
objArr = objArr.slice(0, objArr.length - 1); |
|
|
|
objArr = "" + objArr + "|"; |
|
|
|
arr.push(objArr); |
|
|
|
} |
|
|
|
Arguments = arr; |
|
|
|
gridList2(flag); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function btnMergeMaterial() { |
|
|
|
debugger; |
|
|
|
mark = '合并拣料'; |
|
|
|
var sign = ''; |
|
|
|
flag = '2'; |
|
|
|
var Type = $("#selShow").val(); |
|
|
@ -304,6 +315,51 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function btnPrint() { |
|
|
|
debugger; |
|
|
|
var mold = ''; |
|
|
|
if (mark == '') { |
|
|
|
$.modalAlert("请先拣料再进行打印!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if (mark == '合并拣料') { |
|
|
|
var objArr = ''; |
|
|
|
var arr = []; |
|
|
|
var obj_Item1 = $("#gridList2"); |
|
|
|
var rowIds_Item1 = obj_Item1.getDataIDs(); |
|
|
|
var arrayData_Item1 = new Array(); |
|
|
|
var Enables = ''; |
|
|
|
if (rowIds_Item1.length > 0) { |
|
|
|
debugger; |
|
|
|
for (var i = 0; i < rowIds_Item1.length; i++) { |
|
|
|
var RowData_Item1 = obj_Item1.getRowData(rowIds_Item1[0]); |
|
|
|
objArr += "'" + RowData_Item1.MergeID + "',"; |
|
|
|
objArr = objArr.slice(0, objArr.length - 1); |
|
|
|
objArr = "" + objArr + "|"; |
|
|
|
arr.push(objArr); |
|
|
|
} |
|
|
|
Arguments = arr; |
|
|
|
mold = 'HBJL00001'; |
|
|
|
} |
|
|
|
} |
|
|
|
if (mark == '拣料') { |
|
|
|
mold = 'JL00001'; |
|
|
|
} |
|
|
|
$.modalOpen({ |
|
|
|
id: "PrintLot", |
|
|
|
title: "打印", |
|
|
|
url: "/WMS/Print/PrintView?Arguments=" + encodeURI(encodeURI(Arguments)) + "&mold=" + mold + "&" + Math.random(), |
|
|
|
width: "550px", |
|
|
|
height: "1000px", |
|
|
|
callBack: function (iframeId) { |
|
|
|
top.frames[iframeId].submitForm(); |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function fullscreen() { |
|
|
|
var docElm = document.documentElement; |
|
|
|
if (docElm.requestFullscreen) { |
|
|
@ -330,6 +386,7 @@ |
|
|
|
<div class="btn-group"> |
|
|
|
<a id="NF-Material" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnMaterial()"><i class="fa fa-pencil-square-o"></i>拣料</a> |
|
|
|
<a id="NF-MergeMaterial" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnMergeMaterial()"><i class="fa fa-pencil-square-o"></i>合并拣料</a> |
|
|
|
<a id="NF-Print" authorize="yes" style="margin-left:3px;" class="btn btn-primary" onclick="btnPrint()"><i class="fa fa-pencil-square-o"></i>打印</a> |
|
|
|
<a class="btn btn-primary" onclick="$.reload()"><span class="glyphicon glyphicon-refresh"></span></a> |
|
|
|
|
|
|
|
</div> |
|
|
|