前台可以这么写:
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里接收
标签:WEB,后台,handler,前台,数组,var,EAS From: https://www.cnblogs.com/ketoli/p/17109382.html