detail.html 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773
  1. <!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': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_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' : {: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. </head>
  45. <style type='text/css'>
  46. .tabs-container .layui-form-item {overflow: hidden;}
  47. .tabs-container .tabs-left > .nav-tabs {}
  48. .tab-goods .nav li {float:left;}
  49. .spec_item_thumb {position: relative; width: 30px; height: 20px; padding: 0; border-left: none;}
  50. .spec_item_thumb i {position: absolute; top: -5px; right: -5px;}
  51. .input-group .spec_item_thumb{padding:0px;}
  52. .multi-img-details {margin-top:.5em;max-width: 700px; padding:0; }
  53. .multi-audio-details .multi-audio-item {width:155px; height: 40px; position:relative; float: left; margin-right: 5px;}
  54. .region-goods-details {
  55. background: #f8f8f8;
  56. margin-bottom: 10px;
  57. padding: 0 10px;
  58. }
  59. .region-goods-left{
  60. text-align: center;
  61. font-weight: bold;
  62. color: #333;
  63. font-size: 14px;
  64. padding: 20px 0;
  65. }
  66. .region-goods-right{
  67. border-left: 3px solid #fff;
  68. padding: 10px 10px;
  69. }
  70. .input-group .input-group-btn .btn:hover{background-color:#5bc0de}
  71. .layui-form-select{display:none;}
  72. .input-group .input-group-addon{}
  73. .container{width: 100%;}
  74. </style>
  75. <style>
  76. tbody tr td{
  77. position: relative;
  78. }
  79. tbody tr .icow-weibiaoti--{
  80. visibility: hidden;
  81. display: inline-block;
  82. color: #fff;
  83. height:18px;
  84. width:18px;
  85. background: #e0e0e0;
  86. text-align: center;
  87. line-height: 18px;
  88. vertical-align: middle;
  89. }
  90. tbody tr:hover .icow-weibiaoti--{
  91. visibility: visible;
  92. }
  93. tbody tr .icow-weibiaoti--.hidden{
  94. visibility: hidden !important;
  95. }
  96. .full .icow-weibiaoti--{
  97. margin-left:10px;
  98. }
  99. .full>span{
  100. display: -webkit-box;
  101. display: -webkit-flex;
  102. display: -ms-flexbox;
  103. display: flex;
  104. vertical-align: middle;
  105. align-items: center;
  106. }
  107. tbody tr .label{
  108. margin: 5px 0;
  109. }
  110. .goods_attribute a{
  111. cursor: pointer;
  112. }
  113. .newgoodsflag{
  114. width: 22px;height: 16px;
  115. background-color: #ff0000;
  116. color: #fff;
  117. text-align: center;
  118. position: absolute;
  119. bottom: 70px;
  120. left: 57px;
  121. font-size: 12px;
  122. }
  123. .a{cursor: pointer;}
  124. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  125. width:auto!important;
  126. }
  127. .we7-modal-dialog .modal-footer, .modal-dialog .modal-footer{padding:0px;}
  128. .modal-footer{padding:0px;}
  129. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect {
  130. width: auto!important;
  131. }
  132. </style>
  133. <body layadmin-themealias="default">
  134. <table id="demo" lay-filter="test"></table>
  135. <div class="layui-fluid">
  136. <div class="layui-card">
  137. <div class="layui-card-header layui-elem-quote">
  138. 当前位置:<span class="line-text">接龙详情</span>
  139. </div>
  140. <div class="layui-card-body" style="padding:15px;">
  141. <form action="" class="layui-form" lay-filter="example" method="post" >
  142. <input type="hidden" name="id" value="{$item['order_id']}" />
  143. <input type="hidden" name="dispatchid" value="{$express_info['id']}" />
  144. <!---订单详情begin--->
  145. <div class="layui-row order-container">
  146. <div class="order-container-left" style="border-right: 1px solid #efefef">
  147. <div class="layui-row">
  148. <div class="layui-col-md-12">
  149. <ul class="">
  150. <li class="text"><span class="layui-col-sm">接龙编号:</span><span class="text-default">{$solitaire_info['id']}</span></li>
  151. <li class="text">
  152. <span class="layui-col-sm">开始时间:</span>
  153. <span class="text-default"><?php echo date('Y-m-d H:i:s', $solitaire_info['begin_time']); ?> &nbsp;&nbsp;</span>
  154. </li>
  155. <li class="text">
  156. <span class="layui-col-sm">结束时间:</span>
  157. <span class="text-default"><?php echo date('Y-m-d H:i:s', $solitaire_info['end_time']); ?> &nbsp;&nbsp;</span>
  158. </li>
  159. <li class="text">
  160. <span class="layui-col-sm">团长昵称:</span>
  161. <span class="text-default">
  162. {$head_info['community_name']}({$head_info['head_name']})
  163. </span>
  164. </li>
  165. </ul>
  166. </div>
  167. </div>
  168. </div>
  169. <div class=" order-container-static">
  170. <div class=" status">
  171. <span class="text"> 接龙状态:</span>
  172. <span class="text-warning font18">{$state_str}</span>
  173. </div>
  174. <div>
  175. <ul>
  176. <li class="text">接龙人数:<span class="text-default">{$order_count}</span></li>
  177. </ul>
  178. </div>
  179. </div>
  180. </div>
  181. <h4 style="margin:15px 0px;font-weight:bold;">接龙信息</h4>
  182. <div class="layui-row order-container">
  183. <div class="" style="margin-top:20px;">
  184. <div class="layui-row">
  185. <div class="layui-col-md-12">
  186. <ul class="">
  187. <li class="text">
  188. <span class="layui-col-sm">接龙标题:</span>
  189. <span class="text-default">{$solitaire_info['solitaire_name']}</span>
  190. </li>
  191. </ul>
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. <!---订单详情end-->
  197. <h4 style="margin:15px 0px;font-weight:bold;">商品信息</h4>
  198. <table class="layui-table ">
  199. <thead>
  200. <tr class="trorder" style="background: #fff">
  201. <th class="" style="width: 75px;text-align: right;padding-right: 0">
  202. 商品标题
  203. </th>
  204. <th style="">
  205. </th>
  206. <th style="width: 180px;padding-left: 20px">编号</th>
  207. <th style="text-align: center;padding-left: 20px">库存</th>
  208. <th style="text-align: center;">单价</th>
  209. <th style="text-align: center;">原价</th>
  210. </tr>
  211. </thead>
  212. <tbody>
  213. <?php foreach($goods_arr as $goods){ ?>
  214. <tr class="trorder" style="background: #fff">
  215. <td style="text-align: right;padding-right: 0">
  216. <img src="{:tomedia($goods['image'])}" style='width:52px;height:52px;border:1px solid #efefef; padding:1px;' >
  217. </td>
  218. <td style="min-width: 300px">
  219. <a target="_blank" href="{:U('goods/edit', array('id' => $goods['id']))}" title="查看" style="display: block;line-height: 22px;max-width: 250px;white-space: nowrap;
  220. overflow: hidden;text-overflow: ellipsis;">{$goods['goodsname']}
  221. </a>
  222. </td>
  223. <td style="padding: 10px 20px">
  224. <p>
  225. 编码:<span>{$goods['codes']}</span>
  226. </p>
  227. </td>
  228. <td style="padding: 10px 20px;text-align:center;">
  229. <p>
  230. <span>{$goods['total']}</span>
  231. </p>
  232. </td>
  233. <td style="padding: 10px 20px;text-align:center;">
  234. <p>
  235. <span>{$goods['price']}</span>
  236. </p>
  237. </td>
  238. <td style="padding: 10px 20px;text-align:center;">
  239. <p>
  240. <span>{$goods['productprice']}</span>
  241. </p>
  242. </td>
  243. </tr>
  244. <?php } ?>
  245. </tbody>
  246. </table>
  247. <h4 style="margin:15px 0px;font-weight:bold;">接龙信息</h4>
  248. <div class="btn-group">
  249. <button class="btn btn-default btn-sm btn-operation-refund" data-confirm="确认要批量退款吗?" type="button" data-toggle='batch' data-href="{:U('order/refund_mult',array( 'solid_id'=> $id ))}">
  250. <i class='icow icow-xiajia3'></i> 批量退款
  251. </button>
  252. </div>
  253. <table class="layui-table ">
  254. <thead>
  255. <tr class="trorder" style="background: #fff">
  256. <th style="width:25px;">
  257. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  258. </th>
  259. <th class="" style="width: 75px;text-align: right;padding-right: 0">
  260. 会员信息
  261. </th>
  262. <th style="">
  263. </th>
  264. <th style="width: 180px;padding-left: 20px">参加时间</th>
  265. <th style="padding-left: 20px">订单编号</th>
  266. <th style="padding-left: 20px;text-align:center;">订单商品数量</th>
  267. <th style="padding-left: 20px;text-align:center;">订单金额</th>
  268. <th style="padding-left: 20px;text-align:center;">订单状态</th>
  269. <th style="text-align:center;">操作</th>
  270. </tr>
  271. </thead>
  272. <tbody>
  273. <?php foreach($order_list as $order){ ?>
  274. <tr class="trorder" style="background: #fff">
  275. <td>
  276. <input type='checkbox' name="item_checkbox" class="checkone" lay-skin="primary" value="{$order['order_id']}"/>
  277. </td>
  278. <td style="text-align: right;padding-right: 0">
  279. <img src="{:tomedia($order['mb_info']['avatar'])}" style='width:52px;height:52px;border:1px solid #efefef; padding:1px;' >
  280. </td>
  281. <td style="min-width: 300px">
  282. {$order['mb_info']['username']}
  283. </td>
  284. <td style="padding: 10px 20px">
  285. <p>
  286. <span><?php echo date('Y-m-d H:i:s', $order['date_added']); ?></span>
  287. </p>
  288. </td>
  289. <td style="padding: 10px 20px">
  290. <p>
  291. <span>{$order['order_num_alias']}</span>
  292. </p>
  293. </td>
  294. <td style="padding: 10px 20px;text-align:center;">
  295. <p>
  296. <span>{$order['buy_quantity']}</span>
  297. </p>
  298. </td>
  299. <td style="padding: 10px 20px;text-align:center;">
  300. <?php $free_tongji = $order['total']+$order['shipping_fare']-$order['voucher_credit']-$order['fullreduction_money']- $order['score_for_money'];
  301. if($free_tongji < 0){
  302. $free_tongji = 0;
  303. }
  304. ?>
  305. <p>
  306. <span>{:round($free_tongji ,2)}</span>
  307. </p>
  308. </td>
  309. <td style="padding: 10px 20px;text-align:center;">
  310. <p>
  311. <span>{$order_status_arr[$order['order_status_id']]}</span>
  312. </p>
  313. </td>
  314. <td style="padding: 10px 20px;text-align:center;">
  315. <?php if( in_array($order['order_status_id'], array(1,4,6,10,11,12,14)) ){ ?>
  316. <a class='op btn btn-primary btn-xs ' data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/oprefund_do', array('id' => $order['order_id']))}" >
  317. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title="整个订单立即退款" ></i>
  318. 整个订单立即退款
  319. </a>
  320. <?php } ?>
  321. <a class='op text-primary' lay-href="{:U('order/detail', array('id' => $order['order_id'], 'ok' => 1))}" >查看详情</a>
  322. </td>
  323. </tr>
  324. <?php } ?>
  325. </tbody>
  326. </table>
  327. </form>
  328. </div>
  329. </div>
  330. </div>
  331. <div id="ajaxModal" class="modal fade" style="display: none;">
  332. </div>
  333. <script src="/layuiadmin/layui/layui.js"></script>
  334. <script>
  335. layui.config({
  336. base: '/layuiadmin/' //静态资源所在路径
  337. }).extend({
  338. index: 'lib/index' //主入口模块
  339. }).use('index');
  340. </script>
  341. <script>
  342. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  343. var layer = layui.layer;
  344. var $;
  345. layui.use(['jquery', 'layer','form'], function(){
  346. $ = layui.$;
  347. var form = layui.form;
  348. $('.deldom').click(function(){
  349. var s_url = $(this).attr('data-href');
  350. layer.confirm($(this).attr('data-confirm'), function(index){
  351. $.ajax({
  352. url:s_url,
  353. type:'post',
  354. dataType:'json',
  355. success:function(info){
  356. if(info.status == 0)
  357. {
  358. layer.msg(info.result.message,{icon: 1,time: 2000});
  359. }else if(info.status == 1){
  360. var go_url = location.href;
  361. if( info.result.hasOwnProperty("url") )
  362. {
  363. go_url = info.result.url;
  364. }
  365. layer.msg('操作成功',{time: 1000,
  366. end:function(){
  367. location.href = info.result.url;
  368. }
  369. });
  370. }
  371. }
  372. })
  373. });
  374. })
  375. $('.btn-operation-refund').click(function(){
  376. var ids_arr = [];
  377. var obj = $(this);
  378. var s_toggle = $(this).attr('data-toggle');
  379. var s_url = $(this).attr('data-href');
  380. $("input[name=item_checkbox]").each(function() {
  381. if( $(this).prop('checked') )
  382. {
  383. ids_arr.push( $(this).val() );
  384. }
  385. })
  386. if(ids_arr.length < 1)
  387. {
  388. layer.msg('请选择要操作的内容');
  389. }else{
  390. layer.confirm($(obj).attr('data-confirm'), function(index){
  391. $.post(s_url, {ids_arr:ids_arr}, function(shtml){
  392. layer.open({
  393. type: 1,
  394. area: '930px',
  395. content: shtml //注意,如果str是object,那么需要字符拼接。
  396. });
  397. });
  398. });
  399. }
  400. })
  401. $('.btn-operation').click(function(){
  402. var ids_arr = [];
  403. var obj = $(this);
  404. var s_toggle = $(this).attr('data-toggle');
  405. var s_url = $(this).attr('data-href');
  406. $("input[name=item_checkbox]").each(function() {
  407. if( $(this).prop('checked') )
  408. {
  409. ids_arr.push( $(this).val() );
  410. }
  411. })
  412. if(ids_arr.length < 1)
  413. {
  414. layer.msg('请选择要操作的内容');
  415. }else{
  416. var can_sub = true;
  417. if( s_toggle == 'batch-remove' )
  418. {
  419. can_sub = false;
  420. layer.confirm($(obj).attr('data-confirm'), function(index){
  421. $.ajax({
  422. url:s_url,
  423. type:'post',
  424. dataType:'json',
  425. data:{ids:ids_arr},
  426. success:function(info){
  427. if(info.status == 0)
  428. {
  429. layer.msg(info.result.message,{icon: 1,time: 2000});
  430. }else if(info.status == 1){
  431. var go_url = location.href;
  432. if( info.result.hasOwnProperty("url") )
  433. {
  434. go_url = info.result.url;
  435. }
  436. layer.msg('操作成功',{time: 1000,
  437. end:function(){
  438. location.href = info.result.url;
  439. }
  440. });
  441. }
  442. }
  443. })
  444. });
  445. }else{
  446. $.ajax({
  447. url:s_url,
  448. type:'post',
  449. dataType:'json',
  450. data:{ids:ids_arr},
  451. success:function(info){
  452. if(info.status == 0)
  453. {
  454. layer.msg(info.result.message,{icon: 1,time: 2000});
  455. }else if(info.status == 1){
  456. var go_url = location.href;
  457. if( info.result.hasOwnProperty("url") )
  458. {
  459. go_url = info.result.url;
  460. }
  461. layer.msg('操作成功',{time: 1000,
  462. end:function(){
  463. location.href = info.result.url;
  464. }
  465. });
  466. }
  467. }
  468. })
  469. }
  470. }
  471. })
  472. form.on('switch(restwsitch)', function(data){
  473. var s_url = $(this).attr('data-href')
  474. var rest = 1;
  475. if(data.elem.checked)
  476. {
  477. rest = 1;
  478. }else{
  479. rest = 0;
  480. }
  481. $.ajax({
  482. url:s_url,
  483. type:'post',
  484. dataType:'json',
  485. data:{rest:rest},
  486. success:function(info){
  487. if(info.status == 0)
  488. {
  489. layer.msg(info.result.message,{icon: 1,time: 2000});
  490. }else if(info.status == 1){
  491. var go_url = location.href;
  492. if( info.result.hasOwnProperty("url") )
  493. {
  494. go_url = info.result.url;
  495. }
  496. layer.msg('操作成功',{time: 1000,
  497. end:function(){
  498. location.href = info.result.url;
  499. }
  500. });
  501. }
  502. }
  503. })
  504. });
  505. form.on('switch(enablewsitch)', function(data){
  506. var s_url = $(this).attr('data-href')
  507. var enable = 1;
  508. if(data.elem.checked)
  509. {
  510. enable = 1;
  511. }else{
  512. enable = 0;
  513. }
  514. $.ajax({
  515. url:s_url,
  516. type:'post',
  517. dataType:'json',
  518. data:{enable:enable},
  519. success:function(info){
  520. if(info.status == 0)
  521. {
  522. layer.msg(info.result.message,{icon: 1,time: 2000});
  523. }else if(info.status == 1){
  524. var go_url = location.href;
  525. if( info.result.hasOwnProperty("url") )
  526. {
  527. go_url = info.result.url;
  528. }
  529. layer.msg('操作成功',{time: 1000,
  530. end:function(){
  531. location.href = info.result.url;
  532. }
  533. });
  534. }
  535. }
  536. })
  537. });
  538. form.on('switch(statewsitch)', function(data){
  539. var s_url = $(this).attr('data-href')
  540. var state = 1;
  541. if(data.elem.checked)
  542. {
  543. state = 1;
  544. }else{
  545. state = 0;
  546. }
  547. $.ajax({
  548. url:s_url,
  549. type:'post',
  550. dataType:'json',
  551. data:{state:state},
  552. success:function(info){
  553. if(info.status == 0)
  554. {
  555. layer.msg(info.result.message,{icon: 1,time: 2000});
  556. }else if(info.status == 1){
  557. var go_url = location.href;
  558. if( info.result.hasOwnProperty("url") )
  559. {
  560. go_url = info.result.url;
  561. }
  562. layer.msg('操作成功',{time: 1000,
  563. end:function(){
  564. location.href = info.result.url;
  565. }
  566. });
  567. }
  568. }
  569. })
  570. });
  571. form.on('checkbox(checkboxall)', function(data){
  572. if(data.elem.checked)
  573. {
  574. $("input[name=item_checkbox]").each(function() {
  575. $(this).prop("checked", true);
  576. });
  577. $("input[name=checkall]").each(function() {
  578. $(this).prop("checked", true);
  579. });
  580. }else{
  581. $("input[name=item_checkbox]").each(function() {
  582. $(this).prop("checked", false);
  583. });
  584. $("input[name=checkall]").each(function() {
  585. $(this).prop("checked", false);
  586. });
  587. }
  588. form.render('checkbox');
  589. });
  590. //监听提交
  591. form.on('submit(formDemo)', function(data){
  592. $.ajax({
  593. url: data.form.action,
  594. type: data.form.method,
  595. data: data.field,
  596. dataType:'json',
  597. success: function (info) {
  598. if(info.status == 0)
  599. {
  600. layer.msg(info.result.message,{icon: 1,time: 2000});
  601. }else if(info.status == 1){
  602. var go_url = location.href;
  603. if( info.result.hasOwnProperty("url") )
  604. {
  605. go_url = info.result.url;
  606. }
  607. layer.msg('操作成功',{time: 1000,
  608. end:function(){
  609. location.href = info.result.url;
  610. }
  611. });
  612. }
  613. }
  614. });
  615. return false;
  616. });
  617. })
  618. </script>
  619. <script>
  620. var ajax_url = "";
  621. $(function(){
  622. $("[data-toggle='ajaxModal']").click(function () {
  623. var s_url = $(this).attr('data-href');
  624. ajax_url = s_url;
  625. console.log(23);
  626. $.ajax({
  627. url:s_url,
  628. type:"get",
  629. success:function(shtml){
  630. $('#ajaxModal').html(shtml);
  631. $("#ajaxModal").modal();
  632. }
  633. })
  634. });
  635. $(document).delegate(".modal-footer .btn-primary","click",function(){
  636. var s_data = $('#ajaxModal form').serialize();
  637. $.ajax({
  638. url:ajax_url,
  639. type:'post',
  640. dataType:'json',
  641. data:s_data,
  642. success:function(info){
  643. if(info.status == 0)
  644. {
  645. layer.msg(info.result.message,{icon: 1,time: 2000});
  646. }else if(info.status == 1){
  647. var go_url = location.href;
  648. if( info.result.hasOwnProperty("url") )
  649. {
  650. go_url = info.result.url;
  651. }
  652. layer.msg('操作成功',{time: 1000,
  653. end:function(){
  654. location.href = info.result.url;
  655. }
  656. });
  657. }
  658. }
  659. })
  660. return false;
  661. })
  662. })
  663. </script>
  664. <div id="ajaxModal" class="modal fade" style="display: none;">
  665. </div>
  666. <script>
  667. //没有选中时间段不能导出
  668. $(function () {
  669. $('.btn-submit').click(function () {
  670. var e = $(this).data('export');
  671. if(e==1 ){
  672. if($('#keyword').val() !='' ){
  673. $('#export').val(1);
  674. $('#search').submit();
  675. }else if($('#searchtime').val()!=''){
  676. $('#export').val(1);
  677. $('#search').submit();
  678. }else{
  679. $('#export').val(1);
  680. $('#search').submit();
  681. return;
  682. }
  683. }else{
  684. $('#export').val(0);
  685. $('#search').submit();
  686. }
  687. })
  688. })
  689. </script>
  690. </body>