list_goodslist.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  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. </style>
  94. </head>
  95. <body layadmin-themealias="default">
  96. <div class="layui-fluid">
  97. <div class="layui-card">
  98. <div class="layui-card-header layui-elem-quote">当前位置:<span class="line-text">配送单商品管理</span></div>
  99. <div class="layui-card-body" style="padding:15px;">
  100. <div class="page-content">
  101. <h3 class="order-title">配送信息</h3>
  102. <table class="layui-table">
  103. <thead>
  104. <tr class="trorder" style="background: #fff">
  105. <th class="" style="width: 175px;text-align: left;padding-right: 0">
  106. 团长名称
  107. </th>
  108. <th style="">
  109. 团长电话
  110. </th>
  111. <th style="padding-left: 20px">配送员</th>
  112. <th style="padding-left: 20px">路径信息</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. <tr class="trorder" style="background: #fff">
  117. <td style="text-align: left;padding-right: 0">
  118. {$list_info['head_name']}
  119. </td>
  120. <td style="">
  121. {$list_info['head_mobile']}
  122. </td>
  123. <td style="padding: 10px 20px">
  124. <p style="white-space:normal;">
  125. {$list_info['clerk_name']}
  126. </p>
  127. <p>
  128. {$list_info['clerk_mobile']}
  129. </p>
  130. </td>
  131. <td style="padding: 10px 20px">
  132. <p style="white-space:normal;">
  133. {$list_info['line_name']}
  134. </p>
  135. </td>
  136. </tr>
  137. </tbody>
  138. </table>
  139. <div style="text-align:right;">
  140. <a href="{:U('delivery/downexcel', array('list_id' => $list_id))}" target="_blank" class="btn btn-primary">导出配货单</a>
  141. </div>
  142. <form action="" method="post" class="layui-form" >
  143. <div class="row">
  144. <div class="col-md-12">
  145. <div class="page-table-header">
  146. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  147. </div>
  148. <table class="table table-responsive">
  149. <thead>
  150. <tr>
  151. <th style="width:25px;"></th>
  152. <th style="width:100px;text-align:center;">ID</th>
  153. <th style="">&nbsp;</th>
  154. <th style="">商品名称</th>
  155. <th style="width: 100px;">商品规格</th>
  156. <th style="width: 100px;">商品数量</th>
  157. </tr>
  158. </thead>
  159. <tbody>
  160. <?php foreach( $list as $item ){ ?>
  161. <tr>
  162. <td style="width:25px;">
  163. <input type='checkbox' value="{$item['id']}" name="item_checkbox" lay-skin="primary" />
  164. </td>
  165. <td style="width:100px;text-align:center;">
  166. {$item['id']}
  167. </td>
  168. <td>
  169. <img src="{:tomedia($item['goods_image'])}" style="width:72px;height:72px;padding:1px;border:1px solid #efefef;margin: 7px 0" onerror="this.src='/static/images/nopic.png'" />
  170. </td>
  171. <td class='full' >
  172. {$item['goods_name']}
  173. </td>
  174. <td>
  175. {$item['sku_str']}
  176. </td>
  177. <td>
  178. {$item['goods_count']}
  179. </td>
  180. </tr>
  181. <?php } ?>
  182. </tbody>
  183. <tfoot>
  184. <tr>
  185. <td colspan="3" style="padding-left: 0;">
  186. <div class="page-table-header">
  187. <input type="checkbox" name="checkall" lay-skin="primary" lay-filter="checkboxall" >
  188. </div>
  189. </td>
  190. <td colspan="3" style="text-align: right">
  191. {$pager}
  192. </td>
  193. </tr>
  194. </tfoot>
  195. </table>
  196. </div>
  197. </div>
  198. </form>
  199. </div>
  200. </div>
  201. </div>
  202. </div>
  203. <script src="/layuiadmin/layui/layui.js"></script>
  204. <script>
  205. layui.config({
  206. base: '/layuiadmin/' //静态资源所在路径
  207. }).extend({
  208. index: 'lib/index' //主入口模块
  209. }).use('index');
  210. </script>
  211. <script>
  212. var layer = layui.layer;
  213. var $;
  214. layui.use(['jquery', 'layer','form'], function(){
  215. $ = layui.$;
  216. var form = layui.form;
  217. $('.deldom').click(function(){
  218. var s_url = $(this).attr('data-href');
  219. layer.confirm($(this).attr('data-confirm'), function(index){
  220. $.ajax({
  221. url:s_url,
  222. type:'post',
  223. dataType:'json',
  224. success:function(info){
  225. if(info.status == 0)
  226. {
  227. layer.msg(info.result.message,{icon: 1,time: 2000});
  228. }else if(info.status == 1){
  229. var go_url = location.href;
  230. if( info.result.hasOwnProperty("url") )
  231. {
  232. go_url = info.result.url;
  233. }
  234. layer.msg('操作成功',{time: 1000,
  235. end:function(){
  236. location.href = info.result.url;
  237. }
  238. });
  239. }
  240. }
  241. })
  242. });
  243. })
  244. $('.btn-operation').click(function(){
  245. var ids_arr = [];
  246. var obj = $(this);
  247. var s_toggle = $(this).attr('data-toggle');
  248. var s_url = $(this).attr('data-href');
  249. $("input[name=item_checkbox]").each(function() {
  250. if( $(this).prop('checked') )
  251. {
  252. ids_arr.push( $(this).val() );
  253. }
  254. })
  255. if(ids_arr.length < 1)
  256. {
  257. layer.msg('请选择要操作的内容');
  258. }else{
  259. var can_sub = true;
  260. if( s_toggle == 'batch-remove' )
  261. {
  262. can_sub = false;
  263. layer.confirm($(obj).attr('data-confirm'), function(index){
  264. $.ajax({
  265. url:s_url,
  266. type:'post',
  267. dataType:'json',
  268. data:{ids:ids_arr},
  269. success:function(info){
  270. if(info.status == 0)
  271. {
  272. layer.msg(info.result.message,{icon: 1,time: 2000});
  273. }else if(info.status == 1){
  274. var go_url = location.href;
  275. if( info.result.hasOwnProperty("url") )
  276. {
  277. go_url = info.result.url;
  278. }
  279. layer.msg('操作成功',{time: 1000,
  280. end:function(){
  281. location.href = info.result.url;
  282. }
  283. });
  284. }
  285. }
  286. })
  287. });
  288. }else{
  289. $.ajax({
  290. url:s_url,
  291. type:'post',
  292. dataType:'json',
  293. data:{ids:ids_arr},
  294. success:function(info){
  295. if(info.status == 0)
  296. {
  297. layer.msg(info.result.message,{icon: 1,time: 2000});
  298. }else if(info.status == 1){
  299. var go_url = location.href;
  300. if( info.result.hasOwnProperty("url") )
  301. {
  302. go_url = info.result.url;
  303. }
  304. layer.msg('操作成功',{time: 1000,
  305. end:function(){
  306. location.href = info.result.url;
  307. }
  308. });
  309. }
  310. }
  311. })
  312. }
  313. }
  314. })
  315. form.on('switch(statewsitch)', function(data){
  316. var s_url = $(this).attr('data-href')
  317. var s_value = 1;
  318. if(data.elem.checked)
  319. {
  320. s_value = 1;
  321. }else{
  322. s_value = 0;
  323. }
  324. $.ajax({
  325. url:s_url,
  326. type:'post',
  327. dataType:'json',
  328. data:{state:s_value},
  329. success:function(info){
  330. if(info.status == 0)
  331. {
  332. layer.msg(info.result.message,{icon: 1,time: 2000});
  333. }else if(info.status == 1){
  334. var go_url = location.href;
  335. if( info.result.hasOwnProperty("url") )
  336. {
  337. go_url = info.result.url;
  338. }
  339. layer.msg('操作成功',{time: 1000,
  340. end:function(){
  341. location.href = info.result.url;
  342. }
  343. });
  344. }
  345. }
  346. })
  347. });
  348. form.on('checkbox(checkboxall)', function(data){
  349. if(data.elem.checked)
  350. {
  351. $("input[name=item_checkbox]").each(function() {
  352. $(this).prop("checked", true);
  353. });
  354. $("input[name=checkall]").each(function() {
  355. $(this).prop("checked", true);
  356. });
  357. }else{
  358. $("input[name=item_checkbox]").each(function() {
  359. $(this).prop("checked", false);
  360. });
  361. $("input[name=checkall]").each(function() {
  362. $(this).prop("checked", false);
  363. });
  364. }
  365. form.render('checkbox');
  366. });
  367. //监听提交
  368. form.on('submit(formDemo)', function(data){
  369. $.ajax({
  370. url: data.form.action,
  371. type: data.form.method,
  372. data: data.field,
  373. dataType:'json',
  374. success: function (info) {
  375. if(info.status == 0)
  376. {
  377. layer.msg(info.result.message,{icon: 1,time: 2000});
  378. }else if(info.status == 1){
  379. var go_url = location.href;
  380. if( info.result.hasOwnProperty("url") )
  381. {
  382. go_url = info.result.url;
  383. }
  384. layer.msg('操作成功',{time: 1000,
  385. end:function(){
  386. location.href = info.result.url;
  387. }
  388. });
  389. }
  390. }
  391. });
  392. return false;
  393. });
  394. })
  395. </script>
  396. </body>
  397. </html>