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.

104 lines
4.2 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. <div class="page-header">
  2. <h1 class="page-title"><?=$mem['mem_nickname']?>님의 <?=$this->site->config('point_name')?> 정보</h1>
  3. </div>
  4. <form data-grid-search onsubmit="grid.refresh(1);return false;" data-fit-aside autocomplete="off">
  5. <div data-ax-tbl>
  6. <div data-ax-tr>
  7. <div data-ax-td>
  8. <div data-ax-td-label><?=$this->site->config('point_name')?> 유형</div>
  9. <div data-ax-td-wrap>
  10. <select class="form-control form-control-inline" name="target_type">
  11. <option value="">전체보기</option>
  12. <?php foreach($point_type as $key=>$val) :?>
  13. <option value="<?=$key?>" <?=$target_type==$key?'selected':''?>><?=$val?></option>
  14. <?php endforeach;?>
  15. </select>
  16. </div>
  17. </div>
  18. <div data-ax-td>
  19. <div data-ax-td-label>기간검색</div>
  20. <div data-ax-td-wrap>
  21. <input class="form-control" data-chained-datepicker="[name='enddate']" name="startdate" data-toggle="datepicker" value="">
  22. </div>
  23. <div data-ax-td-wrap>
  24. <input class="form-control" name="enddate" data-toggle="datepicker" value="">
  25. </div>
  26. </div>
  27. <div data-ax-td class="W100">
  28. <div data-ax-td-wrap>
  29. <button class="btn btn-default btn-sm"><i class="fal fa-search"></i> 필터적용</button>
  30. </div>
  31. </div>
  32. </div>
  33. </div>
  34. </form>
  35. <div class="H10"></div>
  36. <div class="ax-button-group">
  37. <div class="left">
  38. <button type="button" class="btn btn-default" onclick="APP.MEMBER.POP_POINT_FORM_ADMIN('<?=$mem['mem_idx']?>');"><i class="fal fa-plus-circle"></i> <?=$this->site->config('point_name')?> 등록</button>
  39. </div>
  40. </div>
  41. <div id="grid-container"></div>
  42. <script>
  43. var grid = new GRID('#grid-container', {
  44. paging: {
  45. pageSize: 10
  46. },
  47. columns: [
  48. {caption:'번호', dataField:'nums', alignment:'right', width:60, dataType:'number', format:'fixedPoint'},
  49. {caption:'일시', dataField:'reg_datetime', alignment:'center', width:120},
  50. {caption:'구분', dataField:'target_type', alignment:'center', width:120},
  51. {
  52. caption: '증가', name:'mpo_value_plus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
  53. calculateCellValue: function(cell) {
  54. if(cell.mpo_flag == 1) return cell.mpo_value.numberFormat()
  55. }
  56. },
  57. {
  58. caption: '감소',name:'mpo_value_minus', dataField:'mpo_value', alignment:'right', dataType:'number', format:'fixedPoint', width:120,
  59. calculateCellValue: function(cell) {
  60. if(cell.mpo_flag == -1) return cell.mpo_value.numberFormat()
  61. }
  62. },
  63. {caption:'내용', dataField:'mpo_description', alignment:'left', minWidth:120},
  64. ],
  65. onCellPrepared: function(e) {
  66. if(e.rowType == 'data') {
  67. if(e.column.name == 'mpo_value_plus') {
  68. e.cellElement.css("color", '#3498db');
  69. }
  70. else if (e.column.name == 'mpo_value_minus') {
  71. e.cellElement.css("color", '#e32815');
  72. }
  73. }
  74. },
  75. dataSource: new DevExpress.data.DataSource({
  76. key : 'mpo_idx',
  77. load: function(loadOptions) {
  78. var d = $.Deferred();
  79. var params = grid.getSearchParam(loadOptions);
  80. params.mem_idx = '<?=$mem['mem_idx']?>';
  81. $.ajax({
  82. url : base_url + '/admin/ajax/members/points',
  83. type: 'GET',
  84. async: false,
  85. cache: false,
  86. data: params
  87. }).done(function(res) {
  88. d.resolve(res.lists, {
  89. totalCount : res.totalCount
  90. });
  91. });
  92. return d.promise();
  93. }
  94. }),
  95. });
  96. $(function() {
  97. grid.init();
  98. })
  99. </script>