sth
This commit is contained in:
parent
a5ae44b6a4
commit
3fb6925a8f
|
|
@ -294,17 +294,17 @@ class Ajax extends Backend
|
|||
$province = $this->request->get('province');
|
||||
$city = $this->request->get('city');
|
||||
}
|
||||
$where = ['pid' => 0, 'level' => 1];
|
||||
$where = ['level' => 1];
|
||||
$provincelist = null;
|
||||
if ($province !== null) {
|
||||
$where['pid'] = $province;
|
||||
$where['code'] = ['like',$province."%"];
|
||||
$where['level'] = 2;
|
||||
if ($city !== null) {
|
||||
$where['pid'] = $city;
|
||||
$where['code'] = ['like',$city."%"];
|
||||
$where['level'] = 3;
|
||||
}
|
||||
}
|
||||
$provincelist = Db::name('area')->where($where)->field('id as value,name')->select();
|
||||
$provincelist = Db::name('areas')->where($where)->field('id as value,name')->select();
|
||||
$this->success('', '', $provincelist);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ class Worker extends Backend
|
|||
*/
|
||||
private OrderDispatch $DispatchModel;
|
||||
|
||||
|
||||
protected $relationSearch = true;
|
||||
|
||||
public function _initialize()
|
||||
{
|
||||
parent::_initialize();
|
||||
|
|
@ -124,12 +127,7 @@ class Worker extends Backend
|
|||
$filter['end_time'] = trim($arr[1]);
|
||||
}
|
||||
|
||||
/*unset($filter['daterange']); // 移除 status
|
||||
|
||||
$newFilter = json_encode($filter, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
// 重新赋值到 $_GET,影响 $this->request->get("filter") 后面调用
|
||||
$_GET['filter'] = $newFilter;*/
|
||||
}
|
||||
|
||||
//派单表
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ class Worker extends BaseModel
|
|||
|
||||
public function area()
|
||||
{
|
||||
return $this->belongsTo('Area', 'area_id', 'area_code');
|
||||
return $this->belongsTo('area', 'area_id', 'area_code')->setEagerlyType(0);
|
||||
}
|
||||
|
||||
public function admin()
|
||||
|
|
|
|||
|
|
@ -344,3 +344,18 @@
|
|||
|
||||
<script src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak={$mapkey}&callback=initMap"></script>
|
||||
|
||||
<!--
|
||||
<script id="sourcetpl" type="text/html">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-inline" data-toggle="cxselect" data-selects="province,city,area">
|
||||
<select style="width: 100px;" class="province form-control" name="province_id" data-url="ajax/area" ></select>
|
||||
<input type="hidden" class="operate" data-name="province_id" value="=" />
|
||||
<select style="width: 100px;" class="city form-control" name="city_id" data-url="ajax/area" data-query-name="province"></select>
|
||||
<input type="hidden" class="operate" data-name="city_id" value="=" />
|
||||
<!– <select class="area form-control" name="area_id" data-url="ajax/area" data-query-name="city"></select>
|
||||
<input type="hidden" class="operate" data-name="area_id" value="=" />–>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</script>-->
|
||||
|
|
|
|||
|
|
@ -54,6 +54,14 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
//{field: 'admin_user', title: __('派单员'),operate: "LIKE",visible:false},
|
||||
//{field: 'city_name', title: __('城市'),operate: "LIKE",visible:false},
|
||||
//{field: 'city_name', title: __('城市'),operate: "LIKE",visible:false},
|
||||
|
||||
/*{field: 'area', title: __('城市'), searchList: function (column) {
|
||||
return Template('sourcetpl', {});
|
||||
}
|
||||
},
|
||||
*/
|
||||
{field: 'area.merge_name', title: __('地区'),operate: 'LIKE',visible:false},
|
||||
|
||||
{field: 'daterange', title: __('时间筛选'), addclass:'datetimerange',
|
||||
autocomplete:false,
|
||||
operate: "RANGE",
|
||||
|
|
@ -63,6 +71,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'echarts', 'echarts-t
|
|||
visible:false,
|
||||
defaultValue: Config.default_daterange
|
||||
},
|
||||
|
||||
{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