tts
This commit is contained in:
parent
e08dc78904
commit
b89642b2b9
|
|
@ -106,6 +106,21 @@ class Item extends Backend
|
||||||
$build->where('area_id', 'like', $area_id . '%');
|
$build->where('area_id', 'like', $area_id . '%');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//来源
|
||||||
|
if(!empty(request()->get('source',null))){
|
||||||
|
$build->where('source',request()->get('source'));
|
||||||
|
}
|
||||||
|
//城市
|
||||||
|
/* if(!empty(request()->post('area_id',null))){
|
||||||
|
$build->where('area_id','LIKE',request()->post('source').'%');
|
||||||
|
}*/
|
||||||
|
|
||||||
|
if(!empty(request()->get('item_id',null))){
|
||||||
|
$item_id =request()->get('item_id');
|
||||||
|
$item_ids = $this->getItemsById($item_id);
|
||||||
|
$item_ids [] = $item_id;
|
||||||
|
$build->whereIn('item_id', $item_ids);
|
||||||
|
}
|
||||||
|
|
||||||
$build->whereBetween('create_time', [$start, $end_at])
|
$build->whereBetween('create_time', [$start, $end_at])
|
||||||
->field([
|
->field([
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<input type="text" class="form-control datetimerange" value = "{$default_daterange}" data-locale='{"format":"YYYY-MM-DD"}' placeholder="指定日期" name="filter[daterange]" id="daterange" autocomplete="off" style="width: 200px;">
|
<input type="text" class="form-control datetimerange" value = "{$default_daterange}" data-locale='{"format":"YYYY-MM-DD"}' placeholder="指定日期" name="filter[daterange]" id="daterange" autocomplete="off" style="width: 200px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group" style="margin-left: 15px;">
|
<!-- <div class="form-group" style="margin-left: 15px;">
|
||||||
<select id="source" data-live-search="true" title="选择订单渠道" name="filter[source]" class="form-control selectpicker show-tick">
|
<select id="source" data-live-search="true" title="选择订单渠道" name="filter[source]" class="form-control selectpicker show-tick">
|
||||||
{foreach $sources as $item}
|
{foreach $sources as $item}
|
||||||
<option value="{$item['id']}">【{$item['ptitle']}】{$item['title']}</option>
|
<option value="{$item['id']}">【{$item['ptitle']}】{$item['title']}</option>
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
<input id="select_item" class="form-control" type="text" autocomplete="off" />
|
<input id="select_item" class="form-control" type="text" autocomplete="off" />
|
||||||
<input id="select_item_id" type="hidden" name="item_id" />
|
<input id="select_item_id" type="hidden" name="item_id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询按钮 -->
|
<!-- 查询按钮 -->
|
||||||
|
|
@ -69,15 +69,34 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-pane fade" id="second">
|
<div class="tab-pane fade" id="second">
|
||||||
<div id="chart-filter-table" style="margin-top:20px;margin-bottom: 30px;">
|
<div id="chart-filter-table" style="margin-top:20px;margin-bottom: 30px;">
|
||||||
|
|
||||||
|
<div style="display: inline-block;width: 300px;position: relative">
|
||||||
|
<select id="source" data-live-search="true" title="选择订单渠道" name="filter[source]" class="form-control selectpicker show-tick">
|
||||||
|
{foreach $sources as $item}
|
||||||
|
<option value="{$item['id']}">【{$item['ptitle']}】{$item['title']}</option>
|
||||||
|
{/foreach}
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;width: 300px;position: relative">
|
<div style="display: inline-block;width: 300px;position: relative">
|
||||||
<input class="form-control" data-toggle="city-picker" type="text" placeholder="地区" id="area-table">
|
<input class="form-control" data-toggle="city-picker" type="text" placeholder="地区" id="area-table">
|
||||||
<input style="display: none" type="text" id="area_id">
|
<input style="display: none" type="text" id="area_id">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style="display: inline-block;width: 200px;position: relative">
|
||||||
|
<div class="col-xs-12">
|
||||||
|
<input id="select_item" class="form-control" type="text" autocomplete="off" />
|
||||||
|
<input id="select_item_id" type="hidden" name="item_id" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div style="display: inline-block;width: 200px;position: relative">
|
<div style="display: inline-block;width: 200px;position: relative">
|
||||||
<input type="text" class="form-control datetimerange" data-locale='{"format":"YYYY-MM-DD"}'
|
<input type="text" class="form-control datetimerange" data-locale='{"format":"YYYY-MM-DD"}'
|
||||||
value = "{$default_daterange}"
|
value = "{$default_daterange}"
|
||||||
placeholder="指定日期" name="filter[daterange]" id="daterange-table" autocomplete="off" style="width: 180px;">
|
placeholder="指定日期" name="filter[daterange]" id="daterange-table" autocomplete="off" style="width: 180px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<!-- 查询按钮 -->
|
<!-- 查询按钮 -->
|
||||||
<button class="btn btn-default" id="filter-btn-table" style="margin-left: 15px;">查询</button>
|
<button class="btn btn-default" id="filter-btn-table" style="margin-left: 15px;">查询</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -76,6 +76,11 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
||||||
|
|
||||||
const area_id = $('#area_id').val();
|
const area_id = $('#area_id').val();
|
||||||
const range = $('#daterange-table').val();
|
const range = $('#daterange-table').val();
|
||||||
|
|
||||||
|
const source1 = $('#source').val();
|
||||||
|
var item_id = $('#item_id').val();
|
||||||
|
|
||||||
|
|
||||||
let data = '';
|
let data = '';
|
||||||
if (area_id !== ''){
|
if (area_id !== ''){
|
||||||
data += 'area_id=' + area_id+'&';
|
data += 'area_id=' + area_id+'&';
|
||||||
|
|
@ -83,6 +88,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
||||||
if (range !== ''){
|
if (range !== ''){
|
||||||
data += 'range=' + range;
|
data += 'range=' + range;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (source1!== ''){
|
||||||
|
data += 'source=' + source1;
|
||||||
|
}
|
||||||
|
if (item_id !== ''){
|
||||||
|
data +='item_id=' + item_id;
|
||||||
|
}
|
||||||
|
|
||||||
// data = encodeURIComponent(data);
|
// data = encodeURIComponent(data);
|
||||||
$("#table2").bootstrapTable('refresh',{
|
$("#table2").bootstrapTable('refresh',{
|
||||||
url:'statistics/item/list?' + data,
|
url:'statistics/item/list?' + data,
|
||||||
|
|
@ -207,16 +220,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
||||||
getChartData: function () {
|
getChartData: function () {
|
||||||
// 获取日期范围值
|
// 获取日期范围值
|
||||||
var daterange = $('#daterange').val();
|
var daterange = $('#daterange').val();
|
||||||
var source = $('#source').val();
|
/* var source = $('#source').val();
|
||||||
var city_id = $('#area_id').val();
|
var city_id = $('#area_id').val();
|
||||||
var item_id = $('#item_id').val();
|
var item_id = $('#item_id').val();
|
||||||
|
*/
|
||||||
// 构建查询参数
|
// 构建查询参数
|
||||||
var params = {
|
var params = {
|
||||||
'daterange': daterange,
|
'daterange': daterange,
|
||||||
'source': source,
|
/* 'source': source,
|
||||||
'area_id': city_id,
|
'area_id': city_id,
|
||||||
'item_id': item_id,
|
'item_id': item_id,*/
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user