4d987c245e6f9ee3318f71493bcd3b4f.php 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_W['attachurl_remote']); ?>',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : <?php echo json_encode($_W['account']);?>,
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. .img-40{
  94. width:40px;height:40px;
  95. }
  96. </style>
  97. </head>
  98. <body layadmin-themealias="default">
  99. <table id="demo" lay-filter="test"></table>
  100. <div class="layui-fluid">
  101. <div class="layui-card">
  102. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">兑换记录</span></div>
  103. <div class="layui-card-body" style="padding:15px;">
  104. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  105. <input type="hidden" name="c" value="virtualcard" />
  106. <input type="hidden" name="a" value="exchangerecord" />
  107. <input type="hidden" name="code_id" value="<?php echo ($code_id); ?>" />
  108. <div class="layui-form-item">
  109. <div class="layui-inline">
  110. <div class="layui-input-inline" style="width:280px;">
  111. <?php echo tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);;?>
  112. </div>
  113. <div class="layui-input-inline">
  114. <input type="text" class="layui-input" name='keyword' value="<?php echo ($_GPC['keyword']); ?>" placeholder="输入兑换码然后回车">
  115. </div>
  116. <div class="layui-input-inline">
  117. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  118. </div>
  119. </div>
  120. </div>
  121. </form>
  122. <form action="" class="layui-form" lay-filter="example" method="post" >
  123. <div class="row">
  124. <div class="col-md-12">
  125. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  126. <thead>
  127. <tr>
  128. <th style="width:25px;">
  129. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  130. </th>
  131. <th style="width:80px;text-align:center;">ID</th>
  132. <th style="">兑换号</th>
  133. <th>兑换用户</th>
  134. <th style="width:180px;">下单用户</th>
  135. <th style="">兑换时间</th>
  136. <th style="width: 100px;">兑换金额</th>
  137. </tr>
  138. </thead>
  139. <tbody>
  140. <?php foreach( $list as $item ){ ?>
  141. <tr>
  142. <td>
  143. <input type='checkbox' name="item_checkbox" lay-skin="primary" value="<?php echo ($item['id']); ?>"/>
  144. </td>
  145. <td>
  146. <?php echo ($item['id']); ?>
  147. </td>
  148. <td>
  149. <?php echo ($item['code_sn']); ?>
  150. </td>
  151. <td>
  152. <div rel="pop" style="display: flex" >
  153. <img class="img-40" src="<?php echo tomedia($item['use_user_info']['avatar']);?>" style='border-radius:50%;border:1px solid #efefef;' />
  154. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  155. <span class="nickname">
  156. <?php echo ($item['use_user_info']['username']); ?>
  157. <br>
  158. 手机:<?php if( !empty($item['use_user_info']['telephone']) ){ echo ($item['use_user_info']['telephone']); ?> <?php } else {?>暂无<?php }?>
  159. </span>
  160. </span>
  161. </div>
  162. </td>
  163. <td>
  164. <div rel="pop" style="display: flex" >
  165. <img class="img-40" src="<?php echo tomedia($item['buy_user_info']['avatar']);?>" style='border-radius:50%;border:1px solid #efefef;' />
  166. <span style="display: flex;flex-direction: column;justify-content: center;align-items: flex-start;padding-left: 5px">
  167. <span class="nickname">
  168. <?php echo ($item['buy_user_info']['username']); ?><br/>
  169. 手机:<?php if( !empty($item['buy_user_info']['telephone']) ){ echo ($item['buy_user_info']['telephone']); ?> <?php } else {?>暂无<?php }?>
  170. </span>
  171. </span>
  172. </div>
  173. </td>
  174. <td>
  175. <?php echo ($item['adddate']); ?>
  176. </td>
  177. <td>
  178. ¥<?php echo ($item['money']); ?>
  179. </td>
  180. </tr>
  181. <?php } ?>
  182. </tbody>
  183. <tfoot>
  184. <tr>
  185. <td colspan="7" style="text-align: right">
  186. <?php echo ($pager); ?>
  187. </td>
  188. </tr>
  189. </tfoot>
  190. </table>
  191. </div>
  192. </div>
  193. </form>
  194. </div>
  195. </div>
  196. </div>
  197. <script src="/layuiadmin/layui/layui.js"></script>
  198. <script>
  199. layui.config({
  200. base: '/layuiadmin/' //静态资源所在路径
  201. }).extend({
  202. index: 'lib/index' //主入口模块
  203. }).use('index');
  204. </script>
  205. <script>
  206. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  207. var layer = layui.layer;
  208. var $;
  209. layui.use(['jquery', 'layer','form'], function(){
  210. $ = layui.$;
  211. var form = layui.form;
  212. $('.deldom').click(function(){
  213. var s_url = $(this).attr('data-href');
  214. layer.confirm($(this).attr('data-confirm'), function(index){
  215. $.ajax({
  216. url:s_url,
  217. type:'post',
  218. dataType:'json',
  219. success:function(info){
  220. if(info.status == 0)
  221. {
  222. layer.msg(info.result.message,{icon: 1,time: 2000});
  223. }else if(info.status == 1){
  224. var go_url = location.href;
  225. if( info.result.hasOwnProperty("url") )
  226. {
  227. go_url = info.result.url;
  228. }
  229. layer.msg('操作成功',{time: 1000,
  230. end:function(){
  231. location.href = info.result.url;
  232. }
  233. });
  234. }
  235. }
  236. })
  237. });
  238. })
  239. $('.btn-operation').click(function(){
  240. var ids_arr = [];
  241. var obj = $(this);
  242. var s_toggle = $(this).attr('data-toggle');
  243. var s_url = $(this).attr('data-href');
  244. $("input[name=item_checkbox]").each(function() {
  245. if( $(this).prop('checked') )
  246. {
  247. ids_arr.push( $(this).val() );
  248. }
  249. })
  250. if(ids_arr.length < 1)
  251. {
  252. layer.msg('请选择要操作的内容');
  253. }else{
  254. var can_sub = true;
  255. if( s_toggle == 'batch-remove' )
  256. {
  257. can_sub = false;
  258. layer.confirm($(obj).attr('data-confirm'), function(index){
  259. $.ajax({
  260. url:s_url,
  261. type:'post',
  262. dataType:'json',
  263. data:{ids:ids_arr},
  264. success:function(info){
  265. if(info.status == 0)
  266. {
  267. layer.msg(info.result.message,{icon: 1,time: 2000});
  268. }else if(info.status == 1){
  269. var go_url = location.href;
  270. if( info.result.hasOwnProperty("url") )
  271. {
  272. go_url = info.result.url;
  273. }
  274. layer.msg('操作成功',{time: 1000,
  275. end:function(){
  276. location.href = info.result.url;
  277. }
  278. });
  279. }
  280. }
  281. })
  282. });
  283. }else{
  284. $.ajax({
  285. url:s_url,
  286. type:'post',
  287. dataType:'json',
  288. data:{ids:ids_arr},
  289. success:function(info){
  290. if(info.status == 0)
  291. {
  292. layer.msg(info.result.message,{icon: 1,time: 2000});
  293. }else if(info.status == 1){
  294. var go_url = location.href;
  295. if( info.result.hasOwnProperty("url") )
  296. {
  297. go_url = info.result.url;
  298. }
  299. layer.msg('操作成功',{time: 1000,
  300. end:function(){
  301. location.href = info.result.url;
  302. }
  303. });
  304. }
  305. }
  306. })
  307. }
  308. }
  309. })
  310. form.on('switch(statewsitch)', function(data){
  311. var s_url = $(this).attr('data-href')
  312. var s_value = 1;
  313. if(data.elem.checked)
  314. {
  315. s_value = 1;
  316. }else{
  317. s_value = 0;
  318. }
  319. $.ajax({
  320. url:s_url,
  321. type:'post',
  322. dataType:'json',
  323. data:{value:s_value},
  324. success:function(info){
  325. if(info.status == 0)
  326. {
  327. layer.msg(info.result.message,{icon: 1,time: 2000});
  328. }else if(info.status == 1){
  329. var go_url = location.href;
  330. if( info.result.hasOwnProperty("url") )
  331. {
  332. go_url = info.result.url;
  333. }
  334. layer.msg('操作成功',{time: 1000,
  335. end:function(){
  336. location.href = info.result.url;
  337. }
  338. });
  339. }
  340. }
  341. })
  342. });
  343. form.on('checkbox(checkboxall)', function(data){
  344. if(data.elem.checked)
  345. {
  346. $("input[name=item_checkbox]").each(function() {
  347. $(this).prop("checked", true);
  348. });
  349. $("input[name=checkall]").each(function() {
  350. $(this).prop("checked", true);
  351. });
  352. }else{
  353. $("input[name=item_checkbox]").each(function() {
  354. $(this).prop("checked", false);
  355. });
  356. $("input[name=checkall]").each(function() {
  357. $(this).prop("checked", false);
  358. });
  359. }
  360. form.render('checkbox');
  361. });
  362. //监听提交
  363. form.on('submit(formDemo)', function(data){
  364. $.ajax({
  365. url: data.form.action,
  366. type: data.form.method,
  367. data: data.field,
  368. dataType:'json',
  369. success: function (info) {
  370. if(info.status == 0)
  371. {
  372. layer.msg(info.result.message,{icon: 1,time: 2000});
  373. }else if(info.status == 1){
  374. var go_url = location.href;
  375. if( info.result.hasOwnProperty("url") )
  376. {
  377. go_url = info.result.url;
  378. }
  379. layer.msg('操作成功',{time: 1000,
  380. end:function(){
  381. location.href = info.result.url;
  382. }
  383. });
  384. }
  385. }
  386. });
  387. return false;
  388. });
  389. })
  390. </script>
  391. </body>