batchedit.html.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * The batchedit view file of opportunity 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 Shujie Tian <tianshujie@chandao.com>
  7. * @package opportunity
  8. * @link https://www.zentao.net
  9. */
  10. namespace zin;
  11. $items = array();
  12. /* Field of ID. */
  13. $items[] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '32px');
  14. /* Field of name. */
  15. $items[] = array( 'name' => 'name', 'label' => $lang->opportunity->name, 'required' => true, 'control' => 'input', 'width' => '200px');
  16. /* Field of source. */
  17. $items[] = array('name' => 'source', 'label' => $lang->opportunity->source, 'control' => 'picker', 'items' => $lang->opportunity->sourceList, 'width' => '200px');
  18. /* Field of impact. */
  19. $items[] = array('name' => 'impact', 'label' => $lang->opportunity->impact, 'control' => array('control' => 'picker', 'required' => true), 'items' => $lang->opportunity->impactList, 'width' => '90px');
  20. /* Field of chance. */
  21. $items[] = array('name' => 'chance', 'label' => $lang->opportunity->chance, 'control' => array('control' => 'picker', 'required' => true), 'items' => $lang->opportunity->chanceList, 'width' => '90px');
  22. /* Field of ratio. */
  23. $items[] = array('name' => 'ratio', 'label' => $lang->opportunity->ratio, 'control' => 'input', 'readonly' => true, 'width' => '90px');
  24. /* Field of pri. */
  25. $items[] = array('name' => 'pri', 'label' => $lang->opportunity->pri, 'control' => 'priPicker', 'readonly' => true, 'width' => '90px');
  26. formBatchPanel
  27. (
  28. on::change('[data-name=impact]', 'computeIndex'),
  29. on::change('[data-name=chance]', 'computeIndex'),
  30. set::title($lang->opportunity->batchEdit),
  31. set::mode('edit'),
  32. set::data(array_values($opportunities)),
  33. set::items($items)
  34. );