No Description
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.

money_index.htm 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  1. {include file="public/layout" /}
  2. <body class="bodystyle" style="cursor: default; -moz-user-select: inherit;">
  3. <div id="append_parent"></div>
  4. <div id="ajaxwaitid"></div>
  5. {include file="order/left" /}
  6. <div class="page" style="min-width:auto;margin-left:100px;padding-bottom: 0;">
  7. <div class="flexigrid flexigrid-xin">
  8. <div class="header-bar">
  9. <div class="more">
  10. <div class="search">
  11. <div class="content">
  12. <form id="postForm" action="{:url('Member/money_index')}" method="get" onsubmit="layer_loading('正在处理');" style="display: unset;">
  13. {$searchform.hidden|default=''}
  14. <div class="ey-form-item"><label class="users-form-item-label">充值状态:</label>
  15. <div class="users-form-item-content">
  16. <div class="users-select">
  17. <div tabindex="0" class="users-select-selection">
  18. <div class="">
  19. <select name="status" id="status">
  20. <option value="2" {eq name="$Request.param.status" value="2"}selected{/eq}>已充值</option>
  21. <option value="1" {eq name="$Request.param.status" value="1"}selected{/eq}>未付款</option>
  22. <option value="" {if condition="!$Request.param.status"}selected{/if}>全部</option>
  23. </select>
  24. </div>
  25. </div>
  26. </div>
  27. </div>
  28. </div>
  29. <div class="ey-form-item"><label class="users-form-item-label">关键词:</label>
  30. <div class="users-form-item-content">
  31. <div class="users-select">
  32. <div tabindex="0" class="users-select-selection">
  33. <div class="sDiv2">
  34. <input type="text" size="50" name="keywords" value="{$Request.param.keywords}" class="qsbox" style="width: 170px;" placeholder="订单号或用户名">
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <div class="ey-form-item"><label class="users-form-item-label">支付方式:</label>
  41. <div class="users-form-item-content">
  42. <div class="users-select">
  43. <div tabindex="0" class="users-select-selection">
  44. <div class="">
  45. <select name="pay_method" id="pay_method">
  46. <option value="" {if condition="!$Request.param.pay_method"}selected{/if}>全部</option>
  47. <option value="admin_pay" {eq name="$Request.param.pay_method" value="admin_pay"}selected{/eq}>后台充值</option>
  48. <option value="wechat" {eq name="$Request.param.pay_method" value="wechat"}selected{/eq}>微信支付</option>
  49. <option value="alipay" {eq name="$Request.param.pay_method" value="alipay"}selected{/eq}>支付宝支付</option>
  50. </select>
  51. </div>
  52. </div>
  53. </div>
  54. </div>
  55. </div>
  56. <div class="ey-form-item"><label class="users-form-item-label">会员级别:</label>
  57. <div class="users-form-item-content">
  58. <div class="users-select">
  59. <div tabindex="0" class="users-select-selection">
  60. <div class="">
  61. <select name="level" id="level">
  62. <option value="" {if condition="!$Request.param.level"}selected{/if}>全部</option>
  63. {volist name="$usersLevel" id="ul"}
  64. <option value="{$ul.level_id}" {if condition='$Request.param.level == $ul.level_id'}selected{/if}>{$ul.level_name}</option>
  65. {/volist}
  66. </select>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="ey-form-item"><label class="users-form-item-label">下单时间:</label>
  73. <div class="users-form-item-content">
  74. <div class="users-select">
  75. <div tabindex="0" class="users-select-selection">
  76. <div class="sDiv2">
  77. <input type="text" name="add_time_begin" id="add_time_begin" autocomplete="off" value="{$Request.param.add_time_begin}" class="qsbox" placeholder="起始日期">
  78. </div>
  79. &nbsp;至&nbsp;
  80. <div class="sDiv2">
  81. <input type="text" name="add_time_end" id="add_time_end" autocomplete="off" value="{$Request.param.add_time_end}" class="qsbox" placeholder="结束日期">
  82. </div>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="ey-form-item">
  88. <div class="users-form-item-content">
  89. <span class="bt-xin" onclick="OrderQuery();">查询</span>
  90. <span class="bt-xin-no" onclick="OrderQuery('reset');">重置</span>
  91. <div class="fbutton">
  92. <a href="javascript:void(0);" onclick="OrderExcelExport(this);" data-url="{:url('Order/ajax_order_excel_export')}" class="bt-xin-xia"><i class="iconfont e-xiazai"></i>导出</a>
  93. </div>
  94. </div>
  95. </div>
  96. </form>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="page" style="min-width:auto;margin-left:100px;">
  104. <div class="flexigrid flexigrid-xin">
  105. <div class="tableDiv " style="height: auto;">
  106. <div id="flexigrid" cellpadding="0" cellspacing="0" border="0">
  107. <table cellspacing="0" cellpadding="0" style="width: 100%">
  108. <thead>
  109. <tr>
  110. <th abbr="ac_id" axis="col4" class="w200">
  111. <div class="">订单号</div>
  112. </th>
  113. <th abbr="ac_id" axis="col4" class="">
  114. <div class="">充值金额</div>
  115. </th>
  116. <th abbr="article_title" axis="col3" class="w160">
  117. <div class="">用户</div>
  118. </th>
  119. <th abbr="article_title" axis="col3" class="w160">
  120. <div class="">会员级别</div>
  121. </th>
  122. <th abbr="ac_id" axis="col4" class="w160">
  123. <div class="tc">充值时间</div>
  124. </th>
  125. <th abbr="ac_id" axis="col4" class="w100">
  126. <div class="tc">充值状态</div>
  127. </th>
  128. <th abbr="ac_id" axis="col4" class="w100">
  129. <div class="tc">操作</div>
  130. </th>
  131. </tr>
  132. </thead>
  133. <tbody class="no-border">
  134. {empty name="list"}
  135. <tr>
  136. <td class="no-data" align="center" axis="col0" colspan="50">
  137. <div class="">
  138. <div class="no_pic"><img src="__SKIN__/images/null-data.png"></div>
  139. </div>
  140. </td>
  141. </tr>
  142. {else/}
  143. {foreach name="list" item="vo" key="k" }
  144. <tr>
  145. <td >
  146. <div class="">
  147. <!-- 此处判断后台充值,微信支付,支付宝支付 -->
  148. {if condition='$vo.pay_method == "wechat"'}
  149. <i class="iconfont e-weixinzhifu zhifu"></i>
  150. {elseif condition='$vo.pay_method == "alipay"'/}
  151. <i class="iconfont e-zhifubaozhifu zhifu"></i>
  152. {else /}
  153. <i class="iconfont e-yuezhifu zhifu"></i>
  154. {/if}
  155. {$vo.order_number}
  156. </div>
  157. </td>
  158. <td> <div class="green"> ¥{$vo.money} </div> </td>
  159. <td class="sort">
  160. <div class="d-flex" style=" padding-left: 10px;">
  161. <img id="img_head_pic" style="margin-right: 5px;float: unset;border: 1px solid #e9edef;width: 24px;height: 24px;border-radius: 50%;" src="{$vo.head_pic|get_head_pic=###,false,$vo['sex']}" />
  162. <a href="javascript:void(0);" data-href="{:url('Member/users_edit', ['id'=>$vo.users_id,'from'=>'money_index','iframe'=>1])}" onclick="openFullframe(this, '会员资料','100%','100%');" class="l-height-24">{$vo.username}</a>
  163. </div>
  164. </td>
  165. <td class="sort"> <div class=""> {$usersLevel[$vo.level]['level_name']} </div> </td>
  166. <td> <div class="tc"> {$vo.add_time|date='Y-m-d H:i:s',###} </div> </td>
  167. <td class=""> <div class="tc"> {$pay_status_arr[$vo['status']]} </div> </td>
  168. <td class="">
  169. <div class="tc">
  170. {if condition='$vo.status == 1'}
  171. <a class="btn blue" href="javascript:void(0);" data-url="{:url('Member/money_mark_order')}" data-moneyid="{$vo.moneyid}" data-title="手工充值" data-status="{$vo.status}" data-username="{$vo.username}" data-money="{$vo.money}" onClick="handle(this);">充值</a>
  172. <i></i>
  173. {elseif condition='$vo.status == 3' /}
  174. <a class="btn blue" href="javascript:void(0);" data-url="{:url('Member/money_mark_order')}" data-moneyid="{$vo.moneyid}" data-title="撤销充值" data-status="{$vo.status}" data-username="{$vo.username}" data-money="{$vo.money}" onClick="handle(this);">撤销</a>
  175. <i></i>
  176. {else /}
  177. <a class="btn grey" href="javascript:void(0);" data-moneyid="{$vo.moneyid}" data-title="撤销充值" data-status="{$vo.status}" data-username="{$vo.username}" data-money="{$vo.money}">撤销</a>
  178. <i></i>
  179. {/if}
  180. </div>
  181. </td>
  182. </tr>
  183. {/foreach}
  184. {/empty}
  185. </tbody>
  186. </table>
  187. </div>
  188. <div class="iDiv" style="display: none;"></div>
  189. </div>
  190. {notempty name="list"}
  191. <div class="tDiv"> <div class="tDiv2"> {include file="public/page" /} </div> <div style="clear:both"></div> </div>
  192. {/notempty}
  193. </div>
  194. </div>
  195. <script type="text/javascript">
  196. $(function() {
  197. $('input[name*=ids]').click(function() {
  198. if ($('input[name*=ids]').length == $('input[name*=ids]:checked').length) {
  199. $('.checkAll').prop('checked','checked');
  200. } else {
  201. $('.checkAll').prop('checked', false);
  202. }
  203. });
  204. $('input[type=checkbox].checkAll').click(function(){
  205. $('input[type=checkbox]').prop('checked',this.checked);
  206. });
  207. });
  208. layui.use('laydate', function() {
  209. var laydate = layui.laydate;
  210. //执行一个laydate实例
  211. laydate.render({
  212. elem: '#add_time_begin' //指定元素
  213. });
  214. laydate.render({
  215. elem: '#add_time_end' //指定元素
  216. });
  217. });
  218. $(document).ready(function() {
  219. // 表格行点击选中切换
  220. $('#flexigrid > table>tbody >tr').click(function() {
  221. $(this).toggleClass('trSelected');
  222. });
  223. });
  224. // 订单查询
  225. function OrderQuery(isReset) {
  226. if (isReset && 'reset' == isReset) {
  227. window.location.href = "{:url('Member/money_index', ['status'=>2])}";
  228. } else {
  229. $('#postForm').submit();
  230. }
  231. }
  232. // AJAX调用下载
  233. function OrderExcelExport(obj) {
  234. layer_loading('订单导出中');
  235. $.ajax({
  236. type: 'post',
  237. url : $(obj).attr('data-url'),
  238. data: {
  239. _ajax: 1,
  240. // 导出类型,充值订单固定值2
  241. export_type: 2,
  242. // 搜索条件信息,可为空
  243. level: "{$Request.param.level}",
  244. status: "{$Request.param.status}",
  245. keywords: "{$Request.param.keywords}",
  246. pay_method: "{$Request.param.pay_method}",
  247. end_time: "{$Request.param.add_time_end}",
  248. start_time: "{$Request.param.add_time_begin}"
  249. },
  250. dataType: 'json',
  251. success: function(res) {
  252. layer.closeAll();
  253. if (1 == res.code) {
  254. window.location.href = res.url;
  255. } else {
  256. showErrorAlert(res.msg);
  257. }
  258. },
  259. error: function(e) {
  260. layer.closeAll();
  261. showErrorAlert(e.responseText);
  262. }
  263. });
  264. }
  265. // 订单处理
  266. function handle(obj) {
  267. var msg = '';
  268. var status = $(obj).attr('data-status');
  269. var username = $(obj).attr('data-username');
  270. var money = $(obj).attr('data-money');
  271. if (1 == status) {
  272. msg = "将为【<font color='red'>"+username+"</font>】账户充值<font color='red'>¥"+money+"元</font>,确认执行?";
  273. } else if (3 == status) {
  274. msg = "将扣除【<font color='red'>"+username+"</font>】账户余额<font color='red'>¥"+money+"元</font>,确认执行?";
  275. }
  276. layer.confirm(msg, {
  277. shade: layer_shade,
  278. area: ['480px', '190px'],
  279. move: false,
  280. title: '提示',
  281. btnAlign:'r',
  282. closeBtn: 3,
  283. btn: ['确定','取消'] ,//按钮
  284. success: function () {
  285. $(".layui-layer-content").css('text-align', 'left');
  286. }
  287. }, function() {
  288. layer_loading('正在处理');
  289. // 确定
  290. $.ajax({
  291. type : 'post',
  292. url : $(obj).attr('data-url'),
  293. data : {moneyid:$(obj).attr('data-moneyid'), _ajax:1},
  294. dataType : 'json',
  295. success : function(res){
  296. layer.closeAll();
  297. if(res.code == 1){
  298. layer.msg(res.msg, {icon: 1, time:1000}, function(){
  299. window.location.reload();
  300. });
  301. }else{
  302. layer.alert(res.msg, {icon: 2, title:false});
  303. }
  304. },
  305. error:function(e){
  306. layer.closeAll();
  307. layer.alert(e.responseText, {icon: 2, title:false});
  308. }
  309. })
  310. }, function(index) {
  311. layer.closeAll();
  312. });
  313. return false;
  314. }
  315. </script>
  316. {include file="public/footer" /}