diff --git a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml index 76c866c..c2c7d4e 100644 --- a/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml +++ b/WMS-BS/NFine.Web/Areas/WMS/Views/PickMaterial/ICSMOPickMerge.cshtml @@ -217,7 +217,6 @@ } function gridList() { - $("#NF-Material").removeAttr("disabled") var Type = $("#selShow").val(); var $gridList = $("#gridList"); @@ -625,13 +624,17 @@ shrinkToFit: false,//宽度自适应 autowidth: true, loadComplete: function (data) { + $("#NF-Material").removeAttr("onclick"); + $("#NF-Material").attr("onclick", "btnMaterial()"); if (data.msg != '') { $.modalAlert(data.msg, "warning"); return; } else { $('#gridList').jqGrid('setGridParam', { - selarrrow: objList}); + selarrrow: objList + }); + $('#gridList').trigger("reloadGrid"); } }, rowNum: 10000, @@ -721,6 +724,11 @@ // gridList2(flag); //} + function ErrorAlert() { + $.modalAlert("拣料详情尚未加载完成,请耐心等待上一次拣料完成!", "warning"); + return; + } + function btnMaterial() { debugger; //var ISFlag = false; @@ -732,7 +740,6 @@ var arr = []; mark = '拣料'; flag = '1'; - $("#NF-Material").attr("disabled", "disabled") //ChosenList == ""; var objList = $("#gridList").jqGrid('getGridParam', 'selarrrow'); //for (var i in objList) { @@ -794,6 +801,8 @@ if (sign == '0') { // PickID = PickIDs; $("#PickID").val(PickIDs); + $("#NF-Material").removeAttr("onclick"); + $("#NF-Material").attr("onclick", "ErrorAlert()"); gridList2(flag); } if (sign == '1') {