index.html 77 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861
  1. <!DOCTYPE html>
  2. <html xmlns="http://www.w3.org/1999/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. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  42. <link href="/static/css/snailfish.css?v=32" rel="stylesheet">
  43. <style>
  44. tbody tr td{
  45. position: relative;
  46. }
  47. tbody tr .icow-weibiaoti--{
  48. visibility: hidden;
  49. display: inline-block;
  50. color: #fff;
  51. height:18px;
  52. width:18px;
  53. background: #e0e0e0;
  54. text-align: center;
  55. line-height: 18px;
  56. vertical-align: middle;
  57. }
  58. tbody tr:hover .icow-weibiaoti--{
  59. visibility: visible;
  60. }
  61. tbody tr .icow-weibiaoti--.hidden{
  62. visibility: hidden !important;
  63. }
  64. .full .icow-weibiaoti--{
  65. margin-left:10px;
  66. }
  67. .full>span{
  68. display: -webkit-box;
  69. display: -webkit-flex;
  70. display: -ms-flexbox;
  71. display: flex;
  72. vertical-align: middle;
  73. align-items: center;
  74. }
  75. tbody tr .label{
  76. margin: 5px 0;
  77. }
  78. .goods_attribute a{
  79. cursor: pointer;
  80. }
  81. .newgoodsflag{
  82. width: 22px;height: 16px;
  83. background-color: #ff0000;
  84. color: #fff;
  85. text-align: center;
  86. position: absolute;
  87. bottom: 70px;
  88. left: 57px;
  89. font-size: 12px;
  90. }
  91. .a{cursor: pointer;}
  92. .img-40 {
  93. width: 40px;
  94. height: 40px;
  95. }
  96. .daterangepicker select.ampmselect, .daterangepicker select.hourselect, .daterangepicker select.minuteselect{
  97. width:auto!important;
  98. }
  99. .list-tb-div th .tDiv{color:#000;}
  100. .ul_left{float:right;}
  101. .ul_left li{margin: 5px 10px;float:left;}
  102. .ts_delivery_btn,.renew_delivery_btn{cursor:pointer;}
  103. </style>
  104. </head>
  105. <body layadmin-themealias="default">
  106. <table id="demo" lay-filter="test"></table>
  107. <div class="layui-fluid">
  108. <div class="layui-card">
  109. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">订单管理
  110. <span>&nbsp;&nbsp;&nbsp;&nbsp;订单数: <span class='text-danger'>{$total}</span> 订单金额: <span class='text-danger'>{$total_money}</span>
  111. </span></span>
  112. </div>
  113. <?php if($order_status_id != 12){ ?>
  114. <div class="layui-tab layui-tab-brief" >
  115. <ul class="layui-tab-title">
  116. <?php if($is_community == 1){ ?>
  117. <li <?php if( empty($order_status_id) || $order_status_id=='0'){ ?>class="layui-this"<?php } ?>><a href="{:U($cur_controller, array('order_status_id' => 0,'headid'=>$headid))}">全部订单({$all_count})</a></li>
  118. <li <?php if( $order_status_id=='3'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 3,'headid'=>$headid))}">待付款({$count_status_3})</a></li>
  119. <li <?php if( $order_status_id=='1'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 1,'headid'=>$headid))}">待发货({$count_status_1})</a></li>
  120. <li <?php if( $order_status_id=='14'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 14,'headid'=>$headid ))}">配送中({$count_status_14})</a></li>
  121. <li <?php if( $order_status_id=='4'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 4,'headid'=>$headid ))}">待收货({$count_status_4})</a></li>
  122. <li <?php if( $order_status_id=='11'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 11,'headid'=>$headid ))}">已完成({$count_status_11})</a></li>
  123. <li <?php if( $order_status_id=='5'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 5,'headid'=>$headid ))}">已取消({$count_status_5})</a></li>
  124. <li <?php if( $order_status_id=='7'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 7,'headid'=>$headid ))}">已退款({$count_status_7})</a></li>
  125. <?php } else if($_GPC['is_fenxiao'] == 1 && $_GPC['commiss_member_id'] > 0){ ?>
  126. <li <?php if( empty($order_status_id) || $order_status_id =='0' ){ ?>class="layui-this"<?php } ?>><a href="{:U($cur_controller, array('is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id'],'order_status_id' => 0))}">全部订单({$all_count})</a></li>
  127. <li <?php if( $_GPC['order_status_id']=='3' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 3,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">待付款({$count_status_3})</a></li>
  128. <li <?php if( $_GPC['order_status_id']=='1' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 1,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">待发货({$count_status_1})</a></li>
  129. <li <?php if( $_GPC['order_status_id']=='14' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 14,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">配送中({$count_status_14})</a></li>
  130. <li <?php if( $_GPC['order_status_id']=='4' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 4,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">待收货({$count_status_4})</a></li>
  131. <li <?php if( $_GPC['order_status_id']=='11' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 11,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">已完成({$count_status_11})</a></li>
  132. <li <?php if( $_GPC['order_status_id']=='5' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 5,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">已取消({$count_status_5})</a></li>
  133. <li <?php if( $_GPC['order_status_id']=='7' ){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 7,'is_fenxiao' => 1,'commiss_member_id' => $_GPC['commiss_member_id']))}">已退款({$count_status_7})</a></li>
  134. <?php } else if( $is_presale_order == 1 ){ ?>
  135. <!-- 预售 -->
  136. <li <?php if( empty($order_status_id) || $order_status_id=='0'){ ?>class="layui-this"<?php } ?>><a href="{:U($cur_controller, array('order_status_id' => 0, 'presale_order' =>1 ))}">全部订单({$all_count})</a></li>
  137. <li <?php if( $order_status_id=='3'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 3 , 'presale_order' =>1 ))}">待付款({$count_status_3})</a></li>
  138. <li <?php if( $order_status_id=='1'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 1 , 'presale_order' =>1 ))}">待发货({$count_status_1})</a></li>
  139. <li <?php if( $order_status_id=='14'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 14 , 'presale_order' =>1 ))}">配送中({$count_status_14})</a></li>
  140. <li <?php if( $order_status_id=='4'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 4 , 'presale_order' =>1 ))}">待收货({$count_status_4})</a></li>
  141. <li <?php if( $order_status_id=='11'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 11 , 'presale_order' =>1 ))}">已完成({$count_status_11})</a></li>
  142. <li <?php if( $order_status_id=='5'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 5 , 'presale_order' =>1 ))}">已取消({$count_status_5})</a></li>
  143. <li <?php if( $order_status_id=='7'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 7 , 'presale_order' =>1 ))}">已退款({$count_status_7})</a></li>
  144. <?php }else if( $is_virtualcard_order == 1 ){ ?>
  145. <!-- 礼品卡 -->
  146. <li <?php if( empty($order_status_id) || $order_status_id=='0'){ ?>class="layui-this"<?php } ?>><a href="{:U($cur_controller, array('order_status_id' => 0, 'virtualcard_order' =>1 ))}">全部订单({$all_count})</a></li>
  147. <li <?php if( $order_status_id=='3'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 3 , 'virtualcard_order' =>1 ))}">待付款({$count_status_3})</a></li>
  148. <li <?php if( $order_status_id=='1'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 1 , 'virtualcard_order' =>1 ))}">待发货({$count_status_1})</a></li>
  149. <li <?php if( $order_status_id=='14'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 14 , 'virtualcard_order' =>1 ))}">配送中({$count_status_14})</a></li>
  150. <li <?php if( $order_status_id=='4'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 4 , 'virtualcard_order' =>1 ))}">待收货({$count_status_4})</a></li>
  151. <li <?php if( $order_status_id=='11'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 11 , 'virtualcard_order' =>1 ))}">已完成({$count_status_11})</a></li>
  152. <li <?php if( $order_status_id=='5'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 5 , 'virtualcard_order' =>1 ))}">已取消({$count_status_5})</a></li>
  153. <li <?php if( $order_status_id=='7'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 7 , 'virtualcard_order' =>1 ))}">已退款({$count_status_7})</a></li>
  154. <?php } else { ?>
  155. <li <?php if( empty($order_status_id) || $order_status_id=='0'){ ?>class="layui-this"<?php } ?>><a href="{:U($cur_controller, array('order_status_id' => 0))}">全部订单({$all_count})</a></li>
  156. <li <?php if( $order_status_id=='3'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 3))}">待付款({$count_status_3})</a></li>
  157. <li <?php if( $order_status_id=='1'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 1))}">待发货({$count_status_1})</a></li>
  158. <li <?php if( $order_status_id=='14'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 14))}">配送中({$count_status_14})</a></li>
  159. <li <?php if( $order_status_id=='4'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 4))}">待收货({$count_status_4})</a></li>
  160. <li <?php if( $order_status_id=='11'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 11))}">已完成({$count_status_11})</a></li>
  161. <li <?php if( $order_status_id=='5'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 5))}">已取消({$count_status_5})</a></li>
  162. <li <?php if( $order_status_id=='7'){ ?>class="layui-this"<?php } ?> ><a href="{:U($cur_controller, array('order_status_id' => 7))}">已退款({$count_status_7})</a></li>
  163. <?php } ?>
  164. </ul>
  165. </div>
  166. <?php } ?>
  167. <div class="layui-card-body" style="padding:15px;">
  168. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  169. <?php if($order_status_id != 12 && empty($is_fenxiao) && empty($is_community)){ ?>
  170. <input type="hidden" name="c" value="order" />
  171. <input type="hidden" name="a" value="index" />
  172. <?php }else if($is_fenxiao == 1){ ?>
  173. <input type="hidden" name="c" value="distribution" />
  174. <input type="hidden" name="a" value="distributionorder" />
  175. <?php }else if($is_community == 1){ ?>
  176. <input type="hidden" name="headid" value="{$headid}" />
  177. <input type="hidden" name="c" id="c" value="communityhead" />
  178. <input type="hidden" name="a" id="a" value="distributionorder" />
  179. <?php }else{ ?>
  180. <input type="hidden" name="c" value="order" />
  181. <input type="hidden" name="a" value="orderaftersales" />
  182. <?php } ?>
  183. <input type="hidden" name="order_status_id" value="{$order_status_id}" />
  184. <?php if( $is_presale_order == 1 ){ ?>
  185. <input type="hidden" name="presale_order" value="1" />
  186. <?php }else if( $is_virtualcard_order == 1 ){ ?>
  187. <input type="hidden" name="virtualcard_order" value="1" />
  188. <?php } ?>
  189. <div class="layui-form-item">
  190. <div class="layui-inline">
  191. <div class="layui-input-inline" style="width:100px;">
  192. <select name='type' class='layui-input layui-unselect' lay-ignore style="width:100px;padding:0 5px;" id="type">
  193. <?php if( $is_presale_order == 1 ){ ?>
  194. <option value='normal' <?php if( $is_presale_order == 1){ ?> selected <?php } ?>>预售订单</option>
  195. <?php }else if( $is_virtualcard_order == 1 ){ ?>
  196. <option value='normal' <?php if( $is_presale_order == 1){ ?> selected <?php } ?>>礼品卡订单</option>
  197. <?php }else{ ?>
  198. <option value=''>订单类型</option>
  199. <option value='normal' <?php if( $type=='normal'){ ?>selected<?php } ?>>普通订单</option>
  200. <option value='integral' <?php if( $type=='integral'){ ?> selected <?php } ?>>积分订单</option>
  201. <option value='soli' <?php if( $is_soli==1){ ?> selected <?php } ?>>接龙订单</option>
  202. <?php } ?>
  203. </select>
  204. </div>
  205. <div class="layui-input-inline" style="width:100px;">
  206. <select name='searchtime' lay-ignore class='layui-input layui-unselect' style="width:100px;padding:0 5px;" id="searchtime">
  207. <option value=''>不按时间</option>
  208. <option value='create' <?php if( $searchtime=='create'){ ?>selected<?php } ?>>下单时间</option>
  209. <option value='pay' <?php if( $searchtime=='pay'){ ?>selected<?php } ?>>付款时间</option>
  210. <option value='send' <?php if( $searchtime=='send'){ ?>selected<?php } ?>>发货时间</option>
  211. <option value='finish' <?php if( $searchtime=='finish'){ ?>selected<?php } ?>>完成时间</option>
  212. </select>
  213. </div>
  214. <div class="layui-input-inline" style="width:280px;">
  215. {:tpl_form_field_daterange('time', array('starttime'=>date('Y-m-d H:i', $starttime),'endtime'=>date('Y-m-d H:i', $endtime)),true);}
  216. </div>
  217. <?php if( $is_virtualcard_order != 1 ){ ?>
  218. <div class="layui-input-inline" style="width:100px;">
  219. <select name='delivery' lay-ignore class='layui-input layui-unselect' style="width:100px;padding:0 5px;" id="type">
  220. <option value=''>配送方式</option>
  221. <option value='pickup' <?php if( $delivery=='pickup'){ ?>selected<?php } ?>>社区自提</option>
  222. <option value='tuanz_send' <?php if( $delivery=='tuanz_send'){ ?>selected<?php } ?>>团长配送</option>
  223. <option value='express' <?php if( $delivery=='express'){ ?>selected<?php } ?>>快递</option>
  224. <option value='localtown_delivery' <?php if( $delivery=='localtown_delivery'){ ?>selected<?php } ?>>同城配送</option>
  225. <option value='hexiao' <?php if( $delivery=='hexiao'){ ?>selected<?php } ?>>到店核销</option>
  226. <option value='cashon_delivery' <?php if( $delivery=='cashon_delivery'){ ?>selected<?php } ?>>货到付款</option>
  227. </select>
  228. </div>
  229. <?php } ?>
  230. <div class="layui-input-inline" style="width:110px;">
  231. <select name='searchfield' lay-ignore class='layui-input layui-unselect' style="width:110px;padding:0 5px;" >
  232. <option value='ordersn' <?php if( $searchfield=='ordersn'){ ?>selected<?php } ?>>订单号</option>
  233. <option value='member' <?php if( $searchfield=='member'){ ?>selected<?php } ?>>会员信息</option>
  234. <option value='mobile' <?php if( $searchfield=='mobile'){ ?>selected<?php } ?>>手机号</option>
  235. <option value='address' <?php if( $searchfield=='address'){ ?>selected<?php } ?>>收件人信息</option>
  236. <option value='location' <?php if( $searchfield=='location'){ ?>selected<?php } ?>>地址信息</option>
  237. <option value='shipping_no' <?php if( $searchfield=='shipping_no'){ ?>selected<?php } ?>>快递单号</option>
  238. <option value='goodstitle' <?php if( $searchfield=='goodstitle'){ ?>selected<?php } ?>>商品名称</option>
  239. <option value='trans_id' <?php if( $searchfield=='trans_id'){ ?>selected<?php } ?>>微信支付单号</option>
  240. <?php if($is_community != 1){ ?>
  241. <option value='head_name' <?php if( $searchfield=='head_name'){ ?>selected<?php } ?>>团长姓名</option>
  242. <option value='head_address' <?php if( $searchfield=='head_address'){ ?>selected<?php } ?>>小区名称</option>
  243. <?php } ?>
  244. <?php
  245. if (!defined('ROLE') || ROLE != 'agenter' )
  246. {
  247. ?>
  248. <option value='supply_name' <?php if( $searchfield=='supply_name'){ ?>selected<?php } ?>>供应商名称</option>
  249. <?php } ?>
  250. <option value='member_id' <?php if( $searchfield=='member_id'){ ?>selected<?php } ?>>会员ID</option>
  251. <!--<option value='goodssn' <?php if( $searchfield=='goodssn'){ ?>selected<?php } ?>>商品编码</option>-->
  252. </select>
  253. </div>
  254. <div class="layui-input-inline" >
  255. <input type="text" class="layui-input" name="keyword" value="{$keyword}" placeholder="请输入关键词"/>
  256. </div>
  257. <input type="hidden" name="export" id="export" value="0">
  258. <div class="layui-input-inline" style="width:585px;">
  259. <button class="layui-btn layui-btn-sm unbtn_export" data-export="0" type="submit"> 搜索</button>
  260. <button type="submit" name="" data-export="1" value="1" class="layui-btn layui-btn-sm btn-submit">导出</button>
  261. <button type="submit" name="" data-export="2" value="2" class="layui-btn layui-btn-sm btn-submit">按订单导出</button>
  262. <?php if(!empty($open_feier_print) && $open_feier_print >=1){ ?>
  263. <a href="javascript:;" class="layui-btn layui-btn-sm btn_all_print">批量打印小票</a>
  264. <?php } ?>
  265. <?php if($data['kdniao_status'] == 1 && $order_status_id=='1'){ ?>
  266. <a href="javascript:;" class="layui-btn layui-btn-sm kdn_select_btn" id="kdn_exit_btn">打印选中电子面单(<span id="kdn_select_num">0</span>)</a>
  267. <a href="javascript:;" class="layui-btn layui-btn-sm kdn_all_btn">打印所有电子面单(<span id="kdn_all_num">{$count_status_express}</span>)</a>
  268. <a href="javascript:;" class="kdn_print_list" style="color:#428bca;"><span id="kdn_print_content">打印成功</span></a>
  269. <?php }else{ ?>
  270. <a href="javascript:;" class="layui-btn layui-btn-sm kdn_select_btn" id="kdn_other_btn" style="display:none;">打印选中电子面单(<span id="kdn_select_num">0</span>)</a>
  271. <?php }?>
  272. </div>
  273. </div>
  274. </div>
  275. </form>
  276. <form action="" class="layui-form" lay-filter="example" method="post" >
  277. <div class="row">
  278. <div class="list-div list-tb-div">
  279. <table cellpadding="0" cellspacing="0" border="0">
  280. <thead>
  281. <tr>
  282. <th width="3%" class="sign"><div class="tDiv">
  283. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  284. </div>
  285. </th>
  286. <th width="25%"><div class="tDiv">订单号</div></th>
  287. <th width="9%"><div class="tDiv">单价/数量</div></th>
  288. <th width="12%"><div class="tDiv">买家</div></th>
  289. <th width="8%"><div class="tDiv">支付/配送</div></th>
  290. <th width="14%"><div class="tDiv">小区/团长</div></th>
  291. <th width="10%"><div class="tDiv">价格</div></th>
  292. <th width="9%"><div class="tDiv">操作</div></th>
  293. <th width="8%"><div class="tDiv">状态</div></th>
  294. </tr>
  295. </thead>
  296. </table>
  297. <table cellpadding="0" cellspacing="0" border="0">
  298. <colgroup>
  299. <col width="28%">
  300. <col width="9%">
  301. <col width="12%">
  302. <col width="8%">
  303. <col width="14%">
  304. <col width="10%">
  305. <col width="9%">
  306. <col width="8%">
  307. </colgroup>
  308. <tbody>
  309. <?php foreach( $list as $item ){ ?>
  310. <tr class="tr-order-sn">
  311. <td colspan="10">
  312. <div class="tDiv ml10">
  313. <span class="sign">
  314. <input type='checkbox' name="item_checkbox" class="checkone" lay-skin="primary" value="{$item['order_id']}" lay-filter="item_checkbox" order_delivery="{$item['delivery']}" order_status="{$item['order_status_id']}"/>
  315. </span>
  316. <span class="words">流水号: #{$item['day_paixu']}</span>
  317. <?php if( $item['type']=='pintuan'){ ?>
  318. <span class="layui-badge" type="margin:0,15px,0,0;">拼团</span>
  319. <?php } ?>
  320. <?php foreach($item['goods'] as $k => $g){ ?>
  321. <?php if( $item['type']=='normal' && $g['goods_type']['type']=='pin' ){ ?>
  322. <span class="layui-badge" type="margin:0,15px,0,0;">单独购买</span>
  323. <?php } ?>
  324. <?php } ?>
  325. <?php if( !empty($item['soli_id'])){ ?>
  326. <span class="layui-badge" type="margin:0,15px,0,0;">接龙</span>
  327. <?php } ?>
  328. <span class="words">订单号: {$item['order_num_alias']}</span>
  329. <span class="words">下单时间:{:date('Y-m-d',$item['date_added'])}&nbsp {:date('H:i:s',$item['date_added'])}</span>
  330. <span class="words">
  331. <?php if( in_array($item['order_status_id'], array(1,2,4,6,11,14))){ ?>&nbsp;<span class="label label-success">{$order_status_arr[$item['order_status_id']]}</span><?php } ?>
  332. <?php if( in_array($item['order_status_id'], array(7,8,9))){ ?><label class='label label-danger'>{$order_status_arr[$item['order_status_id']]}</label><?php } ?>
  333. <?php if( in_array($item['order_status_id'], array(3,5,10,12,13))){ ?><label class='label label-default'>{$order_status_arr[$item['order_status_id']]}</label><?php } ?>
  334. </span>
  335. <span style='background:#fdeeee;color:red;'>
  336. <?php if( !empty($item['remarksaler']) ){ ?>
  337. 卖家备注:{$item['remarksaler']}
  338. <?php } ?>
  339. </span>
  340. <div style='text-align:right;font-size:12px;display:inline-block;' >
  341. <a class='op' data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/opremarksaler', array('id' => $item['order_id']))}" >
  342. <?php if( !empty($item['remarksaler'])){ ?>
  343. <i class="icow icow-flag-o" style="color: #df5254;display: inline-block;vertical-align: middle" title=" 查看备注"></i>
  344. 备注
  345. &nbsp
  346. <?php }else{ ?>
  347. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title=" 添加备注" ></i>
  348. 备注
  349. &nbsp
  350. <?php } ?>
  351. </a>
  352. <?php if($item['order_status_id'] != 3 ){ ?>
  353. <a href="{:U('order/order_print_dan', array('id' => $item['order_id']))}" class="text-primary" target="_blank">打印</a>
  354. <?php }?>
  355. <?php $is_printer_list = D('Home/Front')->get_config_by_name('is_printer_list'); ?>
  356. <?php if( ( empty($open_feier_print) && !empty($is_printer_list) ) || $open_feier_print >=1 && !in_array($item['order_status_id'], array(3))){ ?>
  357. <a href="javascript:;" data-confirm="确认打印订单小票吗?" class="deldom" data-href="{:U('order/opprint',array('id'=>$item['order_id']))}">
  358. &nbsp;&nbsp;打印小票
  359. </a>&nbsp;&nbsp;
  360. <?php } ?>
  361. <?php if( $item['is_print_suc'] == 0 ){ ?>
  362. <span class="layui-badge">打印失败</span>
  363. <?php } ?>
  364. <?php if( in_array($item['order_status_id'], array(1,4,6,10,11,12,14)) && $is_can_nowrfund_order ){ ?>
  365. <a href="javascript:;" style="display:none;" data-confirm="确认立即退款吗?" class="deldom" data-href="{:U('order/oprefund_do',array('id'=>$item['order_id']))}">
  366. &nbsp;&nbsp;立即退款
  367. </a>&nbsp;&nbsp;
  368. <a class='op' <?php if($item['is_statements_state'] == 1){ ?>data-confirm="订单已结算,再发生退款,佣金不可追回" <?php } ?> data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/oprefund_do', array('id' => $item['order_id']))}" >
  369. <i class="icow icow-yibiaoji" style="color: #999;display: inline-block;vertical-align: middle" title=" 立即退款" ></i>
  370. 整个订单立即退款
  371. </a>&nbsp;&nbsp;
  372. <?php } ?>
  373. <?php if( ( in_array($item['order_status_id'], array(1,4,7)) && $item['delivery']== 'delivery' && $item['is_virtualcard'] == 0 ) ){ ?>
  374. <a class="op" data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/op/changeexpress', array('id' => $item['order_id']))}">
  375. <i class="icow icow-wuliu" title="修改物流" style="color: #999;display: inline-block;vertical-align: middle"></i>
  376. 修改物流
  377. &nbsp
  378. </a>
  379. <?php } ?>
  380. <?php if( $item['order_status_id'] == 3){ ?>
  381. <a class='op' data-toggle='ajaxModal' href="javascript:;" style="display:none;" data-href="{:U('order/opchangeprice',array('id'=>$item['order_id']))}">
  382. <i class="icow icow-gaijia" title="订单改价" style="color: #999;display: inline-block;vertical-align: middle"></i>
  383. 订单改价
  384. &nbsp
  385. </a>
  386. <a class='op' data-toggle='ajaxModal' href="javascript:;" data-href="{:U('order/opclose',array('id'=>$item['order_id']))}" >
  387. <i class="icow icow-shutDown" title="删除订单" style="color: #999;margin-right: 3px;display: inline-block;vertical-align: middle"></i>
  388. 删除订单
  389. &nbsp
  390. </a>
  391. <?php } ?>
  392. <?php if($data['kdniao_status'] == 1 && $item['delivery'] == 'express'){ ?>
  393. <?php if($item['is_kdn_print'] == 1){
  394. echo '<span style="color:#009688;">面单打印成功</span>';
  395. }else if($item['is_kdn_print'] == 2){
  396. echo '<span style="color:red;">面单打印失败,请检查物流接口是否支持此快递面单,稍后重新打印</span>';
  397. }?>
  398. <?php } ?>
  399. </div>
  400. </div>
  401. </td>
  402. </tr>
  403. <tr class="">
  404. <td class="td-product">
  405. <?php $i =1;
  406. $member_youhui = 0;
  407. foreach($item['goods'] as $k => $g){
  408. $member_youhui += ($g['oldprice'] - $g['price'])*$g['quantity'];
  409. ?>
  410. <div class="tDiv relative tpinfo <?php if($i == count($item['goods'])){ ?>last<?php } ?> ">
  411. <div class="img"><img width="70" src="{:tomedia($g['goods_images'])}" alt="" /></div>
  412. <div class="product-info">
  413. <div class="name mb5">
  414. {$g['name']}&nbsp;&nbsp;
  415. <?php if( !empty($g['hexiao_info'])){ ?>
  416. <?php if($g['hexiao_info']['hexiao_type'] == 0){?>
  417. (订单核销)
  418. <?php }else{ ?>
  419. (按次核销)
  420. <?php } ?>
  421. <?php } ?>
  422. </div>
  423. <div>
  424. <?php if( !empty($g['option_sku'])){ ?>{$g['option_sku']}<?php } ?>
  425. </div>
  426. <div class="order_icon_items">
  427. <?php if($item['order_status_id'] == 7){ ?>
  428. 已退款
  429. <?php }else if($g['is_refund_state'] == 1 && !empty($g['refund_info']) ){ ?>
  430. 退款金额:<?php echo $g['refund_info']['ref_money']; ?> 元,
  431. <?php if($g['refund_info']['state'] == 0 ){ ?>
  432. <span class="layui-badge">申请中</span>
  433. <?php }else if($g['refund_info']['state'] == 3){ ?>
  434. <span class="label label-success">退款成功</span>
  435. <?php }else if($g['refund_info']['state'] == 4){ ?>
  436. <span class="label label-default">退款失败</span>
  437. <?php } ?>
  438. <br/><br/>
  439. <a class="btn btn-primary btn-xs " href="{:U('order/oprefund', array('id' => $item['order_id'], 'ref_id' => $g['refund_info']['ref_id'] ))}" >退款详情</a>
  440. <?php } ?>
  441. </div>
  442. </div>
  443. </div>
  444. <?php $i++; } ?>
  445. </td>
  446. <td class="td-price" style="vertical-align: top;">
  447. <?php $i =1;
  448. foreach($item['goods'] as $k => $g){ ?>
  449. <div class="tDiv tpinfo <?php if($i == count($item['goods'])){ ?>last<?php } ?>" style="display: flex;align-items: center;">¥<?php echo round($g['old_total']/$g['quantity'],2); ?>
  450. x {$g['quantity']} <?php if($g['has_refund_quantity'] > 0){ ?>(已退{$g['has_refund_quantity']}个)<?php } ?> </br>
  451. <?php if($g['is_level_buy'] == 1){ ?>
  452. <?php if( $g['member_disc'] < 100 ){ ?>
  453. <!--<span class="label label-primary">会员折扣:{$g['member_disc']}%</span>-->
  454. <?php } ?>
  455. <?php } ?>
  456. </div>
  457. <?php $i++; } ?>
  458. </td>
  459. <td>
  460. <div class="tDiv" >
  461. <font style="color: #999;">{$item['shipping_name']}</font><br/><font style="color: #999;">{$item['shipping_tel']}</font>
  462. <br/>
  463. <?php if (defined('ROLE') && ROLE == 'agenter' ){ ?>
  464. <font style="color: #999;">会员名:</font>{$item['nickname']}
  465. <?php if( !empty($item['member_content']) ){ ?>
  466. <br/><font class="text-danger">{$item['member_content']}</font>
  467. <?php } ?>
  468. <?php }else{ ?>
  469. <?php if($s_id == 1){ ?>
  470. <a class="text-primary" href="{:U('user/detail',array('id'=>$item['member_id']))}"><font style="color: #999;">会员名:</font>{$item['nickname']}<font style="color: #999;"><br>会员ID:{$item['member_id']}</font></a>
  471. <?php }else{ ?>
  472. <a class="text-primary user"><font style="color: #999;">会员名:</font>{$item['nickname']}<font style="color: #999;"><br>会员ID:{$item['member_id']}</font></a>
  473. <?php } ?>
  474. <?php if( !empty($item['member_content']) ){ ?>
  475. <br/><font class="text-danger">{$item['member_content']}</font>
  476. <?php } ?>
  477. <?php } ?>
  478. <br/>
  479. </div>
  480. </td>
  481. <td>
  482. <div class="tDiv" style="height: 100px;">
  483. <!-- 已支付 -->
  484. <?php if( $item['order_status_id'] != 3 && $item['order_status_id'] != 5){ ?>
  485. <?php if( $item['payment_code']=='yuer'){ ?>
  486. <span> <i class="text-warning" style="font-size: 17px;"></i><span>余额支付</span></span>
  487. <?php }else if( $item['payment_code']=='admin' ){ ?>
  488. <span> <i class=" text-danger" style="font-size: 17px"></i>后台付款</span>
  489. <?php }else if( $item['payment_code']=='supply_mobile' ){ ?>
  490. <span> <i class=" text-danger" style="font-size: 17px"></i>供应商手机端付款</span>
  491. <?php }else if( $item['payment_code']=='cashon_delivery' ){ ?>
  492. <span> <i class=" text-danger" style="font-size: 17px"></i>货到付款</span>
  493. <?php }else{ ?>
  494. <span class="line-text"> 微信支付</span>
  495. <?php } ?>
  496. <?php }elseif( $item['order_status_id'] == 3 || $item['order_status_id'] == 5 ){ ?>
  497. <!-- 未支付 -->
  498. <?php if($item['payment_code']=='yuer'){ ?>
  499. <span> <i class="text-warning" style="font-size: 17px;"></i><span>余额支付</span></span>
  500. <?php }elseif($item['payment_code']=='admin'){ ?>
  501. <span> <i class=" text-danger" style="font-size: 17px"></i>后台付款</span>
  502. <?php }else if($item['payment_code']=='weixin'){ ?>
  503. <span class="line-text"> 微信支付</span>
  504. <?php }else if( $item['payment_code']=='cashon_delivery' ){ ?>
  505. <span> <i class=" text-danger" style="font-size: 17px"></i>货到付款</span>
  506. <?php }else{ ?>
  507. <label class='label label-default'>未支付</label>
  508. <?php } ?>
  509. <?php } ?>
  510. <br/>
  511. <?php if( $item['delivery']=='pickup'){ ?><font class="text-danger">(社区自提)</font><?php } ?>
  512. <?php if( $item['delivery']=='express'){ ?><font class="text-danger">(快递)</font><?php } ?>
  513. <?php if( $item['delivery']=='localtown_delivery'){ ?><font class="text-danger">(同城配送)</font><?php } ?>
  514. <?php if( $item['delivery']=='tuanz_send'){ ?><font class="text-danger">(团长配送)</font><?php } ?>
  515. <?php if( $item['delivery']=='hexiao'){ ?><font class="text-danger">(到店核销)</font><?php } ?>
  516. </div>
  517. </td>
  518. <?php if($is_can_look_headinfo){ ?>
  519. <td>
  520. <div class="tDiv" style="text-align: left;">
  521. <div style='margin-top:5px;display:block;float:left;'>
  522. {$item['head_name']}
  523. </div>
  524. <div style='margin-top:5px;display:block;float:left;'>
  525. 电话:{$item['head_mobile']}
  526. </div>
  527. <div style='margin-top:5px;display:block;float:left;cursor: pointer;' >
  528. <font style="color: #999;">小区:</font> <font class="line-text">{$item['community_name']} ({$item['province']} {$item['city']})
  529. </div>
  530. </div>
  531. </td>
  532. <?php }else{ ?>
  533. <td>
  534. <div class="tDiv" style="text-align: left;">
  535. <div style='margin-top:5px;display:block; text-align: center;'>
  536. {$item['head_name']}
  537. </div>
  538. </div>
  539. </td>
  540. <?php } ?>
  541. <td>
  542. <div class="tDiv" style="">
  543. <?php if($member_youhui >0){ ?>
  544. <span style='margin-top:5px;margin-left:5px;display:block;'>
  545. 商品合计:{:round($item['old_price']+$member_youhui,2)}
  546. </span>
  547. <?php }else{ ?>
  548. <span style='margin-top:5px;margin-left:5px;display:block;'>
  549. 商品合计:{:round($item['old_price'],2)}
  550. </span>
  551. <?php } ?>
  552. <?php if($item['is_free_shipping_fare'] == 1){ ?>
  553. <span style='margin-top:5px;margin-left:5px;display:block;'>
  554. 运 费:+{:round( $item['fare_shipping_free'],2)}
  555. </span>
  556. <span style='margin-top:5px;margin-left:5px;display:block;'>
  557. 满{$item['man_e_money']}免运费:-{:round( $item['fare_shipping_free'],2)}
  558. </span>
  559. <?php }else{ ?>
  560. <span style='margin-top:5px;margin-left:5px;display:block;'>
  561. 运 费:+{:round( $item['shipping_fare'],2)}
  562. </span>
  563. <?php } ?>
  564. <?php if($item['packing_fare'] > 0){ ?>
  565. <span style='margin-top:5px;margin-left:5px;display:block;'>
  566. {$localtown_modifypickingname}:+{:round( $item['packing_fare'],2)}
  567. </span>
  568. <?php } ?>
  569. <?php if($item['voucher_credit'] >0){ ?>
  570. <span style='margin-top:5px;margin-left:5px;display:block;'>
  571. 优惠券:-{:round( $item['voucher_credit'],2)}
  572. </span>
  573. <?php } ?>
  574. <?php if($item['fullreduction_money'] >0){ ?>
  575. <span style='margin-top:5px;margin-left:5px;display:block;'>
  576. 满减优惠:-{:round( $item['fullreduction_money'],2)}
  577. </span>
  578. <?php } ?>
  579. <?php if( $item['score_for_money']>0 ){ ?>
  580. <span style='margin-top:5px;margin-left:5px;display:block;'>
  581. 积分抵扣:-¥{$item['score_for_money']}
  582. </span>
  583. <?php } ?>
  584. <?php if($member_youhui >0){ ?>
  585. <span style='margin-top:5px;margin-left:5px;display:block;'>
  586. 会员等级折扣优惠:-{:round( $member_youhui,2)}
  587. </span>
  588. <?php } ?>
  589. <?php
  590. if($item['is_change_price'] == 1){
  591. $change_price = $item['total'] - $item['old_price'];
  592. if($change_price > 0){
  593. ?>
  594. <span style='margin-top:5px;margin-left:5px;display:block;'>
  595. 商家改价:+{:round( $change_price,2)}
  596. </span>
  597. <?php }else if($change_price < 0){ ?>
  598. <span style='margin-top:5px;margin-left:5px;display:block;'>
  599. 商家改价:{:round( $change_price,2)}
  600. </span>
  601. <?php }
  602. }
  603. ?>
  604. <?php if(!empty($item['localtown_add_shipping_fare']) && $item['localtown_add_shipping_fare'] > 0){ ?>
  605. <span style='margin-top:5px;margin-left:5px;display:block;'>
  606. 加价配送:+{:round($item['localtown_add_shipping_fare'],2)}
  607. </span>
  608. <?php }?>
  609. <span style='margin-top:5px;margin-left:5px;display:block;'>
  610. <?php if($item['shipping_fare'] <= 0 ){ $item['fare_shipping_free'] = 0; } ?>
  611. <?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'];
  612. if($free_tongji < 0){
  613. $free_tongji = 0;
  614. }
  615. ?>
  616. 实付款:{:round($free_tongji ,2)}
  617. </span>
  618. </div>
  619. </td>
  620. <td>
  621. <div class="tDiv" style="">
  622. <?php
  623. if(empty(cookie('is_new_backadmin')) || cookie('is_new_backadmin') == 1){
  624. ?>
  625. <a class='op text-primary' href="{:U('order/detail', array('id' => $item['order_id'], 'ok' => 1))}">查看详情</a>
  626. <?php
  627. }else{
  628. ?>
  629. <a class='op text-primary' href="javascript:void(0);" onclick="window.parent.layui.index.openTabsPage('{:U(\'order/detail\', array(\'id\' => $item[\'order_id\'], \'ok\' => 1))}', '查看详情')">查看详情</a>
  630. <?php } ?>
  631. <?php if( $item['addressid']!=0 && $item['statusvalue']>=2 && $item['sendtype']==0){ ?>
  632. <a class='op text-primary' data-toggle="ajaxModal" href="javascript:;" data-href="{:U('util/express', array('id' => $item['order_id'],'express'=>$item['express'],'expresssn'=>$item['expresssn']))}" >物流信息</a>
  633. <?php } ?>
  634. <br/>
  635. <?php
  636. if($item['order_status_id'] == 1 && $data['kdniao_status'] == 1 && $item['delivery'] == 'express'){
  637. if($item['is_kdn_print'] == 0 || $item['is_kdn_print'] == 2){
  638. ?>
  639. <a class='op text-primary print_order' href="javascript:void(0);" order_id="{$item['order_id']}">打印面单</a>
  640. <?php
  641. }else if($item['is_kdn_print'] == 1){
  642. ?>
  643. <a class='op text-primary print_kdn' href="javascript:void(0);" order_id="{$item['order_id']}">打印面单</a>
  644. <?php
  645. }
  646. }
  647. ?>
  648. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 4 && $item['orderdistribution_order']['state'] == 1){ ?>
  649. <br/>
  650. <?php if(($item['orderdistribution_order']['delivery_type'] == 0 && empty($item['third_distribution_type'])) || $item['orderdistribution_order']['delivery_type'] == 1){ ?>
  651. <a class='btn btn-primary btn-xs ajaxPost' data-toggle="ajaxModal" href="javascript:;" data-href="{:U('orderdistribution/choosemember', array('id' => $item['order_id'] ))}" >指定配送员配送</a>
  652. <?php } ?>
  653. <?php } ?>
  654. <?php if(($item['orderdistribution_order']['state'] == 1 && empty($item['third_distribution_type'])) || (!empty($item['third_distribution_type']) && $item['orderdistribution_order']['state'] == 5)){ ?>
  655. <?php } ?>
  656. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 4 && $item['orderdistribution_order']['state'] != 1 && $item['orderdistribution_order']['orderdistribution_id'] > 0){ ?>
  657. <br/>
  658. 配送员:{$item['orderdistribution_order']['username']}
  659. <?php } ?>
  660. <?php if($is_can_third_delivery || true){ ?>
  661. <?php
  662. $third_name = "";
  663. if($item['third_distribution_type'] == 'imdada'){
  664. $third_name = '达达平台';
  665. }else if($item['third_distribution_type'] == 'sf'){
  666. $third_name = '顺丰同城';
  667. }else if($item['third_distribution_type'] == 'make'){
  668. $third_name = '码科配送';
  669. }else if($item['third_distribution_type'] == 'uupt'){
  670. $third_name = 'UU跑腿';
  671. }else if($item['third_distribution_type'] == 'dianwoda'){
  672. $third_name = '点我达';
  673. }else if($item['third_distribution_type'] == 'ele'){
  674. $third_name = '蜂鸟即配';
  675. }
  676. ?>
  677. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 4 && !empty($item['third_distribution_type']) && $item['orderdistribution_order']['delivery_type'] != 1 && $item['orderdistribution_order']['state'] != 5){ ?>
  678. <br/>
  679. <span style="color: #009688;">
  680. <a href="javascript:void(0)" data-orderid="<?php echo $item['order_id'];?>" class="third_log"><?php
  681. echo $third_name;
  682. ?>配送中</a></span>
  683. <?php }?>
  684. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 4 && !empty($item['third_distribution_type']) && $item['orderdistribution_order']['delivery_type'] != 1 && $item['orderdistribution_order']['state'] == 5){ ?>
  685. <br/>
  686. <a style="color: #009688;" class="renew_delivery_btn" data-type="{$item['third_distribution_type']}" data-order-id="{$item['order_id']}">重新配送</a>
  687. <?php }?>
  688. <?php }?>
  689. </div>
  690. </td>
  691. <td>
  692. <div class="tDiv" style="">
  693. <span class='text-{$item[order_status_id]}'>{$order_status_arr[$item['order_status_id']]}</span><br/>
  694. <?php
  695. $is_ops_show = true;
  696. if (defined('ROLE') && ROLE == 'agenter' )
  697. {
  698. $supper_info = get_agent_logininfo();
  699. if( $supper_info['type'] != 1)
  700. {
  701. $is_ops_show = false;
  702. }
  703. }
  704. ?>
  705. <?php if($is_ops_show){ ?>
  706. <!---操作开始-->
  707. <?php if( $item['order_status_id'] == 3){ ?>
  708. <!--未付款-->
  709. <?php
  710. $is_pay_show = true;
  711. if (defined('ROLE') && ROLE == 'agenter' )
  712. {
  713. $supper_info = get_agent_logininfo();
  714. $is_pay_show = false;
  715. }
  716. ?>
  717. <?php
  718. if($is_pay_show){
  719. if(!isset($data['open_admin_payment']) || $data['open_admin_payment']=='1'){
  720. ?>
  721. <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>
  722. <?php
  723. }
  724. }
  725. ?>
  726. <?php }elseif( $item['order_status_id'] == 1 ){ ?>
  727. <!--已付款-->
  728. <?php if( $item['order_status_id'] == 1 && $item['delivery'] == 'express' ){ ?>
  729. <!--快递 发货-->
  730. <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>
  731. <?php }elseif( $item['order_status_id'] == 1 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send' ) ){ ?>
  732. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认此订单发货吗?" data-href="{:U('order/opsend_tuanz', array('id' => $item['order_id']))}">确认配送</a>
  733. <?php }else if( $item['order_status_id'] == 1 && $item['delivery'] == 'localtown_delivery' ){ ?>
  734. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认此订单发货吗?" data-href="{:U('order/opsend_localtown', array('id' => $item['order_id']))}">确认配送</a>
  735. <?php }?>
  736. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'pickup' || $item['delivery'] == 'tuanz_send') ){ ?>
  737. <?php if($is_can_confirm_delivery){ ?>
  738. <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>
  739. <?php }else{ ?>
  740. <?php } ?>
  741. <?php }elseif( $item['order_status_id'] == 14 && ($item['delivery'] == 'express') ){ ?>
  742. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="{:U('order/opreceive', array('id' => $item['order_id']))}" data-confirm="确认订单收货吗?">确认收货</a><br />
  743. <?php }elseif( $item['order_status_id'] == 4 || $item['order_status_id'] == 6 ){ ?>
  744. <!--已发货-->
  745. <?php if( $item['order_status_id'] == 4){ ?>
  746. <!--快递 取消发货-->
  747. <?php if( $item['delivery'] == 'hexiao' ){ ?>
  748. <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>
  749. <?php }else{ ?>
  750. <?php if($is_can_confirm_receipt){ ?>
  751. <a class="btn btn-primary btn-xs deldom" href="javascript:;" data-href="{:U('order/opreceive', array('id' => $item['order_id']))}" data-confirm="确认订单收货吗?">确认收货</a><br />
  752. <?php if($item['delivery'] == 'localtown_delivery' && $item['orderdistribution_order']['delivery_type'] == 0 && $item['orderdistribution_order']['state'] == 5){ ?>
  753. <br /><a class="btn btn-primary btn-xs deldom" href="javascript:;" data-confirm="确认此订单发货吗?" data-href="{:U('order/opsend_localtown', array('id' => $item['order_id']))}">平台配送</a>
  754. <?php } ?>
  755. <?php }else{ ?>
  756. <?php }} ?>
  757. <?php if( $item['delivery'] == 'express' && $item['is_virtualcard'] == 0 ){ ?>
  758. <a class="text-primary " data-toggle="ajaxModal" href="javascript:;" data-href="{:U('order/opchangeexpress', array('id' => $item['order_id']))}">修改物流</a>
  759. <?php } ?>
  760. <?php }else{ ?>
  761. <a class="btn btn-primary btn-xs deldom" style="display:none;" href="javascript:;" data-href="{:U('order/opfinish', array('id' => $item['order_id']))}" data-confirm="确认完成订单吗?">确认完成</a>
  762. <?php } ?>
  763. <?php }elseif($item['order_status_id'] == 3){ ?>
  764. <?php } ?>
  765. <!---操作结束--->
  766. <?php } ?>
  767. </div>
  768. </td>
  769. </tr>
  770. <tr id="order_delivery_<?php echo $item['order_id'];?>">
  771. <td colspan="8">
  772. <font style="color: #999;padding-left: 10px;">供应商:</font>
  773. <?php if(!empty($g['shopname']['shopname']) ){ ?>
  774. {$g['shopname']['shopname']}<?php if( $g['shopname']['type'] == 1 ){ ?>(独立供应商)<?php }else{ ?>(平台供应商)<?php } ?>
  775. <?php }else{ ?>
  776. 平台自营(自营)
  777. <?php } ?>
  778. <?php if( $item['soli_id'] > 0 ){ ?>
  779. (接龙商品)
  780. <?php } ?>
  781. <?php if(($is_can_third_delivery && $item['store_id'] > 0) || $item['store_id'] == 0){ ?>
  782. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 1 && empty($item['third_distribution_type']) && $item['orderdistribution_order']['delivery_type'] != 1){ ?>
  783. <ul style="float:right;" class="ul_left">
  784. <?php if($is_localtown_mk_status == 1){ ?>
  785. <li>
  786. <a class="ts_delivery_btn" data-type="make" data-order-id="<?php echo $item['order_id']?>">推送到码科配送</a>
  787. <?php if($is_make_prequery_status == 1){ ?>
  788. <br/>
  789. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_mk_delivery_fee']) ? $item['pre_mk_delivery_fee'] : 0; ?></span>
  790. <?php } ?>
  791. </li>
  792. <?php } ?>
  793. <?php if($is_localtown_imdada_status == 1){ ?>
  794. <li>
  795. <a class="ts_delivery_btn" data-type="imdada" data-order-id="<?php echo $item['order_id']?>">推送到达达配送</a>
  796. <?php if($is_imdada_prequery_status == 1){ ?>
  797. <br/>
  798. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_imdada_delivery_fee']) ? $item['pre_imdada_delivery_fee'] : 0; ?></span>
  799. <?php } ?>
  800. </li>
  801. <?php } ?>
  802. <?php if($is_localtown_sf_status == 1){ ?>
  803. <li>
  804. <a class="ts_delivery_btn" data-type="sf" data-order-id="<?php echo $item['order_id']?>">推送到顺丰同城</a>
  805. <?php if($is_sf_prequery_status == 1){ ?>
  806. <br/>
  807. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_sf_delivery_fee']) ? $item['pre_sf_delivery_fee'] : 0; ?></span>
  808. <?php } ?>
  809. </li>
  810. <?php } ?>
  811. <?php if($is_localtown_ele_status == 1){ ?>
  812. <li>
  813. <a class="ts_delivery_btn" data-type="ele" data-order-id="<?php echo $item['order_id']?>">推送到蜂鸟即配</a>
  814. </li>
  815. <?php } ?>
  816. </ul>
  817. <?php } ?>
  818. <?php if($item['delivery'] == 'localtown_delivery' && $item['order_status_id'] == 4 && !empty($item['third_distribution_type']) && $item['orderdistribution_order']['state'] == 5 && $item['orderdistribution_order']['delivery_type'] != 1){ ?>
  819. <ul style="float:right;" class="ul_left">
  820. <?php if($is_localtown_imdada_status == 1){ ?>
  821. <?php if($item['third_distribution_type'] == 'imdada'){ ?>
  822. <li>
  823. <a class="ts_delivery_error_btn" style="color:red;">达达配送平台:{$item['orderdistribution_order']['cancel_reason']}</a>
  824. <?php if($is_imdada_prequery_status == 1){ ?>
  825. <br/>
  826. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_imdada_delivery_fee']) ? $item['pre_imdada_delivery_fee'] : 0; ?></span>
  827. <?php } ?>
  828. </li>
  829. <?php }else{ ?>
  830. <li>
  831. <a class="ts_delivery_btn" data-type="imdada" data-order-id="<?php echo $item['order_id']?>">推送到达达配送</a>
  832. <?php if($is_imdada_prequery_status == 1){ ?>
  833. <br/>
  834. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_imdada_delivery_fee']) ? $item['pre_imdada_delivery_fee'] : 0; ?></span>
  835. <?php } ?>
  836. </li>
  837. <?php } ?>
  838. <?php } ?>
  839. <?php if($is_localtown_sf_status == 1){ ?>
  840. <?php if($item['third_distribution_type'] == 'sf'){ ?>
  841. <li>
  842. <a class="ts_delivery_error_btn" style="color:red;">顺丰同城平台:{$item['orderdistribution_order']['cancel_reason']}</a>
  843. <?php if($is_sf_prequery_status == 1){ ?>
  844. <br/>
  845. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_sf_delivery_fee']) ? $item['pre_sf_delivery_fee'] : 0; ?></span>
  846. <?php } ?>
  847. </li>
  848. <?php }else{ ?>
  849. <li>
  850. <a class="ts_delivery_btn" data-type="sf" data-order-id="<?php echo $item['order_id']?>">推送到顺丰同城</a>
  851. <?php if($is_sf_prequery_status == 1){ ?>
  852. <br/>
  853. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_sf_delivery_fee']) ? $item['pre_sf_delivery_fee'] : 0; ?></span>
  854. <?php } ?>
  855. </li>
  856. <?php } ?>
  857. <?php } ?>
  858. <?php if($is_localtown_mk_status == 1){ ?>
  859. <?php if($item['third_distribution_type'] == 'make'){ ?>
  860. <li>
  861. <a class="ts_delivery_error_btn" style="color:red;">码科配送:{$item['orderdistribution_order']['cancel_reason']}</a>
  862. <?php if($is_sf_prequery_status == 1){ ?>
  863. <br/>
  864. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_mk_delivery_fee']) ? $item['pre_mk_delivery_fee'] : 0; ?></span>
  865. <?php } ?>
  866. </li>
  867. <?php }else{ ?>
  868. <li>
  869. <a class="ts_delivery_btn" data-type="make" data-order-id="<?php echo $item['order_id']?>">推送到码科配送</a>
  870. <?php if($is_make_prequery_status == 1){ ?>
  871. <br/>
  872. <span style="color: rgb(0, 150, 136);">预计配送费:<?php echo !empty($item['pre_mk_delivery_fee']) ? $item['pre_mk_delivery_fee'] : 0; ?></span>
  873. <?php } ?>
  874. </li>
  875. <?php } ?>
  876. <?php } ?>
  877. <?php if($is_localtown_ele_status == 1){ ?>
  878. <?php if($item['third_distribution_type'] == 'ele'){ ?>
  879. <li>
  880. <a class="ts_delivery_error_btn" style="color:red;">蜂鸟即配平台:{$item['orderdistribution_order']['cancel_reason']}</a>
  881. </li>
  882. <?php }else{ ?>
  883. <li>
  884. <a class="ts_delivery_btn" data-type="ele" data-order-id="<?php echo $item['order_id']?>">推送到蜂鸟即配</a>
  885. </li>
  886. <?php } ?>
  887. <?php } ?>
  888. </ul>
  889. <?php }?>
  890. <?php }?>
  891. <input type="hidden" class="imdada_has_send" name="imdada_has_send" value="<?php echo $item['imdada_has_send']; ?>"/>
  892. <input type="hidden" class="sf_has_send" name="sf_has_send" value="<?php echo $item['sf_has_send']; ?>"/>
  893. </td>
  894. </tr>
  895. <?php if( !empty($item['comment'])){ ?>
  896. <tr>
  897. <td colspan="8"><div style='background:#fdeeee;color:red;'>买家备注: {$item['comment']}</div></td>
  898. </tr>
  899. <?php } ?>
  900. <tr>
  901. <td colspan="8">
  902. <div style="height:20px;">&nbsp;</div>
  903. </td>
  904. </tr>
  905. <?php } ?>
  906. </tbody>
  907. <tfoot>
  908. <tr>
  909. <td colspan="0">
  910. <div class="page-table-header">
  911. </div>
  912. </td>
  913. <td colspan="8" style="text-align: right">
  914. {$pager}
  915. </td>
  916. </tr>
  917. </tfoot>
  918. </table>
  919. </div>
  920. </div>
  921. </form>
  922. </div>
  923. </div>
  924. </div>
  925. <script src="/layuiadmin/layui/layui.js"></script>
  926. <script>
  927. layui.config({
  928. base: '/layuiadmin/' //静态资源所在路径
  929. }).extend({
  930. index: 'lib/index' //主入口模块
  931. }).use('index');
  932. </script>
  933. <script>
  934. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  935. var layer = layui.layer;
  936. var $;
  937. layui.use(['jquery', 'layer','form'], function(){
  938. $ = layui.$;
  939. var form = layui.form;
  940. var element = layui.element;
  941. $('.deldom').click(function(){
  942. var s_url = $(this).attr('data-href');
  943. var lock = false;
  944. layer.confirm($(this).attr('data-confirm'), function(index){
  945. if(!lock){
  946. lock = true;
  947. $.ajax({
  948. url:s_url,
  949. type:'post',
  950. dataType:'json',
  951. success:function(info){
  952. $('#ajaxModal').removeClass('in');
  953. $('.modal-backdrop').removeClass('in');
  954. if(info.status == 0)
  955. {
  956. layer.msg(info.result.msg,{icon: 1,time: 2000});
  957. }else if(info.status == 1){
  958. var go_url = location.href;
  959. if( info.result.hasOwnProperty("url") )
  960. {
  961. go_url = info.result.url;
  962. }
  963. layer.msg('操作成功',{time: 1000,
  964. end:function(){
  965. location.href = info.result.url;
  966. }
  967. });
  968. }
  969. }
  970. })
  971. }
  972. },function(){
  973. $('#ajaxModal').removeClass('in');
  974. $('.modal-backdrop').removeClass('in');
  975. });
  976. })
  977. $('.btn-operation').click(function(){
  978. var ids_arr = [];
  979. var obj = $(this);
  980. var s_toggle = $(this).attr('data-toggle');
  981. var s_url = $(this).attr('data-href');
  982. $("input[name=item_checkbox]").each(function() {
  983. if( $(this).prop('checked') )
  984. {
  985. ids_arr.push( $(this).val() );
  986. }
  987. })
  988. if(ids_arr.length < 1)
  989. {
  990. layer.msg('请选择要操作的内容');
  991. }else{
  992. var can_sub = true;
  993. if( s_toggle == 'batch-remove' )
  994. {
  995. can_sub = false;
  996. layer.confirm($(obj).attr('data-confirm'), function(index){
  997. $.ajax({
  998. url:s_url,
  999. type:'post',
  1000. dataType:'json',
  1001. data:{ids:ids_arr},
  1002. success:function(info){
  1003. if(info.status == 0)
  1004. {
  1005. layer.msg(info.result.message,{icon: 1,time: 2000});
  1006. }else if(info.status == 1){
  1007. var go_url = location.href;
  1008. if( info.result.hasOwnProperty("url") )
  1009. {
  1010. go_url = info.result.url;
  1011. }
  1012. layer.msg('操作成功',{time: 1000,
  1013. end:function(){
  1014. location.href = info.result.url;
  1015. }
  1016. });
  1017. }
  1018. }
  1019. })
  1020. });
  1021. }else{
  1022. $.ajax({
  1023. url:s_url,
  1024. type:'post',
  1025. dataType:'json',
  1026. data:{ids:ids_arr},
  1027. success:function(info){
  1028. if(info.status == 0)
  1029. {
  1030. layer.msg(info.result.message,{icon: 1,time: 2000});
  1031. }else if(info.status == 1){
  1032. var go_url = location.href;
  1033. if( info.result.hasOwnProperty("url") )
  1034. {
  1035. go_url = info.result.url;
  1036. }
  1037. layer.msg('操作成功',{time: 1000,
  1038. end:function(){
  1039. location.href = info.result.url;
  1040. }
  1041. });
  1042. }
  1043. }
  1044. })
  1045. }
  1046. }
  1047. })
  1048. form.on('switch(restwsitch)', function(data){
  1049. var s_url = $(this).attr('data-href')
  1050. var rest = 1;
  1051. if(data.elem.checked)
  1052. {
  1053. rest = 1;
  1054. }else{
  1055. rest = 0;
  1056. }
  1057. $.ajax({
  1058. url:s_url,
  1059. type:'post',
  1060. dataType:'json',
  1061. data:{rest:rest},
  1062. success:function(info){
  1063. if(info.status == 0)
  1064. {
  1065. layer.msg(info.result.message,{icon: 1,time: 2000});
  1066. }else if(info.status == 1){
  1067. var go_url = location.href;
  1068. if( info.result.hasOwnProperty("url") )
  1069. {
  1070. go_url = info.result.url;
  1071. }
  1072. layer.msg('操作成功',{time: 1000,
  1073. end:function(){
  1074. location.href = info.result.url;
  1075. }
  1076. });
  1077. }
  1078. }
  1079. })
  1080. });
  1081. form.on('switch(enablewsitch)', function(data){
  1082. var s_url = $(this).attr('data-href')
  1083. var enable = 1;
  1084. if(data.elem.checked)
  1085. {
  1086. enable = 1;
  1087. }else{
  1088. enable = 0;
  1089. }
  1090. $.ajax({
  1091. url:s_url,
  1092. type:'post',
  1093. dataType:'json',
  1094. data:{enable:enable},
  1095. success:function(info){
  1096. if(info.status == 0)
  1097. {
  1098. layer.msg(info.result.message,{icon: 1,time: 2000});
  1099. }else if(info.status == 1){
  1100. var go_url = location.href;
  1101. if( info.result.hasOwnProperty("url") )
  1102. {
  1103. go_url = info.result.url;
  1104. }
  1105. layer.msg('操作成功',{time: 1000,
  1106. end:function(){
  1107. location.href = info.result.url;
  1108. }
  1109. });
  1110. }
  1111. }
  1112. })
  1113. });
  1114. form.on('switch(statewsitch)', function(data){
  1115. var s_url = $(this).attr('data-href')
  1116. var state = 1;
  1117. if(data.elem.checked)
  1118. {
  1119. state = 1;
  1120. }else{
  1121. state = 0;
  1122. }
  1123. $.ajax({
  1124. url:s_url,
  1125. type:'post',
  1126. dataType:'json',
  1127. data:{state:state},
  1128. success:function(info){
  1129. if(info.status == 0)
  1130. {
  1131. layer.msg(info.result.message,{icon: 1,time: 2000});
  1132. }else if(info.status == 1){
  1133. var go_url = location.href;
  1134. if( info.result.hasOwnProperty("url") )
  1135. {
  1136. go_url = info.result.url;
  1137. }
  1138. layer.msg('操作成功',{time: 1000,
  1139. end:function(){
  1140. location.href = info.result.url;
  1141. }
  1142. });
  1143. }
  1144. }
  1145. })
  1146. });
  1147. form.on('checkbox(checkboxall)', function(data){
  1148. var count = 0;
  1149. var kdn_count = 0;
  1150. if(data.elem.checked)
  1151. {
  1152. $("input[name=item_checkbox]").each(function() {
  1153. var delivery = $(this).attr("order_delivery");
  1154. var order_status = $(this).attr("order_status");
  1155. if(delivery == 'express' && order_status == 1){
  1156. if($('#kdn_exit_btn').length == 0){
  1157. $('#kdn_other_btn').show();
  1158. }
  1159. kdn_count++;
  1160. }
  1161. count++;
  1162. $(this).prop("checked", true);
  1163. });
  1164. $("input[name=checkall]").each(function() {
  1165. $(this).prop("checked", true);
  1166. });
  1167. }else{
  1168. $("input[name=item_checkbox]").each(function() {
  1169. $(this).prop("checked", false);
  1170. });
  1171. $("input[name=checkall]").each(function() {
  1172. $(this).prop("checked", false);
  1173. });
  1174. }
  1175. $('#kdn_select_num').html(kdn_count);
  1176. form.render('checkbox');
  1177. });
  1178. form.on('checkbox(item_checkbox)', function(data){
  1179. var count = 0;
  1180. $("input[name=item_checkbox]").each(function() {
  1181. if($(this).prop("checked")){
  1182. var delivery = $(this).attr("order_delivery");
  1183. var order_status = $(this).attr("order_status");
  1184. if(delivery == 'express' && order_status == 1){
  1185. if($('#kdn_exit_btn').length == 0){
  1186. $('#kdn_other_btn').show();
  1187. }
  1188. count++;
  1189. }
  1190. }
  1191. });
  1192. $('#kdn_select_num').html(count);
  1193. form.render('checkbox');
  1194. });
  1195. //监听提交
  1196. form.on('submit(formDemo)', function(data){
  1197. var loadingIndex = layer.load();
  1198. $.ajax({
  1199. url: data.form.action,
  1200. type: data.form.method,
  1201. data: data.field,
  1202. dataType:'json',
  1203. success: function (info) {
  1204. if(info.status == 0)
  1205. {
  1206. layer.msg(info.result.message,{icon: 1,time: 2000});
  1207. layer.close(loadingIndex);
  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. return false;
  1223. });
  1224. })
  1225. </script>
  1226. <script>
  1227. var ajax_url = "";
  1228. $(function(){
  1229. $("[data-toggle='ajaxModal']").click(function () {
  1230. var s_url = $(this).attr('data-href');
  1231. ajax_url = s_url;
  1232. console.log(23);
  1233. //
  1234. var s_confirm = $(this).attr('data-confirm');
  1235. console.log(s_confirm);
  1236. if( s_confirm )
  1237. {
  1238. layer.confirm(s_confirm, function(index){
  1239. layer.close(index);
  1240. $.ajax({
  1241. url:s_url,
  1242. type:"get",
  1243. success:function(shtml){
  1244. $('#ajaxModal').html(shtml);
  1245. $("#ajaxModal").modal();
  1246. }
  1247. })
  1248. })
  1249. }else{
  1250. $.ajax({
  1251. url:s_url,
  1252. type:"get",
  1253. success:function(shtml){
  1254. $('#ajaxModal').html(shtml);
  1255. $("#ajaxModal").modal();
  1256. }
  1257. })
  1258. }
  1259. });
  1260. $(document).delegate(".modal-footer .btn-primary","click",function(){
  1261. var loadingIndex = layer.load();
  1262. //
  1263. var s_data = $('#ajaxModal form').serialize();
  1264. $.ajax({
  1265. url:ajax_url,
  1266. type:'post',
  1267. dataType:'json',
  1268. data:s_data,
  1269. success:function(info){
  1270. if(info.status == 0)
  1271. {
  1272. layer.msg(info.result.message,{icon: 1,time: 2000});
  1273. layer.close(loadingIndex);
  1274. }else if(info.status == 1){
  1275. var go_url = location.href;
  1276. if( info.result.hasOwnProperty("url") )
  1277. {
  1278. go_url = info.result.url;
  1279. }
  1280. layer.msg('操作成功',{time: 1000,
  1281. end:function(){
  1282. location.href = info.result.url;
  1283. }
  1284. });
  1285. }
  1286. }
  1287. })
  1288. return false;
  1289. })
  1290. })
  1291. </script>
  1292. <div id="ajaxModal" class="modal fade" style="display: none;">
  1293. </div>
  1294. <script>
  1295. //没有选中时间段不能导出
  1296. $(function () {
  1297. $('.btn-submit').click(function(){
  1298. //
  1299. var e = $(this).data('export');
  1300. if(e>0 ){
  1301. if($('#keyword').val() !='' ){
  1302. $('#export').val(e);
  1303. }else if($('#searchtime').val()!=''){
  1304. $('#export').val(e);
  1305. }else{
  1306. layer.msg('请先选择时间段!');
  1307. return false;
  1308. }
  1309. }else{
  1310. $('#export').val(0);
  1311. }
  1312. var form_data = $('.form-search').serialize();
  1313. var a = form_data.replace('c=order&a=index','');
  1314. var s = a.replace('c=communityhead&a=distributionorder','');
  1315. s = s.replace('c=distribution&a=distributionorder','');
  1316. $.post("{:U('order/export_form', array('sec' => 1) )}", s, function(shtml){
  1317. layer.open({
  1318. type: 1,
  1319. area: '930px',
  1320. content: shtml //注意,如果str是object,那么需要字符拼接。
  1321. });
  1322. });
  1323. return false;
  1324. })
  1325. $('.unbtn_export').click(function(){
  1326. //
  1327. $('#export').val(0);
  1328. })
  1329. $('.btn_all_print').click(function(){
  1330. var loadingIndex = layer.load();
  1331. var ids_arr = [];
  1332. $("input[name=item_checkbox]").each(function() {
  1333. if( $(this).prop('checked') )
  1334. {
  1335. ids_arr.push( $(this).val() );
  1336. }
  1337. })
  1338. if(ids_arr.length < 1)
  1339. {
  1340. layer.close(loadingIndex);
  1341. layer.msg('请选择要打印的订单');
  1342. return false;
  1343. }else{
  1344. layer.close(loadingIndex);
  1345. layer.confirm('确认要批量打印这些订单小票吗', function(index){
  1346. $.post("{:U('order/all_opprint', array('sec' => 1) )}", {order_arr:ids_arr}, function(shtml){
  1347. layer.open({
  1348. type: 1,
  1349. area: '930px',
  1350. content: shtml //注意,如果str是object,那么需要字符拼接。
  1351. });
  1352. });
  1353. });
  1354. return false;
  1355. }
  1356. })
  1357. $('.btn-submit').click(function () {
  1358. var e = $(this).data('export');
  1359. if(e==1 ){
  1360. if($('#keyword').val() !='' ){
  1361. $('#export').val(1);
  1362. $('#search').submit();
  1363. }else if($('#searchtime').val()!=''){
  1364. $('#export').val(1);
  1365. $('#search').submit();
  1366. }else{
  1367. $('#export').val(1);
  1368. $('#search').submit();
  1369. return;
  1370. }
  1371. }else{
  1372. $('#export').val(0);
  1373. $('#search').submit();
  1374. }
  1375. })
  1376. $('.print_order').click(function(){
  1377. var order_id = $(this).attr("order_id");
  1378. $.ajax({
  1379. url:"{:U('order/check_kdniao')}",
  1380. type:'post',
  1381. dataType:'json',
  1382. success:function(info){
  1383. if(info.status == 0)
  1384. {
  1385. kdniao_set();
  1386. }else if(info.status == 1){
  1387. $.post("{:U('order/express_list')}", {type:'one',order_id:order_id}, function(shtml){
  1388. layer.open({
  1389. type: 1,
  1390. area: '930px',
  1391. content: shtml //注意,如果str是object,那么需要字符拼接。
  1392. });
  1393. });
  1394. }
  1395. }
  1396. })
  1397. return false;
  1398. })
  1399. $('.print_kdn').click(function(){
  1400. var order_id = $(this).attr("order_id");
  1401. $.post("{:U('order/kdn_info')}", {order_id:order_id}, function(shtml){
  1402. layer.open({
  1403. title: "快递面单",
  1404. type: 1,
  1405. area: ['450px', '700px'],
  1406. content: shtml
  1407. });
  1408. });
  1409. });
  1410. $('.kdn_all_btn').click(function(){
  1411. $.ajax({
  1412. url:"{:U('order/check_kdniao')}",
  1413. type:'post',
  1414. dataType:'json',
  1415. success:function(info){
  1416. if(info.status == 0)
  1417. {
  1418. kdniao_set();
  1419. }else if(info.status == 1){
  1420. kdn_all_print();
  1421. }
  1422. }
  1423. })
  1424. return false;
  1425. });
  1426. $('.kdn_select_btn').click(function(){
  1427. $.ajax({
  1428. url:"{:U('order/check_kdniao')}",
  1429. type:'post',
  1430. dataType:'json',
  1431. success:function(info){
  1432. if(info.status == 0)
  1433. {
  1434. kdniao_set();
  1435. }else if(info.status == 1){
  1436. kdn_select_print();
  1437. }
  1438. }
  1439. })
  1440. return false;
  1441. });
  1442. $('#kdn_print_content').click(function(){
  1443. $.post("{:U('order/kdn_print_log_list')}", {}, function(shtml){
  1444. layer.open({
  1445. type: 1,
  1446. area: '500px',
  1447. content: shtml //注意,如果str是object,那么需要字符拼接。
  1448. });
  1449. });
  1450. });
  1451. $('.user').click(function(){
  1452. layer.msg('权限不足!',{icon: 2,time: 1200});
  1453. })
  1454. $('.ts_delivery_btn').click(function(){
  1455. var data_type = $(this).attr("data-type");
  1456. var order_id = $(this).attr("data-order-id");
  1457. $.ajax({
  1458. url:"{:U('order/check_delivery_config')}",
  1459. type:'post',
  1460. dataType:'json',
  1461. data: {data_type:data_type},
  1462. success:function(res){
  1463. if(res.status == 0)
  1464. {
  1465. var html = '推送失败,平台参数设置错误请重新设置';
  1466. layer.confirm(html, {
  1467. btn: ['确定','取消'] //按钮
  1468. }, function(){
  1469. layer.closeAll();
  1470. }, function(){
  1471. layer.closeAll();
  1472. });
  1473. }else if(res.status == 1){
  1474. thirth_delivery_order(data_type,order_id,1);
  1475. }
  1476. }
  1477. })
  1478. });
  1479. $('.renew_delivery_btn').click(function(){
  1480. var data_type = $(this).attr("data-type");
  1481. var order_id = $(this).attr("data-order-id");
  1482. $.ajax({
  1483. url:"{:U('order/check_delivery_config')}",
  1484. type:'post',
  1485. dataType:'json',
  1486. data: {data_type:data_type},
  1487. success:function(res){
  1488. if(res.status == 0)
  1489. {
  1490. var html = '推送失败,平台参数设置错误请重新设置';
  1491. layer.confirm(html, {
  1492. btn: ['确定','取消'] //按钮
  1493. }, function(){
  1494. layer.closeAll();
  1495. }, function(){
  1496. layer.closeAll();
  1497. });
  1498. }else if(res.status == 1){
  1499. thirth_delivery_order(data_type,order_id,2);
  1500. }
  1501. }
  1502. })
  1503. });
  1504. $('.third_log').click(function(){
  1505. var order_id = $(this).attr("data-orderid");
  1506. $.post("{:U('order/third_delivery_log_list')}", {order_id:order_id}, function(shtml){
  1507. layer.open({
  1508. type: 1,
  1509. area: ['900px', '600px'],
  1510. content: shtml //注意,如果str是object,那么需要字符拼接。
  1511. });
  1512. });
  1513. });
  1514. })
  1515. function thirth_delivery_order(data_type,order_id,state){
  1516. var thirth_name = "达达平台";
  1517. var has_send = 0;
  1518. if(data_type == 'imdada'){
  1519. thirth_name = "达达平台";
  1520. has_send = $('#order_delivery_'+order_id).find('.imdada_has_send').val();
  1521. }else if(data_type == 'sf'){
  1522. thirth_name = "顺丰同城";
  1523. has_send = $('#order_delivery_'+order_id).find('.sf_has_send').val();
  1524. }else if(data_type == 'make'){
  1525. thirth_name = "码科配送";
  1526. //has_send = $('#sf_has_send').val();
  1527. }else if(data_type == 'ele'){
  1528. thirth_name = "蜂鸟即配";
  1529. //has_send = $('#sf_has_send').val();
  1530. }
  1531. var html = "";
  1532. var post_url = "";
  1533. if(state == 1){
  1534. html = "确认推送到"+thirth_name+"配送吗?";
  1535. if(has_send == 1){
  1536. post_url = "{:U('order/thirth_renew_delivery_order')}";
  1537. }else{
  1538. post_url = "{:U('order/thirth_delivery_order')}";
  1539. }
  1540. }else{
  1541. html = "确认重新推送到"+thirth_name+"配送吗?";
  1542. post_url = "{:U('order/thirth_renew_delivery_order')}";
  1543. }
  1544. layer.confirm(html, {
  1545. btn: ['确定','取消'] //按钮
  1546. }, function(index){
  1547. layer.close(index);
  1548. $.ajax({
  1549. url:post_url,
  1550. type:'post',
  1551. dataType:'json',
  1552. data: {data_type:data_type,order_id:order_id},
  1553. success:function(res){
  1554. console.log(res);
  1555. if(res.status == 0)
  1556. {
  1557. layer.msg(res.result.msg,{icon: 2,time: 2000});
  1558. return false;
  1559. }else if(res.status == 1){
  1560. var go_url = location.href;
  1561. layer.msg('推送成功',{time: 1000,
  1562. end:function(){
  1563. location.href = go_url;
  1564. }
  1565. });
  1566. }
  1567. }
  1568. })
  1569. }, function(){
  1570. layer.closeAll();
  1571. });
  1572. }
  1573. function kdn_all_print(){
  1574. var count = $('#kdn_all_num').html();
  1575. var html = '批量打印面单,面单打印成功,即为自动发货成功,打印失败,即为自动发货失败,共计<span style="color:red;">'+count+'</span>个快递订单,确认将全部快递订单打印电子面单自动发货?';
  1576. layer.confirm(html, {
  1577. btn: ['确定打印','取消'] //按钮
  1578. }, function(index){
  1579. layer.close(index);
  1580. $.post("{:U('order/express_list')}", {type:"all"}, function(shtml){
  1581. layer.open({
  1582. type: 1,
  1583. area: '930px',
  1584. content: shtml //注意,如果str是object,那么需要字符拼接。
  1585. });
  1586. });
  1587. }, function(){
  1588. layer.closeAll();
  1589. });
  1590. }
  1591. function kdn_select_print(){
  1592. var count = $('#kdn_select_num').html();
  1593. if(count == 0){
  1594. layer.msg("请在左侧选中待发货快递订单",{icon: 2,time: 2000});
  1595. return false;
  1596. }else{
  1597. var order_ids = "";
  1598. $("input[name=item_checkbox]").each(function() {
  1599. if( $(this).prop('checked') )
  1600. {
  1601. var delivery = $(this).attr("order_delivery");
  1602. var order_status = $(this).attr("order_status");
  1603. if(delivery == 'express' && order_status == 1){
  1604. if(order_ids == ''){
  1605. order_ids = $(this).val();
  1606. }else{
  1607. order_ids = order_ids+','+$(this).val();
  1608. }
  1609. }
  1610. }
  1611. })
  1612. var html = '批量打印面单,面单打印成功,即为自动发货成功,打印失败,即为自动发货失败,确认将<br/>选中的<span style="color:red;">'+count+'</span>个快递订单打印成电子面单自动发货?';
  1613. layer.confirm(html, {
  1614. btn: ['确定打印','取消'] //按钮
  1615. }, function(index){
  1616. layer.close(index);
  1617. $.post("{:U('order/express_list')}", {type:"select",order_id:order_ids}, function(shtml){
  1618. layer.open({
  1619. type: 1,
  1620. area: '930px',
  1621. content: shtml //注意,如果str是object,那么需要字符拼接。
  1622. });
  1623. });
  1624. }, function(){
  1625. layer.closeAll();
  1626. });
  1627. }
  1628. }
  1629. function kdniao_set(){
  1630. var html = '暂未设置"快递鸟"电子面单物流接口,请先到后台<br/><span style="color:#428bca;">设置</span>——<span style="color:#428bca;">物流设置</span>——<span style="color:#428bca;">物流接口设置</span>,设置好参数后,再进行打印面单操作';
  1631. layer.confirm(html, {
  1632. btn: ['去设置','取消'] //按钮
  1633. }, function(){
  1634. window.location.href = "{:U('logistics/inface')}";
  1635. }, function(){
  1636. layer.closeAll();
  1637. });
  1638. }
  1639. </script>
  1640. </body>