list_cell.php 5.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. <?php /** Created by Anton on 14.02.2020. */
  2. use app\models\entity\TmcStatus;
  3. use app\models\entity\Warehouse;
  4. ?>
  5. <link href="/tmc/css/main.min.css" rel="stylesheet">
  6. <style type="text/css">
  7. .main_content {
  8. top: 125px;
  9. padding: 0;
  10. display: inline-flex;
  11. }
  12. </style>
  13. <div class="menuTask loco-scrol-blue scroller">
  14. <div style="height: calc(100vh - 178px);" class="loko-div">
  15. <ul class="nav nav-tabs">
  16. <?php /** @var Warehouse $warehouse */ ?>
  17. <?php foreach ($warehouses as $warehouse): ?>
  18. <li>
  19. <a data-toggle="tab" href="panel<?= $warehouse->id ?>">
  20. <?= $warehouse->number . ' склад' ?>
  21. </a>
  22. </li>
  23. <?php endforeach; ?>
  24. </ul>
  25. <div class="tab-content">
  26. <?php foreach ($devices as $warehouseId => $warehouse): ?>
  27. <div id="panel<?= $warehouseId ?>" class="tab-pane">
  28. <div class="boxB4" style="padding: 15px 0;">
  29. <div class="inpBox">
  30. <input class="js-search" type="text" placeholder="Поиск">
  31. <img src="/images/find.svg" alt="">
  32. </div>
  33. </div>
  34. <h5>Стеллажи:</h5>
  35. <div class="boxB5">
  36. <div class="accordion">
  37. <?php foreach ($warehouse['stacks'] as $stackId => $stack): ?>
  38. <div class="trigger">
  39. <input type="checkbox" id="checkbox-<?= $i ?>" class="loco_checkbox"/>
  40. <label for="checkbox-<?= $i++ ?>" class="checkbox">
  41. <?= $stack['title']; ?>
  42. <t class="loco_info" style="float:right; margin-right: 35px">
  43. <b><?= count(array_filter($stack['tmcs'], function ($device) {
  44. return in_array($device['id_status'], [
  45. TmcStatus::TMC_STATUS_IN_STORAGE,
  46. TmcStatus::TMC_STATUS_IN_CHARGE
  47. ]);
  48. })) ?></b>
  49. </t>
  50. <t class="loco_info_red" style="float:right; margin-right: 5px">
  51. <b><?= count(array_filter($stack['tmcs'], function ($device) {
  52. return $device['id_status'] == TmcStatus::TMC_STATUS_ISSUED;
  53. })) ?></b></t>
  54. <t class="loco_info" style="padding: 5px; float:right; margin-right: 5px"><b><?= count($stack['tmcs']) ?></b></t>
  55. <i></i>
  56. </label>
  57. <div class="tmc-content loco-scrol-null scroller_null">
  58. <?php foreach ($stack['tmcs'] as $device): ?>
  59. <a href="tmc\detail\cell.php?id=<?= $device['storage'] ?>">
  60. <div>
  61. <h5>
  62. <?= $device['storage'] ?>
  63. <t class="loco_grey" style="float:right"><?= $device['name'] ?></t>
  64. </h5>
  65. <t class="<?= getColorByStatus((int)$device['id_status']) ?>">
  66. <?= $device['status'] ?>
  67. </t>
  68. <?php if ($device['user']): ?>
  69. <t class="loco_grey" style="float:right"><?= $device['user'] ?></t>
  70. <?php endif; ?>
  71. </div>
  72. </a>
  73. <?php endforeach; ?>
  74. </div>
  75. </div>
  76. <?php endforeach; ?>
  77. </div>
  78. </div>
  79. </div>
  80. <?php endforeach; ?>
  81. </div>
  82. </div>
  83. </div>
  84. <div role="log" aria-live="assertive" aria-relevant="additions" class="ui-helper-hidden-accessible"></div>
  85. <script type="application/javascript" src="tmc/js/storage.js"></script>
  86. <script type="application/javascript" src="tmc/js/search.js"></script>