<div style="overflow: hidden;"><div class="table-responsive section-scroll">
<table cellpadding="0" cellspacing="0" style="width: 100%;margin: -1px auto;">
<thead style="width: 100%;">
<tr style="border: none;height: 35px;color: white;">
<th class="table-th-css">订单编号</th>
<th class="table-th-css">手机号</th>
<th class="table-th-css">支付方式</th>
<th class="table-th-css">应付</th>
<th class="table-th-css">实付</th>
<th class="table-th-css">找零</th>
<th class="table-th-css">抹零</th>
<th class="table-th-css">返利</th>
<th class="table-th-css">抵扣</th>
<th class="table-th-css">时间</th>
<th class="table-th-css">状态</th>
<th class="table-th-css">操作</th>
</tr>
</thead>
<tbody>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
<tr>
<td>00050024</td>
<td>15834885029</td>
<td>银联</td>
<td>80.00</td>
<td>100.00</td>
<td>20.00</td>
<td>0.04</td>
<td>+80.00</td>
<td>-0.00</td>
<td>2018-3-18 17:11:30</td>
<td>结账</td>
<td>
<span class="pandian dingdanjilu">订单记录</span>
<span class="pandian dayin">
<a target="_blank" href="/mendian/rukou.php/Home/Tonji/xiaofei_dayin.html" style="color: white;">打印</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
var tableCont = $('.section-scroll tr th'); //获取th
var tableScroll = $('.section-scroll'); //获取滚动条同级的class
function scrollHandle() {
var scrollTop = tableScroll.scrollTop();
// 当滚动距离大于0时设置top及相应的样式
if (scrollTop > 0) {
tableCont.css({
"top": scrollTop + 'px',
});
} else {
// 当滚动距离小于0时设置top及相应的样式
tableCont.css({
"top": scrollTop + 'px',
});
}
}
tableScroll.on('scroll', scrollHandle);