batchchangestatus.html.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * The batchChangeStatus view file of productplan module of ZenTaoPMS.
  4. *
  5. * @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
  6. * @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
  7. * @author Wang Yidong <yidong@easycorp.ltd>
  8. * @package productplan
  9. * @link https://www.zentao.net
  10. */
  11. namespace zin;
  12. $items = array();
  13. $items['planIdList'] = array('name' => 'planIdList', 'label' => $lang->idAB, 'control' => 'hidden', 'hidden' => true);
  14. $items['id'] = array('name' => 'id', 'label' => $lang->idAB, 'control' => 'index', 'width' => '60px');
  15. $items['title'] = array('name' => 'title', 'label' => $lang->productplan->title, 'control' => 'text', 'width' => '300px', 'disabled' => true);
  16. $items['status'] = array('name' => 'status', 'label' => $lang->productplan->status, 'control' => 'text', 'width' => '80px', 'disabled' => true);
  17. $items['closedReason'] = array('name' => 'closedReason', 'label' => $lang->productplan->closedReason, 'control' => 'picker', 'width' => '200px', 'required' => true, 'items' => $lang->productplan->closedReasonList);
  18. $items['comment'] = array('name' => 'comment', 'label' => $lang->comment, 'control' => 'text', 'filter' => 'trim');
  19. foreach($plans as $plan)
  20. {
  21. $plan->planIdList = $plan->id;
  22. $plan->status = zget($lang->productplan->statusList, $plan->status);
  23. }
  24. $closedReasonItems = array();
  25. foreach($lang->productplan->closedReasonList as $reasonKey => $reasonName) $closedReasonItems[] = array('text' => $reasonName, 'value' => $reasonKey);
  26. jsVar('closedReasonItems', $closedReasonItems);
  27. formBatchPanel
  28. (
  29. set::title($lang->productplan->batchClose),
  30. set::mode('edit'),
  31. set::items($items),
  32. set::data(array_values($plans))
  33. );
  34. render();