batchedit.html.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. /**
  3. * The batchedit view file of effort module of ZenTaoPMS.
  4. * @copyright Copyright 2009-2024 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  5. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  6. * @author Mengyi Liu
  7. * @package effort
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. jsVar('shadowProducts', $shadowProducts);
  12. $isEn = $app->getClientLang() == 'en';
  13. foreach($efforts as $effort)
  14. {
  15. $efforts[$effort->id]->objectType = $effort->objectType . '_' . $effort->objectID;
  16. }
  17. formBatchPanel
  18. (
  19. set::title($lang->effort->batchEdit),
  20. set::mode('edit'),
  21. set::data(array_values($efforts)),
  22. set::url(createLink('effort', 'batchEdit', 'from=batchEdit')),
  23. on::change('[data-name="objectType"]', 'setLeftInput'),
  24. set::onRenderRow(jsRaw('renderRowData')),
  25. /* Field of id index. */
  26. formBatchItem
  27. (
  28. set::name('id'),
  29. set::label($lang->idAB),
  30. set::control('index'),
  31. set::width('50px')
  32. ),
  33. /* Field of id. */
  34. formBatchItem
  35. (
  36. set::name('id'),
  37. set::label($lang->idAB),
  38. set::control('hidden'),
  39. set::hidden(true)
  40. ),
  41. /* Field of id. */
  42. formBatchItem
  43. (
  44. set::name('objectID'),
  45. set::label($lang->effort->objectID),
  46. set::control('hidden'),
  47. set::hidden(true)
  48. ),
  49. /* Field of product. */
  50. $config->vision != 'lite' ? formBatchItem
  51. (
  52. set::name('product'),
  53. set::label($lang->effort->product),
  54. set::control('picker'),
  55. set::multiple(true),
  56. set::items($products),
  57. set::width('160px')
  58. ) : formBatchItem
  59. (
  60. set::name('product'),
  61. set::label($lang->effort->product),
  62. set::control('hidden'),
  63. set::hidden(true)
  64. ),
  65. /* Field of execution. */
  66. formBatchItem
  67. (
  68. set::name('execution'),
  69. set::label($lang->effort->execution),
  70. set::width('160px'),
  71. set::control(array('control' => 'picker', 'items' => $executions, 'popWidth' => 'auto', 'maxItemsCount' => 50))
  72. ),
  73. /* Field of date. */
  74. formBatchItem
  75. (
  76. set::name('date'),
  77. set::label($lang->effort->date),
  78. set::control('datePicker'),
  79. set::width('160px')
  80. ),
  81. /* Field of work. */
  82. formBatchItem
  83. (
  84. set::name('work'),
  85. set::label($lang->effort->work),
  86. set::control('input'),
  87. set::width('160px')
  88. ),
  89. /* Field of consumed. */
  90. formBatchItem
  91. (
  92. set::name('consumed'),
  93. set::label($isEn ? $lang->effort->consumed : ($lang->effort->consumed . '(' . $lang->effort->hour . ')')),
  94. set::control('input'),
  95. set::width('160px')
  96. ),
  97. /* Field of objectType. */
  98. formBatchItem
  99. (
  100. set::name('objectType'),
  101. set::label($lang->effort->objectType),
  102. set::control('picker'),
  103. set::items(isset($typeList) ? $typeList : array()),
  104. set::width('160px')
  105. ),
  106. /* Field of left. */
  107. formBatchItem
  108. (
  109. set::name('left'),
  110. set::label($isEn ? $lang->effort->left : ($lang->effort->left . '(' . $lang->effort->hour . ')')),
  111. set::control('input'),
  112. set::width('160px')
  113. )
  114. );