• ajax传递数组


    traditional: true,

        var ids=[];
                                 var sendQtys=[];
                                 $(list).each(function(){                                         
                                     var li=this;                                        
                                     ids.push(li.cuttingOperationId);
                                     sendQtys.push(li.sendQty);
                                 });  
                                 // var cids=ids.join(",");
                                 // var csendQtys=sendQtys.join(",");
                                 Util.ajax({
                                     url: 'fms/****/***',
                                     data: {
                                         actualQty:actualQty,
                                         cuttingOperationIdList: ids,
                                         sendQtysList: sendQtys
                                     },
                                     traditional: true,
                                     success: function(data) {
                                         
                                         if(!data.success) {
                                            Message.error(data.msg);
                                        }else{
                                            Message.info(data.msg);
                                            vm.loadStore();
                                            panelVm.close();
                                        }
                                         
                                     }
                                 });

     第二种

    								data: $.param({
    										produceOrderIdList: idList,
    										sapLineNumList:sapLineNumList
    									}, true) ,
    								async: false,
    

      

  • 相关阅读:
    表达式for loop
    用户输入
    字符编码
    变量字符编码
    Python安装
    Python 2 or 3?
    Python解释器
    2017中国大学生程序设计竞赛
    Educational Round 27
    Round #429 (Div.2)
  • 原文地址:https://www.cnblogs.com/Mr-Y1907/p/14776250.html
Copyright © 2020-2023  润新知