auditplan.html.php 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php include $app->getModuleRoot() . 'common/view/header.html.php';?>
  2. <?php js::set('browseType', $browseType);?>
  3. <?php js::set('mode', $mode);?>
  4. <?php js::set('total', $pager->recTotal);?>
  5. <?php js::set('rawMethod', $app->rawMethod);?>
  6. <?php js::set('todoCount', $todoCount);?>
  7. <?php js::set('isMax', $isMax);?>
  8. <?php js::set('isBiz', $isBiz);?>
  9. <?php js::set('isOpenedURAndSR', $isOpenedURAndSR);?>
  10. <style>
  11. .c-actions{width: 180px}
  12. </style>
  13. <div id="mainMenu" class="clearfix">
  14. <div class="btn-toolbar pull-left">
  15. <?php
  16. foreach($lang->my->featureBar[$app->rawMethod]['nc'] as $key => $name)
  17. {
  18. $label = "<span class='text'>{$name}</span>";
  19. $label .= $key == 'auditplan' ? " <span class='label label-light label-badge'>{$pager->recTotal}</span>" : '';
  20. $active = $key == 'auditplan' ? 'btn-active-text' : '';
  21. $keyParam = $key == 'auditplan' ? 'mychecking' : $key;
  22. $modeParam = $key == 'auditplan' ? 'auditplan' : 'nc';
  23. echo html::a(inlink($app->rawMethod, "mode=$modeParam&type=$keyParam"), $label, '', "class='btn btn-link $active'");
  24. }
  25. ?>
  26. </div>
  27. </div>
  28. <div id="mainContent" class='main-table'>
  29. <?php if(empty($auditplans)):?>
  30. <div class="table-empty-tip">
  31. <p>
  32. <span class="text-muted"><?php echo $lang->noData;?></span>
  33. </p>
  34. </div>
  35. <?php else:?>
  36. <form id='myTaskForm' class="main-table table-risk" data-ride="table" method="post">
  37. <?php $vars = "mode=$mode&browseType=$browseType&param=$param&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID"; ?>
  38. <table class="table has-sort-head table-fixed" id='projectList'>
  39. <thead>
  40. <tr class='text-center'>
  41. <th class='c-id'><?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
  42. <th class='c-process'><?php common::printOrderLink('process', $orderBy, $vars, $lang->auditplan->process);?></th>
  43. <th class='c-objectID'><?php common::printOrderLink('objectID', $orderBy, $vars, $lang->auditplan->objectID);?></th>
  44. <th class='c-project'><?php common::printOrderLink('project', $orderBy, $vars, $lang->auditplan->project);?></th>
  45. <th class='c-execution'><?php common::printOrderLink('execution', $orderBy, $vars, $lang->auditplan->execution);?></th>
  46. <th class='c-objectType'><?php common::printOrderLink('objectType', $orderBy, $vars, $lang->auditplan->objectType);?></th>
  47. <th class='c-status'><?php common::printOrderLink('status', $orderBy, $vars, $lang->auditplan->status);?></th>
  48. <th class='c-checkDate'><?php common::printOrderLink('checkDate', $orderBy, $vars, $lang->auditplan->checkDate);?></th>
  49. <th class='c-actions'><?php echo $lang->actions;?></th>
  50. </tr>
  51. </thead>
  52. <tbody>
  53. <?php foreach($auditplans as $id => $auditplan):?>
  54. <?php
  55. $class = '';
  56. $process = zget($processes, $auditplan->process);
  57. $processType = zget($this->lang->auditplan, $auditplan->objectType, '');
  58. $objectType = $auditplan->objectType == 'activity' ? zget($activities, $auditplan->objectID) : zget($outputs, $auditplan->objectID);
  59. $execution = $auditplan->execution ? zget($executions, $auditplan->execution) : '';
  60. $execution = $execution ? html::a(helper::createLink('execution', 'task', "executionID=$auditplan->execution"), $execution, '', "title={$execution}") : '';
  61. $project = $auditplan->project ? zget($projects, $auditplan->project) : '';
  62. $project = $project ? html::a(helper::createLink('auditplan', 'browse', "projectID=$auditplan->project"), $project, '', "title={$project}") : '';
  63. $auditplan->ncs = $this->loadModel('auditplan')->getNcCount($auditplan->id);
  64. if((helper::diffDate(helper::today(), $auditplan->checkDate) > -1) and !helper::isZeroDate($auditplan->checkDate)) $class = 'delayed';
  65. ?>
  66. <tr class='text-center'>
  67. <td><?php echo $auditplan->id;?></td>
  68. <td title="<?php echo $process;?>"><?php echo $process;?></td>
  69. <td title="<?php echo $objectType;?>"><?php echo $objectType;?></td>
  70. <td title="<?php echo $project;?>"><?php echo $project;?></td>
  71. <td title="<?php echo $execution;?>"><?php echo $execution;?></td>
  72. <td><?php echo $processType;?></td>
  73. <td class='status-<?php echo $auditplan->status;?>'><?php echo zget($lang->auditplan->statusList, $auditplan->status);?></td>
  74. <td class='<?php echo $class;?>'><?php echo '<span>' . $auditplan->checkDate . '</span>';?></td>
  75. <td class='c-actions'><?php
  76. if($auditplan->status == 'wait' || $auditplan->status == 'checking')
  77. {
  78. common::printIcon('auditplan', 'check', "auditplanID=$auditplan->id&projectID=$auditplan->project", $auditplan, 'list', 'confirm', '', 'iframe', true, '', $this->lang->auditplan->check);
  79. }
  80. else
  81. {
  82. common::printIcon('auditplan', 'check', "auditplanID=$auditplan->id&projectID=$projectID", $auditplan, 'list', 'confirm', '', 'disabled');
  83. }
  84. common::printIcon('auditplan', 'result', "auditplanID=$auditplan->id", $auditplan, 'list', 'list-alt', '', 'iframe', true);
  85. if($auditplan->ncs)
  86. {
  87. common::printIcon('auditplan', 'nc', "auditplanID=$auditplan->id", $auditplan, 'list', 'bug', '', 'iframe', true);
  88. }
  89. else
  90. {
  91. common::printIcon('auditplan', 'nc', "auditplanID=$auditplan->id", $auditplan, 'list', 'bug', '', 'disabled', true);
  92. }
  93. common::printIcon('auditplan', 'edit', "auditplanID=$auditplan->id" . "&from=my", $auditplan, 'list', '', '', 'iframe', true);
  94. common::printIcon('auditplan', 'delete', "auditplanID=$auditplan->id", $auditplan, 'list', 'trash', 'hiddenwin');
  95. ?>
  96. </td>
  97. </tr>
  98. <?php endforeach;?>
  99. </tbody>
  100. </table>
  101. <div class='table-footer'>
  102. <?php $pager->show('right', 'pagerjs');?>
  103. </div>
  104. </form>
  105. <?php endif;?>
  106. </div>
  107. <?php include $app->getModuleRoot() . 'common/view/footer.html.php';?>