* Fix bug.

This commit is contained in:
leiyong
2021-03-22 15:27:44 +08:00
parent 8298c6b729
commit 9c29107a6b
5 changed files with 17 additions and 20 deletions
+1 -1
View File
@@ -193,8 +193,8 @@ if(!defined('TABLE_SEARCHINDEX')) define('TABLE_SEARCHINDEX', $config->db->prefi
if(!defined('TABLE_SEARCHDICT')) define('TABLE_SEARCHDICT', $config->db->prefix . 'searchdict');
$config->objectTables['product'] = TABLE_PRODUCT;
$config->objectTables['story'] = TABLE_STORY;
$config->objectTables['productplan'] = TABLE_PRODUCTPLAN;
$config->objectTables['story'] = TABLE_STORY;
$config->objectTables['release'] = TABLE_RELEASE;
$config->objectTables['program'] = TABLE_PROJECT;
$config->objectTables['project'] = TABLE_PROJECT;
+2 -4
View File
@@ -77,11 +77,9 @@ class product extends control
*/
public function project($status = 'all', $productID = 0, $branch = 0, $involved = 0)
{
$this->product->setMenu($productID, $branch);
$this->app->loadLang('my');
$this->app->loadLang('execution');
$this->app->loadLang('program');
$this->product->setMenu($productID, $branch);
/* Get PM id list. */
$accounts = array();
+8 -8
View File
@@ -34,13 +34,13 @@
<th class='c-id w-50px'><?php echo $lang->idAB;?></th>
<th><?php echo $lang->project->name;?></th>
<th class='w-150px'><?php echo $lang->project->common;?></th>
<th class='w-80px'><?php echo $lang->project->PM;?></th>
<th class='w-100px'><?php echo $lang->project->begin;?></th>
<th class='w-100px'><?php echo $lang->project->end;?></th>
<th class='w-100px'><?php echo $lang->project->status;?></th>
<th class='w-100px'><?php echo $lang->project->budget;?></th>
<th class='w-80px text-right'><?php echo $lang->project->estimate;?></th>
<th class='w-80px text-right'><?php echo $lang->project->consume;?></th>
<th class='w-100px'><?php echo $lang->project->PM;?></th>
<th class='w-80px'><?php echo $lang->project->begin;?></th>
<th class='w-80px'><?php echo $lang->project->end;?></th>
<th class='w-70px'><?php echo $lang->project->status;?></th>
<th class='w-80px'><?php echo $lang->project->budget;?></th>
<th class='w-60px text-right'><?php echo $lang->project->estimate;?></th>
<th class='w-60px text-right'><?php echo $lang->project->consume;?></th>
<th class='w-60px'><?php echo $lang->project->progress;?></th>
</tr>
</thead>
@@ -61,7 +61,7 @@
<td class='c-status' title='<?php echo $status;?>'>
<span class="status-project status-<?php echo $project->status?>"><?php echo $status;?></span>
</td>
<td><?php echo $project->budget != 0 ? zget($lang->program->currencySymbol, $project->budgetUnit) . number_format($project->budget, 2) : $this->lang->project->future;?></td>
<td><?php echo $project->budget != 0 ? number_format($project->budget, 2) . zget($lang->project->currencySymbol, $project->budgetUnit) : $this->lang->project->future;?></td>
<td class="text-right" title="<?php echo $project->hours->totalEstimate . ' ' . $lang->project->workHour;?>"><?php echo $project->hours->totalEstimate . ' ' . $lang->execution->workHourUnit;?></td>
<td class="text-right" title="<?php echo $project->hours->totalConsumed . ' ' . $lang->project->workHour;?>"><?php echo $project->hours->totalConsumed . ' ' . $lang->execution->workHourUnit;?></td>
<td>
+5 -6
View File
@@ -22,16 +22,17 @@ class productplan extends control
*/
public function commonAction($productID, $branch = 0)
{
$this->loadModel('product')->setMenu($productID, $branch);
$product = $this->loadModel('product')->getById($productID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
$this->app->loadConfig('execution');
$product = $this->product->getById($productID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
$this->product->setMenu($productID, $branch);
$this->session->set('currentProductType', $product->type);
$this->view->product = $product;
$this->view->branch = $branch;
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($productID);
$this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$productID}&branch=$branch"), $product->name);
$this->product->setMenu($productID, $branch);
}
/**
@@ -206,8 +207,6 @@ class productplan extends control
*/
public function browse($productID = 0, $branch = 0, $browseType = 'all', $orderBy = 'begin_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1 )
{
$this->app->loadLang('project');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
+1 -1
View File
@@ -56,7 +56,7 @@
</th>
<th class='w-160px'><?php common::printOrderLink('title', $orderBy, $vars, $lang->productplan->title);?></th>
<?php if($this->session->currentProductType != 'normal'):?>
<th class='w-100px'><?php common::printOrderLink('branch',$orderBy, $vars, $lang->product->branch);?></th>
<th class='w-100px'><?php common::printOrderLink('branch',$orderBy, $vars, $lang->productplan->branch);?></th>
<?php endif;?>
<th class='w-100px'><?php common::printOrderLink('begin', $orderBy, $vars, $lang->productplan->begin);?></th>
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->productplan->end);?></th>