Parcourir la source

优化批次列表分页功能

曹鹤洋 il y a 2 ans
Parent
commit
480312b9d5
1 fichiers modifiés avec 8 ajouts et 6 suppressions
  1. 8 6
      Application/Admin/View/Qcode/budadetail.html

+ 8 - 6
Application/Admin/View/Qcode/budadetail.html

@@ -553,12 +553,14 @@
             },
 
 			onLoadSuccess:function(data){
-				if(data.rows[0].l_num == null || data.rows[0].l_num == 0){
-					$("#supTgGrid").datagrid("hideColumn", "l_num"); // 设置隐藏列
-					$("#supTgGrid").datagrid("showColumn", "l_weight"); // 设置显示列
-				}else{
-					$("#supTgGrid").datagrid("hideColumn", "l_weight"); // 设置隐藏列
-					$("#supTgGrid").datagrid("showColumn", "l_num"); // 设置显示列
+				if(data.total){
+					if(data.rows[0].l_num == null || data.rows[0].l_num == 0){
+						$("#supTgGrid").datagrid("hideColumn", "l_num"); // 设置隐藏列
+						$("#supTgGrid").datagrid("showColumn", "l_weight"); // 设置显示列
+					}else{
+						$("#supTgGrid").datagrid("hideColumn", "l_weight"); // 设置隐藏列
+						$("#supTgGrid").datagrid("showColumn", "l_num"); // 设置显示列
+					}
 				}
 			},