You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
2.2 KiB

2 years ago
  1. 'use strict';
  2. var fnPageInit = function () {
  3. var canDo = new CanDo({
  4. sortField: 'EventID',
  5. sortOrder: 'asc',
  6. /**
  7. * 當前程式所有ID名稱集合
  8. */
  9. idKeys: ['OrgID', 'EventID'],
  10. /**
  11. * Grid欄位設置可以是 function
  12. */
  13. gridFields: [
  14. { name: "RowIndex", title: 'common.RowNumber', align: 'center', width: 50, sorting: false },
  15. { name: "SourceFromName", title: 'common.SourceFromName', width: 100 },// ╠common.SourceFromName⇒表單名稱╣
  16. { name: "EventName", title: 'Task_Upd.EventName', width: 250 },
  17. { name: "OwnerName", title: 'Task_Upd.Owner', width: 80 },// ╠common.SourceFromName⇒表單名稱╣
  18. { name: "CreateUserName", title: 'common.CreateUser', width: 80 },
  19. {
  20. name: "StartDate", title: 'common.StartDate', align: 'center', width: 120, itemTemplate: function (value) {
  21. return newDate(value);
  22. }
  23. },
  24. {
  25. name: "EndDate", title: 'common.EndDate', align: 'center', width: 120, itemTemplate: function (value) {
  26. return newDate(value, false, true);
  27. }
  28. },
  29. {
  30. name: "Status", title: 'common.Status', width: 60, itemTemplate: function (value) {
  31. var oStatus = { U: '未開始', G: '進行中', D: '已完成(待確認)', O: '已確認' };
  32. return oStatus[value] || '未開始';
  33. }
  34. },
  35. { name: "ProgressShow", title: 'common.Progress', align: 'center', width: 80 },
  36. { name: "ImportantName", title: 'common.Important', align: 'center', width: 80 }
  37. ],
  38. /**
  39. * 頁面初始化
  40. * @param {Object} pargs CanDo 對象
  41. */
  42. pageInit: function (pargs) {
  43. fnSetUserDrop([
  44. {
  45. Select: $('#CreateUser,#Owner'),
  46. Select2: true
  47. }
  48. ]).done(function () {
  49. pargs._reSetQueryPm();
  50. pargs._initGrid();
  51. });
  52. }
  53. });
  54. };
  55. require(['base', 'select2', 'jsgrid', 'cando'], fnPageInit);