e77066148f19aa4e9ebaa215936c1470.php 12 KB

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