goods_communityhead.html 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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="goods" />
  107. <input type="hidden" name="a" value="goods_head" />
  108. <input type="hidden" name="id" value="{$goods_info.id}" />
  109. <div class="layui-form-item">
  110. <div class="layui-inline">
  111. <div class="layui-input-inline" style="width: 300px">
  112. <input type="text" class="layui-input" name='keyword' value="{$keyword}" 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. <div class="page-table-header">
  124. <div class="btn-group">
  125. <button class="layui-btn layui-btn-sm allBtn" type="button" data-href="{:U('goods/all_goods_head', array('goods_id'=>$goods_info['id'], 'ok' => 1))}" data-confirm="确定所有的团长可售卖该商品吗?">
  126. 所有团长可售
  127. </button>
  128. <div class="layui-input-inline" style="margin-left: 50px;">
  129. 部分团长可售商品:<span style="color:#428bca">{$goods_info.goodsname}</span>
  130. </div>
  131. </div>
  132. </div>
  133. <table class="table table-responsive" lay-even lay-skin="line" lay-size="lg">
  134. <thead>
  135. <tr>
  136. <th style="width:25px;">
  137. <input type='checkbox' name="checkall" lay-skin="primary" lay-filter="checkboxall" />
  138. </th>
  139. <th>团长昵称</th>
  140. <th>团长名称</th>
  141. <th>团长电话</th>
  142. <th>小区名称</th>
  143. <th>小区地址</th>
  144. <th style="width:165px;text-align: center;">操作</th>
  145. </tr>
  146. </thead>
  147. <tbody>
  148. <?php foreach( $list as $row ){ ?>
  149. <tr>
  150. <td>
  151. <input type='checkbox' name="item_checkbox" lay-skin="primary" value="{$row['id']}"/>
  152. </td>
  153. <td><img class="img-40" src="{$row['avatar']}" style='border-radius:50%;border:1px solid #efefef;' />&nbsp;{$row['username']}</td>
  154. <td>{$row['head_name']}</td>
  155. <td>{$row['head_mobile']}</td>
  156. <td>{$row['community_name']}</td>
  157. <td>{$row['address']}</td>
  158. <td style="text-align: center;">
  159. <a href="javascript:void(0)" class='layui-btn layui-btn-xs cancelBtn' data-href="{:U('goods/cancel_goods_head', array('id' => $row['hg_id'],'goods_id'=>$goods_info['id'], 'ok' => 1))}" data-confirm="取消售卖后,该商品将不属于该团长,确定取消售卖吗?">
  160. 取消售卖
  161. </a>
  162. </td>
  163. </tr>
  164. <?php } ?>
  165. </tbody>
  166. <tfoot>
  167. <tr>
  168. <td colspan="7" style="text-align: right">
  169. {$pager}
  170. </td>
  171. </tr>
  172. </tfoot>
  173. </table>
  174. </div>
  175. </div>
  176. </form>
  177. </div>
  178. </div>
  179. </div>
  180. <script src="/layuiadmin/layui/layui.js"></script>
  181. <script>
  182. layui.config({
  183. base: '/layuiadmin/' //静态资源所在路径
  184. }).extend({
  185. index: 'lib/index' //主入口模块
  186. }).use('index');
  187. </script>
  188. <script>
  189. //由于模块都一次性加载,因此不用执行 layui.use() 来加载对应模块,直接使用即可:
  190. var layer = layui.layer;
  191. var $;
  192. layui.use(['jquery', 'layer','form'], function(){
  193. $ = layui.$;
  194. var form = layui.form;
  195. $('.cancelBtn').click(function(){
  196. var s_url = $(this).attr('data-href');
  197. layer.confirm($(this).attr('data-confirm'), function(index){
  198. $.ajax({
  199. url:s_url,
  200. type:'post',
  201. dataType:'json',
  202. success:function(info){
  203. if(info.status == 0)
  204. {
  205. layer.msg(info.result.message,{icon: 1,time: 2000});
  206. }else if(info.status == 1){
  207. layer.msg('操作成功',{time: 1000,
  208. end:function(){
  209. location.href = info.result.url;
  210. }
  211. });
  212. }
  213. }
  214. })
  215. });
  216. });
  217. $('.allBtn').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. layer.msg('操作成功',{time: 1000,
  230. end:function(){
  231. location.href = info.result.url;
  232. }
  233. });
  234. }
  235. }
  236. })
  237. });
  238. });
  239. form.on('checkbox(checkboxall)', function(data){
  240. if(data.elem.checked)
  241. {
  242. $("input[name=item_checkbox]").each(function() {
  243. $(this).prop("checked", true);
  244. });
  245. $("input[name=checkall]").each(function() {
  246. $(this).prop("checked", true);
  247. });
  248. }else{
  249. $("input[name=item_checkbox]").each(function() {
  250. $(this).prop("checked", false);
  251. });
  252. $("input[name=checkall]").each(function() {
  253. $(this).prop("checked", false);
  254. });
  255. }
  256. form.render('checkbox');
  257. });
  258. })
  259. </script>
  260. </body>