activity_goods.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <extend name="Public:base" />
  2. <block name="content">
  3. <div class="row">
  4. <div class="col-xs-12">
  5. <div class="table-responsive">
  6. <table class="table table-striped table-bordered table-hover">
  7. <thead>
  8. <tr>
  9. <th>ID</th>
  10. <th>图片</th>
  11. <th>商品名称</th>
  12. <th>当前状态</th>
  13. <th>价格</th>
  14. <th>库存</th>
  15. <th>销售数量</th>
  16. <th>所属店铺</th>
  17. <th>申请时间</th>
  18. <th>操作</th>
  19. </tr>
  20. </thead>
  21. <tbody>
  22. <volist name="list" id="data" empty="$empty">
  23. <tr>
  24. <td>{$data.id}</td>
  25. <td><img src="__ROOT__/{$data.image}" /></td>
  26. <td>{$data.name}</td>
  27. <td>
  28. <?php if($data['state'] == 0) { ?>
  29. <span class="red bold">申请中</span>
  30. <?php }else{ ?>
  31. <span class="green bold">已通过</span>
  32. <?php } ?>
  33. </td>
  34. <td>
  35. <span class="green bold">拼团价:{$data.pinprice}</span>
  36. <br/>
  37. <span class="blue bold">单独价:{$data.danprice}</span>
  38. </td>
  39. <td>
  40. {$data.quantity}
  41. </td>
  42. <td>
  43. {$data.seller_count}
  44. </td>
  45. <td>
  46. <?php $s = M('seller')->where(array('s_id'=>$data['store_id']))->field('s_true_name')->find();echo $s['s_true_name']; ?>
  47. </td>
  48. <td>
  49. <?php if( $state == 1){ ?>
  50. <?php echo date('Y-m-d H:i:s',$data['begin_time']); ?><br/>
  51. <?php echo date('Y-m-d H:i:s',$data['end_time']); ?>
  52. <?php }else{ ?>
  53. <?php echo date('Y-m-d H:i:s',$data['addtime']); ?>
  54. <?php } ?>
  55. </td>
  56. <td>
  57. <?php if($data['state'] == 0) { ?>
  58. <a class="btn btn-xs btn-info shenhe" href="javascript:;" rel-url='{:U("Spike/shenhe",array("id" => $data["id"]))}'>
  59. <i class="icon-check bigger-120"></i>
  60. </a>
  61. <?php } ?>
  62. </td>
  63. </tr>
  64. </volist>
  65. <tr>
  66. <td colspan="20" class="page">{$page}</td>
  67. </tr>
  68. </tbody>
  69. </table>
  70. </div>
  71. </div>
  72. </div>
  73. </block>
  74. <block name="javascript">
  75. <script>
  76. $(function(){
  77. $('.shenhe').click(function(){
  78. var ask_url = $(this).attr('rel-url');
  79. if(!confirm('确认审核通过吗?')){
  80. return false;
  81. }
  82. $.ajax({
  83. url:ask_url,
  84. type:'get',
  85. dataType:'json',
  86. success:function(result){
  87. if(result.code == 1) {
  88. alert('操作成功');
  89. location.href = location.href;
  90. } else {
  91. return false;
  92. alert(result.msg);
  93. }
  94. }
  95. })
  96. })
  97. })
  98. </script>
  99. </block>