se_bonus.js 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. 'use strict';
  2. /**
  3. * 奖罚金
  4. *
  5. * @author Mai
  6. * @date 2020/2/12
  7. * @version
  8. */
  9. const spreadSetting = {
  10. cols: [
  11. {title: '名称', colSpan: '1', rowSpan: '1', field: 'name', hAlign: 0, width: 185, formatter: '@'},
  12. {title: '金额', colSpan: '1', rowSpan: '1', field: 'e_type', hAlign: 1, width: 80, formatter: '@'},
  13. {title: '本期金额', colSpan: '1', rowSpan: '1', field: 'quantity', hAlign: 2, width: 100, type: 'Number'},
  14. {title: '截止本期金额', colSpan: '1', rowSpan: '1', field: 'total_price', hAlign: 2, width: 100, type: 'Number', readOnly: true},
  15. {title: '时间', colSpan: '1', rowSpan: '1', field: 'total_price', hAlign: 2, width: 100, type: 'Number'},
  16. {title: '编号', colSpan: '1', rowSpan: '1', field: 'total_price', hAlign: 2, width: 100, type: 'Number'},
  17. {title: '依据材料证明', colSpan: '1', rowSpan: '1', field: 'total_price', hAlign: 2, width: 100, type: 'Number'},
  18. {title: '备注', colSpan: '1', rowSpan: '1', field: 'memo', hAlign: 0, width: 150, formatter: '@', cellType: 'ellipsisAutoTip'}
  19. ],
  20. emptyRows: 3,
  21. headRows: 1,
  22. headRowHeight: [32],
  23. defaultRowHeight: 21,
  24. headerFont: '12px 微软雅黑',
  25. font: '12px 微软雅黑',
  26. };
  27. $(document).ready(() => {
  28. autoFlashHeight();
  29. const bonusSpread = SpreadJsObj.createNewSpread($('#bonus-spread')[0]);
  30. const bonusSheet = bonusSpread.getActiveSheet();
  31. SpreadJsObj.initSheet(bonusSheet, spreadSetting);
  32. $.subMenu({
  33. menu: '#sub-menu', miniMenu: '#sub-mini-menu', miniMenuList: '#mini-menu-list',
  34. toMenu: '#to-menu', toMiniMenu: '#to-mini-menu',
  35. key: 'menu.1.0.0',
  36. miniHint: '#sub-mini-hint', hintKey: 'menu.hint.1.0.1',
  37. callback: function (info) {
  38. if (info.mini) {
  39. $('.panel-title').addClass('fluid');
  40. $('#sub-menu').removeClass('panel-sidebar');
  41. } else {
  42. $('.panel-title').removeClass('fluid');
  43. $('#sub-menu').addClass('panel-sidebar');
  44. }
  45. autoFlashHeight();
  46. bonusSpread.refresh();
  47. }
  48. });
  49. });