1 // 获取出差人列表信息 2 var tem = this.comp("View_BU_TravelExpense"); 3 tem.setFilter("mike", "View_BU_TravelExpense.fBILLCODE = '" + fTravelBillCode + "'"); 4 tem.refreshData(); 5 6 if (tem.getCount() > 0) { 7 // 增加行 8 var jsonStr; 9 10 var options = { 11 defaultValues : [] 12 }; 13 14 tem.each(function(param) { 15 jsonStr = "{sID:'" + param.row.val('expr1') + "'," + "fJobNumber:'" + param.row.val('fJobNumber') + "'," + "fBusinessPeopleID:'" + param.row.val('fBusinessPeopleID') + "'," 16 + "fBusinessPeople:'" + param.row.val('fBusinessPeople') + "'," + "fDepartment:'" + param.row.val('fDepartment') + "'," + "fPostName:'" + param.row.val('fPostName') + "'," 17 + "fBalance:'" + param.row.val('fBalance') + "'," + "fBorrower:'" + param.row.val('fBorrower') + "'}"; 18 19 // 字符串转成json对象 20 options.defaultValues.push(eval('(' + jsonStr + ')')); 21 22 }); 23 24 datafive.newData(options); 25 }