c691c9c4728d656d559517264a51abb8.php 64 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561
  1. <?php if (!defined('THINK_PATH')) exit();?><!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': '<?php echo ($_W['uniacid']); ?>',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '<?php echo ($_W['acid']); ?>',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '<?php echo ($_W['openid']); ?>',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '<?php echo ($_W['uid']); ?>',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '<?php echo ($_W['siteroot']); ?>',
  27. 'siteurl': '<?php echo ($_W['siteurl']); ?>',
  28. 'attachurl': '<?php echo ($_W['attachurl']); ?>',
  29. 'attachurl_local': '<?php echo ($_W['attachurl_local']); ?>',
  30. 'attachurl_remote': '<?php echo ($_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' : <?php echo 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. .hxBtn{color:#428bca;}
  101. .form-title {
  102. font-size: 16px;
  103. font-weight: bold;
  104. line-height: 22px;
  105. padding: 9px 20px;
  106. background-color: #F4F6F8;
  107. border-radius: 2px;
  108. margin-top: 20px;
  109. margin-bottom: 20px;
  110. }
  111. ul.form_list li{width: 30%;display: inline-block;text-align: left;margin: 10px;}
  112. </style>
  113. </head>
  114. <body layadmin-themealias="default">
  115. <table id="demo" lay-filter="test"></table>
  116. <div class="layui-fluid">
  117. <div class="layui-card">
  118. <div class="layui-card-header layui-elem-quote">
  119. 当前位置:<span class="line-text">订单详情</span>
  120. </div>
  121. <div class="layui-card-body" style="padding:15px;">
  122. <ul class="layui-timeline">
  123. <?php foreach($history_list as $history){ ?>
  124. <li class="layui-timeline-item">
  125. <i class="layui-icon layui-timeline-axis"></i>
  126. <div class="layui-timeline-content layui-text">
  127. <h3 class="layui-timeline-title">
  128. <?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>
  129. </h3>
  130. <p>
  131. <?php echo $history['comment']; ?>
  132. </p>
  133. </div>
  134. </li>
  135. <?php } ?>
  136. </ul>
  137. <form action="" class="layui-form" lay-filter="example" method="post" >
  138. <input type="hidden" name="id" value="<?php echo ($item['order_id']); ?>" />
  139. <input type="hidden" name="dispatchid" value="<?php echo ($express_info['id']); ?>" />
  140. <!---订单详情begin--->
  141. <div class="layui-row order-container">
  142. <div class="order-container-left" style="border-right: 1px solid #efefef">
  143. <div class="layui-row">
  144. <div class="layui-col-md-12">
  145. <ul class="">
  146. <li class="text"><span class="layui-col-sm">订单编号:</span><?php echo ($item['order_num_alias']); ?></li>
  147. <?php if( !empty($coupon)){ ?>
  148. <li class="text">
  149. <span class="layui-col-sm">优惠券:</span>
  150. <span class="text-default"><?php echo ($coupon['voucher_title']); ?> &nbsp;&nbsp;</span>
  151. </li>
  152. <?php } ?>
  153. <li class="text">
  154. <span class="layui-col-sm">付款方式:</span>
  155. <span class="text-default">
  156. <?php if( $item['payment_code'] == ''){ ?>未付款<?php } ?>
  157. <?php if( $item['payment_code'] == 'yuer'){ ?>余额支付<?php } ?>
  158. <?php if( $item['payment_code'] == 'admin'){ ?>后台付款<?php } ?>
  159. <?php if( $item['payment_code'] == 'weixin'){ ?>微信支付<?php } ?>
  160. <?php if( $item['payment_code'] == 'supply_mobile'){ ?>供应商手机端付款<?php } ?>
  161. <?php if( $item['payment_code'] == 'cashon_delivery'){ ?>货到付款<?php } ?>
  162. </span>
  163. </li>
  164. <li class="text">
  165. <span class="layui-col-sm">买  家:</span>
  166. <span class="text-default">
  167. <?php if (defined('ROLE') && ROLE == 'agenter' ) { ?>
  168. <?php echo ($member['username']); ?> &nbsp;&nbsp;会员ID :<?php echo ($member['member_id']); ?>
  169. <?php }else{ ?>
  170. <?php if($s_id == 1){ ?>
  171. <a href="<?php echo U('user/detail',array('id'=>$member['member_id']));?>" target='_blank' class="text-primary"><?php echo ($member['username']); ?></a>
  172. <?php }else{ ?>
  173. <a id="user" target='_blank' class="text-primary"><?php echo ($member['username']); ?></a>
  174. <?php } ?>
  175. &nbsp;&nbsp;会员ID :<?php echo ($member['member_id']); ?>
  176. <?php if( !empty($member['content']) ){ ?>
  177. <font class="text-danger">(<?php echo ($member['content']); ?>)</font>
  178. <?php } ?>
  179. <?php } ?>
  180. &nbsp;&nbsp;
  181. </span>
  182. </li>
  183. <?php if($is_order_note_open == 1){ ?>
  184. <?php if(!($item['delivery'] == 'express' && ($item['type'] == 'normal' || $item['type'] == 'pintuan'))){ ?>
  185. <?php if( !empty($item['note_content'])){ ?>
  186. <li class="text">
  187. <span style="padding-left: 10px;"><?php echo ($order_note_name); ?>:</span>
  188. <span class="text-default">
  189. <?php echo ($item['note_content']); ?>
  190. </span>
  191. </li>
  192. <?php } ?>
  193. <?php } ?>
  194. <?php } ?>
  195. <li class="text">
  196. <span class="layui-col-sm">配送方式:</span>
  197. <span class="text-default">
  198. <?php if( $item['delivery'] == 'pickup'){ ?>
  199. 社区自提
  200. <?php }elseif( $item['delivery'] == 'express' ){ ?>
  201. <?php if( $is_virtualcard == 1 ){ ?>
  202. 礼品卡兑换余额
  203. <?php }else{ ?>
  204. 快递<?php if( !empty($express_info['name'])){ ?>(<?php echo ($express_info['name']); ?> <?php if( !empty($item['shipping_no'])){ ?>快递单号:<?php echo ($item['shipping_no']); } ?>)<?php } ?>
  205. <a class="text-primary" data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/express', array('order_id' => $item['order_id']));?>" >查看物流</a>
  206. <?php } ?>
  207. <?php }elseif( $item['delivery'] == 'tuanz_send' ){ ?>
  208. 团长配送
  209. <?php }elseif( $item['delivery'] == 'hexiao' ){ ?>
  210. 到店核销
  211. <?php }else{ ?>
  212. 同城配送
  213. <?php } ?>
  214. </span>
  215. </li>
  216. <?php if( $is_virtualcard == 0 ){ ?>
  217. <li class="text">
  218. <span class="layui-col-sm">收 货 人:</span>
  219. <span class="text-default">
  220. <?php echo ($item['shipping_name']); ?> <?php echo ($item['shipping_tel']); ?>
  221. </span>
  222. </li>
  223. <?php } ?>
  224. <?php if($is_can_look_headinfo){ ?>
  225. <?php if( $item['type'] != 'integral' && ( $item['type'] != 'pintuan' || $item['head_id'] > 0 ) ){ ?>
  226. <li class="text">
  227. <span class="layui-col-sm">团  长:</span>
  228. <span class="text-default">
  229. <?php echo ($item['ziti_name']); ?> <?php echo ($item['ziti_mobile']); ?>
  230. </span>
  231. </li>
  232. <?php } ?>
  233. <?php if( $item['delivery'] == 'tuanz_send'){ ?>
  234. <li class="text">
  235. <span class="layui-col-sm">送货地址:</span>
  236. <span class="text-default">
  237. <?php echo ($item['tuan_send_address']); ?>
  238. </span>
  239. </li>
  240. <?php } ?>
  241. <?php }else{ ?>
  242. <li class="text">
  243. <span class="layui-col-sm">团  长:</span>
  244. <span class="text-default">
  245. <?php echo ($item['ziti_name']); ?>
  246. </span>
  247. </li>
  248. <?php } ?>
  249. <?php if( $item['delivery'] == 'pickup'){ ?>
  250. <li class="text">
  251. <span class="layui-col-sm">取货地址:</span>
  252. <span class="text-default">
  253. <?php echo ($item['shipping_address']); ?>
  254. </span>
  255. </li>
  256. <?php } ?>
  257. <?php if( !empty($item['address_id']) && $is_virtualcard == 0 ){ ?>
  258. <li class="text">
  259. <span class="layui-col-sm">收货详细地址:</span>
  260. <span class="text-default">
  261. <?php echo ($province_info['name']); echo ($city_info['name']); echo ($area_info['name']); ?> <?php if( $item['delivery'] == 'tuanz_send'){ echo ($item['tuan_send_address']); }else{ ?> <?php echo ($item['shipping_address']); } ?>, <?php echo ($item['shipping_name']); ?>, <?php echo ($item['shipping_tel']); ?>
  262. <a class='text-primary op js-clip' data-url="<?php echo ($province_info['name']); echo ($city_info['name']); echo ($area_info['name']); if( $item['delivery'] == 'tuanz_send'){ echo ($item['tuan_send_address']); }else{ ?> <?php echo ($item['shipping_address']); } ?>, <?php echo ($item['shipping_name']); ?>, <?php echo ($item['shipping_tel']); ?>">复制</a>
  263. </span>
  264. </li>
  265. <?php } ?>
  266. <?php if( !empty($item['comment'])){ ?>
  267. <li class="text"><span class="col-sm">买家备注:</span><span class="text-default"><?php echo ($item['comment']); ?></span></li>
  268. <?php } ?>
  269. </ul>
  270. </div>
  271. <?php if( !empty($item['address_id'])){ ?>
  272. <div class="layui-col-md-12 ops">
  273. <a class="btn btn-primary" style="margin-left: 10px" data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/opchangeaddress', array('id' => $item['order_id']));?>">修改订单收货信息</a>
  274. </div>
  275. <?php } ?>
  276. </div>
  277. </div>
  278. <div class=" order-container-static">
  279. <div class=" status">
  280. <span class="text"> 订单状态:</span>
  281. <?php if( $item['order_status_id'] == 1){ ?>
  282. <span class="text-warning font18">待发货</span>
  283. <?php } ?>
  284. <?php if( $item['order_status_id'] == 3){ ?>
  285. <span class="text-warning font18">待付款</span>
  286. <?php } ?>
  287. <?php if( $item['order_status_id'] == 4){ ?>
  288. <span class="text-warning font18">已发货</span>
  289. <?php if($item['delivery'] == 'hexiao'){ ?>
  290. <span class="text-warning font18">待使用</span>
  291. <?php }else{?>
  292. <span class="text-warning font18">待收货</span>
  293. <?php } ?>
  294. <?php } ?>
  295. <?php if( $item['order_status_id'] == 6){ ?>
  296. <span class="text-warning font18">已签收</span>
  297. <?php } ?>
  298. <?php if( $item['order_status_id'] == 7){ ?>
  299. <span class="text-warning font18">已退款</span>
  300. <?php } ?>
  301. <?php if( $item['order_status_id'] == 14){ ?>
  302. <span class="text-warning font18">配送中</span>
  303. <?php } ?>
  304. <?php if( $item['order_status_id'] == 11){ ?>
  305. <span class="text-success font18">交易完成</span>
  306. <?php } ?>
  307. <?php if( $item['order_status_id'] == 5){ ?>
  308. <span class="text-default font18">已关闭</span>
  309. <?php } ?>
  310. <?php if( $item['order_status_id'] == 15){ ?>
  311. <span class="text-default font18">定金已支付,等待活动结束买家支付尾款</span>
  312. <?php } ?>
  313. <i>
  314. <?php if( $item['order_status_id'] == 3){ ?>
  315. ( 等待买家付款)
  316. <?php } ?>
  317. <?php if( $item['order_status_id'] == 1 ){ ?>(买家已经付款,请商家尽快发货)<?php } ?>
  318. <?php if( $item['order_status_id'] == 4){ ?>
  319. <?php if($item['delivery'] == 'hexiao'){ ?>
  320. (买家已经付款,等待买家到店核销)
  321. <?php }else{ ?>
  322. (商家已发货,等待买家收货并交易完成)
  323. <?php }?>
  324. <?php } ?>
  325. <?php if( $item['order_status_id'] == 14){ ?>(商家已发货,正在配送给团长途中)<?php } ?>
  326. <?php if( $item['order_status_id'] == 12){ ?>
  327. ( <span class="label label-default">已维权</span> <?php if( !empty($refund['refundtime'])){ ?>维权时间: <?php echo date('Y-m-d H:i:s',$refund['refundtime']); } ?>)
  328. <?php } ?>
  329. </i>
  330. </div>
  331. <?php if( $item['delivery'] == 'localtown_delivery'){ ?>
  332. <?php if( !empty($item['expected_delivery_time']) && empty($item['presale_info']) ){ ?>
  333. <div>
  334. <ul>
  335. <!--
  336. <?php
  337. $weekarray=array("日","一","二","三","四","五","六"); $week = $weekarray[date('w',$item['date_added'])]; ?>
  338. <li class="text">期望配送时间:<span class="text-default"><?php echo date('m-d',$item['date_added'])?>(周<?php echo $week;?>)<?php echo ($item['expected_delivery_time']); ?></span></li>-->
  339. <li class="text">期望配送时间:<span class="text-default"><?php echo ($item['expected_delivery_time']); ?></span></li>
  340. </ul>
  341. </div>
  342. <?php } ?>
  343. <?php
  344. if( $item['order_status_id'] == 4 || $item['order_status_id'] == 6 || $item['order_status_id'] == 11 ){ if(!empty($item['orderdistribution_order']['username'])){ ?>
  345. <div>
  346. <ul>
  347. <li class="text">配送员:
  348. <span class="text-default"><a href="javascript:void(0);" style="color:#428bca;"><?php echo $item['orderdistribution_order']['username']; ?></a></span>
  349. <!--<?php if($item['orderdistribution_order']['orderdistribution_id'] == -1){?>
  350. <i class="layui-icon layui-icon-about font20" data-message="“批量发货--订单批量确认收货”系统默认配送员配送完成。" style="font-size: 20px;"></i>
  351. <?php }?>-->
  352. </li>
  353. </ul>
  354. </div>
  355. <?php }} ?>
  356. <?php } ?>
  357. <?php if( $item['type'] == 'pintuan' ){ ?>
  358. <div>
  359. <td>
  360. <a href="<?php echo U('group/pintuan_detail', array('pin_id' => $pin_id));?>" target="_blank" class="btn btn-success btn-sm">查看拼团详情</a>
  361. </td>
  362. </div>
  363. <?php } ?>
  364. <?php if( !empty($item['transaction_id'])){ ?>
  365. <div>
  366. <ul>
  367. <li class="text">交易单号:<span class="text-default"><?php echo ($item['transaction_id']); ?></span></li>
  368. </ul>
  369. </div>
  370. <?php } ?>
  371. <?php if( !empty($item['presale_info'])){ ?>
  372. <div>
  373. <ul>
  374. <?php if( $item['presale_info']['presale_type'] == 0 ){ ?>
  375. <li class="text">预售方式:<span class="text-default">定金预售</span></li>
  376. <?php }else{ ?>
  377. <li class="text">预售方式:<span class="text-default">全款预售</span></li>
  378. <?php } ?>
  379. <li class="text">阶段一: <span class="text-default">预付定金(定金 ¥<?php echo ($item['presale_info']['presale_ding_money']); ?> <?php echo !empty($item['presale_info']['presale_deduction_money']) && $item['presale_info']['presale_deduction_money'] > 0 ? '抵扣 ¥'.$item['presale_info']['presale_deduction_money'] : ''; ?>)</span></li>
  380. <?php if( $item['presale_info']['presale_type'] == 0 ){ ?>
  381. <li class="text">阶段二:
  382. <span class="text-default">
  383. <?php if( $item['presale_info']['state'] == 1 ){ ?>
  384. 支付尾款(未支付)
  385. <?php }else if( $item['presale_info']['state'] == 2 ){ ?>
  386. 支付尾款(已支付)
  387. <?php }else if( $item['presale_info']['state'] == 0 ){ ?>
  388. 定金还未支付
  389. <?php } ?>
  390. </span>
  391. </li>
  392. <?php } ?>
  393. <?php if( $item['presale_info']['presale_limit_balancepaytime'] == 0 ){ ?>
  394. <li class="text">尾款支付时间:<span class="text-default">不限制</span></li>
  395. <?php }else if( $item['presale_info']['presale_limit_balancepaytime'] == 1 && $item['presale_info']['presale_type'] == 0 ){ ?>
  396. <li class="text">尾款支付时间:
  397. <span class="text-default"><?php echo ($item['presale_info']['balance_pay_begintime']); ?> - <?php echo ($item['presale_info']['balance_pay_endtime']); ?></span>
  398. </li>
  399. <?php } ?>
  400. </ul>
  401. </div>
  402. <?php } ?>
  403. <?php if( !empty($item['expresssn']) && $item['delivery']=='express' && !empty($item['shipping_method'])){ ?>
  404. <div>
  405. <ul>
  406. <li class="text">快递公司:<span class="text-default"><?php if( empty($express_info['name'])){ ?>其他快递<?php }else{ echo ($express_info['name']); } ?></span></li>
  407. <li class="text">快递单号:<span class="text-default"><?php echo ($item['shipping_no']); ?></span>&nbsp;<a class="text-primary op" data-toggle="ajaxModal" href="<?php echo U('util/express', array('id' => $item['id'],'express'=>$item['express'],'expresssn'=>$item['expresssn']));?>">查看物流</a></li>
  408. <li class="text">发货时间:<span class="text-default"><?php echo date('Y-m-d H:i:s',$item['express_time']);?></span></li>
  409. </ul>
  410. </div>
  411. <?php } ?>
  412. <?php if( $item['delivery']=='pickup' ){ ?>
  413. <div>
  414. <ul>
  415. <?php if( !empty($item['express_time'])){ ?>
  416. <li class="text">发货时间:<span class="text-default"><?php echo date('Y-m-d H:i:s',$item['express_time']);?></span></li>
  417. <?php } ?>
  418. <?php if( !empty($item['express_tuanz_time'])){ ?>
  419. <li class="text">团长接货时间:<span class="text-default"><?php echo date('Y-m-d H:i:s',$item['express_tuanz_time']);?></span></li>
  420. <?php } ?>
  421. </ul>
  422. </div>
  423. <?php } ?>
  424. <div class="ops layui-col-md-12" style="padding: 0;">
  425. <?php $is_ops_show = true; if (defined('ROLE') && ROLE == 'agenter' ) { $supper_info = get_agent_logininfo(); if( $supper_info['type'] != 1) { $is_ops_show = false; } } ?>
  426. <?php if($is_ops_show){ ?>
  427. <!---操作开始-->
  428. <?php if( $item['order_status_id'] == 3){ ?>
  429. <!--未付款-->
  430. <?php $is_pay_show = true; if (defined('ROLE') && ROLE == 'agenter' ) { $supper_info = json_decode(base64_decode($_GPC['__lionfish_comshop_agent']), true); $is_pay_show = false; } ?>
  431. <?php if($is_pay_show){ ?>
  432. <?php if(!isset($open_admin_payment) || $open_admin_payment == '1'){ ?>
  433. <a class="btn btn-primary btn-xs deldom" data-toggle="ajaxPost" href="javascript:;" data-href="<?php echo U('order/oppay', array('id' => $item['order_id']));?>" data-confirm="确认此订单已付款吗?">确认付款</a>
  434. <?php } ?>
  435. <?php } ?>
  436. <?php }elseif( $item['order_status_id'] == 1 ){ ?>
  437. <!--已付款-->
  438. <?php if( $item['order_status_id'] == 1 && $item['delivery'] == 'express' ){ ?>
  439. <!--快递 发货-->
  440. <a class="btn btn-primary btn-xs ajaxPost" data-toggle='ajaxModal' href="javascript:;" data-href="<?php echo U('order/opsend', array('id' => $item['order_id']));?>" data-confirm="确认此订单发货吗?">确认发货</a>
  441. <?php }elseif( $item['order_status_id'] == 1 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send' ) ){ ?>
  442. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认此订单发货吗?" data-href="<?php echo U('order/opsend_tuanz', array('id' => $item['order_id']));?>">确认配送</a>
  443. <?php }else{ ?>
  444. <?php } ?>
  445. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send') ){ ?>
  446. <?php if($is_can_confirm_delivery){ ?>
  447. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="<?php echo U('order/opsend_tuanz_over', array('id' => $item['order_id']));?>" data-confirm="确认送达团长吗?">确认送达团长</a>
  448. <?php }?>
  449. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'express') ){ ?>
  450. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="<?php echo U('order/opreceive', array('id' => $item['order_id']));?>" data-confirm="确认订单收货吗?">确认收货</a><br />
  451. <?php }elseif( $item['order_status_id'] == 4 || $item['order_status_id'] == 6 ){ ?>
  452. <!--已发货-->
  453. <?php if( $item['order_status_id'] == 4){ ?>
  454. <!--快递 取消发货-->
  455. <?php if($is_can_confirm_receipt){ ?>
  456. <?php if($item['delivery'] == 'hexiao'){ ?>
  457. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认使用该订单吗?<br/><span style='color:#ad0909;font-size:13px;'>确认使用订单以后,订单下面全部商品默认核销成功。</span>" data-href="<?php echo U('order/order_hexiao', array('id' => $item['order_id']));?>">确认使用</a>
  458. <?php }else{ ?>
  459. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="<?php echo U('order/opreceive', array('id' => $item['order_id']));?>" data-confirm="确认订单收货吗?">确认收货</a><br />
  460. <?php }?>
  461. <?php }?>
  462. <?php if( $item['delivery'] == 'express' && $is_virtualcard == 0 ){ ?>
  463. <a class="text-primary" data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/opchangeexpress', array('id' => $item['order_id']));?>">修改物流</a>
  464. <?php } ?>
  465. <?php }else{ ?>
  466. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="<?php echo U('order/opfinish', array('id' => $item['order_id']));?>" data-confirm="确认完成订单吗?">确认完成</a>
  467. <?php } ?>
  468. <?php }elseif( $item['order_status_id'] == 3 ){ ?>
  469. <?php } ?>
  470. <!---操作结束--->
  471. <?php } ?>
  472. <?php
  473. if (!defined('ROLE')){ if( $item['order_status_id'] == 3 && $item['type'] != 'integral' && $is_presale == 0 ){ ?>
  474. <a class='op btn btn-primary btn-xs' data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/change_order', array('id' => $item['order_id']));?>" >
  475. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title="订单改价" ></i>
  476. 订单改价
  477. </a>
  478. <?php }} ?>
  479. <a class="text-primary" data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/opremarksaler', array('id' => $item['order_id']));?>" >
  480. <?php if( !empty($item['remarksaler'])){ ?>查看备注
  481. <?php }else{ ?>
  482. 添加备注
  483. <?php } ?>
  484. </a>
  485. </div>
  486. <?php if( $item['order_status_id'] != 3){ ?>
  487. <div class="order-container-footer text col-md-12" style="border: none;padding: 0">
  488. <?php if( $item['order_status_id'] == 1){ ?>
  489. 友情提示:如果无法进行发货,请及时联系买家进行妥善处理;
  490. <?php } ?>
  491. <?php if( $item['order_status_id'] == 4){ ?>
  492. <?php if($item['delivery'] == 'hexiao'){ ?>
  493. <span style="font-size:12px;color:#a7a5a5;">注:确认使用后,订单下面全部商品默认核销成功!</span>
  494. <br/>
  495. 友情提示:如果无法进行发货,请及时联系买家进行妥善处理;
  496. <?php }else{?>
  497. 友情提示:
  498. 请及时关注物流状态,确保买家及时收到商品;
  499. 如果买家未收到货物或有退换货请求,请及时联系买家妥善处理
  500. <?php }} ?>
  501. <?php if( $item['order_status_id']==11){ ?>
  502. 友情提示:
  503. 交易成功,如买家有售后申请,请与买家进行协商,妥善处理
  504. <?php } ?>
  505. </div>
  506. <?php } ?>
  507. </div>
  508. </div>
  509. <!---订单详情end-->
  510. <?php if( $is_virtualcard == 1 ){ ?>
  511. <h3 style="margin:15px 0px;">礼品卡信息</h3>
  512. <table class="layui-table ">
  513. <thead>
  514. <tr class="trorder" style="background: #fff">
  515. <th class="" style="width:200px;text-align: left;padding-right: 0;">
  516. 兑换码
  517. </th>
  518. <th style="padding-left: 20px;width:10%;">状态</th>
  519. <th style="text-align: left;padding-left: 20px;width:10%;">有效期</th>
  520. <th style="text-align: left;width: 100px;">可兑换余额</th>
  521. <th style="text-align: left;width: 100px;">使用人</th>
  522. </tr>
  523. </thead>
  524. <tbody>
  525. <tr>
  526. <td style="text-align:left;"><?php echo ($virtualcard_info['code_sn']); ?></td>
  527. <td>
  528. <?php
  529. switch( $virtualcard_info['state'] ) { case 0: echo '未支付'; break; case 1: echo '未使用'; break; case 2: echo '已使用'; break; case 3: echo '已失效'; break; } ?>
  530. </td>
  531. <td>
  532. <?php if( $virtualcard_info['is_effect'] == 1 ){ ?>
  533. <?php if( $virtualcard_info['effect_type'] == 0 ){ ?>
  534. 无限期
  535. <?php }else{ ?>
  536. <?php echo ($virtualcard_info['effect_enddate']); ?>
  537. <?php } ?>
  538. <?php }else{ ?>
  539. 已失效
  540. <?php } ?>
  541. </td>
  542. <td>¥<?php echo round($virtualcard_info['code_money'], 2);?></td>
  543. <td><?php echo ($virtualcard_info['use_member_name']); ?></td>
  544. </tr>
  545. </tbody>
  546. </table>
  547. <?php } ?>
  548. <?php
  549. if( !empty($order_form_data) && !empty($order_form_data['form_list']) ){ $form_list = $order_form_data['form_list']; ?>
  550. <div class="form-title">
  551. 关联表单信息:
  552. </div>
  553. <div class="layui-row">
  554. <ul class="form_list">
  555. <?php
  556. foreach($form_list as $k => $v){ ?>
  557. <li>
  558. <?php if($v['type'] == 'image'){ ?>
  559. <?php echo ($v['item_name']); ?>:
  560. <?php if(!empty($v['item_val'])){ ?>
  561. <?php foreach($v['item_val'] as $ik=>$iv){ ?>
  562. <?php if( empty($iv) ){ ?>
  563. 暂无
  564. <?php }else{ ?>
  565. <img src="<?php echo ($iv); ?>" style="width:52px;height:52px;border:1px solid #efefef; padding:1px;">
  566. <?php } ?>
  567. <?php } ?>
  568. <?php } ?>
  569. <?php }else{ ?>
  570. <?php echo ($v['item_name']); ?>:<?php echo ($v['item_val']); ?>
  571. <?php } ?>
  572. </li>
  573. <?php } ?>
  574. </ul>
  575. </div>
  576. <?php } ?>
  577. <h3 style="margin:15px 0px;">商品信息</h3>
  578. <p style="text-aligin:right;">
  579. <?php if( in_array($item['order_status_id'], array(1,4,6,10,11,12,14)) && $is_can_nowrfund_order ){ ?>
  580. <a class='op btn btn-primary btn-xs' style="float:right;" data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/oprefund_do', array('id' => $item['order_id']));?>" >
  581. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title="整个订单立即退款" ></i>
  582. 整个订单立即退款
  583. </a>
  584. <?php } ?>
  585. </p>
  586. <table class="layui-table ">
  587. <thead>
  588. <tr class="trorder" style="background: #fff">
  589. <th class="" style="width: 75px;text-align: right;padding-right: 0;">
  590. 商品标题
  591. </th>
  592. <th style="width:10%;">
  593. </th>
  594. <th style="padding-left: 20px;width:10%;">规格、编号</th>
  595. <th style="text-align: left;padding-left: 20px;width:10%;">基数</th>
  596. <?php if( $item['type'] != 'integral' ){ ?>
  597. <th style="padding-left: 20px;width:15%;">团长佣金&nbsp;</th>
  598. <?php } ?>
  599. <th style="width:120px;">是否退款</th>
  600. <?php if($item['delivery'] == 'hexiao'){ ?>
  601. <th style="width:120px;">到店核销方式</th>
  602. <?php }?>
  603. <th style="text-align: center;width: 100px">供应商</th>
  604. <th style="text-align: center;width: 80px">单价</th>
  605. <th style="text-align: center;width: 80px;">数量</th>
  606. <th style="text-align: center;width: 100px;">价格</th>
  607. </tr>
  608. </thead>
  609. <tbody>
  610. <?php $i =0; ?>
  611. <?php $member_youhui = 0; ?>
  612. <?php $total_refund_money = 0; ?>
  613. <?php $total_refund_shipping_fare = 0; ?>
  614. <?php $integral_total_refund_money = 0; ?>
  615. <?php $integral_total_refund_shipping_fare = 0; ?>
  616. <?php $order_total = 0; ?>
  617. <?php foreach( $order_goods as $goods ){ ?>
  618. <?php
  619. if(!empty($goods['goods_refund_shipping_fare'])){ $total_refund_shipping_fare = $total_refund_shipping_fare + $goods['goods_refund_shipping_fare']; } ?>
  620. <?php $member_youhui += ($goods['oldprice'] - $goods['price'])*$goods['quantity']; ?>
  621. <?php $total_refund_money += ($goods['has_refund_money']); ?>
  622. <tr class="trorder" style="background: #fff">
  623. <td style="text-align: right;padding-right: 0">
  624. <img src="<?php echo tomedia($goods['goods_images']);?>" style='width:52px;height:52px;border:1px solid #efefef; padding:1px;' >
  625. </td>
  626. <td style="min-width: 300px">
  627. <a target="_blank" href="<?php echo U('goods/edit', array('id' => $goods['goods_id']));?>"title="查看" style="display: block;line-height: 22px;max-width: 250px;white-space: nowrap;
  628. overflow: hidden;text-overflow: ellipsis;"><?php echo ($goods['name']); if($goods['is_refund_state'] == 1 ){ ?>(退款)<?php } ?></a>
  629. </td>
  630. <td style="padding: 10px 20px">
  631. <p style="white-space:normal;">
  632. 规格:<?php if( !empty($goods['option_sku'])){ ?><span class="label label-primary" data-container="body" data-toggle="popover" data-placement="right" data-content="<?php echo ($goods['option_sku']); ?>"><?php echo ($goods['option_sku']); ?></span><?php }else{ ?>无<?php } ?>
  633. </p>
  634. <p>
  635. 编码:<?php if( !empty($goods['model'])){ ?><span><?php echo ($goods['model']); ?></span><?php }else{ ?>无<?php } ?>
  636. </p>
  637. </td>
  638. <td style="padding: 10px 20px">
  639. <?php $vip_free_money = 0; $mblevel_free_money =0; if( $goods['is_level_buy'] == 1 ) { $mblevel_free_money = round(($goods['oldprice'] - $goods['price'])*$goods['quantity'],2); } if( $goods['is_vipcard_buy'] == 1 ) { $vip_free_money = round(($goods['oldprice'] - $goods['price'])*$goods['quantity'],2); } $order_total = $order_total + $goods['old_total']; $change_price = 0; if($goods['is_change_price'] == 1){ $change_price = $goods['price']*$goods['quantity'] - $goods['total']; } ?>
  640. &nbsp;&nbsp;商品合计<?php echo ($goods['old_total']); ?><br/>
  641. -&nbsp;满减:<?php echo ($goods['fullreduction_money']); ?><br/>
  642. -&nbsp;优惠券:<?php echo ($goods['voucher_credit']); ?><br/>
  643. <?php if( ($goods['is_change_price'] == 1 && $change_price > 0 ) ){ ?>
  644. -&nbsp;商家改价:<?php echo ($change_price); ?><br/>
  645. <?php } ?>
  646. <?php if( ($goods['is_level_buy']>0 && $mblevel_free_money > 0 ) ){ $item['is_level_buy'] = 1; ?>
  647. -&nbsp;会员等级优惠:<?php echo ($mblevel_free_money); ?><br/>
  648. <?php } ?>
  649. <?php if( ($goods['is_vipcard_buy']>0 && $vip_free_money > 0 ) ){ $item['is_vipcard_buy'] = 1; ?>
  650. -&nbsp;付费会员优惠:<?php echo ($vip_free_money); ?><br/>
  651. <?php } ?>
  652. <?php if($goods['has_refund_money']>0){ ?>
  653. -&nbsp;已退款:<?php echo ($goods['has_refund_money']); ?><br/>
  654. <?php } ?>
  655. =&nbsp;基数:<?php echo round($goods['total'] -$goods['fullreduction_money']-$goods['voucher_credit']-$goods['has_refund_money'],2); ?>
  656. </td>
  657. <?php if( $item['type'] != 'integral' && ($item['type'] == 'normal' || $item['head_id'] > 0) ){ ?>
  658. <td style="padding: 10px 20px">
  659. <?php foreach($goods['head_commission_order_info'] as $kkk => $vvv) { ?>
  660. <p style="white-space:normal;padding-bottom:8px;">
  661. 团长:<?php echo $vvv['head_name']; ?>&nbsp;&nbsp;
  662. <?php if($item['delivery']=='tuanz_send'){ ?>
  663. 佣金:<?php if($vvv['money'] ==0 ){ echo round( $vvv['add_shipping_fare'],2); }else{ echo round($vvv['money'] - $vvv['add_shipping_fare'],2);} ?> </br>
  664. <?php if($vvv['level'] <= 0){ ?>
  665. 配送收入:<?php echo $vvv['add_shipping_fare']; ?></br>
  666. <?php } ?>
  667. 总佣金: <?php echo $vvv['money']; ?>
  668. <?php }else{ ?>
  669. ¥<?php echo $vvv['money']; ?>
  670. <?php } ?>&nbsp;
  671. <?php if($vvv['level'] >0){ ?>
  672. (<?php echo $vvv['level']; ?>级)
  673. <br/>
  674. <?php if($vvv['fen_type'] == 0){ ?>
  675. 分佣比例:<?php echo $vvv['bili']; ?>%
  676. <?php }else{ ?>
  677. 固定团长分佣金额:<?php echo $vvv['bili']; ?>
  678. <?php } ?>
  679. <?php }else{ ?>
  680. <br/>
  681. <?php if($vvv['fen_type'] == 0){ ?>
  682. 提成比例:<?php echo $vvv['bili']; ?>%
  683. <?php }else{ ?>
  684. 固定团长分佣金额:<?php echo $vvv['bili']; ?>
  685. <?php } ?>
  686. <?php } ?>
  687. </p>
  688. <?php } ?>
  689. </td>
  690. <?php } ?>
  691. <td style="text-align: center;">
  692. <?php if($item['order_status_id'] == 7){ ?>
  693. 已退款
  694. <?php }else if($goods['is_refund_state'] == 1 && !empty($goods['refund_info']) ){ ?>
  695. 退款金额:<?php echo $goods['refund_info']['ref_money']; ?> <?php if($item['type'] == 'integral'){ ?>积分<?php }else{ ?>元<?php } ?>,
  696. <?php if($goods['refund_info']['state'] == 0 ){ ?>
  697. <span class="layui-badge">申请中</span>
  698. <?php }else if($goods['refund_info']['state'] == 3){ ?>
  699. <span class="label label-success">退款成功</span>
  700. <?php }else if($goods['refund_info']['state'] == 4){ ?>
  701. <span class="label label-default">退款失败</span>
  702. <?php } ?>
  703. <br/><br/>
  704. <a class="btn btn-primary btn-xs " href="<?php echo U('order/oprefund', array('id' => $item['order_id'], 'ref_id' => $goods['refund_info']['ref_id'] ));?>" >退款详情</a>
  705. <?php }else if($goods['is_refund_state'] == 0 && in_array( $item['order_status_id'], array(1,4,6,10,11,12,14)) && $is_can_nowrfund_order ){ ?>
  706. <?php if($item['delivery'] == 'hexiao'){ ?>
  707. <?php if(!empty($goods['hx_info']) && $goods['hx_info']['is_can_refund'] == 1){ ?>
  708. <a class='btn op btn-primary btn-xs' data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/oprefund_goods_do', array('id' => $item['order_id'], 'order_goods_id' => $goods['order_goods_id'] ));?>" >
  709. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title="后台商品退款" ></i>
  710. 后台商品退款
  711. </a>
  712. <?php } ?>
  713. <?php }else{ ?>
  714. <a class='btn op btn-primary btn-xs' data-toggle="ajaxModal" href="javascript:;" data-href="<?php echo U('order/oprefund_goods_do', array('id' => $item['order_id'], 'order_goods_id' => $goods['order_goods_id'] ));?>" >
  715. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title="后台商品退款" ></i>
  716. 后台商品退款
  717. </a>
  718. <?php } ?>
  719. <?php if($goods['has_refund_quantity'] > 0){ ?>已退款商品数量<?php echo ($goods['has_refund_quantity']); ?>个,<br />退款<?php if($item['type'] == 'integral'){ ?>积分<?php }else{ ?>金额<?php } echo ($goods['has_refund_money']); if($item['type'] == 'integral'){ ?>积分<?php }else{ ?>元<?php } } ?>
  720. <?php }else{ ?>
  721. <?php if($goods['has_refund_quantity'] > 0){ ?>已退款商品数量<?php echo ($goods['has_refund_quantity']); ?>个,<br />退款<?php if($item['type'] == 'integral'){ ?>积分<?php }else{ ?>金额<?php } echo ($goods['has_refund_money']); if($item['type'] == 'integral'){ ?>积分<?php }else{ ?>元<?php } } ?>
  722. <?php } ?>
  723. </td>
  724. <?php if($item['delivery'] == 'hexiao'){ ?>
  725. <td style="text-align: center;">
  726. <?php if(!empty($goods['hx_info'])){ ?>
  727. <?php if($goods['hx_info']['hexiao_type'] == 0){ ?>
  728. <span>订单核销</span>
  729. <?php }else{ ?>
  730. <span>按次核销</span>
  731. <?php } ?>
  732. <br/>
  733. <?php if($item['order_status_id'] == 11 && $goods['hx_info']['is_hexiao_over'] == 1){ ?>
  734. <a class="hxBtn" href="javascript:;" data-href="<?php echo U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">(核销记录)</a>
  735. <?php }?>
  736. <?php if($item['order_status_id'] == 7 || $goods['is_refund_state'] == 1 || (!empty($goods['refund_info'] && $goods['refund_info']['state'] != 4))){ }else{ ?>
  737. <?php if($goods['hx_info']['is_hexiao_over'] == 1){ ?>
  738. <?php if($item['order_status_id'] == 4){ ?>
  739. <a class="hxBtn" href="javascript:;" data-href="<?php echo U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">(已核销)</a>
  740. <?php } ?>
  741. <?php }else{ ?>
  742. <?php if($goods['hx_info']['hexiao_type'] == 0){ ?>
  743. <?php if($item['order_status_id'] == 4){ ?>
  744. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认使用该订单吗?" data-href="<?php echo U('order/order_goods_hexiao', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">确认使用</a>
  745. <?php } ?>
  746. <?php }else{ ?>
  747. <?php if($item['order_status_id'] == 4){ ?>
  748. <a class="btn btn-primary btn-xs hxAction" href="javascript:;" data-href="<?php echo U('order/hexiao_times', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">确认使用</a>
  749. <?php } ?>
  750. <?php if($goods['hx_info']['remain_hexiao_count'] > 0 && $goods['hx_info']['remain_hexiao_count'] < $goods['hx_info']['hexiao_count'] && $goods['hx_info']['hexiao_count'] > 0 ){ ?>
  751. <br/>
  752. <a class="hxBtn" href="javascript:;" data-href="<?php echo U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">(部分核销)</a>
  753. <?php } ?>
  754. <?php if($goods['hx_info']['hexiao_count'] == 0 && $goods['hx_info']['record_count'] > 0){ ?>
  755. <br/>
  756. <a class="hxBtn" href="javascript:;" data-href="<?php echo U('order/view_hexiao_history', array('id' => $item['order_id'],'order_goods_id'=>$goods['order_goods_id']));?>">(核销记录)</a>
  757. <?php } ?>
  758. <?php } ?>
  759. <?php } ?>
  760. <?php } ?>
  761. <?php } ?>
  762. </td>
  763. <?php } ?>
  764. <td style="text-align: center;">
  765. <span><?php echo ($goods['supply_name']); ?><br/>(<?php echo ($goods['supply_type']); ?>)</span>
  766. <?php if($item['delivery'] == 'hexiao'){ ?>
  767. <?php if(!empty($goods['hx_info']) && $goods['hx_info']['hx_assign_salesroom'] == 1){ ?>
  768. <br/>
  769. <a class="hxBtn" href="javascript:;" data-href="<?php echo U('order/hexiao_goods_assign_salesroom', array('goods_id' => $goods['goods_id'],'order_goods_id'=>$goods['order_goods_id']));?>">(商品指定核销)</a>
  770. <?php } } ?>
  771. </td>
  772. <td style="text-align: center">
  773. <p><?php if($item['type'] == 'integral'){ ?> <?php }else{ ?>¥<?php } echo round($goods['oldprice'],2); if($item['type'] == 'integral'){ ?>积分<?php }else{ ?> <?php } ?>
  774. <!--
  775. <?php if( $goods['member_disc'] < 100 ){ ?>
  776. <span class="label label-primary">会员折扣:<?php echo ($goods['member_disc']); ?>%</span>
  777. <?php } ?>-->
  778. <?php if( $goods['is_vipcard_buy'] == 1){ ?>
  779. <span class="label label-primary">付费会员价格:<?php echo round($goods['price'],2);?></span>
  780. <?php }else if($goods['is_level_buy'] == 1){ ?>
  781. <?php if( $goods['member_disc'] < 100 ){ ?>
  782. <span class="label label-primary">会员折扣:<?php echo ($goods['member_disc']); ?>%</span>
  783. <?php } ?>
  784. <?php } ?>
  785. </p>
  786. </td>
  787. <td style="text-align: center">
  788. <p><?php echo ($goods['quantity']); ?>个<?php if($goods['has_refund_quantity'] > 0){ ?>(已退<?php echo ($goods['has_refund_quantity']); ?>个)<?php } ?></p>
  789. </td>
  790. <td style="text-align: center"><?php if($item['type'] == 'integral'){ ?> <?php }else{ ?>¥<?php } echo round($goods['oldprice']*$goods['quantity'],2);?></td>
  791. </tr>
  792. <?php if($item['is_commission'] == 1 && !empty($goods['member_commission_list']) ){ ?>
  793. <tr class="tr-order-sn">
  794. <td <?php if($item['delivery'] == 'hexiao'){ ?>colspan="11"<?php }else{ ?>colspan="10"<?php } ?>>
  795. 分销佣金:<br/>
  796. <?php foreach($goods['member_commission_list'] as $mb_val){ ?>
  797. <!--分销员:<?php echo $mb_val['username']; ?>(<?php echo $mb_val['level']; ?>级上线)
  798. 佣金比例:
  799. <?php if($mb_val['type'] == 1){ ?>
  800. &nbsp;<?php echo $mb_val['bili']; ?>%
  801. *(&nbsp;基数:<?php echo ($goods['price']); ?>
  802. *&nbsp;数量:<?php echo ($goods['quantity']); ?>
  803. <?php if($goods['has_refund_money']>0){ ?>
  804. -&nbsp;已退款:<?php echo ($goods['has_refund_money']); ?>
  805. <?php } ?>
  806. )
  807. <?php }else{ ?>
  808. 固定佣金<?php echo $mb_val['bili']; ?>
  809. &nbsp;*&nbsp;数量:<?php echo ($goods['quantity']); ?>
  810. <?php } ?>
  811. =&nbsp;具体佣金:<?php echo $mb_val['money']; ?>元 &nbsp;-->
  812. 分销员:<span style="display:inline-block;min-width: 70px;"><?php echo $mb_val['username']; ?></span>(<?php echo $mb_val['level']; ?>级上线)
  813. &nbsp;&nbsp;&nbsp;&nbsp;佣金比例:
  814. <?php if($mb_val['type'] == 1){ $jishu = $goods['total'] -$goods['fullreduction_money']-$goods['voucher_credit']-$goods['has_refund_money']; ?><span style="display:inline-block;width: 50px;"><?php echo $mb_val['bili'];?>%</span> &nbsp;&nbsp;&nbsp;&nbsp;有效基数:<span style="display:inline-block;width: 50px;"><?php echo $jishu; ?></span>
  815. &nbsp;&nbsp;&nbsp;&nbsp;具体佣金:<?php echo round($jishu*$mb_val['bili']/100,2); ?>元 &nbsp;
  816. <?php }else{ ?>
  817. 固定佣金<?php echo $mb_val['bili']; ?>
  818. &nbsp;*&nbsp;数量:<?php echo ($goods['quantity']); ?>
  819. =&nbsp;具体佣金:<?php echo round($mb_val['bili']*$goods['quantity'],2); ?>元 &nbsp;
  820. <?php } ?>
  821. <!--=&nbsp;具体佣金:<?php echo $mb_val['money']; ?>元 &nbsp;-->
  822. <?php $str_state = ''; switch($mb_val['state']) { case 0: $str_state='待结算'; break; case 1: $str_state='已结算'; $order_status = 1; break; case 2: $str_state='订单退款'; break; } ?>(<?php echo $str_state; ?>)<br/>
  823. <?php } ?>
  824. </td>
  825. </tr>
  826. <?php } ?>
  827. <?php $i++; ?>
  828. <?php } ?>
  829. </tbody>
  830. <tfoot style="height:20px;">
  831. <?php if($item['type'] != 'integral'){ ?>
  832. <tr class="trorder">
  833. <td colspan="2" style="padding-left: 20px">
  834. 订单结算状态:
  835. <?php $order_states = ''; switch($order_status) { case 0: $order_states='待结算'; break; case 1: $order_states='已结算'; break; case 2: $order_states='已失效'; break; } echo $order_states; ?>
  836. <span onmouseover="overShow1()" onmouseout="outHide1()" style="display:inline;border-radius: 50%; height: 17px;width:17px; display: inline-block; border-style: solid; border-color: #8a8a8a; border-width:1px; font-size:11px"><span style="padding-left: 4px;font-weight:bold;color:#8a8a8a;">?</span></span>
  837. </td>
  838. <td <?php if($item['type'] == 'integral'){ ?> colspan="7"<?php }else if($item['delivery'] == 'hexiao'){ ?> colspan="9"<?php }else{ ?>colspan="8"<?php } ?> style="padding-right: 60px"></td>
  839. </tr>
  840. <?php } ?>
  841. <tr class="trorder" style="height:100px;">
  842. <td colspan="2">
  843. <div id="showDiv" style="position:relative; background-color: #8a8a8a; display:none; height:80px;width:1200px;border-radius:20px;padding-left: 20px;color:#FFF;">
  844. -待结算:还在订单“售后期”。<br />
  845. -已结算:已过订单“售后期”。<br />
  846. -已失效:整单退款的订单。<br />
  847. <?php if(($item['order_status_id'] ==6 || $item['order_status_id'] ==11) ){ ?>
  848. <?php if($order_status == 0 && $open_aftersale == 1){ ?>
  849. -订单预计结算时间:<?php echo date("Y-m-d H:i:s",$order_settlement); ?>,订单结算状态为“已结算”的时候,用户在小程序订单中不能在申请商品售后,订单中的会员佣金,团长佣金为已结算状态。
  850. <?php }else{ ?>
  851. -订单结算状态为“已结算”的时候,用户在小程序订单中不能在申请商品售后,订单中的会员佣金,团长佣金为已结算状态。
  852. <?php } ?>
  853. <?php }else{ ?>
  854. <?php if($order_status == 2){ ?>
  855. -订单结算状态为“已结算”的时候,用户在小程序订单中不能在申请商品售后,订单中的会员佣金,团长佣金为已结算状态。
  856. <?php }else{ ?>
  857. <?php if($open_aftersale == 1){ ?>
  858. -订单预计结算时间:订单 “确认收货” 后,预计<?php echo $open_aftersale_time; ?>天后进行结算,订单结算状态为“已结算”的时候,用户在小程序订单中不能在申请商品售后,订单中的会员佣金,团长佣金为已结算状态。
  859. <?php }else{ ?>
  860. -订单预计结算时间:订单 “确认收货” 后进行结算,订单结算状态为“已结算”的时候,用户在小程序订单中不能在申请商品售后,订单中的会员佣金,团长佣金为已结算状态。
  861. <?php } ?>
  862. <?php } ?>
  863. <?php } ?>
  864. </div>
  865. </td>
  866. <td <?php if($item['type'] == 'integral'){ ?> colspan="7"<?php }else if($item['delivery'] == 'hexiao'){ ?> colspan="9"<?php }else{ ?>colspan="8"<?php } ?> style="padding-right: 60px">
  867. <div class="price">
  868. <p> <span class="price-inner">商品合计:</span><span style="font-weight: bold"><?php if( $item['type'] == 'integral' ){ }else{ ?>¥<?php } echo $order_total; if( $item['type'] == 'integral' ){ ?>积分<?php } ?></span></p>
  869. <?php if( $item['delivery'] == 'localtown_delivery'){ ?>
  870. <?php if( $item['is_localtown_free_shipping_fare'] == 1 ){ ?>
  871. <p><span class="price-inner">同城配送费:</span>¥<?php echo ($item['localtown_free_shipping_fare']); ?></p>
  872. <p><span class="price-inner">满减配送费:</span>-¥<?php echo ($item['localtown_free_shipping_fare']); ?></p>
  873. <?php }else{ ?>
  874. <p><span class="price-inner">同城配送费:</span>¥<?php echo ($item['shipping_fare']); ?></p>
  875. <?php } ?>
  876. <?php if( !empty($item['localtown_add_shipping_fare']) && $item['localtown_add_shipping_fare'] > 0 ){ ?>
  877. <p><span class="price-inner">加价配送:</span>¥<?php echo ($item['localtown_add_shipping_fare']); ?></p>
  878. <?php } ?>
  879. <?php }else{ ?>
  880. <?php if( $item['is_free_shipping_fare'] == 1 ){ ?>
  881. <p><span class="price-inner">运费:</span>¥<?php echo ($item['fare_shipping_free']); ?><span>( <?php echo ($item['delivery_text']); ?> )</span></p>
  882. <p><span class="price-inner">满<?php echo ($item['man_e_money']); ?>减运费:</span>-¥<?php echo ($item['fare_shipping_free']); ?></p>
  883. <?php }else{ ?>
  884. <p><span class="price-inner">运费:</span>¥<?php echo ($item['shipping_fare']); ?><span>( <?php echo ($item['delivery_text']); ?> )</span></p>
  885. <?php } ?>
  886. <?php } ?>
  887. <?php if( $item['packing_fare']>0 ){ ?>
  888. <p><span class="price-inner"><?php echo ($localtown_modifypickingname); ?>:</span>¥<?php echo ($item['packing_fare']); ?></p>
  889. <?php } ?>
  890. <?php if( $item['voucher_id']>0 ){ ?>
  891. <p><span class="price-inner">优惠券优惠:</span><span class="text-danger">-¥<?php echo ($item['voucher_credit']); ?></span></p>
  892. <?php } ?>
  893. <?php if( $item['fullreduction_money']>0 ){ ?>
  894. <p><span class="price-inner">满减优惠:</span><span class="text-danger">-¥<?php echo ($item['fullreduction_money']); ?></span></p>
  895. <?php } ?>
  896. <?php if( $item['score_for_money']>0 ){ ?>
  897. <p><span class="price-inner">积分抵扣:</span><span class="text-danger">-¥<?php echo ($item['score_for_money']); ?></span></p>
  898. <?php } ?>
  899. <?php if($item['is_change_price'] == 1){ ?>
  900. <p>
  901. <span class="price-inner">商家改价:</span>
  902. <span style=''>
  903. <?php
  904. $change_price = $item['total'] - $item['old_price']; if($change_price < 0){ echo '-¥'.(0-$change_price); }else{ echo '¥'.$change_price; } ?>
  905. </span>
  906. </p>
  907. <?php } ?>
  908. <?php if( ($item['changedtotal'])!=0){ ?>
  909. <p>
  910. <span class="price-inner">卖家改价:</span>
  911. <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>
  912. </p>
  913. <?php } ?>
  914. <?php if( ($item['changedshipping_fare'])!=0){ ?>
  915. <p>
  916. <span class="price-inner">卖家改运费:</span>
  917. <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>
  918. </p>
  919. <?php } ?>
  920. <?php if($item['shipping_fare'] <= 0 ){ $item['fare_shipping_free'] = 0; } ?>
  921. <?php $free_tongji = $item['total'] + $item['packing_fare'] +$item['shipping_fare']-$item['voucher_credit']-$item['fullreduction_money'] - $item['score_for_money'] + $item['localtown_add_shipping_fare']- $item['fare_shipping_free'] - $presale_for_ordermoney; if($free_tongji < 0){ $free_tongji = 0; } ?>
  922. <?php
  923. if( $item['is_vipcard_buy'] == 1 && $member_youhui >0 ) { ?>
  924. <p><span class="price-inner">会员卡优惠:</span><span class="text-danger">-¥<?php echo ($member_youhui); ?></span></p>
  925. <?php
  926. } ?>
  927. <?php
  928. if( $item['is_level_buy'] == 1 && $member_youhui >0 ) { ?>
  929. <p><span class="price-inner">会员等级折扣优惠:</span><span class="text-danger">-¥<?php echo ($member_youhui); ?></span></p>
  930. <?php } ?>
  931. <?php if($item['type'] == 'integral'){ ?>
  932. <p><span class="price-inner">实付款:</span>
  933. <span style="font-size: 14px;font-weight: bold;color: #e4393c"><?php if( $item['shipping_fare'] > 0 ){ ?>¥<?php echo round($item['shipping_fare'],2);?>+<?php } ?> <?php echo round($item['total'],2);?> 积分</span>
  934. </p>
  935. <?php if( $total_refund_money > 0 ){ ?>
  936. <p><span class="price-inner">退款:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c"><?php echo ($total_refund_money); ?>积分</span></p>
  937. <?php } ?>
  938. <?php
  939. if( $total_refund_shipping_fare > 0 ){ ?>
  940. <p><span class="price-inner">退运费:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">¥<?php echo ($total_refund_shipping_fare); ?></span></p>
  941. <?php } ?>
  942. <?php }else{ ?>
  943. <?php
  944. if( $presale_for_ordermoney > 0 ){ ?>
  945. <p><span class="price-inner">定金抵扣:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">-¥<?php echo ($presale_for_ordermoney); ?></span></p>
  946. <?php } ?>
  947. <p><span class="price-inner">实付款:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">¥<?php echo round($free_tongji,2)?></span></p>
  948. <?php
  949. if( $total_refund_money > 0 ){ ?>
  950. <p><span class="price-inner">退款:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">¥<?php echo ($total_refund_money); ?></span></p>
  951. <?php } ?>
  952. <?php
  953. if( $total_refund_shipping_fare > 0 ){ ?>
  954. <p><span class="price-inner">退运费:</span><span style="font-size: 14px;font-weight: bold;color: #e4393c">¥<?php echo ($total_refund_shipping_fare); ?></span></p>
  955. <?php } ?>
  956. <?php } ?>
  957. </div>
  958. </td>
  959. </tr>
  960. </tfoot>
  961. </table>
  962. </form>
  963. </div>
  964. </div>
  965. </div>
  966. <script src="/layuiadmin/layui/layui.js"></script>
  967. <script>
  968. layui.config({
  969. base: '/layuiadmin/' //静态资源所在路径
  970. }).extend({
  971. index: 'lib/index' //主入口模块
  972. }).use('index');
  973. </script>
  974. <script>
  975. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  976. var layer = layui.layer;
  977. var $;
  978. layui.use(['jquery', 'layer','form'], function(){
  979. $ = layui.$;
  980. var form = layui.form;
  981. $('.tip_headcommiss').click(function(){
  982. var s_str = '团长佣金结算状态: 待结算<br/>团长佣金结算金额:2.40<br/>佣金预计结算时间:2016-09-14 16:04:05 <br>结算说明:结算前商品退款会改变佣金计算情况,佣金结算后商品进行退款不改变佣金计算情况。';
  983. layer.tips( s_str ,this, {
  984. tips:[1,'#000'],
  985. time: 10000
  986. });
  987. })
  988. $('.layui-icon-about').mouseover(function(){
  989. var that = this;
  990. var _msg = $(this).attr('data-message');
  991. layer.tips(_msg, that,{ tips:[1] });
  992. })
  993. $('.deldom').click(function(){
  994. var s_url = $(this).attr('data-href');
  995. layer.confirm($(this).attr('data-confirm'), function(index){
  996. $.ajax({
  997. url:s_url,
  998. type:'post',
  999. dataType:'json',
  1000. success:function(info){
  1001. if(info.status == 0)
  1002. {
  1003. layer.msg(info.result.message,{icon: 1,time: 2000});
  1004. }else if(info.status == 1){
  1005. var go_url = location.href;
  1006. if( info.result.hasOwnProperty("url") )
  1007. {
  1008. go_url = info.result.url;
  1009. }
  1010. layer.msg('操作成功',{time: 1000,
  1011. end:function(){
  1012. location.href = info.result.url;
  1013. }
  1014. });
  1015. }
  1016. }
  1017. })
  1018. });
  1019. })
  1020. $('.hxBtn').click(function(){
  1021. var url = $(this).attr('data-href');
  1022. $.post(url, {}, function(shtml){
  1023. layer.open({
  1024. type: 1,
  1025. area: '930px',
  1026. content: shtml //注意,如果str是object,那么需要字符拼接。
  1027. });
  1028. });
  1029. return false;
  1030. })
  1031. $('.hxAction').click(function(){
  1032. var url = $(this).attr('data-href');
  1033. $.post(url, {}, function(shtml){
  1034. layer.open({
  1035. type: 1,
  1036. title: '商品核销',
  1037. area: '930px',
  1038. content: shtml
  1039. ,btnAlign : 'c'
  1040. ,btn: ['确认使用', '取消']
  1041. ,yes: function(index, layero){
  1042. hexiao_goods();
  1043. },btn2: function(index, layero){
  1044. layer.closeAll();
  1045. }
  1046. ,cancel: function(){
  1047. layer.closeAll();
  1048. }
  1049. });
  1050. });
  1051. return false;
  1052. })
  1053. $('.btn-operation').click(function(){
  1054. var ids_arr = [];
  1055. var obj = $(this);
  1056. var s_toggle = $(this).attr('data-toggle');
  1057. var s_url = $(this).attr('data-href');
  1058. $("input[name=item_checkbox]").each(function() {
  1059. if( $(this).prop('checked') )
  1060. {
  1061. ids_arr.push( $(this).val() );
  1062. }
  1063. })
  1064. if(ids_arr.length < 1)
  1065. {
  1066. layer.msg('请选择要操作的内容');
  1067. }else{
  1068. var can_sub = true;
  1069. if( s_toggle == 'batch-remove' )
  1070. {
  1071. can_sub = false;
  1072. layer.confirm($(obj).attr('data-confirm'), function(index){
  1073. $.ajax({
  1074. url:s_url,
  1075. type:'post',
  1076. dataType:'json',
  1077. data:{ids:ids_arr},
  1078. success:function(info){
  1079. if(info.status == 0)
  1080. {
  1081. layer.msg(info.result.message,{icon: 1,time: 2000});
  1082. }else if(info.status == 1){
  1083. var go_url = location.href;
  1084. if( info.result.hasOwnProperty("url") )
  1085. {
  1086. go_url = info.result.url;
  1087. }
  1088. layer.msg('操作成功',{time: 1000,
  1089. end:function(){
  1090. location.href = info.result.url;
  1091. }
  1092. });
  1093. }
  1094. }
  1095. })
  1096. });
  1097. }else{
  1098. $.ajax({
  1099. url:s_url,
  1100. type:'post',
  1101. dataType:'json',
  1102. data:{ids:ids_arr},
  1103. success:function(info){
  1104. if(info.status == 0)
  1105. {
  1106. layer.msg(info.result.message,{icon: 1,time: 2000});
  1107. }else if(info.status == 1){
  1108. var go_url = location.href;
  1109. if( info.result.hasOwnProperty("url") )
  1110. {
  1111. go_url = info.result.url;
  1112. }
  1113. layer.msg('操作成功',{time: 1000,
  1114. end:function(){
  1115. location.href = info.result.url;
  1116. }
  1117. });
  1118. }
  1119. }
  1120. })
  1121. }
  1122. }
  1123. })
  1124. form.on('switch(restwsitch)', function(data){
  1125. var s_url = $(this).attr('data-href')
  1126. var rest = 1;
  1127. if(data.elem.checked)
  1128. {
  1129. rest = 1;
  1130. }else{
  1131. rest = 0;
  1132. }
  1133. $.ajax({
  1134. url:s_url,
  1135. type:'post',
  1136. dataType:'json',
  1137. data:{rest:rest},
  1138. success:function(info){
  1139. if(info.status == 0)
  1140. {
  1141. layer.msg(info.result.message,{icon: 1,time: 2000});
  1142. }else if(info.status == 1){
  1143. var go_url = location.href;
  1144. if( info.result.hasOwnProperty("url") )
  1145. {
  1146. go_url = info.result.url;
  1147. }
  1148. layer.msg('操作成功',{time: 1000,
  1149. end:function(){
  1150. location.href = info.result.url;
  1151. }
  1152. });
  1153. }
  1154. }
  1155. })
  1156. });
  1157. form.on('switch(enablewsitch)', function(data){
  1158. var s_url = $(this).attr('data-href')
  1159. var enable = 1;
  1160. if(data.elem.checked)
  1161. {
  1162. enable = 1;
  1163. }else{
  1164. enable = 0;
  1165. }
  1166. $.ajax({
  1167. url:s_url,
  1168. type:'post',
  1169. dataType:'json',
  1170. data:{enable:enable},
  1171. success:function(info){
  1172. if(info.status == 0)
  1173. {
  1174. layer.msg(info.result.message,{icon: 1,time: 2000});
  1175. }else if(info.status == 1){
  1176. var go_url = location.href;
  1177. if( info.result.hasOwnProperty("url") )
  1178. {
  1179. go_url = info.result.url;
  1180. }
  1181. layer.msg('操作成功',{time: 1000,
  1182. end:function(){
  1183. location.href = info.result.url;
  1184. }
  1185. });
  1186. }
  1187. }
  1188. })
  1189. });
  1190. form.on('switch(statewsitch)', function(data){
  1191. var s_url = $(this).attr('data-href')
  1192. var state = 1;
  1193. if(data.elem.checked)
  1194. {
  1195. state = 1;
  1196. }else{
  1197. state = 0;
  1198. }
  1199. $.ajax({
  1200. url:s_url,
  1201. type:'post',
  1202. dataType:'json',
  1203. data:{state:state},
  1204. success:function(info){
  1205. if(info.status == 0)
  1206. {
  1207. layer.msg(info.result.message,{icon: 1,time: 2000});
  1208. }else if(info.status == 1){
  1209. var go_url = location.href;
  1210. if( info.result.hasOwnProperty("url") )
  1211. {
  1212. go_url = info.result.url;
  1213. }
  1214. layer.msg('操作成功',{time: 1000,
  1215. end:function(){
  1216. location.href = info.result.url;
  1217. }
  1218. });
  1219. }
  1220. }
  1221. })
  1222. });
  1223. form.on('checkbox(checkboxall)', function(data){
  1224. if(data.elem.checked)
  1225. {
  1226. $("input[name=item_checkbox]").each(function() {
  1227. $(this).prop("checked", true);
  1228. });
  1229. $("input[name=checkall]").each(function() {
  1230. $(this).prop("checked", true);
  1231. });
  1232. }else{
  1233. $("input[name=item_checkbox]").each(function() {
  1234. $(this).prop("checked", false);
  1235. });
  1236. $("input[name=checkall]").each(function() {
  1237. $(this).prop("checked", false);
  1238. });
  1239. }
  1240. form.render('checkbox');
  1241. });
  1242. //监听提交
  1243. form.on('submit(formDemo)', function(data){
  1244. $.ajax({
  1245. url: data.form.action,
  1246. type: data.form.method,
  1247. data: data.field,
  1248. dataType:'json',
  1249. success: function (info) {
  1250. if(info.status == 0)
  1251. {
  1252. layer.msg(info.result.message,{icon: 1,time: 2000});
  1253. }else if(info.status == 1){
  1254. var go_url = location.href;
  1255. if( info.result.hasOwnProperty("url") )
  1256. {
  1257. go_url = info.result.url;
  1258. }
  1259. layer.msg('操作成功',{time: 1000,
  1260. end:function(){
  1261. location.href = info.result.url;
  1262. }
  1263. });
  1264. }
  1265. }
  1266. });
  1267. return false;
  1268. });
  1269. })
  1270. </script>
  1271. <script>
  1272. $(function(){
  1273. var ajax_url = "";
  1274. $("[data-toggle='ajaxModal']").click(function () {
  1275. var s_url = $(this).attr('data-href');
  1276. ajax_url = s_url;
  1277. $.ajax({
  1278. url:s_url,
  1279. type:"get",
  1280. success:function(shtml){
  1281. //console.log(shtml);
  1282. $('#ajaxModal').html(shtml);
  1283. $('#ajaxModal').modal();
  1284. }
  1285. })
  1286. })
  1287. $(document).delegate(".modal-footer .btn-primary","click",function(){
  1288. var s_data = $('#ajaxModal form').serialize();
  1289. console.log(ajax_url);
  1290. console.log(s_data);
  1291. $.ajax({
  1292. url:ajax_url,
  1293. type:'post',
  1294. dataType:'json',
  1295. data:s_data,
  1296. success:function(info){
  1297. console.log(info);
  1298. if(info.status == 0)
  1299. {
  1300. layer.msg(info.result.message,{icon: 1,time: 2000});
  1301. }else if(info.status == 1){
  1302. var go_url = location.href;
  1303. if( info.result.hasOwnProperty("url") )
  1304. {
  1305. go_url = info.result.url;
  1306. }
  1307. layer.msg('操作成功',{time: 1000,
  1308. end:function(){
  1309. location.href = info.result.url;
  1310. }
  1311. });
  1312. }
  1313. }
  1314. })
  1315. return false;
  1316. })
  1317. })
  1318. </script>
  1319. <div id="ajaxModal" class="modal fade" style="display: none;">
  1320. </div>
  1321. <script>
  1322. //没有选中时间段不能导出
  1323. $(function () {
  1324. $('.btn-submit').click(function () {
  1325. var e = $(this).data('export');
  1326. if(e==1 ){
  1327. if($('#keyword').val() !='' ){
  1328. $('#export').val(1);
  1329. $('#search').submit();
  1330. }else if($('#searchtime').val()!=''){
  1331. $('#export').val(1);
  1332. $('#search').submit();
  1333. }else{
  1334. $('#export').val(1);
  1335. $('#search').submit();
  1336. return;
  1337. }
  1338. }else{
  1339. $('#export').val(0);
  1340. $('#search').submit();
  1341. }
  1342. });
  1343. $('#user').click(function(){
  1344. layer.msg('权限不足!',{icon: 2,time: 1200});
  1345. });
  1346. })
  1347. </script>
  1348. <script>
  1349. function overShow1() {
  1350. var showDiv = document.getElementById('showDiv');
  1351. showDiv.style.display = 'block';
  1352. }
  1353. function outHide1() {
  1354. var showDiv = document.getElementById('showDiv');
  1355. showDiv.style.display = 'none';
  1356. }
  1357. </script>
  1358. </body>