zoukankan      html  css  js  c++  java
  • 在Javascript操作JSON对象:增加

     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         }
  • 相关阅读:
    ARTS第八周打卡
    ARTS第七周打卡
    ARTS第六周打卡
    ARTS第五周打卡
    ARTS第四周打卡
    ARTS第三周打卡
    ARTS 第二周
    uniapp——头部导航栏配置
    码云、Git使用教程
    超出文本宽度点点显示——css
  • 原文地址:https://www.cnblogs.com/tomato2014/p/7284187.html
Copyright © 2011-2022 走看看