order.html 36 KB

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