feature: taskk
This commit is contained in:
parent
69860cd845
commit
059cee2313
|
|
@ -62,30 +62,6 @@ class Task extends Backend
|
|||
list($where, $sort, $order, $offset, $limit) = $this->buildparams();
|
||||
|
||||
$dateTime = date('Y-m-d');
|
||||
foreach ($where as $k => $item) {
|
||||
if ($item[0] != 'task.status') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (in_array($item[2], [1, 4])) {
|
||||
$where[] = ['expire_end_time', '<=', $dateTime];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($item[2] == 2) {
|
||||
$where[$k][2] = 4;
|
||||
$where[] = ['expire_end_time', '>', $dateTime];
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($item[2] == 6) {
|
||||
$where[$k][2] = 1;
|
||||
$where[] = ['expire_end_time', '>', $dateTime];
|
||||
continue;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
$list = $this->model
|
||||
->with(['exec'])
|
||||
|
|
@ -95,16 +71,6 @@ class Task extends Backend
|
|||
|
||||
foreach ($list as $k => $row) {
|
||||
|
||||
if (strtotime($row['expire_end_time']) > time()) {
|
||||
if ($row['status'] == 1) {
|
||||
$list[$k]['status'] = 6;
|
||||
}
|
||||
|
||||
if ($row['status'] == 4) {
|
||||
$list[$k]['status'] = 2;
|
||||
}
|
||||
}
|
||||
|
||||
$list[$k]['refuse_reason'] = $row['refuse_reason'] ?? '';
|
||||
$list[$k]['fileurl'] = cdnurl($row['prove_file_path']);
|
||||
$list[$k]['filetype'] = pathinfo($list[$k]['fileurl'], PATHINFO_EXTENSION);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Task extends Model
|
|||
|
||||
public function getStatusList()
|
||||
{
|
||||
return ['1' => __('Status 1'), '2' => __('Status 2'), '3' => __('Status 3'), '4' => __('Status 4'), '5' => __('Status 5'), '6' => __('Status 6')];
|
||||
return ['1' => __('Status 1'), '3' => __('Status 3'), '4' => __('Status 4'), '5' => __('Status 5')];
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'type', title: __('Type'), searchList: {"1":__('Type 1'),"2":__('Type 2'),"3":__('Type 3')}, formatter: Table.api.formatter.normal},
|
||||
{field: 'title', title: __('Title'), operate: 'LIKE'},
|
||||
{field: 'desc', title: __('Desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"2":__('Status 2'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5'),"6":__('Status 6')}, formatter: Table.api.formatter.status},
|
||||
{field: 'status', title: __('Status'), searchList: {"1":__('Status 1'),"3":__('Status 3'),"4":__('Status 4'),"5":__('Status 5')}, formatter: Table.api.formatter.status},
|
||||
{field: 'prove_desc', title: __('Prove_desc'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'refuse_reason', title: __('Refuse_reason'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
|
||||
{field: 'expire_start_time', title: __('Expire_start_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
|
||||
|
|
@ -41,11 +41,18 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
|||
{field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate,
|
||||
buttons:[
|
||||
{
|
||||
name: '审核',
|
||||
title: __('审核'),
|
||||
name: 'review',
|
||||
text: "审核",
|
||||
title: "审核",
|
||||
classname: 'btn btn-xs btn-primary btn-dialog',
|
||||
icon: 'fa fa-list',
|
||||
url: 'oa/task/review'
|
||||
url: 'oa/task/review',
|
||||
visible:function(row){
|
||||
if (row.status != 3) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user