index.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  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. <style>
  45. .layui-table[lay-size=lg] td, .layui-table[lay-size=lg] th {
  46. padding: 15px 10px;
  47. }
  48. .product-info{padding-left: 80px;padding-top: 20px;}
  49. .tDiv img{float:left;}
  50. .hxBtn{color:#428bca;}
  51. </style>
  52. </head>
  53. <body layadmin-themealias="default">
  54. <div class="layui-fluid">
  55. <div class="layui-card">
  56. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">核销订单记录<?php if(!empty($salesroom)){ ?><span style="color:red;">({$salesroom.room_name})</span></span><?php } ?></div>
  57. <div class="layui-tab layui-tab-brief">
  58. <ul class="layui-tab-title">
  59. <li <?php if(empty($state)){ ?>class="layui-this"<?php } ?>><a href="{:U('salesroom_order/index',array('salesroom_id'=>$salesroom_id))}">所有订单</a></li>
  60. <li <?php if(!empty($state) && $state == 1){ ?>class="layui-this"<?php } ?>><a href="{:U('salesroom_order/index', array('state' => 1,'salesroom_id'=>$salesroom_id))}">待核销(待收货)</a></li>
  61. <li <?php if(!empty($state) && $state == 2){ ?>class="layui-this"<?php } ?>><a href="{:U('salesroom_order/index', array('state' => 2,'salesroom_id'=>$salesroom_id))}">已核销(已完成)</a></li>
  62. <li <?php if(!empty($state) && $state == 3){ ?>class="layui-this"<?php } ?>><a href="{:U('salesroom_order/index', array('state' => 3,'salesroom_id'=>$salesroom_id))}">已取消</a></li>
  63. <li <?php if(!empty($state) && $state == 4){ ?>class="layui-this"<?php } ?>><a href="{:U('salesroom_order/index', array('state' => 4,'salesroom_id'=>$salesroom_id))}">已过期</a></li>
  64. </ul>
  65. </div>
  66. <div class="layui-card-body" style="padding:15px;">
  67. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  68. <input type="hidden" name="c" value="salesroom_order" />
  69. <input type="hidden" name="salesroom_id" value="{$salesroom_id}"/>
  70. <input type="hidden" name="state" value="{$state}"/>
  71. <div class="layui-form-item">
  72. <div class="layui-inline">
  73. <div class="layui-input-inline" style="width: 300px;">
  74. <input type="text" class="layui-input" name='keyword' value="{$keyword}" placeholder="请输入买家姓名/手机号/会员名/订单号">
  75. </div>
  76. <div class="layui-input-inline">
  77. <select name='searchtime' class='form-control' style="width:100px;padding:0 5px;" id="searchtime">
  78. <option value=''>不按时间</option>
  79. <option value='create_time' <?php if( $searchtime =='create_time' ){ ?>selected<?php } ?>>下单时间</option>
  80. </select>
  81. </div>
  82. <div class="layui-input-inline" style="width: 285px;">
  83. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
  84. </div>
  85. <div class="layui-input-inline">
  86. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  87. </div>
  88. </div>
  89. </div>
  90. </form>
  91. <form action="" class="layui-form" lay-filter="example" method="post" >
  92. <div class="row">
  93. <div class="col-md-12">
  94. <table class="layui-table" lay-skin="line" lay-size="lg">
  95. <thead>
  96. <tr>
  97. <th style="width:20%">商品</th>
  98. <th style="width:10%;">会员名称</th>
  99. <th style="width:8%;">配送/支付</th>
  100. <th style="width:12%;">团长/店铺</th>
  101. <th style="width:12%;">核销人员/核销门店</th>
  102. <th style="width:10%;">订单总额</th>
  103. <th style="width: 150px;">商品数量</th>
  104. <th style="width: 100px;">订单状态</th>
  105. <th style="width: 250px;">操作</th>
  106. </tr>
  107. </thead>
  108. <tbody>
  109. <?php if(!empty($list)){
  110. foreach( $list as $item ){ ?>
  111. <tr class="tr-order-sn">
  112. <td colspan="9">
  113. <div class="tDiv ml10">
  114. <span class="words">订单号: {$item['order_num_alias']}</span>
  115. <span class="words">下单时间:{$item['date_added']}</span>
  116. </div>
  117. </td>
  118. </tr>
  119. <tr>
  120. <td>
  121. <div class="tDiv relative tpinfo last ">
  122. <div class="img">
  123. <img width="70" height="70" src="<?php echo tomedia($item['goods_images']);?>" alt="">
  124. </div>
  125. <div class="product-info">
  126. <div class="name mb5">{$item['goods_name']}</div>
  127. </div>
  128. </div>
  129. </td>
  130. <td>
  131. {$item['shipping_name']}<br/>
  132. {$item['telephone']}<br/>
  133. 会员名:<span style="color:#428bca;">{$item['member_name']}</span>
  134. </td>
  135. <td>
  136. <?php if( $item['payment_code']=='yuer'){ ?>
  137. <span> <i class="text-warning" style="font-size: 17px;"></i><span>余额支付</span></span>
  138. <?php }else if( $item['payment_code']=='admin' ){ ?>
  139. <span> <i class=" text-danger" style="font-size: 17px"></i>后台付款</span>
  140. <?php }else{ ?>
  141. <span class="line-text"> 微信支付</span>
  142. <?php } ?>
  143. <span class="line-text"><br/>(到店核销)</span>
  144. </td>
  145. <td>
  146. <div class="tDiv" style="text-align: left;">
  147. <div style='margin-top:5px;display:block;'>
  148. {$item['head_name']}
  149. </div>
  150. <div style='margin-top:5px;display:block;'>
  151. 电话:{$item['head_mobile']}
  152. </div>
  153. <div style='margin-top:5px;display:block;cursor: pointer;' >
  154. <font style="color: #999;">小区:</font> <font class="line-text">{$item['community_name']} ({$item['province']} {$item['city']})
  155. </div>
  156. </div>
  157. </td>
  158. <td>
  159. <?php
  160. if($item['is_hexiao_over'] == 1){
  161. ?>
  162. <div class="tDiv" style="text-align: left;">
  163. <div style='margin-top:5px;display:block;'>
  164. 姓名:{$item['smember_name']}
  165. </div>
  166. <div style='margin-top:5px;display:block;'>
  167. 手机号:{$item['smember_mobile']}
  168. </div>
  169. <div style='margin-top:5px;display:block;cursor: pointer;' >
  170. 门店:{$item['salesroom_name']}
  171. </div>
  172. </div>
  173. <?php } ?>
  174. </td>
  175. <td>
  176. <div class="tDiv" style="text-align: left;">
  177. <div style='margin-top:5px;display:block;'>
  178. 运&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;费:{$item['shipping_fare']}
  179. </div>
  180. <div style='margin-top:5px;display:block;'>
  181. 商品小计:<?php echo round($item['price']*$item['quantity'],2); ?>
  182. </div>
  183. <div style='margin-top:5px;display:block;cursor: pointer;' >
  184. 应收总款:<?php echo round($item['total'],2); ?>
  185. </div>
  186. </div>
  187. </td>
  188. <td>
  189. {$item['goods_quantity']}个
  190. <?php if($item['refund_quantity'] > 0){ ?>
  191. (已退{$item['refund_quantity']}个)
  192. <?php } ?>
  193. </td>
  194. <td>
  195. <?php if($item['order_status_id'] == 3){ ?>
  196. <span style="color:#a29e9e;">待付款</span><br/>
  197. <?php }else if($item['order_status_id'] == 5){ ?>
  198. <span style="color:#a29e9e;">已取消</span><br/>
  199. <?php }else{ ?>
  200. <?php if($item['is_hexiao_over'] == 1){ ?>
  201. <span style="color:#009688;">已完成</span><br/>
  202. <?php if($item['goods_quantity'] > $item['refund_quantity']){ ?>
  203. <a class="hxBtn" href="javascript:;" data-href="{:U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$item['order_goods_id']))}">(核销记录)</a>
  204. <?php } ?>
  205. <?php }else if($item['is_hexiao_over'] == 0){ ?>
  206. <span style="color:red;">待使用</span>
  207. <?php if($item['record_count'] > 0){ ?>
  208. <br/>
  209. <a class="hxBtn" href="javascript:;" data-href="{:U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$item['order_goods_id']))}">(部分使用)</a>
  210. <?php } ?>
  211. <?php }else if($item['is_hexiao_over'] == 2){ ?>
  212. <span style="color:red;">已过期</span><br/>
  213. <?php if($item['record_count'] > 0){ ?>
  214. <a class="hxBtn" href="javascript:;" data-href="{:U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$item['order_goods_id']))}">(部分使用)</a>
  215. <?php } ?>
  216. <?php } } ?>
  217. </td>
  218. <td style="overflow:visible;position:relative">
  219. <a class='layui-btn layui-btn-xs' href="{:U('order/detail', array('id'=>$item['order_id']))}" >
  220. 查看详情
  221. </a>
  222. </td>
  223. </tr>
  224. <?php }}else{ ?>
  225. <tr>
  226. <td colspan="9" style="text-align: center;color:red;">
  227. 暂无数据!
  228. </td>
  229. </tr>
  230. <?php } ?>
  231. </tbody>
  232. <tfoot>
  233. <tr>
  234. <td colspan="9" style="text-align: right">
  235. {$pager}
  236. </td>
  237. </tr>
  238. </tfoot>
  239. </table>
  240. </div>
  241. </div>
  242. </form>
  243. </div>
  244. </div>
  245. </div>
  246. <script src="/layuiadmin/layui/layui.js"></script>
  247. <script>
  248. layui.config({
  249. base: '/layuiadmin/' //静态资源所在路径
  250. }).extend({
  251. index: 'lib/index' //主入口模块
  252. }).use('index');
  253. </script>
  254. <script>
  255. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  256. var layer = layui.layer;
  257. var $;
  258. layui.use(['jquery', 'layer','form'], function(){
  259. $ = layui.$;
  260. var form = layui.form;
  261. $('.hxBtn').click(function(){
  262. var url = $(this).attr('data-href');
  263. $.post(url, {}, function(shtml){
  264. layer.open({
  265. type: 1,
  266. area: '930px',
  267. content: shtml //注意,如果str是object,那么需要字符拼接。
  268. });
  269. });
  270. return false;
  271. })
  272. })
  273. </script>
  274. </body>
  275. </html>