detail.html 32 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" rel="stylesheet">
  44. <style>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. .img-40 {
  94. width: 40px;
  95. height: 40px;
  96. }
  97. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  98. width:auto!important;
  99. }
  100. </style>
  101. </head>
  102. <body layadmin-themealias="default">
  103. <table id="demo" lay-filter="test"></table>
  104. <div class="layui-fluid">
  105. <div class="layui-card">
  106. <div class="layui-card-header layui-elem-quote">
  107. 当前位置:<span class="line-text">订单详情</span>
  108. </div>
  109. <div class="layui-card-body" style="padding:15px;">
  110. <ul class="layui-timeline">
  111. <?php foreach($history_list as $history){ ?>
  112. <li class="layui-timeline-item">
  113. <i class="layui-icon layui-timeline-axis"></i>
  114. <div class="layui-timeline-content layui-text">
  115. <h3 class="layui-timeline-title">
  116. <?php echo date("Y-m-d H:i:s", $history['date_added']); ?>&nbsp;<span class="layui-badge <?php if($history['order_status_id'] != 1){ ?>layui-bg-green<?php }else{ ?> layui-badge<?php } ?>"><?php echo $history['order_status_name']; ?></span>
  117. </h3>
  118. <p>
  119. <?php echo $history['comment']; ?>
  120. </p>
  121. </div>
  122. </li>
  123. <?php } ?>
  124. </ul>
  125. <form action="" class="layui-form" lay-filter="example" method="post" >
  126. <input type="hidden" name="id" value="{$item['order_id']}" />
  127. <input type="hidden" name="dispatchid" value="{$express_info['id']}" />
  128. <!---订单详情begin--->
  129. <div class="layui-row order-container">
  130. <div class="order-container-left" style="border-right: 1px solid #efefef">
  131. <div class="layui-row">
  132. <div class="layui-col-md-12">
  133. <ul class="">
  134. <li class="text"><span class="layui-col-sm">订单编号:</span><span class="text-default">{$item['order_num_alias']}</span></li>
  135. <?php if( !empty($coupon)){ ?>
  136. <li class="text">
  137. <span class="layui-col-sm">优惠券:</span>
  138. <span class="text-default">{$coupon['voucher_title']} &nbsp;&nbsp;</span>
  139. </li>
  140. <?php } ?>
  141. <li class="text">
  142. <span class="layui-col-sm">付款方式:</span>
  143. <span class="text-default">
  144. <?php if( $item['payment_code'] == ''){ ?>未付款<?php } ?>
  145. <?php if( $item['payment_code'] == 'yuer'){ ?>余额支付<?php } ?>
  146. <?php if( $item['payment_code'] == 'admin'){ ?>后台付款<?php } ?>
  147. <?php if( $item['payment_code'] == 'weixin'){ ?>微信支付<?php } ?>
  148. </span>
  149. </li>
  150. <li class="text">
  151. <span class="layui-col-sm">买  家:</span>
  152. <span class="text-default">
  153. <?php
  154. if (defined('ROLE') && ROLE == 'agenter' )
  155. {
  156. ?>
  157. {$member['username']}
  158. <?php }else{ ?>
  159. <a href="{:U('user/detail',array('id'=>$member['member_id']))}" target='_blank' class="text-primary">{$member['username']}</a>
  160. <?php if( !empty($member['content']) ){ ?>
  161. <font class="text-danger">({$member['content']})</font>
  162. <?php } ?>
  163. <?php } ?>
  164. &nbsp;&nbsp;
  165. </span>
  166. </li>
  167. <li class="text">
  168. <span class="layui-col-sm">配送方式:</span>
  169. <span class="text-default">
  170. <?php if( $item['delivery'] == 'pickup'){ ?>
  171. 自提
  172. <?php }elseif( $item['delivery'] == 'express' ){ ?>
  173. 快递<?php if( !empty($express_info['name'])){ ?>({$express_info['name']} <?php if( !empty($item['shipping_no'])){ ?>快递单号:{$item['shipping_no']}<?php } ?>)<?php } ?>
  174. <?php }elseif( $item['delivery'] == 'tuanz_send' ){ ?>
  175. 团长配送
  176. <?php }else{ ?>
  177. 其他
  178. <?php } ?>
  179. </span>
  180. </li>
  181. <li class="text">
  182. <span class="layui-col-sm">收 货 人:</span>
  183. <span class="text-default">
  184. {$item['shipping_name']} {$item['shipping_tel']}
  185. </span>
  186. </li>
  187. <?php if( $item['delivery'] == 'pickup'){ ?>
  188. <li class="text">
  189. <span class="layui-col-sm">取货地址:</span>
  190. <span class="text-default">
  191. {$item['shipping_address']}
  192. </span>
  193. </li>
  194. <?php } ?>
  195. <?php if( !empty($item['address_id'])){ ?>
  196. <li class="text">
  197. <span class="layui-col-sm">收货人:</span>
  198. <span class="text-default">
  199. {$province_info['name']}{$city_info['name']}{$area_info['name']} <?php if( $item['delivery'] == 'tuanz_send'){ ?>{$item['tuan_send_address']}<?php }else{ ?> {$item['shipping_address']}<?php } ?>, {$item['shipping_name']}, {$item['shipping_tel']}
  200. <a class='text-primary op js-clip' data-url="{$province_info['name']}{$city_info['name']}{$area_info['name']}<?php if( $item['delivery'] == 'tuanz_send'){ ?>{$item['tuan_send_address']}<?php }else{ ?> {$item['shipping_address']}<?php } ?>, {$item['shipping_name']}, {$item['shipping_tel']}">复制</a>
  201. </span>
  202. </li>
  203. <?php } ?>
  204. <?php if( !empty($item['comment'])){ ?>
  205. <li class="text"><span class="col-sm">买家备注:</span><span class="text-default">{$item['comment']}</span></li>
  206. <?php } ?>
  207. </ul>
  208. </div>
  209. <?php if( !empty($item['address_id'])){ ?>
  210. <div class="layui-col-md-12 ops">
  211. <a class="btn btn-primary" style="margin-left: 10px" data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/opchangeaddress', array('id' => $item['order_id']))}">修改订单收货信息</a>
  212. </div>
  213. <?php } ?>
  214. </div>
  215. </div>
  216. <div class=" order-container-static">
  217. <div class=" status">
  218. <span class="text"> 订单状态:</span>
  219. <?php if( $item['order_status_id'] == 1){ ?>
  220. <span class="text-warning font18">待发货</span>
  221. <?php } ?>
  222. <?php if( $item['order_status_id'] == 2){ ?>
  223. <span class="text-warning font18">已付款,拼团中</span>
  224. <?php } ?>
  225. <?php if( $item['order_status_id'] == 3){ ?>
  226. <span class="text-warning font18">待付款</span>
  227. <?php } ?>
  228. <?php if( $item['order_status_id'] == 4){ ?>
  229. <span class="text-warning font18">待收货</span>
  230. <?php } ?>
  231. <?php if( $item['order_status_id'] == 6){ ?>
  232. <span class="text-warning font18">已签收</span>
  233. <?php } ?>
  234. <?php if( $item['order_status_id'] == 14){ ?>
  235. <span class="text-warning font18">配送中</span>
  236. <?php } ?>
  237. <?php if( $item['order_status_id'] == 11){ ?>
  238. <span class="text-success font18">交易完成</span>
  239. <?php } ?>
  240. <?php if( $item['order_status_id'] == 7){ ?>
  241. <span class="text-success font18">已退款</span>
  242. <?php } ?>
  243. <?php if( $item['order_status_id'] == 5){ ?>
  244. <span class="text-default font18">已关闭</span>
  245. <?php } ?>
  246. <i>
  247. <?php if( $item['order_status_id'] == 3){ ?>
  248. ( 等待买家付款)
  249. <?php } ?>
  250. <?php if( $item['order_status_id'] == 1 ){ ?>(买家已经付款,请商家尽快发货)<?php } ?>
  251. <?php if( $item['order_status_id'] == 4){ ?>(商家已发货,等待买家收货并交易完成)<?php } ?>
  252. <?php if( $item['order_status_id'] == 14){ ?>(商家已发货,正在配送给团长途中)<?php } ?>
  253. <?php if( $item['order_status_id'] == 12){ ?>
  254. ( <span class="label label-default">已维权</span> <?php if( !empty($refund['refundtime'])){ ?>维权时间: {:date('Y-m-d H:i:s',$refund['refundtime'])}<?php } ?>)
  255. <?php } ?>
  256. </i>
  257. </div>
  258. <?php if( !empty($item['transaction_id'])){ ?>
  259. <div>
  260. <ul>
  261. <li class="text">交易单号:<span class="text-default">{$item['transaction_id']}</span></li>
  262. </ul>
  263. </div>
  264. <?php } ?>
  265. <?php if( !empty($item['expresssn']) && $item['delivery']=='express' && !empty($item['shipping_method'])){ ?>
  266. <div>
  267. <ul>
  268. <li class="text">快递公司:<span class="text-default"><?php if( empty($express_info['name'])){ ?>其他快递<?php }else{ ?>{$express_info['name']}<?php } ?></span></li>
  269. <li class="text">快递单号:<span class="text-default">{$item['shipping_no']}</span>&nbsp;<a class="text-primary op" data-toggle="ajaxModal" href="{:U('util/express', array('id' => $item['id'],'express'=>$item['express'],'expresssn'=>$item['expresssn']))}">查看物流</a></li>
  270. <li class="text">发货时间:<span class="text-default">{:date('Y-m-d H:i:s',$item['express_time'])}</span></li>
  271. </ul>
  272. </div>
  273. <?php } ?>
  274. <?php if( $item['delivery']=='pickup' ){ ?>
  275. <div>
  276. <ul>
  277. <?php if( !empty($item['express_time'])){ ?>
  278. <li class="text">发货时间:<span class="text-default">{:date('Y-m-d H:i:s',$item['express_time'])}</span></li>
  279. <?php } ?>
  280. <?php if( !empty($item['express_tuanz_time'])){ ?>
  281. <li class="text">团长接货时间:<span class="text-default">{:date('Y-m-d H:i:s',$item['express_tuanz_time'])}</span></li>
  282. <?php } ?>
  283. </ul>
  284. </div>
  285. <?php } ?>
  286. <div class="ops layui-col-md-12" style="padding: 0;">
  287. <?php
  288. $is_ops_show = true;
  289. if (defined('ROLE') && ROLE == 'agenter' )
  290. {
  291. $supper_info = get_agent_logininfo();
  292. if( $supper_info['type'] != 1)
  293. {
  294. $is_ops_show = false;
  295. }
  296. }
  297. ?>
  298. <?php if($is_ops_show){ ?>
  299. <!---操作开始-->
  300. <?php if( $item['order_status_id'] == 3){ ?>
  301. <!--未付款-->
  302. <?php
  303. $is_pay_show = true;
  304. if (defined('ROLE') && ROLE == 'agenter' )
  305. {
  306. $supper_info = json_decode(base64_decode($_GPC['__lionfish_comshop_agent']), true);
  307. $is_pay_show = false;
  308. }
  309. ?>
  310. <?php if($is_pay_show){ ?>
  311. <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>
  312. <?php } ?>
  313. <?php }elseif( $item['order_status_id'] == 1 ){ ?>
  314. <!--已付款-->
  315. <?php if( $item['order_status_id'] == 1 && $item['delivery'] == 'express' ){ ?>
  316. <!--快递 发货-->
  317. <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>
  318. <?php }elseif( $item['order_status_id'] == 1 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send' ) ){ ?>
  319. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认此订单发货吗?" data-href="{:U('order/opsend_tuanz', array('id' => $item['order_id']))}">确认配送</a>
  320. <?php }else{ ?>
  321. <?php } ?>
  322. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send') ){ ?>
  323. <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>
  324. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'express') ){ ?>
  325. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="{:U('order/opreceive', array('id' => $item['order_id']))}" data-confirm="确认订单收货吗?">确认收货</a><br />
  326. <?php }elseif( $item['order_status_id'] == 4 || $item['order_status_id'] == 6 ){ ?>
  327. <!--已发货-->
  328. <?php if( $item['order_status_id'] == 4){ ?>
  329. <!--快递 取消发货-->
  330. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="{:U('order/opreceive', array('id' => $item['order_id']))}" data-confirm="确认订单收货吗?">确认收货</a><br />
  331. <?php if( $item['delivery'] == 'express'){ ?>
  332. <a class="text-primary" data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/opchangeexpress', array('id' => $item['order_id']))}">修改物流</a>
  333. <?php } ?>
  334. <?php }else{ ?>
  335. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="{:U('order/opfinish', array('id' => $item['order_id']))}" data-confirm="确认完成订单吗?">确认完成</a>
  336. <?php } ?>
  337. <?php }elseif( $item['order_status_id'] == 3 ){ ?>
  338. <?php } ?>
  339. <!---操作结束--->
  340. <?php } ?>
  341. <a class="text-primary" data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/opremarksaler', array('id' => $item['order_id']))}" >
  342. <?php if( !empty($item['remarksaler'])){ ?>查看备注
  343. <?php }else{ ?>
  344. 添加备注
  345. <?php } ?>
  346. </a>
  347. </div>
  348. <?php if( $item['order_status_id'] != 3){ ?>
  349. <div class="order-container-footer text col-md-12" style="border: none;padding: 0">
  350. <?php if( $item['order_status_id'] == 1){ ?>
  351. 友情提示:如果无法进行发货,请及时联系买家进行妥善处理;
  352. <?php } ?>
  353. <?php if( $item['order_status_id'] == 4){ ?>
  354. 友情提示:
  355. 请及时关注物流状态,确保买家及时收到商品;
  356. 如果买家未收到货物或有退换货请求,请及时联系买家妥善处理
  357. <?php } ?>
  358. <?php if( $item['order_status_id']==11){ ?>
  359. 友情提示:
  360. 交易成功,如买家有售后申请,请与买家进行协商,妥善处理
  361. <?php } ?>
  362. </div>
  363. <?php } ?>
  364. </div>
  365. </div>
  366. <!---订单详情end-->
  367. <h3 style="margin:15px 0px;">商品信息</h3>
  368. <table class="layui-table ">
  369. <thead>
  370. <tr class="trorder" style="background: #fff">
  371. <th class="" style="width: 75px;text-align: right;padding-right: 0">
  372. 商品标题
  373. </th>
  374. <th style="">
  375. </th>
  376. <th style="padding-left: 20px">规格、编号</th>
  377. <th style="text-align: left;padding-left: 20px">基数</th>
  378. <th style="text-align: center;">供应商</th>
  379. <th style="text-align: center;width: 130px">单价</th>
  380. <th style="text-align: center;width: 100px;">数量</th>
  381. <th style="text-align: center;width: 100px;">价格</th>
  382. </tr>
  383. </thead>
  384. <tbody>
  385. <?php $i =0; ?>
  386. <?php foreach( $order_goods as $goods ){ ?>
  387. <tr class="trorder" style="background: #fff">
  388. <td style="text-align: right;padding-right: 0">
  389. <img src="{:tomedia($goods['goods_images'])}" style='width:52px;height:52px;border:1px solid #efefef; padding:1px;' >
  390. </td>
  391. <td style="min-width: 300px">
  392. <a target="_blank" href="{:U('goods/edit', array('id' => $goods['goods_id']))}"title="查看" style="display: block;line-height: 22px;max-width: 250px;white-space: nowrap;
  393. overflow: hidden;text-overflow: ellipsis;">{$goods['name']}<?php if($goods['is_refund_state'] == 1 ){ ?>(退款)<?php } ?></a>
  394. </td>
  395. <td style="padding: 10px 20px">
  396. <p style="white-space:normal;">
  397. 规格:<?php if( !empty($goods['option_sku'])){ ?><span class="label label-primary" data-container="body" data-toggle="popover" data-placement="right" data-content="{$goods['option_sku']}">{$goods['option_sku']}</span><?php }else{ ?>无<?php } ?>
  398. </p>
  399. <p>
  400. 编码:<?php if( !empty($goods['model'])){ ?><span>{$goods['model']}</span><?php }else{ ?>无<?php } ?>
  401. </p>
  402. </td>
  403. <td style="padding: 10px 20px">
  404. &nbsp;&nbsp;商品小计{$goods['total']}<br/>
  405. -&nbsp;满减:{$goods['fullreduction_money']}<br/>
  406. -&nbsp;优惠券:{$goods['voucher_credit']}<br/>
  407. =&nbsp;基数<?php echo $goods['total'] -$goods['fullreduction_money']-$goods['voucher_credit']; ?>
  408. </td>
  409. <td style="text-align: center;">
  410. <span>{$goods['supply_name']}({$goods['supply_type']})</span>
  411. </td>
  412. <td style="text-align: center">
  413. <p>¥{:round($goods['price'],2)}
  414. <?php if( $goods['member_disc'] < 100){ ?>
  415. <span class="label label-primary">会员折扣:{$goods['member_disc']}%</span>
  416. <?php } ?>
  417. </p>
  418. </td>
  419. <td style="text-align: center">
  420. <p>{$goods['quantity']}个</p>
  421. </td>
  422. <td style="text-align: center">&yen;{:round($goods['price']*$goods['quantity'],2)}</td>
  423. </tr>
  424. <?php if($item['is_commission'] == 1 && !empty($goods['member_commission_list']) ){ ?>
  425. <tr class="tr-order-sn">
  426. <td colspan="10">
  427. 会员佣金:
  428. <?php foreach($goods['member_commission_list'] as $mb_val){ ?>
  429. 分销员:<?php echo $mb_val['username']; ?>(<?php echo $mb_val['level']; ?>级上线)
  430. 佣金比例:
  431. <?php if($mb_val['type'] == 1){ ?>
  432. &nbsp;<?php echo $mb_val['bili']; ?>%
  433. *&nbsp;基数:{$goods['price']}
  434. *&nbsp;数量:{$goods['quantity']}
  435. <?php }else{ ?>
  436. 固定佣金<?php echo $mb_val['bili']; ?>
  437. &nbsp;*&nbsp;数量:{$goods['quantity']}
  438. <?php } ?>
  439. =&nbsp;具体佣金:<?php echo $mb_val['money']; ?>元 &nbsp;
  440. <?php
  441. $str_state = '';
  442. switch($mb_val['state'])
  443. {
  444. case 0: $str_state='待结算'; break;
  445. case 1: $str_state='已结算'; break;
  446. case 2: $str_state='订单退款'; break;
  447. }
  448. ?>(<?php echo $str_state; ?>)<br/>
  449. <?php } ?>
  450. </td>
  451. </tr>
  452. <?php } ?>
  453. <?php $i++; ?>
  454. <?php } ?>
  455. </tbody>
  456. <tfoot style="padding-top: 20px">
  457. <tr class="trorder">
  458. <td colspan="2" style="padding-left: 20px">
  459. </td>
  460. <td <?php if($item['is_commission'] == 1){ ?>colspan="8"<?php }else{ ?> colspan="7"<?php } ?> style="padding-right: 60px">
  461. <div class="price">
  462. <?php if( $item['is_free_shipping_fare'] == 1 ){ ?>
  463. <p><span class="price-inner">运费:</span>¥{$item['fare_shipping_free']}</p>
  464. <p><span class="price-inner">满{$item['man_e_money']}减运费:</span>-¥{$item['fare_shipping_free']}</p>
  465. <?php }else{ ?>
  466. <p><span class="price-inner">运费:</span>¥{$item['shipping_fare']}</p>
  467. <?php } ?>
  468. <p> <span class="price-inner">商品小计:</span><span style="font-weight: bold">¥{:round($item['total'],2)}</span></p>
  469. <?php if( $item['voucher_id']>0 ){ ?>
  470. <p><span class="price-inner">优惠券优惠:</span><span class="text-danger">-¥{$item['voucher_credit']}</span></p>
  471. <?php } ?>
  472. <?php if( $item['fullreduction_money']>0 ){ ?>
  473. <p><span class="price-inner">满减优惠:</span><span class="text-danger">-¥{$item['fullreduction_money']}</span></p>
  474. <?php } ?>
  475. <?php if( $item['score_for_money']>0 ){ ?>
  476. <p><span class="price-inner">积分抵扣:</span><span class="text-danger">-¥{$item['score_for_money']}</span></p>
  477. <?php } ?>
  478. <?php if( ($item['changedtotal'])!=0){ ?>
  479. <p>
  480. <span class="price-inner">卖家改价:</span>
  481. <span style='<?php if( 0<$item['changedtotal']){ ?>color:green<?php }else{ ?>color:red<?php } ?>'><?php if( 0<$item['changedtotal']){ ?>+<?php }else{ ?>-<?php } ?>¥{php echo number_format(abs($item['changedtotal']),2)}</span>
  482. </p>
  483. <?php } ?>
  484. <?php if( ($item['changedshipping_fare'])!=0){ ?>
  485. <p>
  486. <span class="price-inner">卖家改运费:</span>
  487. <span style='<?php if( 0<$item['changedshipping_fare']){ ?>color:green<?php }else{ ?>color:red<?php } ?>'><?php if( 0<$item['changedshipping_fare']){ ?>+<?php }else{ ?>-<?php } ?>¥{php echo abs($item['changedshipping_fare'])}</span>
  488. </p>
  489. <?php } ?>
  490. <?php
  491. $free_tongji = $item['total']+$item['shipping_fare']-$item['voucher_credit']-$item['fullreduction_money'] - $item['score_for_money'];
  492. if($free_tongji < 0){
  493. $free_tongji = 0;
  494. }
  495. ?>
  496. <p><span class="price-inner">实付款:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">¥{$free_tongji}</span></p>
  497. </div>
  498. </td>
  499. </tr>
  500. </tfoot>
  501. </table>
  502. </form>
  503. </div>
  504. </div>
  505. </div>
  506. <script src="/layuiadmin/layui/layui.js"></script>
  507. <script>
  508. layui.config({
  509. base: '/layuiadmin/' //静态资源所在路径
  510. }).extend({
  511. index: 'lib/index' //主入口模块
  512. }).use('index');
  513. </script>
  514. <script>
  515. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  516. var layer = layui.layer;
  517. var $;
  518. layui.use(['jquery', 'layer','form'], function(){
  519. $ = layui.$;
  520. var form = layui.form;
  521. $('.deldom').click(function(){
  522. var s_url = $(this).attr('data-href');
  523. layer.confirm($(this).attr('data-confirm'), function(index){
  524. $.ajax({
  525. url:s_url,
  526. type:'post',
  527. dataType:'json',
  528. success:function(info){
  529. if(info.status == 0)
  530. {
  531. layer.msg(info.result.message,{icon: 1,time: 2000});
  532. }else if(info.status == 1){
  533. var go_url = location.href;
  534. if( info.result.hasOwnProperty("url") )
  535. {
  536. go_url = info.result.url;
  537. }
  538. layer.msg('操作成功',{time: 1000,
  539. end:function(){
  540. location.href = info.result.url;
  541. }
  542. });
  543. }
  544. }
  545. })
  546. });
  547. })
  548. $('.btn-operation').click(function(){
  549. var ids_arr = [];
  550. var obj = $(this);
  551. var s_toggle = $(this).attr('data-toggle');
  552. var s_url = $(this).attr('data-href');
  553. $("input[name=item_checkbox]").each(function() {
  554. if( $(this).prop('checked') )
  555. {
  556. ids_arr.push( $(this).val() );
  557. }
  558. })
  559. if(ids_arr.length < 1)
  560. {
  561. layer.msg('请选择要操作的内容');
  562. }else{
  563. var can_sub = true;
  564. if( s_toggle == 'batch-remove' )
  565. {
  566. can_sub = false;
  567. layer.confirm($(obj).attr('data-confirm'), function(index){
  568. $.ajax({
  569. url:s_url,
  570. type:'post',
  571. dataType:'json',
  572. data:{ids:ids_arr},
  573. success:function(info){
  574. if(info.status == 0)
  575. {
  576. layer.msg(info.result.message,{icon: 1,time: 2000});
  577. }else if(info.status == 1){
  578. var go_url = location.href;
  579. if( info.result.hasOwnProperty("url") )
  580. {
  581. go_url = info.result.url;
  582. }
  583. layer.msg('操作成功',{time: 1000,
  584. end:function(){
  585. location.href = info.result.url;
  586. }
  587. });
  588. }
  589. }
  590. })
  591. });
  592. }else{
  593. $.ajax({
  594. url:s_url,
  595. type:'post',
  596. dataType:'json',
  597. data:{ids:ids_arr},
  598. success:function(info){
  599. if(info.status == 0)
  600. {
  601. layer.msg(info.result.message,{icon: 1,time: 2000});
  602. }else if(info.status == 1){
  603. var go_url = location.href;
  604. if( info.result.hasOwnProperty("url") )
  605. {
  606. go_url = info.result.url;
  607. }
  608. layer.msg('操作成功',{time: 1000,
  609. end:function(){
  610. location.href = info.result.url;
  611. }
  612. });
  613. }
  614. }
  615. })
  616. }
  617. }
  618. })
  619. form.on('switch(restwsitch)', function(data){
  620. var s_url = $(this).attr('data-href')
  621. var rest = 1;
  622. if(data.elem.checked)
  623. {
  624. rest = 1;
  625. }else{
  626. rest = 0;
  627. }
  628. $.ajax({
  629. url:s_url,
  630. type:'post',
  631. dataType:'json',
  632. data:{rest:rest},
  633. success:function(info){
  634. if(info.status == 0)
  635. {
  636. layer.msg(info.result.message,{icon: 1,time: 2000});
  637. }else if(info.status == 1){
  638. var go_url = location.href;
  639. if( info.result.hasOwnProperty("url") )
  640. {
  641. go_url = info.result.url;
  642. }
  643. layer.msg('操作成功',{time: 1000,
  644. end:function(){
  645. location.href = info.result.url;
  646. }
  647. });
  648. }
  649. }
  650. })
  651. });
  652. form.on('switch(enablewsitch)', function(data){
  653. var s_url = $(this).attr('data-href')
  654. var enable = 1;
  655. if(data.elem.checked)
  656. {
  657. enable = 1;
  658. }else{
  659. enable = 0;
  660. }
  661. $.ajax({
  662. url:s_url,
  663. type:'post',
  664. dataType:'json',
  665. data:{enable:enable},
  666. success:function(info){
  667. if(info.status == 0)
  668. {
  669. layer.msg(info.result.message,{icon: 1,time: 2000});
  670. }else if(info.status == 1){
  671. var go_url = location.href;
  672. if( info.result.hasOwnProperty("url") )
  673. {
  674. go_url = info.result.url;
  675. }
  676. layer.msg('操作成功',{time: 1000,
  677. end:function(){
  678. location.href = info.result.url;
  679. }
  680. });
  681. }
  682. }
  683. })
  684. });
  685. form.on('switch(statewsitch)', function(data){
  686. var s_url = $(this).attr('data-href')
  687. var state = 1;
  688. if(data.elem.checked)
  689. {
  690. state = 1;
  691. }else{
  692. state = 0;
  693. }
  694. $.ajax({
  695. url:s_url,
  696. type:'post',
  697. dataType:'json',
  698. data:{state:state},
  699. success:function(info){
  700. if(info.status == 0)
  701. {
  702. layer.msg(info.result.message,{icon: 1,time: 2000});
  703. }else if(info.status == 1){
  704. var go_url = location.href;
  705. if( info.result.hasOwnProperty("url") )
  706. {
  707. go_url = info.result.url;
  708. }
  709. layer.msg('操作成功',{time: 1000,
  710. end:function(){
  711. location.href = info.result.url;
  712. }
  713. });
  714. }
  715. }
  716. })
  717. });
  718. form.on('checkbox(checkboxall)', function(data){
  719. if(data.elem.checked)
  720. {
  721. $("input[name=item_checkbox]").each(function() {
  722. $(this).prop("checked", true);
  723. });
  724. $("input[name=checkall]").each(function() {
  725. $(this).prop("checked", true);
  726. });
  727. }else{
  728. $("input[name=item_checkbox]").each(function() {
  729. $(this).prop("checked", false);
  730. });
  731. $("input[name=checkall]").each(function() {
  732. $(this).prop("checked", false);
  733. });
  734. }
  735. form.render('checkbox');
  736. });
  737. //监听提交
  738. form.on('submit(formDemo)', function(data){
  739. $.ajax({
  740. url: data.form.action,
  741. type: data.form.method,
  742. data: data.field,
  743. dataType:'json',
  744. success: function (info) {
  745. if(info.status == 0)
  746. {
  747. layer.msg(info.result.message,{icon: 1,time: 2000});
  748. }else if(info.status == 1){
  749. var go_url = location.href;
  750. if( info.result.hasOwnProperty("url") )
  751. {
  752. go_url = info.result.url;
  753. }
  754. layer.msg('操作成功',{time: 1000,
  755. end:function(){
  756. location.href = info.result.url;
  757. }
  758. });
  759. }
  760. }
  761. });
  762. return false;
  763. });
  764. })
  765. </script>
  766. <script>
  767. var ajax_url = "";
  768. $(function(){
  769. $("[data-toggle='ajaxModal']").click(function () {
  770. var s_url = $(this).attr('data-href');
  771. ajax_url = s_url;
  772. console.log(23);
  773. $.ajax({
  774. url:s_url,
  775. type:"get",
  776. success:function(shtml){
  777. $('#ajaxModal').html(shtml);
  778. $("#ajaxModal").modal();
  779. }
  780. })
  781. });
  782. $(document).delegate(".modal-footer .btn-primary","click",function(){
  783. var s_data = $('#ajaxModal form').serialize();
  784. $.ajax({
  785. url:ajax_url,
  786. type:'post',
  787. dataType:'json',
  788. data:s_data,
  789. success:function(info){
  790. if(info.status == 0)
  791. {
  792. layer.msg(info.result.message,{icon: 1,time: 2000});
  793. }else if(info.status == 1){
  794. var go_url = location.href;
  795. if( info.result.hasOwnProperty("url") )
  796. {
  797. go_url = info.result.url;
  798. }
  799. layer.msg('操作成功',{time: 1000,
  800. end:function(){
  801. location.href = info.result.url;
  802. }
  803. });
  804. }
  805. }
  806. })
  807. return false;
  808. })
  809. })
  810. </script>
  811. <div id="ajaxModal" class="modal fade" style="display: none;">
  812. </div>
  813. <script>
  814. //没有选中时间段不能导出
  815. $(function () {
  816. $('.btn-submit').click(function () {
  817. var e = $(this).data('export');
  818. if(e==1 ){
  819. if($('#keyword').val() !='' ){
  820. $('#export').val(1);
  821. $('#search').submit();
  822. }else if($('#searchtime').val()!=''){
  823. $('#export').val(1);
  824. $('#search').submit();
  825. }else{
  826. $('#export').val(1);
  827. $('#search').submit();
  828. return;
  829. }
  830. }else{
  831. $('#export').val(0);
  832. $('#search').submit();
  833. }
  834. })
  835. })
  836. </script>
  837. </body>