|
|
@@ -30,15 +30,18 @@ class HistoryWorkLists extends BaseWorkerDataLists
|
|
|
'service_status'=>$this->params['service_status']?3:4,
|
|
|
];
|
|
|
|
|
|
+ //查询月数
|
|
|
+ $create_month = !empty($this->params['create_month'])?$this->params['create_month']:date('Y-m');
|
|
|
$list = ServiceWork::where($where)
|
|
|
->field(['id', 'work_sn', 'address', 'title', 'work_status', 'service_status','work_pay_status','finished_time','base_service_fee','service_fee','create_time'])
|
|
|
->append(['work_status_text','service_status_text'])
|
|
|
+ ->whereMonth('create_time', $create_month)
|
|
|
->limit($this->limitOffset, $this->limitLength)
|
|
|
->order(['id' => 'desc'])
|
|
|
->select()
|
|
|
->toArray();
|
|
|
|
|
|
- $this->count = ServiceWork::where($where)->count();
|
|
|
+ $this->count = ServiceWork::where($where)->whereMonth('create_time', $create_month)->count();
|
|
|
|
|
|
return $list;
|
|
|
}
|