项目管理模块工作记录读取错误bug修正
This commit is contained in:
parent
a06cfd5c4c
commit
3a6fc1cbb5
@ -23,24 +23,25 @@ class Schedule extends BaseController
|
|||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
||||||
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
||||||
|
$tid = isset($param['tid']) ? $param['tid'] : 0;
|
||||||
$where = [];
|
$where = [];
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
if ($tid>0) {
|
||||||
$where[] = ['a.start_time', 'between', [$start_time, $end_time]];
|
|
||||||
}
|
|
||||||
if (!empty($param['tid']) && $param['tid']>0) {
|
|
||||||
$task_ids = Db::name('ProjectTask')->where(['delete_time' => 0, 'project_id' => $param['tid']])->column('id');
|
$task_ids = Db::name('ProjectTask')->where(['delete_time' => 0, 'project_id' => $param['tid']])->column('id');
|
||||||
if (!empty($task_ids)) {
|
|
||||||
$where[] = ['a.tid', 'in', $task_ids];
|
$where[] = ['a.tid', 'in', $task_ids];
|
||||||
}
|
}
|
||||||
}
|
else{
|
||||||
if (!empty($param['keywords'])) {
|
|
||||||
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
|
||||||
}
|
|
||||||
if (!empty($param['uid'])) {
|
if (!empty($param['uid'])) {
|
||||||
$where[] = ['a.admin_id', '=', $param['uid']];
|
$where[] = ['a.admin_id', '=', $param['uid']];
|
||||||
} else {
|
} else {
|
||||||
$where[] = ['a.admin_id', '=', $this->uid];
|
$where[] = ['a.admin_id', '=', $this->uid];
|
||||||
}
|
}
|
||||||
|
if (!empty($param['keywords'])) {
|
||||||
|
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
||||||
|
}
|
||||||
|
if ($start_time > 0 && $end_time > 0) {
|
||||||
|
$where[] = ['a.start_time', 'between', [$start_time, $end_time]];
|
||||||
|
}
|
||||||
|
}
|
||||||
$where[] = ['a.delete_time', '=', 0];
|
$where[] = ['a.delete_time', '=', 0];
|
||||||
$rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
$rows = empty($param['limit']) ? get_config('app . page_size') : $param['limit'];
|
||||||
$schedule = ScheduleList::where($where)
|
$schedule = ScheduleList::where($where)
|
||||||
|
@ -15,7 +15,7 @@ class ProjectLog extends Model
|
|||||||
{
|
{
|
||||||
public static $Sourse = [
|
public static $Sourse = [
|
||||||
'project' => [
|
'project' => [
|
||||||
'status' => ['未开始', '进行中', '已完成', '已关闭'],
|
'status' => ['','未开始', '进行中', '已完成', '已关闭'],
|
||||||
'field_array' => [
|
'field_array' => [
|
||||||
'director_uid' => array('icon' => 'icon-xueshengzhuce', 'title' => '负责人'),
|
'director_uid' => array('icon' => 'icon-xueshengzhuce', 'title' => '负责人'),
|
||||||
'start_time' => array('icon' => 'icon-kaoshijihua', 'title' => '预计开始时间'),
|
'start_time' => array('icon' => 'icon-kaoshijihua', 'title' => '预计开始时间'),
|
||||||
|
@ -39,7 +39,7 @@ function schedule(){
|
|||||||
}
|
}
|
||||||
, { field: 'labor_time', title: '工时', style: 'color: #91CC75;', align: 'center', width: 60 }
|
, { field: 'labor_time', title: '工时', style: 'color: #91CC75;', align: 'center', width: 60 }
|
||||||
, { field: 'labor_type_string', title: '工作类型', align: 'center', width: 90 }
|
, { field: 'labor_type_string', title: '工作类型', align: 'center', width: 90 }
|
||||||
, { field: 'work_cate', title: '工作类别', align: 'center', width: 100 }
|
, { field: 'cate', title: '工作类别', align: 'center', width: 100 }
|
||||||
, { field: 'title', title: '工作内容' }
|
, { field: 'title', title: '工作内容' }
|
||||||
, { field: 'name', title: '执行员工', align: 'center', width: 80 }
|
, { field: 'name', title: '执行员工', align: 'center', width: 80 }
|
||||||
, { field: 'department', title: '所在部门', align: 'center', width: 100 }
|
, { field: 'department', title: '所在部门', align: 'center', width: 100 }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user