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.

33 lines
1.1 KiB

2 years ago
  1. 'use strict';
  2. var fnPageInit = function () {
  3. var canDo = new CanDo({
  4. sortField: 'JobtitleID',
  5. sortOrder: 'asc',
  6. /**
  7. * 當前程式所有ID名稱集合
  8. */
  9. idKeys: ['OrgID', 'JobtitleID'],
  10. /**
  11. * Grid欄位設置可以是 function
  12. */
  13. gridFields: [
  14. { name: "RowIndex", title: 'common.RowNumber', align: 'center', width: 50, sorting: false },
  15. { name: "JobtitleID", title: 'JobtitleMaintain_Upd.JobtitleID', width: 200 },
  16. { name: "JobtitleName", title: 'common.JobtitleName', width: 200 },
  17. {
  18. name: "Effective", title: 'common.Status', width: 200, align: 'center', itemTemplate: function (val) {
  19. return val === 'Y' ? i18next.t('common.Effective') : i18next.t('common.Invalid');
  20. }
  21. }
  22. ],
  23. /**
  24. * 頁面初始化
  25. * @param {Object} pargs CanDo 對象
  26. */
  27. pageInit: function (pargs) {
  28. pargs._reSetQueryPm();
  29. pargs._initGrid();
  30. }
  31. });
  32. };
  33. require(['base', 'jsgrid', 'cando'], fnPageInit);