提交 2e571391 authored 作者: chengye's avatar chengye

结算列表添加创建时间查询

上级 962f5d8b
......@@ -71,10 +71,29 @@ class Settle extends Base
$this->assign('area_id','');
}
//创建时间查询条件
$dateStart = strtotime(Request::get('date_start'));
$dateEnd = strtotime(Request::get('date_end'));
//区间查询
if( !empty($dateStart) && !empty($dateEnd) ){
$map[] = ['settle.settle_date','between',[$dateStart,$dateEnd]];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end',Request::get('date_end'));
} elseif (!empty($dateStart) && empty($dateEnd)){
$map[] = ['settle.settle_date','>',$dateStart];
$this->assign('date_start',Request::get('date_start'));
$this->assign('date_end','');
} elseif (empty($dateStart) && !empty($dateEnd)){
$map[] = ['settle.settle_date','<',$dateEnd];
$this->assign('date_end',Request::get('date_end'));
$this->assign('date_start','');
}else{
$this->assign('date_start','');
$this->assign('date_end','');
}
$page =Request::param('page')?Request::param('page'):1;
$limit = Request::param('limit')?Request::param('limit'):10;
$region=new ElectricMeter();
$data = (new EmSettle())->getSettleList($map,$page,$limit);
$PaymentCount = (new EmSettle())->getSettleCount($map);
if(Request::param('page')){
......@@ -83,13 +102,6 @@ class Settle extends Base
$region=new ElectricMeter();
$this->assign('regions',getTree($region->regions()));
return $this->fetch();
// $data = (new EmSettle())->getList();
// $page = $data->render();
// $this->assign('data',$data);
// $this->assign('page',$page);
// return $this->fetch();
}
public function createAll(){
......
......@@ -94,7 +94,7 @@
应结: {{ d.settle_amount }} 已结:{{ d.sett_amount }}
</script>
<script type="text/html" id="useage">
上期表数: {{ d.last_sum_numb }} 本次表数:{{ d.current_sum_numb }}
上期: {{ d.last_sum_numb }} 本期:{{ d.current_sum_numb }}
</script>
<script type="text/html" id="repo_numb">
{{ d.current_sum_numb - d.last_sum_numb }}
......
......@@ -36,6 +36,19 @@
{/volist}
</select>
</div>
<div class="layui-input-inline" style="width:100px;">
<select name="cp_date" id="cp_date">
<option value="1">创建日期</option>
</select>
</div>
<div class="layui-input-inline">
<input type="text" name="date_start" id="date_start" placeholder="开始日期" autocomplete="off" class="layui-input" style="width:100px;" value="{$date_start}">
</div>
<div class="layui-input-inline">
<input type="text" name="date_end" style="width:100px;" id="date_end" placeholder="结束日期" autocomplete="off" class="layui-input" value="{$date_end}">
</div>
<div class="layui-input-inline">
<button class="layui-btn" lay-submit="" lay-filter="search">
<i class="layui-icon">&#xe615;</i></button>
......@@ -44,7 +57,7 @@
</div>
<div class="layui-card-body">
<div>
<table class="layui-table" lay-data="{ url:'/settle', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value} }"> <thead>
<table class="layui-table" lay-data="{ url:'/settle', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,area_id:document.getElementById('area_id').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value} }"> <thead>
<tr>
<th lay-data="{templet: '#settle_id',sort: true} ">结算单号</th>
<th lay-data="{field:'invoice_id',sort: true}">账单号</th>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论