This commit is contained in:
Yagami
2023-03-01 14:48:22 +08:00
5 changed files with 43 additions and 16 deletions
+2
View File
@@ -65,3 +65,5 @@ REPLACE INTO `zt_process` (`model`, `name`, `type`, `abbr`, `desc`, `assignedTo`
UPDATE `zt_chart` SET `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.name from (\r\nselect \r\nt2.name, YEAR(t1.join) as `join`\r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.`name`, tt.join\r\nORDER BY tt.join, number desc, tt.name' WHERE `id` = '1097';
UPDATE `zt_chart` SET `sql` = 'SELECT tt.join as `year`, count(1) as number, tt.setName from (\r\nselect \r\nYEAR(t1.join) as `join`, t4.name as setName \r\nfrom zt_team t1 \r\nRIGHT JOIN zt_project t2 on t2.id = t1.root\r\nLEFT JOIN zt_project t4 on FIND_IN_SET(t4.id,t2.path) and t4.grade = 1\r\nRIGHT JOIN zt_user t3 on t3.account = t1.account\r\nWHERE t1.type = \'project\'\r\nAND t2.deleted = \'0\'\r\nAND t3.deleted = \'0\'\r\n) tt\r\nGROUP BY tt.setName, tt.join\r\nORDER BY tt.join, number desc, tt.setName' WHERE `id` = '1086';
INSERT IGNORE INTO `zt_config` (`vision`, `owner`, `module`, `key`, `value`) VALUES ('', 'system', 'common', 'setCode', '1');
+1 -1
View File
@@ -223,7 +223,7 @@ $config->execution->datatable->fieldList['status']['required'] = 'no';
$config->execution->datatable->fieldList['status']['fixed'] = 'no';
$config->execution->datatable->fieldList['PM']['title'] = 'owner';
$config->execution->datatable->fieldList['PM']['width'] = '70';
$config->execution->datatable->fieldList['PM']['width'] = '90';
$config->execution->datatable->fieldList['PM']['required'] = 'no';
$config->execution->datatable->fieldList['PM']['fixed'] = 'no';
+2 -1
View File
@@ -1036,7 +1036,8 @@ class execution extends control
$execution = $this->commonAction($executionID);
$project = $this->loadModel('project')->getByID($execution->project);
$executionID = $execution->id;
$products = $this->product->getProducts($execution->id);
$products = $this->product->getProducts($execution->id);
if(count($products) === 1) $productID = current($products)->id;
if($execution->hasProduct)
{
+3 -2
View File
@@ -1472,7 +1472,7 @@ class executionModel extends model
->andWhere('t2.type')->eq('stage')
->andWhere('t2.grade')->eq(1)
->andWhere('t2.deleted')->eq(0)
->andWhere('t2.parent')->eq($oldExecution->id)
->andWhere('t2.parent')->eq($oldExecution->parent)
->fetch('total');
if(!$oldPercentTotal) $oldPercentTotal = 0;
@@ -5547,7 +5547,8 @@ class executionModel extends model
foreach($fieldList as $field => $items)
{
$title = zget($this->lang->execution, $items['title'], zget($this->lang, $items['title'], $items['title']));
$fieldKey = in_array($field, array('name', 'code', 'type', 'PM', 'status')) ? 'exec' . ucfirst($field) : $field;
$title = $field == 'id' ? 'ID' : zget($this->lang->execution, $fieldKey, zget($this->lang, $field, $field));
$fieldList[$field]['title'] = $title;
}
+35 -12
View File
@@ -20,10 +20,12 @@ $(function()
$('#navbar .nav>li[data-id=story]>a').html($('#navbar .nav li.active [data-id=' + storyType + ']').text() + '<span class="caret"></span>');
}
$('#saveButton').on('click', function(e)
var $saveButton = $('#saveButton');
var $saveDraftButton = $('#saveDraftButton');
$saveButton.on('click', function(e)
{
$('#saveButton').attr('type', 'submit').attr('disabled', true);
$('#saveDraftButton').attr('disabled', true);
$saveButton.attr('type', 'submit').attr('disabled', true);
$saveDraftButton.attr('disabled', true);
var storyStatus = !$('#reviewer').val() || $('#needNotReview').is(':checked') ? 'active' : 'reviewing';
$('<input />').attr('type', 'hidden').attr('name', 'status').attr('value', storyStatus).appendTo('#dataform');
@@ -32,15 +34,26 @@ $(function()
setTimeout(function()
{
$('#saveButton').attr('type', 'button').removeAttr('disabled');
$('#saveDraftButton').removeAttr('disabled');
}, 10000);
if($saveButton.attr('disabled') == 'disabled')
{
setTimeout(function()
{
console.log(11);
$saveButton.attr('type', 'button').removeAttr('disabled');
$saveDraftButton.removeAttr('disabled');
}, 10000);
}
else
{
$saveDraftButton.removeAttr('disabled');
}
}, 100);
});
$('#saveDraftButton').on('click', function(e)
$saveDraftButton.on('click', function(e)
{
$('#saveButton').attr('disabled', true);
$('#saveDraftButton').attr('type', 'submit').attr('disabled', true);
$saveButton.attr('disabled', true);
$saveDraftButton.attr('type', 'submit').attr('disabled', true);
storyStatus = 'draft';
if(typeof(page) != 'undefined' && page == 'change') storyStatus = 'changing';
@@ -51,9 +64,19 @@ $(function()
setTimeout(function()
{
$('#saveButton').removeAttr('disabled');
$('#saveDraftButton').attr('type', 'button').removeAttr('disabled');
}, 10000);
if($saveDraftButton.attr('disabled') == 'disabled')
{
setTimeout(function()
{
$saveButton.removeAttr('disabled');
$saveDraftButton.attr('type', 'button').removeAttr('disabled');
}, 10000);
}
else
{
$saveButton.removeAttr('disabled');
}
}, 100);
});
})