zoukankan      html  css  js  c++  java
  • easyui 查询条件form 数据遍历

           columns:[[
         {field:'ck',checkbox:true,id:'ck'},
         {field:'id',hidden:true,title:'id'},
         {field:'action',title:'操作',align:'center',formatter:formatAction},
               {field:'packetnum',title:'红包编码'},
               {field:'isdisable',title:'启用状态',formatter:formatEnable},
               {field:'remark',title:'备注',align:'center'},
               {field:'rulename',title:'来源',align:'center',formatter:formatRuelName},
             {field:'createdate',title:'生成时间'},
            {field:'startdate',title:'生效时间'},
              {field:'enddate',title:'失效时间'},
              {field:'isused',title:'使用状态',align:'center',formatter:formatUsed},
              {field:'smokeid',title:'领取状态',align:'center',formatter:formatsmokeid},
               {field:'usingdate',title:'使用时间'},
               {field:'usingusername',title:'使用人'}
           ]],
           onBeforeLoad: function(param){//queryForm' form id
       第一种方案:   

     $($('#queryForm').serializeArray()).each(function(){ 
             param[this.name]=this.value; 
                  });

       第二种方案:

        queryParams : getFormJson($("#fm_s")[0]),


        },
        onBeforeSelect:function(){
         return false;
        }

     function getFormJson(form) {
      var o = {};
      var a = $(form).serializeArray();
      $.each(a, function() {
       if (o[this.name] !== undefined) {
        if (!o[this.name].push) {
         o[this.name] = [ o[this.name] ];
        }
        o[this.name].push(this.value || '');
       } else {
        o[this.name] = this.value || '';
       }
      });
      return o;
     }

  • 相关阅读:
    C 数组初始化
    Linux函数之snprintf()[一]
    出现一下错误
    IOS通过post方式发送图片续
    IOS通过post方式发送图片
    TCP和UDP的区别趣解
    [转]Release mode debugging with VC++
    [转]Math For Programmers
    OS:kernel and shell
    Reminder: 8020 rule
  • 原文地址:https://www.cnblogs.com/cuijinlong/p/6681789.html
Copyright © 2011-2022 走看看