EAS_WEB的后台handler里获取前台传过来的数组

前台可以这么写
bizReqDateChangeFun:function(changeValue,inst){
          var grid = waf("#entries");
         var expenseType_CostCenter = new Array();//这里声明为数组
    var rowCount = grid.wafGrid("getRowCount");
    for (var i = 1; i <= rowCount; i++) {
        var rowId = grid.wafGrid("getRowId", i);
        var expenseType = grid.wafGrid("getCell", rowId, "expenseType");
        var costCenter = grid.wafGrid("getCell", rowId, "costCenter");
        if (expenseType != "" && expenseType != null && costCenter != "" && costCenter != null) {
          var ts = costCenter.number+","+expenseType.number;
          expenseType_CostCenter.push(ts);
        }
    }
	var date = changeValue.current;
	if (date) bizReqDate = date.format("yyyy-MM-dd");
          waf.doPost({
        action: 'RefreshBudgetData',
        data: {"bizReqDate": bizReqDate, "entries": JSON.stringify(expenseType_CostCenter),"type":"2"},//这里转换成json字符串
        success: function (data) {//成功后返回的数据
            if (data) {
                waf.msgBox.showWarning({
                    summaryMsg: '调用handler成功'
                });
            }
        }
    });
        }

  后台的handler里接收

 

posted @ 2023-02-10 16:14  凉了记忆  阅读(17)  评论(0编辑  收藏  举报