Authored by ZhongW

翻页全选BUG

@@ -458,7 +458,9 @@ grid.prototype = { @@ -458,7 +458,9 @@ grid.prototype = {
458 window.batchOperateShelve.push(g.rows[$(this).attr("data-index")]['productSkn']); 458 window.batchOperateShelve.push(g.rows[$(this).attr("data-index")]['productSkn']);
459 } 459 }
460 }else{ 460 }else{
461 - window.batchOperateShelve.splice($.inArray(g.rows[$(this).attr("data-index")]['productSkn'],window.batchOperateShelve),1); 461 + if($.inArray(g.rows[$(this).attr("data-index")]['productSkn'], window.batchOperateShelve) != -1 ){
  462 + window.batchOperateShelve.splice($.inArray(g.rows[$(this).attr("data-index")]['productSkn'],window.batchOperateShelve),1);
  463 + }
462 } 464 }
463 } 465 }
464 /********************************************/ 466 /********************************************/
@@ -83,6 +83,7 @@ var t = new common.tab2({ @@ -83,6 +83,7 @@ var t = new common.tab2({
83 } else { 83 } else {
84 sortFlag = 1; 84 sortFlag = 1;
85 } 85 }
  86 + batchOperateShelve = [];
86 g.init("/goods/netsale/getList"); 87 g.init("/goods/netsale/getList");
87 }, 88 },
88 columns: [{ 89 columns: [{
@@ -476,7 +477,7 @@ $('#onshelve').on('click', function () { @@ -476,7 +477,7 @@ $('#onshelve').on('click', function () {
476 } 477 }
477 skns = skns + value+","; 478 skns = skns + value+",";
478 }); 479 });
479 - htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:100% \">"+skns+"</div>" 480 + htmlContent += "<div class=\"alert alert-danger\" style=\"margin-top:5px;width:100% \">"+skns.substr(0,skns.length-1)+"</div>"
480 } 481 }
481 htmlContent +="<div class=\"form-group\" style=\"float:right \">"+ 482 htmlContent +="<div class=\"form-group\" style=\"float:right \">"+
482 "<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>" 483 "<div style=\"margin-right:10% \" class=\"col-sm-1\"><a id = \"confirmSkn\" class=\"btn btn-info\" href=\"javascript:;\">确定</a></div>"