detail.html 63 KB

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