js遍历商品编码

function bathAuditGoods(state)
{
    var selections = $("#deliveryGrid").datagrid('getSelections');
    if(selections == null || selections == ''){
        $.messager.alert('提示信息','请选操作的记录','');
        return;
    }else{
            var goodsNos ="";
            for(var i=0;i<selections.length;i++){
                goodsNos +="'"+selections[i].goodsNo+"'"+',';
            }
            goodsNos = goodsNos.substring(0,goodsNos.lastIndexOf(','));
            var message="";
            if(state=="D")
             {
                message="您确定商品编码:"+goodsNos+"提交审核吗?";
             }
            $.messager.confirm('提示信息',message,function(r){
               if(r)
                  {
                    $.post(
                            appPath+"/page/goodsQuertAct/updateState",
                            {"goodsNos":goodsNos,"state":state},
                               function(data){
                                $.messager.alert('提示信息','数据更新成功','info');
                                doQuery();
                               });
                     }
             });
        }
}
上一篇:HDFS经典题目整理


下一篇:Hadoop三大核心组件,hadoop原理