This commit is contained in:
tianshujie
2021-12-09 10:34:47 +08:00
committed by 孙广明
parent 14b272a1af
commit 6219e2323b
2 changed files with 7 additions and 2 deletions
+1 -2
View File
@@ -648,7 +648,7 @@ function toggleProgram(obj)
$programs.attr('disabled', 'disabled');
$('.programStatus').show();
$('#programStatus').val('wait');
$('#programStatus').removeAttr('disabled').trigger("chosen:updated");
$('#programStatus').trigger("chosen:updated");
$('form #newProject0').prop('checked', true);
$('form #newLine0').prop('checked', true);
@@ -660,7 +660,6 @@ function toggleProgram(obj)
$('form .pgm-exist').removeClass('hidden');
$('form .pgm-no-exist').addClass('hidden');
$('.programStatus').hide();
$('#programStatus').attr('disabled', 'disabled');
if(!$('#newProgram0').prop('disabled'))
{
+6
View File
@@ -4369,6 +4369,12 @@ class upgradeModel extends model
$this->loadModel('action')->create('program', $programID, 'openedbysystem');
if($data->programStatus == 'closed') $this->loadModel('action')->create('program', $programID, 'closedbysystem');
}
else
{
$programID = $data->programID ? $data->programID : $data->programs;
$this->dao->update(TABLE_PROGRAM)->set('status')->eq($data->programStatus)->where('id')->eq($programID)->exec();
if($data->programStatus == 'closed') $this->loadModel('action')->create('program', $programID, 'openedbysystem');
}
if(isset($data->newLine))
{