* Fix bug #15552,15559.
This commit is contained in:
@@ -21,7 +21,7 @@ $lang->stage->view = '阶段详情';
|
||||
$lang->stage->common = '阶段';
|
||||
$lang->stage->id = '编号';
|
||||
$lang->stage->name = '阶段名称';
|
||||
$lang->stage->type = '阶段分类';
|
||||
$lang->stage->type = '阶段类型';
|
||||
$lang->stage->percent = '工作量占比';
|
||||
$lang->stage->setType = '阶段类型';
|
||||
|
||||
|
||||
+11
-2
@@ -34,6 +34,7 @@ class stageModel extends model
|
||||
$this->dao->insert(TABLE_STAGE)
|
||||
->data($stage)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->stage->create->requiredFields, 'notempty')
|
||||
->checkIF($stage->percent != '', 'percent', 'float')
|
||||
->exec();
|
||||
|
||||
@@ -67,7 +68,10 @@ class stageModel extends model
|
||||
$stage->createdBy = $this->app->user->account;
|
||||
$stage->createdDate = helper::today();
|
||||
|
||||
$this->dao->insert(TABLE_STAGE)->data($stage)->autoCheck()->checkIF($stage->percent != '', 'percent', 'float')->exec();
|
||||
$this->dao->insert(TABLE_STAGE)->data($stage)->autoCheck()
|
||||
->batchCheck($this->config->stage->create->requiredFields, 'notempty')
|
||||
->checkIF($stage->percent != '', 'percent', 'float')
|
||||
->exec();
|
||||
|
||||
if(dao::isError()) return false;
|
||||
|
||||
@@ -98,7 +102,12 @@ class stageModel extends model
|
||||
|
||||
if(round($totalPercent + $stage->percent - $oldStage->percent) > 100) return dao::$errors['message'][] = $this->lang->stage->error->percentOver;
|
||||
|
||||
$this->dao->update(TABLE_STAGE)->data($stage)->autoCheck()->checkIF($stage->percent != '', 'percent', 'float')->where('id')->eq((int)$stageID)->exec();
|
||||
$this->dao->update(TABLE_STAGE)
|
||||
->data($stage)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->stage->edit->requiredFields, 'notempty')
|
||||
->checkIF($stage->percent != '', 'percent', 'float')->where('id')->eq((int)$stageID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldStage, $stage);
|
||||
return false;
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<style>.c-percent, .c-type {width:150px;}</style>
|
||||
<div id="mainContent" class="main-content fade">
|
||||
<div class="main-header">
|
||||
<h2><?php echo $lang->stage->batchCreate;?></h2>
|
||||
@@ -19,10 +20,10 @@
|
||||
<table class="table table-form">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->stage->id;?></th>
|
||||
<th class='c-id'><?php echo $lang->stage->id;?></th>
|
||||
<th><?php echo $lang->stage->name;?></th>
|
||||
<th class='w-200px'><?php echo $lang->stage->percent;?></th>
|
||||
<th class='w-200px'><?php echo $lang->stage->type;?></th>
|
||||
<th class='c-percent required'><?php echo $lang->stage->percent;?></th>
|
||||
<th class='c-type required'><?php echo $lang->stage->type;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
Reference in New Issue
Block a user