You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
simple-yewu/frontend/views/gift/gift-tj.php

97 lines
3.7 KiB

5 years ago
<?php
use \common\libs\MyLib;
?>
<?php $this->beginBlock('header_css'); ?>
<link href="/assets/css/plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>礼品统计</h5>
<div class="ibox-tools">
<a class="btn btn-primary btn-xs edit-btn" data-id="0" href="javascript:void(0);" onclick="$('#listTable').bootstrapTable('refresh');">
<i class="fa fa-refresh"></i> 刷新
</a>
</div>
</div>
<div class="ibox-content">
5 years ago
<form role="form" id="searchFrm" class="form-inline" onsubmit="return search();">
<div class="form-group" style="margin-bottom: 8px;">
<label for="date_type">范围</label>
<select id="date_type" name="date_type" class="form-control">
<option value="0">全部</option>
<option value="1">出库时间</option>
<option value="2">正本生成时间</option>
<option value="3">提单时间</option>
</select>
</div>
<div class="form-group" style="margin-bottom: 8px;">
<div class="input-daterange input-group" id="datepicker">
<input type="text" class="input-sm form-control" id="begin_date" name="begin_date" autocomplete="off" value="" />
<span class="input-group-addon"></span>
<input type="text" class="input-sm form-control" id="end_date" name="end_date" autocomplete="off" value="" />
5 years ago
</div>
</div>
5 years ago
<button type="submit" class="btn btn-primary mb-8">搜索</button>
5 years ago
</form>
<div class="row">
5 years ago
<div class="col-sm-12">
5 years ago
<table id="listTable">
<thead>
<tr>
<th width="50" data-field="id">ID</th>
<th data-field="name">名称</th>
<th data-field="unout_total">待出库</th>
<th data-field="out_total">已出库</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
<?php $this->beginBlock('footer_js'); ?>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/bootstrap-table-mobile.min.js"></script>
<script src="/assets/js/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
<script>
5 years ago
var o = {};
5 years ago
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
5 years ago
o = {};
var params = $("#searchFrm").serializeArray();
$.each(params, function(index) {
o[this['name']] = this['value'];
});
5 years ago
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/gift/gift-tj-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
5 years ago
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;
5 years ago
}
});
return false;
}
$(function() {
$('.input-daterange').datepicker({
keyboardNavigation: false,
forceParse: false,
autoclose: true
});
search();
});
</script>
<?php $this->endBlock(); ?>