groupgoods.html 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599
  1. {template 'public/header'}
  2. {template 'public/comhead'}
  3. <link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcsslist.css">
  4. <style type="text/css">
  5. .ygrow{margin-top: 20px;font-size: 12px;}
  6. .ygmartop{margin-top: 30px;font-size: 12px;}
  7. .ygmartop2{margin-bottom: 10px;}
  8. .yg5_key>div{float: left;line-height: 34px;}
  9. .store_td1{height: 45px;}
  10. .store_list_img{width: 60px;height: 60px;}
  11. .yg5_tabel{border-color: #e5e5e5;outline: 1px solid #e5e5e5;}
  12. .yg5_tr2>td{padding: 15px;border: 1px solid #e5e5e5;text-align: center;background-color: white;}
  13. .yg5_tr1>td{
  14. border: 1px solid #e5e5e5;
  15. padding-left: 15px;
  16. background-color: #FAFAFA;
  17. font-weight: bold;
  18. text-align: center;
  19. }
  20. .yg5_btn{background-color: #EEEEEE;color: #333;border: 1px solid #E4E4E4;border-radius: 6px;width: 100px;height: 34px;}
  21. .yg5_btn2{background-color: white;color: #333;border: 1px solid white;border-radius: 6px;width: 100px;height: 34px;}
  22. .yg13_img{width: 50px;height: 50px;border-radius: 4px;}
  23. .yg_name{width: 30%;height: 34px;line-height: 34px;color: #333;float: left;background-color: white;border: 1px solid #E4E4E4;text-align: center;}
  24. .yg_left{float: left;}
  25. .form-control{width: 70%;}
  26. .ygseledi{width: 60%;}
  27. .dishes{display: flex;align-items: center;}
  28. .dishes_font{font-size: 20px;}
  29. .dishes_inp{width: 195px;height: 23px;border: none;}
  30. .dishes_inp2{margin-right: 20px;}
  31. .input_box{border: 2px solid #5bc0de;border-radius: 4px;padding: 5px;margin-right: 10px;background-color: #5bc0de;color: white;}
  32. .store_inp{margin-left: 5px;}
  33. .dish_left{margin-right: 20px;}
  34. .dish_btn>button,.dish_btn>a{margin-bottom: 10px;}
  35. .ygboxl{margin-bottom: 15px;}
  36. /*.ygboxl>.input-group{border:1px solid green;}*/
  37. </style>
  38. <ul class="nav nav-tabs">
  39. <span class="ygxian"></span>
  40. <div class="ygdangq">当前位置:</div>
  41. <li {if $type=='all'} class="active" {/if}><a href="{php echo $this->createWebUrl('groupgoods',array('type'=>all));}">全部商品</a></li>
  42. <li {if $type=='wait'} class="active" {/if}><a href="{php echo $this->createWebUrl('groupgoods',array('type'=>wait,'state'=>1));}">待审核</a></li>
  43. <li {if $type=='ok'} class="active" {/if}><a href="{php echo $this->createWebUrl('groupgoods',array('type'=>ok,'state'=>2));}">已确认</a></li>
  44. <li {if $type=='no'} class="active" {/if}><a href="{php echo $this->createWebUrl('groupgoods',array('type'=>no,'state'=>3));}">已拒绝</a></li>
  45. </ul>
  46. <div class="row ygmartop">
  47. <form action="" method="get" class="col-md-12" style="padding: 0px;">
  48. <div class="col-md-12 ygboxl">
  49. <input type="hidden" name="c" value="site" />
  50. <input type="hidden" name="a" value="entry" />
  51. <input type="hidden" name="m" value="zh_tcwq" />
  52. <input type="hidden" name="do" value="groupgoods" />
  53. <div class="col-md-2" style="padding: 0px;">
  54. <div class="yg_name">商品/门店</div>
  55. <input type="text" name="keywords" class="yg_left form-control" placeholder="商品/门店名称">
  56. </div>
  57. <div class="col-md-3">
  58. <div class="yg_name">
  59. 商品状态
  60. </div>
  61. <select class="ygseledi" style="color: #333;" name="is_shelves2">
  62. <option value="">不限</option>
  63. <option value="1">已上架</option>
  64. <option value="2">已下架</option>
  65. </select>
  66. </div>
  67. <div class="col-md-3">
  68. <div class="yg_name">
  69. 商品分类
  70. </div>
  71. <select class="ygseledi" style="color: #333;" name="type_id">
  72. <option value="">不限</option>
  73. {loop $types $item2}
  74. <option value="{$item2['id']}">{$item2['name']}</option>
  75. {/loop}
  76. </select>
  77. </div>
  78. <div class="col-md-1">
  79. <input type="submit" value="搜索" name="submit" class="btn btn-primary btn-sm"/>
  80. <input type="hidden" name="token" value="{$_W['token']}"/>
  81. </div>
  82. </div>
  83. </form>
  84. </div>
  85. <div class="dishes">
  86. <button class="btn ygyouhui2 dish_left" id="allshang">批量上架</button>
  87. <button class="btn storegrey2 dish_left" id="alldown">批量下架</button>
  88. <button class="btn ygshouqian2 dish_left" id="allselect">批量删除</button>
  89. </div>
  90. <div class="main">
  91. <div class="panel panel-default">
  92. <div class="panel-heading">
  93. 商品列表
  94. </div>
  95. <div class="panel-body" style="padding: 0px 15px;">
  96. <div class="row">
  97. <table class="yg5_tabel col-md-12">
  98. <tr class="yg5_tr1">
  99. <td class="store_td1 col-md-1">
  100. <input type="checkbox" class="allcheck" />
  101. <span class="store_inp">全选</span>
  102. </td>
  103. <td class="">所属商家/城市</td>
  104. <td class="">商品图片</td>
  105. <td class="">商品名称</td>
  106. <td class="col-md-1">分类</td>
  107. <td class="col-md-1">拼团价格</td>
  108. <td class="col-md-1">单独够价格</td>
  109. <td class="col-md-1">开团人数</td>
  110. <!-- <td class="col-md-1">库存</td>
  111. <td class="col-md-1">总销量</td> -->
  112. <td class="col-md-1">平台显示</td>
  113. <td class="col-md-1">是否上架</td>
  114. <td class="col-md-1">状态</td>
  115. <td class="col-md-2">操作</td>
  116. </tr>
  117. {loop $list $key $item}
  118. <tr class="yg5_tr2">
  119. <td>
  120. <input type="checkbox" name="test" value="{$item['id']}">
  121. </td>
  122. <td class="store_td1 col-md-1"> {$item['store_name']}{if $item['cityname']}({$item['cityname']}){else}(全国版){/if}</td>
  123. <td class="store_td1 col-md-1"> <img class="store_list_img" src="{media $item['logo']}" alt=""/></td>
  124. <td class="col-md-1 cainame{$item['id']}">
  125. <span class="caispan{$item['id']}">{$item['name']}</span>
  126. <input style="display: none;width: 100%;" name="inp{$item['id']}" type="text" value="{$item['name']}" class="caininp{$item['id']}"/>
  127. <script type="text/javascript">
  128. $(function(){
  129. $(".cainame{$item['id']}").each(function(index){
  130. $(this).dblclick(function(){
  131. $(".caininp{$item['id']}").eq(index).show().focus();
  132. $(".caispan{$item['id']}").eq(index).hide();
  133. });
  134. });
  135. $(".caininp{$item['id']}").each(function(index){
  136. $(this).blur(function(){
  137. $(".caininp{$item['id']}").eq(index).hide();
  138. $(".caispan{$item['id']}").eq(index).show();
  139. var text = $(".caispan{$item['id']}").html();
  140. var inp = $(" input[ name='inp{$item['id']}' ] ").val();
  141. $(".caispan{$item['id']}").html(inp);
  142. // console.log(inp);
  143. id = {$item['id']};
  144. name = inp;
  145. $.ajax({
  146. type:"post",
  147. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  148. dataType:"text",
  149. data:{id:id,name:name},
  150. success:function(data){
  151. console.log(data);
  152. }
  153. })
  154. });
  155. });
  156. })
  157. </script>
  158. </td>
  159. <td class="col-md-1"> {$item['type_name']}</td>
  160. <td class="col-md-1 money{$item['id']}">
  161. <span class="moneyspan{$item['id']}">{$item['pt_price']}</span>
  162. <input style="display: none;width: 100%;" type="text" name="money{$item['id']}" class="moneyinp{$item['id']}" value="{$item['money']}" />
  163. <script type="text/javascript">
  164. $(function(){
  165. $(".money{$item['id']}").each(function(index){
  166. $(this).dblclick(function(){
  167. $(".moneyinp{$item['id']}").eq(index).show().focus();
  168. $(".moneyspan{$item['id']}").eq(index).hide();
  169. });
  170. });
  171. $(".moneyinp{$item['id']}").each(function(index){
  172. $(this).blur(function(){
  173. $(".moneyinp{$item['id']}").eq(index).hide();
  174. $(".moneyspan{$item['id']}").eq(index).show();
  175. var text = $(".moneyspan{$item['id']}").html();
  176. var inp = $(" input[ name='money{$item['id']}' ] ").val();
  177. $(".moneyspan{$item['id']}").html(inp);
  178. // console.log(inp);
  179. id = {$item['id']};
  180. money = inp;
  181. $.ajax({
  182. type:"post",
  183. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  184. dataType:"text",
  185. data:{id:id,money:money},
  186. success:function(data){
  187. console.log(data);
  188. }
  189. })
  190. });
  191. });
  192. })
  193. </script>
  194. </td>
  195. <td class="col-md-1 wm_money{$item['id']}">
  196. <span class="wmspan{$item['id']}">{$item['dd_price']}</span>
  197. <input style="display: none;width: 100%;" type="text" name="wmoney{$item['id']}" class="wmoney{$item['id']}" value="{$item['wm_money']}">
  198. <script type="text/javascript">
  199. $(function(){
  200. $(".wm_money{$item['id']}").each(function(index){
  201. $(this).dblclick(function(){
  202. $(".wmoney{$item['id']}").eq(index).show().focus();
  203. $(".wmspan{$item['id']}").eq(index).hide();
  204. });
  205. });
  206. $(".wmoney{$item['id']}").each(function(index){
  207. $(this).blur(function(){
  208. $(".wmoney{$item['id']}").eq(index).hide();
  209. $(".wmspan{$item['id']}").eq(index).show();
  210. var text = $(".wmspan{$item['id']}").html();
  211. var inp = $(" input[ name='wmoney{$item['id']}' ] ").val();
  212. $(".wmspan{$item['id']}").html(inp);
  213. // console.log(inp);
  214. id = {$item['id']};
  215. wm_money = inp;
  216. $.ajax({
  217. type:"post",
  218. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  219. dataType:"text",
  220. data:{id:id,wm_money:wm_money},
  221. success:function(data){
  222. console.log(data);
  223. }
  224. })
  225. });
  226. });
  227. })
  228. </script>
  229. </td>
  230. <td class="col-md-1 box_fee{$item['id']}">
  231. <span class="boxspan{$item['id']}">{$item['people']}</span>
  232. <input style="display: none;width: 100%;" type="text" name="boxinp{$item['id']}" class="boxinp{$item['id']}" value="{$item['people']}">
  233. <script type="text/javascript">
  234. $(function(){
  235. $(".box_fee{$item['id']}").each(function(index){
  236. $(this).dblclick(function(){
  237. $(".boxinp{$item['id']}").eq(index).show().focus();
  238. $(".boxspan{$item['id']}").eq(index).hide();
  239. });
  240. });
  241. $(".boxinp{$item['id']}").each(function(index){
  242. $(this).blur(function(){
  243. $(".boxinp{$item['id']}").eq(index).hide();
  244. $(".boxspan{$item['id']}").eq(index).show();
  245. var text = $(".boxspan{$item['id']}").html();
  246. var inp = $(" input[ name='boxinp{$item['id']}' ] ").val();
  247. $(".boxspan{$item['id']}").html(inp);
  248. // console.log(inp);
  249. id = {$item['id']};
  250. box_fee = inp;
  251. $.ajax({
  252. type:"post",
  253. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  254. dataType:"text",
  255. data:{id:id,box_fee:box_fee},
  256. success:function(data){
  257. console.log(data);
  258. }
  259. })
  260. });
  261. });
  262. })
  263. </script>
  264. </td>
  265. <!-- <td class="col-md-1 num{$item['id']}">
  266. <span class="numspan{$item['id']}">{$item['inventory']}</span>
  267. <input style="display: none;width: 100%;" type="text" name="numinp{$item['id']}" class="numinp{$item['id']}" value="{$item['num']}">
  268. <script type="text/javascript">
  269. $(function(){
  270. $(".num{$item['id']}").each(function(index){
  271. $(this).dblclick(function(){
  272. $(".numinp{$item['id']}").eq(index).show().focus();
  273. $(".numspan{$item['id']}").eq(index).hide();
  274. });
  275. });
  276. $(".numinp{$item['id']}").each(function(index){
  277. $(this).blur(function(){
  278. $(".numinp{$item['id']}").eq(index).hide();
  279. $(".numspan{$item['id']}").eq(index).show();
  280. var text = $(".numspan{$item['id']}").html();
  281. var inp = $(" input[ name='numinp{$item['id']}' ] ").val();
  282. $(".numspan{$item['id']}").html(inp);
  283. // console.log(inp);
  284. id = {$item['id']};
  285. num = inp;
  286. $.ajax({
  287. type:"post",
  288. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  289. dataType:"text",
  290. data:{id:id,num:num},
  291. success:function(data){
  292. console.log(data);
  293. }
  294. })
  295. });
  296. });
  297. })
  298. </script>
  299. </td>
  300. <td class="col-md-1 xs_num{$item['id']}">
  301. <span class="xspan{$item['id']}">{$item['ysc_num']}</span>
  302. <input style="display: none;width: 100%;" type="text" name="xinp{$item['id']}" class="xinp{$item['id']}" value="{$item['xs_num']}">
  303. <script type="text/javascript">
  304. $(function(){
  305. $(".xs_num{$item['id']}").each(function(index){
  306. $(this).dblclick(function(){
  307. $(".xinp{$item['id']}").eq(index).show().focus();
  308. $(".xspan{$item['id']}").eq(index).hide();
  309. });
  310. });
  311. $(".xinp{$item['id']}").each(function(index){
  312. $(this).blur(function(){
  313. $(".xinp{$item['id']}").eq(index).hide();
  314. $(".xspan{$item['id']}").eq(index).show();
  315. var text = $(".xspan{$item['id']}").html();
  316. var inp = $(" input[ name='xinp{$item['id']}' ] ").val();
  317. $(".xspan{$item['id']}").html(inp);
  318. // console.log(inp);
  319. id = {$item['id']};
  320. xs_num = inp;
  321. $.ajax({
  322. type:"post",
  323. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupupdate&m=zh_tcwq",
  324. dataType:"text",
  325. data:{id:id,xs_num:xs_num},
  326. success:function(data){
  327. console.log(data);
  328. }
  329. })
  330. });
  331. });
  332. })
  333. </script>
  334. </td> -->
  335. <td class="col-md-1 dish_btn">
  336. {if $item['display']==1}
  337. <button type="button" data-toggle="modal" data-target="#myModalo{$item['id']}" class="btn btn-xs storeblue">显示</button>
  338. {elseif $item['display']==2}
  339. <button type="button" data-toggle="modal" data-target="#myModalp{$item['id']}" class="btn btn-xs storegrey">隐藏</button>
  340. {/if}
  341. <input type="hidden" value="{$item['is_shelves']}" name="updtype"/>
  342. </td>
  343. <td class="col-md-1 dish_btn">
  344. {if $item['is_shelves']==1}
  345. <button type="button" data-toggle="modal" data-target="#myModalc{$item['id']}" class="btn btn-xs storeblue">点击下架</button>
  346. {elseif $item['is_shelves']==2}
  347. <button type="button" data-toggle="modal" data-target="#myModalb{$item['id']}" class="btn btn-xs storegrey">点击上架</button>
  348. {/if}
  349. <input type="hidden" value="{$item['is_shelves']}" name="updtype"/>
  350. </td>
  351. {if $item['state']==1}
  352. <td>
  353. <span class="label storered">待审核</span>
  354. </td >
  355. {elseif $item['state']==2}
  356. <td >
  357. <span class="label storeblue">已通过</span>
  358. </td>
  359. {elseif $item['state']==3}
  360. <td>
  361. <span class="label storegrey">已拒绝</span>
  362. </td>
  363. {/if}
  364. <td class="col-md-2 dish_btn">
  365. {if $item['state']==1}
  366. <a href="{php echo $this->createWebUrl('groupgoods',array('op'=>'tg','cid'=>$item['id']));}"><button class="btn storeblue btn-xs">通过</button></a>
  367. <a href="{php echo $this->createWebUrl('groupgoods',array('op'=>'jj','cid'=>$item['id']));}"><button class="btn storegrey btn-xs">拒绝</button></a>
  368. {/if}
  369. <a href="{php echo $this->createWebUrl('groupgoodsinfo', array('id' => $item['id']))}" class="storespan btn btn-xs">
  370. <span class="fa fa-pencil"></span>
  371. <span class="bianji">编辑
  372. <span class="arrowdown"></span>
  373. </span>
  374. </a>
  375. <a href="javascript:void(0);" class="storespan btn btn-xs" data-toggle="modal" data-target="#myModal{$item['id']}">
  376. <span class="fa fa-trash-o"></span>
  377. <span class="bianji">删除
  378. <span class="arrowdown"></span>
  379. </span>
  380. </a>
  381. <!-- <a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('adddishes', array('id' => $item['id']))}" title="编辑">编辑</a>
  382. &nbsp;&nbsp;<a class="btn btn-success btn-sm" href="{php echo $this->createWebUrl('spec',array('dishes_id' => $item['id']));}" title="添加规格">添加规格</a>
  383. &nbsp;&nbsp;<button type="button" class="btn btn-danger btn-sm" data-toggle="modal" data-target="#myModal{$item['id']}">删</button> -->
  384. </td>
  385. </tr>
  386. <div class="modal fade" id="myModal{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  387. <div class="modal-dialog" role="document">
  388. <div class="modal-content">
  389. <div class="modal-header">
  390. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  391. <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
  392. </div>
  393. <div class="modal-body" style="font-size: 20px">
  394. 确定删除么?
  395. </div>
  396. <div class="modal-footer">
  397. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  398. <a href="{php echo $this->createWebUrl('groupgoods', array('op' => 'delete', 'delid' => $item['id']))}" type="button" class="btn btn-info" >确定</a>
  399. </div>
  400. </div>
  401. </div>
  402. </div>
  403. <div class="modal fade" id="myModalo{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  404. <div class="modal-dialog" role="document">
  405. <div class="modal-content">
  406. <div class="modal-header">
  407. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  408. <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
  409. </div>
  410. <div class="modal-body" style="font-size: 20px">
  411. 确定隐藏么?
  412. </div>
  413. <div class="modal-footer">
  414. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  415. <a href="{php echo $this->createWebUrl('groupgoods',array('did'=>$item['id'],'display'=>2,'op' => 'play','page'=>$_GPC['page'],'keywords'=>$_GPC['keywords'],'dishes_type'=>$_GPC['dishes_type'],'type_id'=>$_GPC['type_id']));}" type="button" class="btn btn-info" >确定</a>
  416. </div>
  417. </div>
  418. </div>
  419. </div>
  420. <div class="modal fade" id="myModalp{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  421. <div class="modal-dialog" role="document">
  422. <div class="modal-content">
  423. <div class="modal-header">
  424. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  425. <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
  426. </div>
  427. <div class="modal-body" style="font-size: 20px">
  428. 确定显示么?
  429. </div>
  430. <div class="modal-footer">
  431. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  432. <a href="{php echo $this->createWebUrl('groupgoods',array('did'=>$item['id'],'display'=>1,'op' => 'play','page'=>$_GPC['page'],'keywords'=>$_GPC['keywords'],'dishes_type'=>$_GPC['dishes_type'],'type_id'=>$_GPC['type_id']));}" type="button" class="btn btn-info" >确定</a>
  433. </div>
  434. </div>
  435. </div>
  436. </div>
  437. <div class="modal fade" id="myModalb{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  438. <div class="modal-dialog" role="document">
  439. <div class="modal-content">
  440. <div class="modal-header">
  441. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  442. <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
  443. </div>
  444. <div class="modal-body" style="font-size: 20px">
  445. 确定上架么?
  446. </div>
  447. <div class="modal-footer">
  448. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  449. <a href="{php echo $this->createWebUrl('groupgoods',array('id'=>$item['id'],'is_shelves'=>1,'page'=>$_GPC['page'],'keywords'=>$_GPC['keywords'],'dishes_type'=>$_GPC['dishes_type'],'type_id'=>$_GPC['type_id'],'is_shelves2'=>$_GPC['is_shelves2']));}" type="button" class="btn btn-info" >确定</a>
  450. </div>
  451. </div>
  452. </div>
  453. </div>
  454. <div class="modal fade" id="myModalc{$item['id']}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  455. <div class="modal-dialog" role="document">
  456. <div class="modal-content">
  457. <div class="modal-header">
  458. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  459. <h4 class="modal-title" id="myModalLabel" style="font-size: 20px;">提示</h4>
  460. </div>
  461. <div class="modal-body" style="font-size: 20px">
  462. 确定下架么?
  463. </div>
  464. <div class="modal-footer">
  465. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  466. <a href="{php echo $this->createWebUrl('groupgoods',array('id'=>$item['id'],'is_shelves'=>2,'page'=>$_GPC['page'],'keywords'=>$_GPC['keywords'],'dishes_type'=>$_GPC['dishes_type'],'type_id'=>$_GPC['type_id'],'is_shelves2'=>$_GPC['is_shelves2']));}" type="button" class="btn btn-info" >确定</a>
  467. </div>
  468. </div>
  469. </div>
  470. </div>
  471. {/loop}
  472. {if empty($list)}
  473. <tr class="yg5_tr2">
  474. <td colspan="12">
  475. 暂无商品信息
  476. </td>
  477. </tr>
  478. {/if}
  479. </table>
  480. </div>
  481. </div>
  482. </div>
  483. </div>
  484. <div class="text-right we7-margin-top">{$pager}</div>
  485. <script type="text/javascript">
  486. $(function(){
  487. // $("#frame-2").addClass("in");
  488. $("#frame-22").show();
  489. $("#yframe-22").addClass("wyactive");
  490. // —————批量上架—————
  491. $("#allshang").on('click',function(){
  492. var check = $("input[type=checkbox][class!=allcheck]:checked");
  493. if(check.length < 1){
  494. alert('请选择要上架的商品!');
  495. return false;
  496. }else if(confirm("确认要上架此商品?")){
  497. var id = new Array();
  498. check.each(function(i){
  499. id[i] = $(this).val();
  500. });
  501. console.log(id)
  502. $.ajax({
  503. type:"post",
  504. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupsj&m=zh_tcwq",
  505. dataType:"text",
  506. data:{id:id},
  507. success:function(data){
  508. console.log(data);
  509. location.reload();
  510. }
  511. })
  512. }
  513. });
  514. // 批量下架
  515. $("#alldown").on('click',function(){
  516. var check = $("input[type=checkbox][class!=allcheck]:checked");
  517. if(check.length < 1){
  518. alert('请选择要下架的商品!');
  519. return false;
  520. }else if(confirm("确认要下架此商品?")){
  521. var id = new Array();
  522. check.each(function(i){
  523. id[i] = $(this).val();
  524. });
  525. console.log(id)
  526. $.ajax({
  527. type:"post",
  528. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=groupxj&m=zh_tcwq",
  529. dataType:"text",
  530. data:{id:id},
  531. success:function(data){
  532. console.log(data);
  533. location.reload();
  534. }
  535. })
  536. }
  537. });
  538. $(".allcheck").on('click',function(){
  539. var checked = $(this).get(0).checked;
  540. $("input[type=checkbox]").prop("checked",checked);
  541. });
  542. $("#allselect").on('click',function(){
  543. var check = $("input[type=checkbox][class!=allcheck]:checked");
  544. if(check.length < 1){
  545. alert('请选择要删除的商品!');
  546. return false;
  547. }else if(confirm("确认要删除此商品?")){
  548. var id = new Array();
  549. check.each(function(i){
  550. id[i] = $(this).val();
  551. });
  552. // console.log(id)
  553. $.ajax({
  554. type:"post",
  555. url:"{$_W['siteroot']}/app/index.php?i={$_W['uniacid']}&c=entry&do=delgroup&m=zh_tcwq",
  556. dataType:"text",
  557. data:{id:id},
  558. success:function(data){
  559. console.log(data);
  560. location.reload();
  561. }
  562. })
  563. }
  564. });
  565. $(".allcheck").on('click',function(){
  566. var checked = $(this).get(0).checked;
  567. $("input[type=checkbox]").prop("checked",checked);
  568. });
  569. })
  570. </script>
  571. {template 'common/footer'}