Przeglądaj źródła

储值卡修改

lizhen_gitee 1 rok temu
rodzic
commit
f75961de91

+ 6 - 1
application/admin/controller/RechargeGift.php

@@ -3,7 +3,7 @@
 namespace app\admin\controller;
 
 use app\common\controller\Backend;
-
+use think\Db;
 /**
  * 储值卡赠送卡券管理
  *
@@ -43,6 +43,10 @@ class RechargeGift extends Backend
         $this->relationSearch = true;
         //设置过滤方法
         $this->request->filter(['strip_tags', 'trim']);
+
+        $config_id = input('config_id',0);
+        $this->assignconfig('config_id',$config_id);
+
         if ($this->request->isAjax()) {
             //如果发送的来源是Selectpage,则转发到Selectpage
             if ($this->request->request('keyField')) {
@@ -53,6 +57,7 @@ class RechargeGift extends Backend
             $list = $this->model
                     ->with(['coupons'])
                     ->where($where)
+                    ->where('rechargegift.config_id',$config_id)
                     ->order($sort, $order)
                     ->paginate($limit);
 

+ 4 - 25
public/assets/js/backend/recharge_config.js

@@ -39,33 +39,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     text: '赠送列表',
                                     title: '赠送列表',
                                     classname: 'btn btn-xs btn-primary btn-dialog',
+                                    url:'recharge_gift/index/config_id/{ids}?dialog=1',
                                     icon: 'fa fa-list',
-                                    url: function (row, column) {
-                                        return "recharge_gift/index?config_id="+row.id;
-                                    },
-                                },
-                                {
-                                    name:'edit',
-                                    text:__('Edit'),
-                                    title:__('Edit'),
-                                    classname: 'btn btn-xs btn-success btn-editone',
-                                    icon: 'fa fa-pencil',
-                                    url: function (row, column) {
-                                        return "recharge_config/edit?ids="+row.id;
-                                    },
-                                    refresh:true
-                                },
-                                {
-                                    name:'del',
-                                    text:__('Del'),
-                                    title: __('Del'),
-                                    classname: 'btn btn-xs btn-danger btn-delone',
-                                    icon: 'fa fa-trash',
-                                    url: function (row, column) {
-                                        return "recharge_config/del?ids="+row.id;
-                                    },
-                                    refresh:true
+                                    target: '_self',
+                                    extend: 'data-area=["90%","90%"]',
                                 },
+
                             ]
                         }
                     ]