|
|
@@ -9,18 +9,17 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'LodopFuncs'], functi
|
|
|
|
|
|
|
|
|
//绑定
|
|
|
- // $('#exp').click(function (e) {
|
|
|
- // // var ids = $('#table1').bootstrapTable('getSelections')[0]['id'];
|
|
|
- //
|
|
|
- // $.get('qcode_bach/vo2',{},function (data) {
|
|
|
- // // if(data.code==1){
|
|
|
- // // Toastr.success(data.msg)
|
|
|
- // // $('#table2').bootstrapTable('refresh');
|
|
|
- // // }else{
|
|
|
- // // Toastr.error(data.msg)
|
|
|
- // // }
|
|
|
- // },'json');
|
|
|
+ $('#exp').click(function (e) {
|
|
|
|
|
|
+ $.get('qcode_bach/exp', {}, function (data) {
|
|
|
+ if(data.code==1){
|
|
|
+ top.window.$('[addtabs="'+data.data.id+'"]').trigger("click");
|
|
|
+ }else{
|
|
|
+ Toastr.error(data.msg)
|
|
|
+ }
|
|
|
+ }, 'json');
|
|
|
+ })
|
|
|
+ // var ids = $('#table1').bootstrapTable('getSelections')[0]['id'];
|
|
|
// layer.confirm('确定提交选中的 1 项?!', {
|
|
|
// btn: ['确定', '取消'],
|
|
|
// cancel: function(index, layero) {
|
|
|
@@ -203,13 +202,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'LodopFuncs'], functi
|
|
|
]
|
|
|
],
|
|
|
onLoadSuccess:function(data){
|
|
|
- if(data.rows[0].l_num == null || data.rows[0].l_num == 0){
|
|
|
- $("#table2").bootstrapTable("hideColumn", "l_num"); // 设置隐藏列
|
|
|
- $("#table2").bootstrapTable("showColumn", "l_weight"); // 设置显示列
|
|
|
- }else{
|
|
|
- $("#table2").bootstrapTable("hideColumn", "l_weight"); // 设置隐藏列
|
|
|
- $("#table2").bootstrapTable("showColumn", "l_num"); // 设置显示列
|
|
|
+ if (data.rows[0]!=undefined){
|
|
|
+ if(data.rows[0].l_num == null || data.rows[0].l_num == 0){
|
|
|
+ $("#table2").bootstrapTable("hideColumn", "l_num"); // 设置隐藏列
|
|
|
+ $("#table2").bootstrapTable("showColumn", "l_weight"); // 设置显示列
|
|
|
+ }else{
|
|
|
+ $("#table2").bootstrapTable("hideColumn", "l_weight"); // 设置隐藏列
|
|
|
+ $("#table2").bootstrapTable("showColumn", "l_num"); // 设置显示列
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
});
|
|
|
|