* Finish task #7932. Fix bug #3422.

This commit is contained in:
holan20180123
2020-09-23 13:55:32 +08:00
parent ab6ea6f7e0
commit 4b1c0ced7b
8 changed files with 56 additions and 3 deletions
+9 -1
View File
@@ -72,6 +72,14 @@ class testtask extends control
$this->app->loadClass('pager', $static = true);
$pager = pager::init($recTotal, $recPerPage, $pageID);
/* Get tasks. */
$tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
if(empty($tasks) and $pageID > 1)
{
$pager = pager::init(0, $recPerPage, 1);
$tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
}
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
@@ -81,7 +89,7 @@ class testtask extends control
$this->view->productID = $productID;
$this->view->productName = $this->products[$productID];
$this->view->orderBy = $orderBy;
$this->view->tasks = $this->testtask->getProductTasks($productID, $branch, $sort, $pager, $scopeAndStatus, $beginTime, $endTime);
$this->view->tasks = $tasks;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->pager = $pager;
$this->view->branch = $branch;