From 4d96e17768ce509f709dbe9fcc88418c86ff0fa7 Mon Sep 17 00:00:00 2001 From: ZHAOTONGHUA <2066753415@qq.com> Date: Tue, 26 Nov 2019 17:15:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BD=A6=E9=99=A9=E6=8F=90=E6=88=90=E5=9B=BA?= =?UTF-8?q?=E5=AE=9A=E8=A1=A8=E5=A4=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/views/finance/ticheng-jisuan.php | 24 ++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/views/finance/ticheng-jisuan.php b/frontend/views/finance/ticheng-jisuan.php index f404201..bf1f76a 100644 --- a/frontend/views/finance/ticheng-jisuan.php +++ b/frontend/views/finance/ticheng-jisuan.php @@ -131,7 +131,7 @@ use \common\libs\MyLib;
- +
@@ -212,9 +212,21 @@ use \common\libs\MyLib; }); return false; } + //固定表头 + function fix(){ + //table设置一定的高度 + var tab=$("#listTable").attr('data-height'); + $('.fixed-table-body').css({'height':tab-100}); + //当浏览器窗口变化时,表头与表格不对齐解决 + $('.table').bootstrapTable(); + $(window).resize(function () { + $('.table').bootstrapTable('resetView'); + }); + } $(function() { search(); + fix(); $('.input-daterange').datepicker({ keyboardNavigation: false, forceParse: false, @@ -233,16 +245,6 @@ use \common\libs\MyLib; } }, 'json'); }); - - //使得table有一定的高度,出现滚动条 - //获取body高度 - var a=$(".gray-bg").height(); - //获取条件选择高度 - var b=$('#searchFrm').height(); - console.log(b); - //获取标题高度 - var c=$('.ibox-title').height(); - $('.fixed-table-body').css({'height': a-b-c-100}); }); endBlock(); ?>