orderlist.html 41 KB

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