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/ticket-tj.php

97 lines
3.8 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">
<form role="form" class="form-horizontal" onsubmit="return search();">
<div class="form-group">
<label class="control-label col-md-1">范围</label>
<div class="col-md-2">
<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="col-md-2">
<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="" />
</div>
</div>
<div class="col-md-3">
<button type="submit" class="btn btn-primary">搜索</button>
</div>
</div>
</form>
<div class="row">
<div class="col-md-12">
<table id="listTable">
<thead>
<tr>
<th width="50" data-field="id">ID</th>
<th data-field="name">名称</th>
<th data-field="total">库存</th>
<th data-field="unuse_total">待出库</th>
<th data-field="use_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>
function refreshList() {
$('#listTable').bootstrapTable('refresh');
}
function search() {
$('#listTable').bootstrapTable('destroy');
$('#listTable').bootstrapTable({
url: "/gift/ticket-tj-json",
pagination: true,
sidePagination: 'server',
queryParams: function(params) {
params.date_type = $('#date_type').val();
params.begin_date = $('#begin_date').val();
params.end_date = $('#end_date').val();
return params;
}
});
return false;
}
$(function() {
$('.input-daterange').datepicker({
keyboardNavigation: false,
forceParse: false,
autoclose: true
});
search();
});
</script>
<?php $this->endBlock(); ?>