wupengfei 2 years ago
parent
commit
da4daf1abd

+ 22 - 0
application/mall/controller/CouponConfig.php

@@ -176,4 +176,26 @@ class  CouponConfig extends Controller
     {
         $this->_delete($this->table);
     }
+
+
+
+    /**
+     * @auth true
+     * @menu true
+     */
+    public function user_coupon()
+    {
+        $coupon_id = input('id');
+        $status_arr = ['','正常','已使用','过期','删除'];
+        $this->assign('status_arr',$status_arr);
+        $list =$this->_query('UserCouponList')
+            ->alias('l')
+            ->field('l.*,m.name as user_name , c.title as coupon_name')
+            ->join('store_member m','m.id = l.user_id','LEFT')
+            ->join('store_coupon_config c','l.coupon_id= m.id','LEFT')
+            ->where(['l.coupon_id'=>$coupon_id])
+            ->order('l.id desc')
+            ->page();
+    }
+
 }

+ 2 - 2
application/mall/view/coupon_config/index.html

@@ -20,7 +20,7 @@
             <th class='text-left nowrap'>期限</th>
             <th class='text-left nowrap'>领取张数</th>
             <th class='text-left nowrap'>创建时间</th>
-            <th class="text-center">操作</th>
+            <th class="text-left nowrap">操作</th>
         </tr>
         </thead>
         {/notempty}
@@ -34,7 +34,7 @@
             <td class='text-left nowrap'>{$vo.low_day|default=''}</td>
             <td class='text-left nowrap'>{$vo.user_num|default=''}</td>
             <td class='text-left nowrap'>{$vo.create_at|default=''}</td>
-            <td class='text-center nowrap'>
+            <td class='text-left nowrap'>
                 <a data-title="编辑" class="layui-btn layui-btn-sm" data-modal='{:url("edit")}?id={$vo.id}'>编 辑</a>
                 <a data-title="删除" class="layui-btn layui-btn-sm layui-btn-danger"  onclick="return confirm('确定删除该直播记录吗');"  data-action="{:url('del')}"  data-value='id#{$vo.id}'>删 除</a>
                 <a data-title="领取详情" class="layui-btn layui-btn-sm" data-modal='{:url("user_coupon")}?id={$vo.id}'>领取详情</a>