973fcf8a2113dfcccb6baf18b6b014f2.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877
  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?v=32" 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;
  95. height: 40px;
  96. }
  97. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  98. width:auto!important;
  99. }
  100. </style>
  101. </head>
  102. <body layadmin-themealias="default">
  103. <table id="demo" lay-filter="test"></table>
  104. <div class="layui-fluid">
  105. <div class="layui-card">
  106. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">售后订单管理
  107. </span>
  108. </div>
  109. <div class="layui-tab layui-tab-brief" >
  110. <ul class="layui-tab-title">
  111. <li <?php if( (empty($_GPC['state']) || $_GPC['state']=='-1' )&& $_GPC['state'] !='0' ){ ?>class="layui-this"<?php } ?>><a href="<?php echo U('order/orderaftersales', array('state' => -1));?>">全部申请</a></li>
  112. <li <?php if($_GPC['state']=='0'){ ?>class="layui-this"<?php } ?> ><a href="<?php echo U('order/orderaftersales', array('state' => 0));?>">待处理</a></li>
  113. <li <?php if($_GPC['state']=='6'){ ?>class="layui-this"<?php } ?> ><a href="<?php echo U('order/orderaftersales', array('state' => 6));?>">退货中</a></li>
  114. <li <?php if($_GPC['state']=='3'){ ?>class="layui-this"<?php } ?> ><a href="<?php echo U('order/orderaftersales', array('state' => 3));?>">已完成</a></li>
  115. <li <?php if( $_GPC['state']=='1' ){ ?>class="layui-this"<?php } ?> ><a href="<?php echo U('order/orderaftersales', array('state' => 1));?>">已拒绝</a></li>
  116. </ul>
  117. </div>
  118. <div class="layui-card-body" style="padding:15px;">
  119. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  120. <input type="hidden" name="c" value="order" />
  121. <input type="hidden" name="a" value="orderaftersales" />
  122. <input type="hidden" name="order_status_id" value="<?php echo ($order_status_id); ?>" />
  123. <div class="layui-form-item">
  124. <div class="layui-inline">
  125. <div class="layui-input-inline" style="width:100px;">
  126. <select name='searchtime' lay-ignore class='layui-input layui-unselect' style="width:100px;padding:0 5px;" id="searchtime">
  127. <option value=''>不按时间</option>
  128. <option value='create' <?php if( $searchtime=='create'){ ?>selected<?php } ?>>下单时间</option>
  129. <option value='pay' <?php if( $searchtime=='pay'){ ?>selected<?php } ?>>付款时间</option>
  130. <option value='send' <?php if( $searchtime=='send'){ ?>selected<?php } ?>>发货时间</option>
  131. <option value='finish' <?php if( $searchtime=='finish'){ ?>selected<?php } ?>>完成时间</option>
  132. </select>
  133. </div>
  134. <div class="layui-input-inline" style="width:280px;">
  135. <?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);;?>
  136. </div>
  137. <div class="layui-input-inline" style="width:100px;">
  138. <select name='delivery' lay-ignore class='layui-input layui-unselect' style="width:100px;padding:0 5px;" id="type">
  139. <option value=''>配送方式</option>
  140. <option value='pickup' <?php if( $delivery=='pickup'){ ?>selected<?php } ?>>自提</option>
  141. <option value='tuanz_send' <?php if( $delivery=='tuanz_send'){ ?>selected<?php } ?>>团长配送</option>
  142. <option value='express' <?php if( $delivery=='express'){ ?>selected<?php } ?>>快递</option>
  143. </select>
  144. </div>
  145. <div class="layui-input-inline" style="width:110px;">
  146. <select name='searchfield' lay-ignore class='layui-input layui-unselect' style="width:110px;padding:0 5px;" >
  147. <option value='ordersn' <?php if( $searchfield=='ordersn'){ ?>selected<?php } ?>>订单号</option>
  148. <option value='member' <?php if( $searchfield=='member'){ ?>selected<?php } ?>>会员信息</option>
  149. <option value='mobile' <?php if( $searchfield=='mobile'){ ?>selected<?php } ?>>手机号</option>
  150. <option value='address' <?php if( $searchfield=='address'){ ?>selected<?php } ?>>收件人信息</option>
  151. <option value='location' <?php if( $searchfield=='location'){ ?>selected<?php } ?>>地址信息</option>
  152. <option value='shipping_no' <?php if( $searchfield=='shipping_no'){ ?>selected<?php } ?>>快递单号</option>
  153. <option value='goodstitle' <?php if( $searchfield=='goodstitle'){ ?>selected<?php } ?>>商品名称</option>
  154. <option value='trans_id' <?php if( $searchfield=='trans_id'){ ?>selected<?php } ?>>微信支付单号</option>
  155. <?php if($is_community != 1){ ?>
  156. <option value='head_name' <?php if( $searchfield=='head_name'){ ?>selected<?php } ?>>团长姓名</option>
  157. <option value='head_address' <?php if( $searchfield=='head_address'){ ?>selected<?php } ?>>小区名称</option>
  158. <?php } ?>
  159. <?php if (!defined('ROLE') || ROLE != 'agenter' ) { ?>
  160. <option value='supply_name' <?php if( $searchfield=='supply_name'){ ?>selected<?php } ?>>供应商名称</option>
  161. <?php } ?>
  162. <!--<option value='goodssn' <?php if( $searchfield=='goodssn'){ ?>selected<?php } ?>>商品编码</option>-->
  163. </select>
  164. </div>
  165. <div class="layui-input-inline" >
  166. <input type="text" class="layui-input" name="keyword" value="<?php echo ($keyword); ?>" placeholder="请输入关键词"/>
  167. </div>
  168. <input type="hidden" name="export" id="export" value="0">
  169. <div class="layui-input-inline">
  170. <button class="layui-btn layui-btn-sm" data-export="0" type="submit"> 搜索</button>
  171. <button type="submit" name="export" data-export="1" value="1" class="layui-btn layui-btn-sm">导出</button>
  172. </div>
  173. </div>
  174. </div>
  175. </form>
  176. <form action="" class="layui-form" lay-filter="example" method="post" >
  177. <div class="row">
  178. <div class="list-div list-tb-div">
  179. <table cellpadding="0" cellspacing="0" border="0">
  180. <thead>
  181. <tr>
  182. <th width="3%" class="sign"><div class="tDiv">
  183. <label for="all_list" class="checkbox_stars"></label></div></th>
  184. <th width="25%"><div class="tDiv">订单号</div></th>
  185. <th width="9%"><div class="tDiv">单价/数量</div></th>
  186. <th width="12%"><div class="tDiv">买家</div></th>
  187. <th width="8%"><div class="tDiv">支付/配送</div></th>
  188. <th width="14%"><div class="tDiv">小区/团长</div></th>
  189. <th width="10%"><div class="tDiv">价格</div></th>
  190. <th width="8%"><div class="tDiv">处理状态</div></th>
  191. <th width="9%"><div class="tDiv">操作</div></th>
  192. </tr>
  193. </thead>
  194. </table>
  195. <table cellpadding="0" cellspacing="0" border="0">
  196. <colgroup>
  197. <col width="28%">
  198. <col width="9%">
  199. <col width="12%">
  200. <col width="8%">
  201. <col width="14%">
  202. <col width="10%">
  203. <col width="9%">
  204. <col width="8%">
  205. </colgroup>
  206. <tbody>
  207. <?php foreach( $list as $item ){ ?>
  208. <tr class="tr-order-sn">
  209. <td colspan="10">
  210. <div class="tDiv ml10">
  211. <span class="sign">
  212. </span>
  213. <span class="words">订单号: <?php echo ($item['order_num_alias']); ?></span>
  214. <span class="words">下单时间:<?php echo date('Y-m-d',$item['date_added']);?>&nbsp <?php echo date('H:i:s',$item['date_added']);?></span>
  215. <span class="words">
  216. <?php if(in_array($item['ore_state'], array(3))){ ?>&nbsp;<span class="label label-success"><?php echo ($order_refund_state[$item['ore_state']]); ?></span><?php } ?>
  217. <?php if( in_array($item['ore_state'], array(1,4)) ){ ?><label class='label label-danger'><?php echo ($order_refund_state[$item['ore_state']]); ?></label><?php } ?>
  218. <?php if( in_array($item['ore_state'], array(0,5)) ){ ?><label class='label label-default'><?php echo ($order_refund_state[$item['ore_state']]); ?></label><?php } ?>
  219. </span>
  220. </div>
  221. </td>
  222. </tr>
  223. <tr class="">
  224. <td class="td-product">
  225. <?php $i =1; foreach($item['goods'] as $k => $g){ ?>
  226. <div class="tDiv relative tpinfo <?php if($i == count($item['goods'])){ ?>last<?php } ?> ">
  227. <div class="img"><img width="70" src="<?php echo tomedia($g['goods_images']);?>" alt="" /></div>
  228. <div class="product-info">
  229. <div class="name mb5">
  230. <?php echo ($g['name']); ?>
  231. </div>
  232. <div>
  233. <?php if( !empty($g['option_sku'])){ echo ($g['option_sku']); } ?>
  234. </div>
  235. <div class="order_icon_items">
  236. </div>
  237. </div>
  238. </div>
  239. <?php $i++; } ?>
  240. </td>
  241. <td class="td-price" style="vertical-align: top;">
  242. <?php $i =1; foreach($item['goods'] as $k => $g){ ?>
  243. <div class="tDiv tpinfo <?php if($i == count($item['goods'])){ ?>last<?php } ?>" style="display: flex;align-items: center;">¥<?php echo round($g['total']/$g['quantity'],2); ?>
  244. x <?php echo ($g['quantity']); ?> </div>
  245. <?php $i++; } ?>
  246. </td>
  247. <td>
  248. <div class="tDiv" >
  249. <font style="color: #999;"><?php echo ($item['shipping_name']); ?></font><br/><font style="color: #999;"><?php echo ($item['shipping_tel']); ?></font>
  250. <br/>
  251. <?php if (defined('ROLE') && ROLE == 'agenter' ){ ?>
  252. <font style="color: #999;">会员名:</font><?php echo ($item['nickname']); ?>
  253. <?php if( !empty($item['member_content']) ){ ?>
  254. <br/><font class="text-danger"><?php echo ($item['member_content']); ?></font>
  255. <?php } ?>
  256. <?php }else{ ?>
  257. <?php if($s_id == 1){ ?>
  258. <a class="text-primary" href="<?php echo U('user/detail',array('id'=>$item['member_id']));?>"><font style="color: #999;">会员名:</font><?php echo ($item['nickname']); ?></a>
  259. <?php }else{ ?>
  260. <a class="text-primary user"><font style="color: #999;">会员名:</font><?php echo ($item['nickname']); ?></a>
  261. <?php } ?>
  262. <?php if( !empty($item['member_content']) ){ ?>
  263. <br/><font class="text-danger"><?php echo ($item['member_content']); ?></font>
  264. <?php } ?>
  265. <?php } ?>
  266. <br/>
  267. </div>
  268. </td>
  269. <td>
  270. <div class="tDiv" style="height: 100px;">
  271. <!-- 已支付 -->
  272. <?php if( $item['order_status_id'] != 3 && $item['order_status_id'] != 5){ ?>
  273. <?php if( $item['payment_code']=='yuer'){ ?>
  274. <span> <i class="text-warning" style="font-size: 17px;"></i><span>余额支付</span></span>
  275. <?php }else if( $item['payment_code']=='admin' ){ ?>
  276. <span> <i class=" text-danger" style="font-size: 17px"></i>后台付款</span>
  277. <?php }else{ ?>
  278. <span class="line-text"> 微信支付</span>
  279. <?php } ?>
  280. <?php }elseif( $item['order_status_id'] == 3 || $item['order_status_id'] == 5 ){ ?>
  281. <!-- 未支付 -->
  282. <?php if( $item['paytypevalue']!=3){ ?>
  283. <label class='label label-default'>未支付</label>
  284. <?php }else{ ?>
  285. <span> <i class="text-primary style="font-size: 17px"></i>货到付款</span>
  286. <?php } ?>
  287. <?php } ?>
  288. <br/>
  289. <?php if( $item['delivery']=='pickup'){ ?><font class="text-danger">(自提)</font><?php } ?>
  290. <?php if( $item['delivery']=='express'){ ?><font class="text-danger">(快递)</font><?php } ?>
  291. <?php if( $item['delivery']=='tuanz_send'){ ?><font class="text-danger">(团长配送)</font><?php } ?>
  292. </div>
  293. </td>
  294. <?php if($is_can_look_headinfo){ ?>
  295. <td>
  296. <div class="tDiv" style="text-align: left;">
  297. <div style='margin-top:5px;display:block;float:left;'>
  298. <?php echo ($item['head_name']); ?>
  299. </div>
  300. <div style='margin-top:5px;display:block;float:left;'>
  301. 电话:<?php echo ($item['head_mobile']); ?>
  302. </div>
  303. <div style='margin-top:5px;display:block;float:left;cursor: pointer;' >
  304. <font style="color: #999;">小区:</font> <font class="line-text"><?php echo ($item['community_name']); ?> (<?php echo ($item['province']); ?> <?php echo ($item['city']); ?>)
  305. </div>
  306. </div>
  307. </td>
  308. <?php }else{ ?>
  309. <td>
  310. <div class="tDiv" style="text-align: left;">
  311. <div style='margin-top:5px;display:block; text-align: center;'>
  312. <?php echo ($item['head_name']); ?>
  313. </div>
  314. </div>
  315. </td>
  316. <?php } ?>
  317. <td>
  318. <div class="tDiv" style="">
  319. <?php if($item['is_free_shipping_fare'] == 1){ ?>
  320. <span style='margin-top:5px;margin-left:5px;display:block;'>
  321. 运 费:+<?php echo round( $item['fare_shipping_free'],2);?>
  322. </span>
  323. <span style='margin-top:5px;margin-left:5px;display:block;'>
  324. 满<?php echo ($item['man_e_money']); ?>免运费:-<?php echo round( $item['fare_shipping_free'],2);?>
  325. </span>
  326. <?php }else{ ?>
  327. <span style='margin-top:5px;margin-left:5px;display:block;'>
  328. 运 费:+<?php echo round( $item['shipping_fare'],2);?>
  329. </span>
  330. <?php } ?>
  331. <?php if($item['fullreduction_money'] >0){ ?>
  332. <span style='margin-top:5px;margin-left:5px;display:block;'>
  333. 满 减:-<?php echo round( $item['fullreduction_money'],2);?>
  334. </span>
  335. <?php } ?>
  336. <?php if($item['voucher_credit'] >0){ ?>
  337. <span style='margin-top:5px;margin-left:5px;display:block;'>
  338. 优惠券:-<?php echo round( $item['voucher_credit'],2);?>
  339. </span>
  340. <?php } ?>
  341. <span style='margin-top:5px;margin-left:5px;display:block;'>
  342. 商品小计:<?php echo round($item['total'],2);?>
  343. </span>
  344. <span style='margin-top:5px;margin-left:5px;display:block;'>
  345. <?php $free_tongji = $item['total']+$item['shipping_fare']-$item['voucher_credit']-$item['fullreduction_money']; if($free_tongji < 0){ $free_tongji = 0; } ?>
  346. <?php
  347. if($item['type'] == 'integral'){ ?>
  348. 应收总款:<br/><?php echo round($item['total'] ,2);?>积分<?php if( !empty( $item['shipping_fare'] ) ){ ?>+运费:<?php echo round($item['shipping_fare'] ,2); } ?>
  349. <?php }else{ ?>
  350. 应收总款:<?php echo round($free_tongji ,2);?>
  351. <?php } ?>
  352. </span>
  353. </div>
  354. </td>
  355. <td>
  356. <div class="tDiv" style="">
  357. <span class='text-<?php echo ($item[order_status_id]); ?>'>
  358. <?php if($item['ore_state'] == 0){ ?>
  359. 待处理
  360. <?php }else if($item['ore_state'] == 1){ ?>
  361. 已拒绝
  362. <?php }else if($item['ore_state'] == 3){ ?>
  363. 已完成
  364. <?php }else if($item['ore_state'] == 5){ ?>
  365. 已拒绝
  366. <?php }else if($item['ore_state'] == 6){ ?>
  367. 退货中
  368. <?php } ?>
  369. </span>
  370. </div>
  371. </td>
  372. <td>
  373. <div class="tDiv" style="">
  374. <a class='op text-primary' href="<?php echo U('order/oprefund', array('id' => $item['order_id'],'ref_id' => $item['ref_id']));?>" >查看详情</a>
  375. <?php if($item['ore_state'] == 0){ ?>
  376. <a class='op' data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/oprefund_doform', array('ref_id' => $item['ref_id']));?>" >
  377. <i class="icow icow-flag-o" style="color: #df5254;display: inline-block;vertical-align: middle" title="平台审核"></i>
  378. 平台审核
  379. &nbsp
  380. </a>
  381. <?php } ?>
  382. <?php if($item['is_forbidden'] == 1){ ?>
  383. <p style="color:red;">禁止此用户再次申请</p>
  384. <?php } ?>
  385. </div>
  386. </td>
  387. </tr>
  388. <tr>
  389. <td colspan="8">
  390. <div style='background:#fdeeee;color:red;padding-left: 10px;'>
  391. 订单状态:<?php echo ($order_status_arr[$item['order_status_id']]); ?>
  392. </div>
  393. </td>
  394. </tr>
  395. <tr>
  396. <td colspan="8">
  397. <div style="height:20px;">&nbsp;</div>
  398. </td>
  399. </tr>
  400. <?php } ?>
  401. </tbody>
  402. <tfoot>
  403. <tr>
  404. <td colspan="0">
  405. <div class="page-table-header">
  406. </div>
  407. </td>
  408. <td colspan="8" style="text-align: right">
  409. <?php echo ($pager); ?>
  410. </td>
  411. </tr>
  412. </tfoot>
  413. </table>
  414. </div>
  415. </div>
  416. </form>
  417. </div>
  418. </div>
  419. </div>
  420. <script src="/layuiadmin/layui/layui.js"></script>
  421. <script>
  422. layui.config({
  423. base: '/layuiadmin/' //静态资源所在路径
  424. }).extend({
  425. index: 'lib/index' //主入口模块
  426. }).use('index');
  427. </script>
  428. <script>
  429. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  430. var layer = layui.layer;
  431. var $;
  432. layui.use(['jquery', 'layer','form'], function(){
  433. $ = layui.$;
  434. var form = layui.form;
  435. $('.deldom').click(function(){
  436. var s_url = $(this).attr('data-href');
  437. layer.confirm($(this).attr('data-confirm'), function(index){
  438. $.ajax({
  439. url:s_url,
  440. type:'post',
  441. dataType:'json',
  442. success:function(info){
  443. $('#ajaxModal').removeClass('in');
  444. $('.modal-backdrop').removeClass('in');
  445. if(info.status == 0)
  446. {
  447. layer.msg(info.result.message,{icon: 1,time: 2000});
  448. }else if(info.status == 1){
  449. var go_url = location.href;
  450. if( info.result.hasOwnProperty("url") )
  451. {
  452. go_url = info.result.url;
  453. }
  454. layer.msg('操作成功',{time: 1000,
  455. end:function(){
  456. location.href = info.result.url;
  457. }
  458. });
  459. }
  460. }
  461. })
  462. },function(){
  463. console.log(232323);
  464. $('#ajaxModal').removeClass('in');
  465. $('.modal-backdrop').removeClass('in');
  466. });
  467. })
  468. $('.btn-operation').click(function(){
  469. var ids_arr = [];
  470. var obj = $(this);
  471. var s_toggle = $(this).attr('data-toggle');
  472. var s_url = $(this).attr('data-href');
  473. $("input[name=item_checkbox]").each(function() {
  474. if( $(this).prop('checked') )
  475. {
  476. ids_arr.push( $(this).val() );
  477. }
  478. })
  479. if(ids_arr.length < 1)
  480. {
  481. layer.msg('请选择要操作的内容');
  482. }else{
  483. var can_sub = true;
  484. if( s_toggle == 'batch-remove' )
  485. {
  486. can_sub = false;
  487. layer.confirm($(obj).attr('data-confirm'), function(index){
  488. $.ajax({
  489. url:s_url,
  490. type:'post',
  491. dataType:'json',
  492. data:{ids:ids_arr},
  493. success:function(info){
  494. if(info.status == 0)
  495. {
  496. layer.msg(info.result.message,{icon: 1,time: 2000});
  497. }else if(info.status == 1){
  498. var go_url = location.href;
  499. if( info.result.hasOwnProperty("url") )
  500. {
  501. go_url = info.result.url;
  502. }
  503. layer.msg('操作成功',{time: 1000,
  504. end:function(){
  505. location.href = info.result.url;
  506. }
  507. });
  508. }
  509. }
  510. })
  511. });
  512. }else{
  513. $.ajax({
  514. url:s_url,
  515. type:'post',
  516. dataType:'json',
  517. data:{ids:ids_arr},
  518. success:function(info){
  519. if(info.status == 0)
  520. {
  521. layer.msg(info.result.message,{icon: 1,time: 2000});
  522. }else if(info.status == 1){
  523. var go_url = location.href;
  524. if( info.result.hasOwnProperty("url") )
  525. {
  526. go_url = info.result.url;
  527. }
  528. layer.msg('操作成功',{time: 1000,
  529. end:function(){
  530. location.href = info.result.url;
  531. }
  532. });
  533. }
  534. }
  535. })
  536. }
  537. }
  538. })
  539. form.on('switch(restwsitch)', function(data){
  540. var s_url = $(this).attr('data-href')
  541. var rest = 1;
  542. if(data.elem.checked)
  543. {
  544. rest = 1;
  545. }else{
  546. rest = 0;
  547. }
  548. $.ajax({
  549. url:s_url,
  550. type:'post',
  551. dataType:'json',
  552. data:{rest:rest},
  553. success:function(info){
  554. if(info.status == 0)
  555. {
  556. layer.msg(info.result.message,{icon: 1,time: 2000});
  557. }else if(info.status == 1){
  558. var go_url = location.href;
  559. if( info.result.hasOwnProperty("url") )
  560. {
  561. go_url = info.result.url;
  562. }
  563. layer.msg('操作成功',{time: 1000,
  564. end:function(){
  565. location.href = info.result.url;
  566. }
  567. });
  568. }
  569. }
  570. })
  571. });
  572. form.on('switch(enablewsitch)', function(data){
  573. var s_url = $(this).attr('data-href')
  574. var enable = 1;
  575. if(data.elem.checked)
  576. {
  577. enable = 1;
  578. }else{
  579. enable = 0;
  580. }
  581. $.ajax({
  582. url:s_url,
  583. type:'post',
  584. dataType:'json',
  585. data:{enable:enable},
  586. success:function(info){
  587. if(info.status == 0)
  588. {
  589. layer.msg(info.result.message,{icon: 1,time: 2000});
  590. }else if(info.status == 1){
  591. var go_url = location.href;
  592. if( info.result.hasOwnProperty("url") )
  593. {
  594. go_url = info.result.url;
  595. }
  596. layer.msg('操作成功',{time: 1000,
  597. end:function(){
  598. location.href = info.result.url;
  599. }
  600. });
  601. }
  602. }
  603. })
  604. });
  605. form.on('switch(statewsitch)', function(data){
  606. var s_url = $(this).attr('data-href')
  607. var state = 1;
  608. if(data.elem.checked)
  609. {
  610. state = 1;
  611. }else{
  612. state = 0;
  613. }
  614. $.ajax({
  615. url:s_url,
  616. type:'post',
  617. dataType:'json',
  618. data:{state:state},
  619. success:function(info){
  620. if(info.status == 0)
  621. {
  622. layer.msg(info.result.message,{icon: 1,time: 2000});
  623. }else if(info.status == 1){
  624. var go_url = location.href;
  625. if( info.result.hasOwnProperty("url") )
  626. {
  627. go_url = info.result.url;
  628. }
  629. layer.msg('操作成功',{time: 1000,
  630. end:function(){
  631. location.href = info.result.url;
  632. }
  633. });
  634. }
  635. }
  636. })
  637. });
  638. form.on('checkbox(checkboxall)', function(data){
  639. if(data.elem.checked)
  640. {
  641. $("input[name=item_checkbox]").each(function() {
  642. $(this).prop("checked", true);
  643. });
  644. $("input[name=checkall]").each(function() {
  645. $(this).prop("checked", true);
  646. });
  647. }else{
  648. $("input[name=item_checkbox]").each(function() {
  649. $(this).prop("checked", false);
  650. });
  651. $("input[name=checkall]").each(function() {
  652. $(this).prop("checked", false);
  653. });
  654. }
  655. form.render('checkbox');
  656. });
  657. $('.user').click(function(){
  658. layer.msg('权限不足!',{icon: 2,time: 1200});
  659. })
  660. //监听提交
  661. form.on('submit(formDemo)', function(data){
  662. $.ajax({
  663. url: data.form.action,
  664. type: data.form.method,
  665. data: data.field,
  666. dataType:'json',
  667. success: function (info) {
  668. if(info.status == 0)
  669. {
  670. layer.msg(info.result.message,{icon: 1,time: 2000});
  671. }else if(info.status == 1){
  672. var go_url = location.href;
  673. if( info.result.hasOwnProperty("url") )
  674. {
  675. go_url = info.result.url;
  676. }
  677. layer.msg('操作成功',{time: 1000,
  678. end:function(){
  679. location.href = info.result.url;
  680. }
  681. });
  682. }
  683. }
  684. });
  685. return false;
  686. });
  687. })
  688. </script>
  689. <script>
  690. var ajax_url = "";
  691. $(function(){
  692. $("[data-toggle='ajaxModal']").click(function () {
  693. var s_url = $(this).attr('data-href');
  694. ajax_url = s_url;
  695. console.log(23);
  696. $.ajax({
  697. url:s_url,
  698. type:"get",
  699. success:function(shtml){
  700. $('#ajaxModal').html(shtml);
  701. $("#ajaxModal").modal();
  702. }
  703. })
  704. });
  705. $(document).delegate(".modal-footer .btn-primary","click",function(){
  706. var s_data = $('#ajaxModal form').serialize();
  707. var loadingIndex = layer.load();
  708. $.ajax({
  709. url:ajax_url,
  710. type:'post',
  711. dataType:'json',
  712. data:s_data,
  713. success:function(info){
  714. if(info.status == 0)
  715. {
  716. layer.msg(info.result.message,{icon: 1,time: 2000});
  717. layer.close(loadingIndex);
  718. }else if(info.status == 1){
  719. var go_url = location.href;
  720. if( info.result.hasOwnProperty("url") )
  721. {
  722. go_url = info.result.url;
  723. }
  724. layer.msg('操作成功',{time: 1000,
  725. end:function(){
  726. location.href = info.result.url;
  727. }
  728. });
  729. }
  730. }
  731. })
  732. return false;
  733. })
  734. })
  735. </script>
  736. <div id="ajaxModal" class="modal fade" style="display: none;">
  737. </div>
  738. <script>
  739. //没有选中时间段不能导出
  740. $(function () {
  741. $('.btn-submit').click(function () {
  742. var e = $(this).data('export');
  743. if(e==1 ){
  744. if($('#keyword').val() !='' ){
  745. $('#export').val(1);
  746. $('#search').submit();
  747. }else if($('#searchtime').val()!=''){
  748. $('#export').val(1);
  749. $('#search').submit();
  750. }else{
  751. $('#export').val(1);
  752. $('#search').submit();
  753. return;
  754. }
  755. }else{
  756. $('#export').val(0);
  757. $('#search').submit();
  758. }
  759. })
  760. })
  761. </script>
  762. </body>