chenrj-PC\chenrj 9 лет назад
Родитель
Сommit
dccd8e7977
2 измененных файлов с 6 добавлено и 2 удалено
  1. 3 1
      VisualInspection/js/lib/mytable.js
  2. 3 1
      VisualInspection/js/util/util.js

+ 3 - 1
VisualInspection/js/lib/mytable.js

@@ -55,6 +55,8 @@
             // var obj = this.obj;
             post_common_service(url+"/"+p_cur+"/"+page_size, param, function(data) {
                 // $(element).html("");
+                 // 这边把请求过来的数据缓存到table选择器中
+                $(element).data("data_cache",data.list);
                 element.tt_data=data.list;
                 options.tableData=data.list;
                 obj.setTable(data.list,element, options,p_cur); 
@@ -117,7 +119,7 @@
                         }else if(obj[cols[i].field])
                             dArr.push(obj[cols[i].field]);
                         else 
-                            dArr.push('');
+                            dArr.push('0');
                     }
                     
                 }

+ 3 - 1
VisualInspection/js/util/util.js

@@ -125,7 +125,9 @@ function showPopup4Common(title,callback,area){
         shade: 0 ,//不显示遮罩
         yes: function(index){
             callback();
-            layer.close(index);
+             if(callback()!=false){
+                layer.close(index);
+            }
         }
     });
 }