59e59b8aad3686d7bafd569e725f6361.php 79 KB

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