xxxrrrdddd 2 years ago
parent
commit
f60852cf59

+ 1 - 0
application/admin/controller/Mobile.php

@@ -45,6 +45,7 @@ class Mobile extends Backend
         parent::_initialize();
         $this->model = new \app\admin\model\Mobile;
         $this->assign('status',\app\common\model\Mobile::$status);
+        $this->assign('admin',$this->admin());
         $this->assign('network',MobileConstant::getNetworkString());
         $this->assign('network_select',MobileConstant::getNetworkSelect());
     }

+ 1 - 0
application/admin/view/mobile/index.html

@@ -73,4 +73,5 @@
     var mobile_network={:json_encode($network)};
     var filters={:json_encode($filters)};
     var mobile_status={:json_encode($status,JSON_UNESCAPED_UNICODE)};
+    var admin_Info={:json_encode($admin)};
 </script>

+ 1 - 0
application/admin/view/mobile/mobile_kill.html

@@ -30,4 +30,5 @@
     var mobile_network={:json_encode($network)};
     var filters={:json_encode($filters)};
     var mobile_status={:json_encode($status,JSON_UNESCAPED_UNICODE)};
+    var admin_Info={:json_encode($admin)};
 </script>

+ 6 - 14
public/assets/js/backend/mobile.js

@@ -200,6 +200,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     },
                                     visible: function (row) {
                                         return table.data('operate-activity_cancel') && row.is_activity===1;
+                                    },
+                                    disable(row){
+                                        return admin_Info.sub && row.hold_chan!==admin_Info.id
                                     }
                                 },
                                 {
@@ -260,20 +263,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                             events: Table.api.events.operate,
                             formatter: Table.api.formatter.operate,
                             buttons: [
-                                /*{
-                                    name:'detail',
-                                    text: '取消预占',
-                                    title: '取消预占',
-                                    classname: 'btn btn-ajax btn-danger btn-xs',
-                                    confirm:'确认取消吗?',
-                                    url:'mobile/activity_cancel',
-                                    visible: function (row) {
-                                        return table.data('operate-activity_cancel') && row.is_activity
-                                    },
-                                    success(){
-                                        $('.btn-refresh').trigger('click')
-                                    }
-                                },*/
                                 {
                                     name: 'detail',
                                     text: __('记录'),
@@ -474,6 +463,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
                                     },
                                     visible: function (row) {
                                         return table.data('operate-activity_cancel') && row.is_activity===1;
+                                    },
+                                    disable(row){
+                                        return admin_Info.sub && row.hold_chan!==admin_Info.id
                                     }
                                 },
                                 {