<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="/application/views/static/bootstrap-3.3.7-dist/css/bootstrap.min.css">
<script type="text/javascript" src="/application/views/static/bootstrap-3.3.7-dist/js/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" type="text/css" href="/application/views/static/jedate/skin/jedate.css">
<script type="text/javascript" src="/application/views/static/jedate/jquery.jedate.min.js"></script>
<style type="text/css">
.wrap{
width: 350px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
</style>
<script type="text/javascript">
$(document).ready(function(){
$("#download").click(function(){
console.log($("form").serialize());
window.open('http://dwq.xxx.com/OutPutExcel/outExcel/?'+$("form").serialize(), '下载文件');
})
});
$(function() {
$("#time_picker_start").jeDate({
format: "YYYY-MM-DD hh:mm:ss",
isTime: true,
// festival:true,
isinitVal:true,
initAddVal:{DD:"-3"},
minDate: "2014-09-19 00:00:00"
})
})
$(function() {
$("#time_picker_end").jeDate({
format: "YYYY-MM-DD hh:mm:ss",
isTime: true,
// festival:true,
isinitVal:true,
minDate: "2014-09-19 00:00:00"
})
})
</script>
</head>
<body>
<div class="container" style="margin-top: 30px;">
<form class="form-horizontal" action="" method="get" role="form">
<div class="form-group">
<label for="weixin_url" class="col-xs-4 col-sm-2 control-label">模糊搜索</label>
<div class="col-xs-8 col-sm-9">
<input type="text" class="form-control" autofocus="true" name="search" id="weixin_url" value="<?php echo $list['search']; ?>" placeholder="输入地址或者备注即可搜索">
</div>
</div>
<div class="form-group">
<label for="class_selecte" class="col-xs-4 col-sm-2 control-label">起始时间</label>
<div class="col-xs-8 col-sm-9">
<input type="text" class="form-control" name="start_time" id="time_picker_start">
</div>
</div>
<div class="form-group">
<label for="class_selecte" class="col-xs-4 col-sm-2 control-label">终止时间</label>
<div class="col-xs-8 col-sm-9">
<input type="text" class="form-control" name="end_time" id="time_picker_end">
</div>
</div>
<div class="form-group">
<label for="class_selecte" class="col-xs-4 col-sm-2 control-label">导出条数</label>
<div class="col-xs-8 col-sm-9">
<input type="number" class="form-control" name="limit" value="" placeholder="导出行数,要多少写多少,不写默认导出全部">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-xs-8 col-sm-9">
<button type="submit" id="search" class="btn btn-lg btn-success">搜索</button>
<button type="submit" id="download" class="btn btn-lg btn-primary" style="margin-left: 30px">下载</button>
</div>
</div>
</form>
<div class="table table-responsive table-condensed" style="margin-top:30px">
<table class="table table-hover">
<thead>
<tr>
<th>ID</th>
<th>经度</th>
<th>纬度</th>
<th class="wrap">地址名</th>
<th>备注</th>
<th>创建时间</th>
</tr>
</thead>
<tbody>
<?php foreach ($list['list'] as $item): ?>
<tr>
<td><?php echo $item['id']; ?></td>
<td><?php echo $item['lon']; ?></td>
<td><?php echo $item['lat']; ?></td>
<td title="<?php echo $item['address']; ?>">
<div class="wrap">
<?php
if (mb_strlen($item['address']) > 20) {
echo '...' . mb_substr($item['address'], -20);
} else {
echo $item['address'];
}
?>
</div>
</td>
<td title="<?php echo $item['remark']; ?>"><div><?php echo mb_substr($item['remark'], -15); ?></div></td>
<td><?php echo $item['create_time']; ?></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php echo $this->pagination->create_links(); ?>
</div>
</div>
</body>
</html>
最好的日期选择插件jedate完整示例
最新推荐文章于 2024-03-15 11:09:51 发布