complete task #6886,#6884,#6882,#6880.

This commit is contained in:
leiyong
2020-02-11 17:58:46 +08:00
parent ab65bcd24f
commit 2b89c9f5f6
7 changed files with 19 additions and 21 deletions
+5 -3
View File
@@ -182,10 +182,12 @@ class my extends control
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Append id for secend sort. */
/* append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$this->loadModel('product');
/* Get the story language configuration. */
$this->app->loadLang('story');
/* Assign. */
$this->view->title = $this->lang->my->common . $this->lang->colon . $this->lang->my->task;
$this->view->position[] = $this->lang->my->task;
+2 -2
View File
@@ -30,8 +30,8 @@
</thead>
<tbody>
<?php foreach($plans as $plan):?>
<?php $hiddenInput = ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? 'form-input-hidden' : 'form-input-show';?>
<?php $showInput = ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? 'form-input-show' : 'form-input-hidden';?>
<?php $hiddenInput = ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? 'form-input-hidden' : 'form-input-show';?>
<?php $showInput = ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? 'form-input-show' : 'form-input-hidden';?>
<?php $isChecked = ($plan->begin == '2030-01-01' || $plan->end == '2030-01-01') ? 'checked="checked"' : '';?>
<tr>
<td class='text-center'><?php echo $plan->id . html::hidden("id[$plan->id]", $plan->id);?></td>
+1 -1
View File
@@ -1044,7 +1044,7 @@ class projectModel extends model
$delay = helper::diffDate(helper::today(), $project->end);
if($delay > 0) $project->delay = $delay;
}
/* Fix bug #2943. */
$total = $this->dao->select('
SUM(estimate) AS totalEstimate,
SUM(consumed) AS totalConsumed,
+2 -3
View File
@@ -153,15 +153,14 @@ class searchModel extends model
$condition = $operator . ' ' . $this->dbh->quote($value) . ' ';
}
/* Set filed name. */
/* Processing query criteria. */
if($operator == '=' and preg_match('/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/', $value))
{
$condition = '`' . $this->post->$fieldName . "` >= '$value' AND `" . $this->post->$fieldName . "` <= '$value 23:59:59'";
$where .= " $andOr ($condition)";
}
elseif ($operator == '<=' and preg_match('/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/', $value))
elseif($operator == '<=' and preg_match('/^[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}$/', $value))
{
/* Fix bug #2896. */
$where .= " $andOr " . '`' . $this->post->$fieldName . "` <= '$value 23:59:59'";
}
elseif($condition)
+7 -12
View File
@@ -448,20 +448,15 @@ class todo extends control
*/
public function batchClose()
{
if(!empty($_POST['todoIDList']))
$waitID = array();
foreach($_POST['todoIDList'] as $todoID)
{
$waitID = array();
$todoIDList = array();
foreach($_POST['todoIDList'] as $todoID)
{
$todo = $this->todo->getById($todoID);
($todo->status != 'done' && $todo->status != 'closed') ? $waitID[] = $todoID : $todoIDList[] = $todoID;
}
if(!empty($waitID)) die(js::execute('alert("ID: ' .implode(',', $waitID). '的待办处于未完成状态。");'));
foreach($todoIDList as $todoID) $this->todo->close($todoID);
die(js::reload('parent'));
$todo = $this->todo->getById($todoID);
($todo->status == 'done') ? $this->todo->close($todoID) : $waitID[] = $todoID;
}
if(!empty($waitID)) die(js::alert('ID: ' . implode(',', $waitID) . $this->lang->todo->unfinishedTodo));
die(js::reload('parent'));
}
/**
+1
View File
@@ -102,6 +102,7 @@ $lang->todo->lblBeforeDays = "提前%s天生成待办";
$lang->todo->lblClickCreate = "点击添加待办";
$lang->todo->noTodo = '该类型没有待办事务';
$lang->todo->noAssignedTo = '被指派人不能为空';
$lang->todo->unfinishedTodo = ' 待办处于未完成状态。';
$lang->todo->periods['all'] = '所有待办';
$lang->todo->periods['thisYear'] = '本年';
+1
View File
@@ -102,6 +102,7 @@ $lang->todo->lblBeforeDays = "提前%s天生成待辦";
$lang->todo->lblClickCreate = "點擊添加待辦";
$lang->todo->noTodo = '該類型沒有待辦事務';
$lang->todo->noAssignedTo = '被指派人不能為空';
$lang->todo->unfinishedTodo = ' 待辦處於未完成狀態。';
$lang->todo->periods['all'] = '所有待辦';
$lang->todo->periods['thisYear'] = '本年';