tts
This commit is contained in:
parent
67fa2b7697
commit
e2c2ea0086
|
|
@ -178,10 +178,15 @@ class Item extends Backend
|
|||
$build = $build
|
||||
->whereBetween('create_time', [$start, $end_at]);
|
||||
|
||||
//来源
|
||||
if(!empty(request()->post('source',null))){
|
||||
$build->where('source',request()->post('source'));
|
||||
}
|
||||
|
||||
//城市
|
||||
if(!empty(request()->post('area_id',null))){
|
||||
$build->where('area_id','LIKE',request()->post('source').'%');
|
||||
}
|
||||
|
||||
$res = $build->field([
|
||||
'item_title name', // 类型
|
||||
|
|
|
|||
|
|
@ -37,6 +37,15 @@
|
|||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group" style="margin-left: 15px;">
|
||||
<div class="col-xs-12">
|
||||
<input id="select_city" class="form-control" data-toggle="city-picker" type="text" />
|
||||
<input id="select_area_id" type="hidden" class="operate" name="area_id" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 查询按钮 -->
|
||||
<button class="btn btn-default" id="filter-btn" style="margin-left: 15px;">查询</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -88,6 +88,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
url:'statistics/item/list?' + data,
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
$("#select_city").on("cp:updated", function () {
|
||||
console.log(123);
|
||||
var citypicker = $(this).data("citypicker");
|
||||
var code = citypicker.getCode("district") || citypicker.getCode("city") || citypicker.getCode("province");
|
||||
$("#select_area_id").val(code);
|
||||
});
|
||||
},
|
||||
|
||||
add: function () {
|
||||
|
|
@ -188,11 +196,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
// 获取日期范围值
|
||||
var daterange = $('#daterange').val();
|
||||
var source = $('#source').val();
|
||||
var city_id = $('#area_id').val();
|
||||
var item_id = $('#item_id').val();
|
||||
|
||||
// 构建查询参数
|
||||
var params = {
|
||||
'daterange': daterange,
|
||||
'source': source
|
||||
'source': source,
|
||||
'area_id': city_id,
|
||||
};
|
||||
|
||||
$.ajax({
|
||||
|
|
@ -207,7 +218,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
console.error("图表数据加载失败");
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
}
|
||||
};
|
||||
return Controller;
|
||||
|
|
|
|||
|
|
@ -83,8 +83,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
visible: false
|
||||
},
|
||||
|
||||
{field: 'item_id', title: __('工程'), searchList:$.getJSON("ajax/getItems"),operate: 'IN',visible:false},
|
||||
|
||||
{field: 'item_id', title: __('工种'), searchList:$.getJSON("ajax/getItems"),operate: 'IN',visible:false},
|
||||
|
||||
{field: 'operate', title: __('Operate'), table: table2, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||
buttons: [
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user