distribution_list.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <?php $shoname_name = D('Home/Front')->get_config_by_name('shoname'); ?>
  6. <title><?php echo $shoname; ?></title>
  7. <link rel="shortcut icon" href="" />
  8. <meta name="renderer" content="webkit">
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
  11. <link rel="stylesheet" href="/layuiadmin/style/admin.css" media="all">
  12. <!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
  13. <!--[if lt IE 9]>
  14. <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
  15. <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
  16. <![endif]-->
  17. <link href="./resource/css/bootstrap.min.css?v=201903260001" rel="stylesheet">
  18. <link href="./resource/css/common.css?v=201903260001" rel="stylesheet">
  19. <script type="text/javascript">
  20. window.sysinfo = {
  21. <?php if (!empty($_W['uniacid']) ){ ?>'uniacid': '{$_W['uniacid']}',<?php } ?>
  22. <?php if( !empty($_W['acid']) ){ ?>'acid': '{$_W['acid']}',<?php } ?>
  23. <?php if (!empty($_W['openid']) ) { ?>'openid': '{$_W['openid']}',<?php } ?>
  24. <?php if( !empty($_W['uid']) ) { ?>'uid': '{$_W['uid']}',<?php } ?>
  25. 'isfounder': <?php if (!empty($_W['isfounder']) ) { ?>1<?php }else{ ?>0<?php } ?>,
  26. 'siteroot': '{$_W['siteroot']}',
  27. 'siteurl': '{$_W['siteurl']}',
  28. 'attachurl': '{$_W['attachurl']}',
  29. 'attachurl_local': '{$_W['attachurl_local']}',
  30. 'attachurl_remote': '{$_W['attachurl_remote']}',
  31. 'module' : {'url' : '<?php if( defined('MODULE_URL') ) { ?>{MODULE_URL}<?php } ?>', 'name' : '<?php if (defined('IN_MODULE') ) { ?>{IN_MODULE}<?php } ?>'},
  32. 'cookie' : {'pre': ''},
  33. 'account' : {:json_encode($_W['account'])},
  34. };
  35. </script>
  36. <script type="text/javascript" src="./resource/js/lib/jquery-1.11.1.min.js"></script>
  37. <script type="text/javascript" src="./resource/js/lib/bootstrap.min.js"></script>
  38. <script type="text/javascript" src="./resource/js/app/util.js?v=201903260001"></script>
  39. <script type="text/javascript" src="./resource/js/app/common.min.js?v=201903260001"></script>
  40. <script type="text/javascript" src="./resource/js/require.js?v=201903260001"></script>
  41. <script type="text/javascript" src="./resource/js/lib/jquery.nice-select.js?v=201903260001"></script>
  42. <link rel="stylesheet" href="/layuiadmin/layui/css/layui.css" media="all">
  43. <link href="/static/css/snailfish.css" rel="stylesheet">
  44. <style>
  45. tbody tr td{
  46. position: relative;
  47. }
  48. tbody tr .icow-weibiaoti--{
  49. visibility: hidden;
  50. display: inline-block;
  51. color: #fff;
  52. height:18px;
  53. width:18px;
  54. background: #e0e0e0;
  55. text-align: center;
  56. line-height: 18px;
  57. vertical-align: middle;
  58. }
  59. tbody tr:hover .icow-weibiaoti--{
  60. visibility: visible;
  61. }
  62. tbody tr .icow-weibiaoti--.hidden{
  63. visibility: hidden !important;
  64. }
  65. .full .icow-weibiaoti--{
  66. margin-left:10px;
  67. }
  68. .full>span{
  69. display: -webkit-box;
  70. display: -webkit-flex;
  71. display: -ms-flexbox;
  72. display: flex;
  73. vertical-align: middle;
  74. align-items: center;
  75. }
  76. tbody tr .label{
  77. margin: 5px 0;
  78. }
  79. .goods_attribute a{
  80. cursor: pointer;
  81. }
  82. .newgoodsflag{
  83. width: 22px;height: 16px;
  84. background-color: #ff0000;
  85. color: #fff;
  86. text-align: center;
  87. position: absolute;
  88. bottom: 70px;
  89. left: 57px;
  90. font-size: 12px;
  91. }
  92. .a{cursor: pointer;}
  93. .img-40 {
  94. width: 40px;
  95. height: 40px;
  96. }
  97. </style>
  98. </head>
  99. <body layadmin-themealias="default">
  100. <table id="demo" lay-filter="test"></table>
  101. <div class="layui-fluid">
  102. <div class="layui-card">
  103. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">配送记录</span></div>
  104. <div class="layui-card-body" style="padding:15px;">
  105. <form action="" method="get" class="form-horizontal form-search layui-form" role="form">
  106. <input type="hidden" name="c" value="orderdistribution" />
  107. <input type="hidden" name="a" value="distribution_list" />
  108. <input type="hidden" name="id" value="{$id}" />
  109. <div class="layui-form-item">
  110. <div class="layui-inline">
  111. <div class="layui-input-inline">
  112. <input type="text" class="layui-input" name='order_no' value="{$order_no}" placeholder="请输入订单编号">
  113. </div>
  114. <div class="layui-input-inline">
  115. <button class="layui-btn layui-btn-sm" type="submit"> 搜索</button>
  116. </div>
  117. </div>
  118. </div>
  119. </form>
  120. <form action="" class="layui-form" lay-filter="example" method="post" >
  121. <div class="row">
  122. <div class="col-md-12">
  123. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  124. <thead>
  125. <tr>
  126. <th style="width:60px;">排序</th>
  127. <th style="width: 150px;">配送员姓名</th>
  128. <th style="width: 150px;">订单编号</th>
  129. <th style="width: 100px;">订单状态</th>
  130. <th style="width: 150px;">下单时间</th>
  131. <th style="width: 150px;">抢单时间</th>
  132. <th style="width: 150px;">取货时间</th>
  133. <th style="width: 150px">完成时间</th>
  134. <th style="width: 100px">配送佣金</th>
  135. <th style="width: 100px">佣金状态</th>
  136. </tr>
  137. </thead>
  138. <tbody>
  139. <?php if(!empty($list)){ ?>
  140. <?php foreach( $list as $row ){ ?>
  141. <tr>
  142. <td>
  143. {$row['id']}
  144. </td>
  145. <td >{$row['username']}</td>
  146. <td >
  147. <a href="{:U('order/detail', array('id' => $row['order_id']))}" style="color:#428bca;">{$row['order_num_alias']}</a>
  148. </td>
  149. <td>
  150. <?php
  151. if($row['state'] == 2 || $row['state'] == 3){
  152. echo '配送中';
  153. }else if($row['state'] == 4){
  154. echo '已完成';
  155. }else if($row['state'] == 5){
  156. echo '已取消';
  157. }
  158. ?>
  159. </td>
  160. <td >{$row['date_added']}</td>
  161. <td >{$row['rob_time']}</td>
  162. <td >{$row['receive_time']}</td>
  163. <td >{$row['finish_time']}</td>
  164. <td style="color:red;">¥{$row['shipping_money']}</td>
  165. <td style="">
  166. <?php
  167. if($row['is_statement'] == 1){
  168. echo '已结算';
  169. }else{
  170. echo '未结算';
  171. }
  172. ?>
  173. </td>
  174. </tr>
  175. <?php } ?>
  176. <?php }else{ ?>
  177. <tr>
  178. <td colspan="10" style="text-align: center">
  179. 暂无数据!
  180. </td>
  181. </tr>
  182. <?php }?>
  183. </tbody>
  184. <tfoot>
  185. <tr>
  186. <td colspan="10" style="text-align: right">
  187. {$pager}
  188. </td>
  189. </tr>
  190. </tfoot>
  191. </table>
  192. </div>
  193. </div>
  194. </form>
  195. </div>
  196. </div>
  197. </div>
  198. <script src="/layuiadmin/layui/layui.js"></script>
  199. <script>
  200. layui.config({
  201. base: '/layuiadmin/' //静态资源所在路径
  202. }).extend({
  203. index: 'lib/index' //主入口模块
  204. }).use('index');
  205. </script>
  206. <script>
  207. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  208. var layer = layui.layer;
  209. var $;
  210. layui.use(['jquery', 'layer','form'], function(){
  211. $ = layui.$;
  212. var form = layui.form;
  213. $('.deldom').click(function(){
  214. var s_url = $(this).attr('data-href');
  215. layer.confirm($(this).attr('data-confirm'), function(index){
  216. $.ajax({
  217. url:s_url,
  218. type:'post',
  219. dataType:'json',
  220. success:function(info){
  221. if(info.status == 0)
  222. {
  223. layer.msg(info.result.message,{icon: 1,time: 2000});
  224. }else if(info.status == 1){
  225. var go_url = location.href;
  226. if( info.result.hasOwnProperty("url") )
  227. {
  228. go_url = info.result.url;
  229. }
  230. layer.msg('操作成功',{time: 1000,
  231. end:function(){
  232. location.href = info.result.url;
  233. }
  234. });
  235. }
  236. }
  237. })
  238. });
  239. })
  240. $('.btn-operation').click(function(){
  241. var ids_arr = [];
  242. var obj = $(this);
  243. var s_toggle = $(this).attr('data-toggle');
  244. var s_url = $(this).attr('data-href');
  245. $("input[name=item_checkbox]").each(function() {
  246. if( $(this).prop('checked') )
  247. {
  248. ids_arr.push( $(this).val() );
  249. }
  250. })
  251. if(ids_arr.length < 1)
  252. {
  253. layer.msg('请选择要操作的内容');
  254. }else{
  255. var can_sub = true;
  256. if( s_toggle == 'batch-remove' )
  257. {
  258. can_sub = false;
  259. layer.confirm($(obj).attr('data-confirm'), function(index){
  260. $.ajax({
  261. url:s_url,
  262. type:'post',
  263. dataType:'json',
  264. data:{ids:ids_arr},
  265. success:function(info){
  266. if(info.status == 0)
  267. {
  268. layer.msg(info.result.message,{icon: 1,time: 2000});
  269. }else if(info.status == 1){
  270. var go_url = location.href;
  271. if( info.result.hasOwnProperty("url") )
  272. {
  273. go_url = info.result.url;
  274. }
  275. layer.msg('操作成功',{time: 1000,
  276. end:function(){
  277. location.href = info.result.url;
  278. }
  279. });
  280. }
  281. }
  282. })
  283. });
  284. }else{
  285. $.ajax({
  286. url:s_url,
  287. type:'post',
  288. dataType:'json',
  289. data:{ids:ids_arr},
  290. success:function(info){
  291. if(info.status == 0)
  292. {
  293. layer.msg(info.result.message,{icon: 1,time: 2000});
  294. }else if(info.status == 1){
  295. var go_url = location.href;
  296. if( info.result.hasOwnProperty("url") )
  297. {
  298. go_url = info.result.url;
  299. }
  300. layer.msg('操作成功',{time: 1000,
  301. end:function(){
  302. location.href = info.result.url;
  303. }
  304. });
  305. }
  306. }
  307. })
  308. }
  309. }
  310. })
  311. form.on('switch(statewsitch)', function(data){
  312. var s_url = $(this).attr('data-href')
  313. var s_value = 1;
  314. if(data.elem.checked)
  315. {
  316. s_value = 1;
  317. }else{
  318. s_value = 0;
  319. }
  320. $.ajax({
  321. url:s_url,
  322. type:'post',
  323. dataType:'json',
  324. data:{value:s_value},
  325. success:function(info){
  326. if(info.status == 0)
  327. {
  328. layer.msg(info.result.message,{icon: 1,time: 2000});
  329. }else if(info.status == 1){
  330. var go_url = location.href;
  331. if( info.result.hasOwnProperty("url") )
  332. {
  333. go_url = info.result.url;
  334. }
  335. layer.msg('操作成功',{time: 1000,
  336. end:function(){
  337. location.href = info.result.url;
  338. }
  339. });
  340. }
  341. }
  342. })
  343. });
  344. form.on('checkbox(checkboxall)', function(data){
  345. if(data.elem.checked)
  346. {
  347. $("input[name=item_checkbox]").each(function() {
  348. $(this).prop("checked", true);
  349. });
  350. $("input[name=checkall]").each(function() {
  351. $(this).prop("checked", true);
  352. });
  353. }else{
  354. $("input[name=item_checkbox]").each(function() {
  355. $(this).prop("checked", false);
  356. });
  357. $("input[name=checkall]").each(function() {
  358. $(this).prop("checked", false);
  359. });
  360. }
  361. form.render('checkbox');
  362. });
  363. //监听提交
  364. form.on('submit(formDemo)', function(data){
  365. $.ajax({
  366. url: data.form.action,
  367. type: data.form.method,
  368. data: data.field,
  369. dataType:'json',
  370. success: function (info) {
  371. if(info.status == 0)
  372. {
  373. layer.msg(info.result.message,{icon: 1,time: 2000});
  374. }else if(info.status == 1){
  375. var go_url = location.href;
  376. if( info.result.hasOwnProperty("url") )
  377. {
  378. go_url = info.result.url;
  379. }
  380. layer.msg('操作成功',{time: 1000,
  381. end:function(){
  382. location.href = info.result.url;
  383. }
  384. });
  385. }
  386. }
  387. });
  388. return false;
  389. });
  390. })
  391. </script>
  392. <script>
  393. var ajax_url = "";
  394. $(function(){
  395. $(".ajaxModal").click(function () {
  396. var s_url = $(this).attr('data-href');
  397. ajax_url = s_url;
  398. $.ajax({
  399. url:s_url,
  400. type:"get",
  401. success:function(shtml){
  402. $('#ajaxModal').html(shtml);
  403. $("#ajaxModal").modal();
  404. }
  405. })
  406. });
  407. $(document).delegate(".modal-footer .btn-primary","click",function(){
  408. var s_data = $('#ajaxModal form').serialize();
  409. $.ajax({
  410. url:ajax_url,
  411. type:'post',
  412. dataType:'json',
  413. data:s_data,
  414. success:function(info){
  415. if(info.status == 0)
  416. {
  417. layer.msg(info.result.message,{icon: 1,time: 2000});
  418. }else if(info.status == 1){
  419. var go_url = location.href;
  420. if( info.result.hasOwnProperty("url") )
  421. {
  422. go_url = info.result.url;
  423. }
  424. layer.msg('操作成功',{time: 1000,
  425. end:function(){
  426. location.href = info.result.url;
  427. }
  428. });
  429. }
  430. }
  431. })
  432. return false;
  433. })
  434. })
  435. </script>
  436. <div id="ajaxModal" class="modal fade" style="display: none;">
  437. </div>
  438. </body>