credit_record.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {template 'common/header'}
  2. <style>
  3. table>tbody>tr>td{white-space:normal}
  4. </style>
  5. <ul class="nav nav-tabs">
  6. <li {if $do == 'stat'} class="active"{/if}><a href="{php echo url('mc/creditmanage/stat', array('type' => 1, 'uid' => $uid));}">数据概况</a></li>
  7. {loop $creditnames $index $creditname}
  8. {if $creditname['title'] != '***'}
  9. <li {if $do == 'credit_record' && $type == $index} class="active"{/if}><a href="{php echo url('mc/creditmanage/credit_record', array('type' => $index, 'uid' => $uid));}">{$creditname['title']}日志</a></li>
  10. {/if}
  11. {/loop}
  12. </ul>
  13. {if $do == 'credit_record'}
  14. <div class="panel panel-default">
  15. <div class=" panel-body table-responsive">
  16. <table class="table table-hover">
  17. <thead>
  18. <tr>
  19. <th style="width:100px">账户类型</th>
  20. <th style="width:100px">操作员</th>
  21. {if $type == 'credit2'}
  22. <th style="width:100px">消费金额</th>
  23. <th style="width:100px">实收金额</th>
  24. {/if}
  25. <th style="width:100px">数量</th>
  26. <th style="width:100px">模块</th>
  27. <th style="width:200px">操作时间</th>
  28. <th>备注</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {loop $data $da}
  33. <tr>
  34. <td>{$creditnames[$type]['title']}</td>
  35. <td>{if $da['username']}{$da['username']}{else}本人{/if}</td>
  36. {if $type == 'credit2'}
  37. <td>{php echo abs($da['num'])}元</td>
  38. <td>{php echo abs($da['final_num'])}元</td>
  39. {/if}
  40. <td>{$da['num']}</td>
  41. <td>
  42. {if !empty($da['module'])}
  43. {$modules['card']['title']}
  44. {else}
  45. 未知
  46. {/if}
  47. </td>
  48. <td>{php echo date('Y-m-d H:i:s', $da['createtime'])}</td>
  49. <td style="white-space:normal">{$da['remark']}</td>
  50. </tr>
  51. {/loop}
  52. </tbody>
  53. </table>
  54. </div>
  55. </div>
  56. {$pager}
  57. {elseif $do == 'stat'}
  58. <style>
  59. .account-stat{overflow:hidden; color:#666;}
  60. .account-stat .account-stat-btn{width:100%; overflow:hidden;}
  61. .account-stat .account-stat-btn > div{text-align:center; margin-bottom:5px;margin-right:2%; float:left;width:18%; padding-top:10px;font-size:16px; border-left:1px #DDD solid;}
  62. .account-stat .account-stat-btn > div:first-child{border-left:0;}
  63. .account-stat .account-stat-btn .stat{width:80%;margin:10px auto;font-size:15px}
  64. </style>
  65. <div class="panel panel-default" style="padding:1em">
  66. <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin: -1em -1em 1em -1em;">
  67. <div class="navbar-header">
  68. <a class="navbar-brand" href="javascript:;">数据统计</a>
  69. <ul class="nav navbar-nav navbar-right">
  70. <li {if $_GPC['type'] == 1}class="active"{/if}><a href="{php echo url('mc/creditmanage/stat', array('uid' => $uid, type => 1));}">今日</a></li>
  71. <li {if $_GPC['type'] == -1}class="active"{/if}><a href="{php echo url('mc/creditmanage/stat', array('uid' => $uid, type => -1));}">昨日</a></li>
  72. <form class="navbar-form navbar-left" role="search" id="form1">
  73. <input name="c" value="mc" type="hidden" />
  74. <input name="a" value="creditmanage" type="hidden" />
  75. <input name="do" value="stat" type="hidden" />
  76. <input name="uid" value="{$uid}" type="hidden" />
  77. {php echo tpl_form_field_daterange('datelimit', array('start' => date('Y-m-d', $starttime),'end' => date('Y-m-d', $endtime)), '')}
  78. </form>
  79. </ul>
  80. </div>
  81. </nav>
  82. <div class="account-stat">
  83. <div class="account-stat-btn">
  84. {loop $creditnames $key $li}
  85. <div>
  86. <strong>{$li['title']}</strong>
  87. <div id="rule" class="stat">
  88. <div>增加 <strong><span class="text-success">{$data[$key]['add']}</span></strong></div>
  89. <div>减少 <strong><span class="text-danger">{$data[$key]['del']}</span></strong></div>
  90. </div>
  91. </div>
  92. {/loop}
  93. </div>
  94. </div>
  95. </div>
  96. <script>
  97. require(['chart', 'daterangepicker'], function(c) {
  98. $('.daterange').on('apply.daterangepicker', function(ev, picker) {
  99. $('#form1')[0].submit();
  100. });
  101. });
  102. </script>
  103. {/if}
  104. {template 'common/footer'}