sth
This commit is contained in:
parent
78fe7c4f82
commit
8ad461ca85
|
|
@ -221,7 +221,7 @@ class Orderplan extends Backend
|
|||
}
|
||||
|
||||
|
||||
private function buildDate($build, $table_name = null,$name = 'create_time')
|
||||
private function buildDate($build, $table_name = null,$name = 'audit_time')
|
||||
{
|
||||
$start = now()->modify('-14 days')->format('Y-m-d');
|
||||
$end_at = now()->format('Y-m-d 23:29:59');
|
||||
|
|
|
|||
|
|
@ -121,11 +121,14 @@ class Dispatchrecord extends Backend
|
|||
}
|
||||
|
||||
if($dispatch->type == 1){
|
||||
$timestamp = strtotime('+'.$params['notice_time'].' day'); // 获取明天同一时间的时间戳
|
||||
$params['notice_time'] = date('Y-m-d', $timestamp) . ' 09:00:00'; // 拼接为明天的 9 点
|
||||
//$dispatch->work_progress = $params['rate'];
|
||||
$params['need_notice'] = 0;
|
||||
if(!empty($params['notice_time'])){
|
||||
$timestamp = strtotime('+'.$params['notice_time'].' day'); // 获取明天同一时间的时间戳
|
||||
$params['notice_time'] = date('Y-m-d', $timestamp) . ' 09:00:00'; // 拼接为明天的 9 点
|
||||
//$dispatch->work_progress = $params['rate'];
|
||||
$params['need_notice'] = 1;
|
||||
}
|
||||
|
||||
$params['need_notice'] = 1;
|
||||
//$params['status'] = 1;
|
||||
/* if(!empty($params['rate'])){ //修改任务的状态
|
||||
if($dispatch->status != $params['rate']){
|
||||
|
|
|
|||
|
|
@ -161,12 +161,14 @@ class Dispatcher extends Backend
|
|||
}
|
||||
|
||||
if(!empty($filter['start_time']) && !empty($filter['end_time'])){
|
||||
$time_by = $filter['time_by'] ??1;
|
||||
/*$time_by = $filter['time_by'] ??1;
|
||||
if($time_by == 1){ //按派单时间
|
||||
$time_field = 'dispatch_time';
|
||||
}else{ //按录单时间
|
||||
$time_field = 'create_time';
|
||||
}
|
||||
}*/
|
||||
|
||||
$time_field = 'audit_time';
|
||||
$builder->whereBetween($time_field,[$filter['start_time'],$filter['end_time']]);
|
||||
}
|
||||
//城市
|
||||
|
|
|
|||
|
|
@ -317,10 +317,10 @@ class Worker extends Backend
|
|||
$builder = (new Order())->field($fields);
|
||||
|
||||
if(!empty($filter['start_time'])){
|
||||
$builder->where('create_time','>=',$filter['start_time']);
|
||||
$builder->where('audit_time','>=',$filter['start_time']);
|
||||
}
|
||||
if(!empty($filter['end_time'])){
|
||||
$builder->where('create_time','<=',$filter['end_time']);
|
||||
$builder->where('audit_time','<=',$filter['end_time']);
|
||||
}
|
||||
if(!empty($filter['worker_ids'])){
|
||||
$builder->where('worker_id','in',$filter['worker_ids']);
|
||||
|
|
|
|||
|
|
@ -26,14 +26,14 @@
|
|||
|
||||
<div class="form-inline" id="chart-filter" style="margin-top:20px;margin-bottom: 30px;">
|
||||
<!-- 单选:维度 -->
|
||||
<div class="form-group">
|
||||
<!-- <div class="form-group">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="filter[time_by]" value="1" checked> 派单时间
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="filter[time_by]" value="2"> 录单时间
|
||||
</label>
|
||||
</div>
|
||||
</div>-->
|
||||
|
||||
<!-- 时间范围 -->
|
||||
<div class="form-group" style="margin-left: 15px;">
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user