瀏覽代碼

优化权限问题

huangsanjia 2 年之前
父節點
當前提交
de72fe1953
共有 2 個文件被更改,包括 6 次插入3 次删除
  1. 4 0
      Application/Admin/Controller/ExportController.class.php
  2. 2 3
      Application/Admin/View/Export/fahuo.html

+ 4 - 0
Application/Admin/Controller/ExportController.class.php

@@ -556,6 +556,10 @@ class ExportController extends AddonController
         $total = M('goods')
             ->where($where)
             ->count();
+        $userinfo=M('admin_user')->where('id='.$session_config['user_auth']['uid'])->find();
+        foreach ($goodsList as $key=>$value){
+            $goodsList[$key]['user_type'] = $userinfo['user_type'];
+        }
         $result  = [];
         $result['total'] = $total;
         $result['rows'] = $goodsList;

+ 2 - 3
Application/Admin/View/Export/fahuo.html

@@ -213,13 +213,12 @@
                     }
                 },
                 {field:'id',title:'ID',align:'center',sortable:false,width:100,hidden:true},
-
                 {field: 'file_dir', title: '发货单打印', align: 'center', sortable: true, width: 200,
                     formatter: function(value,row,index){
-                        if(row.status==0){
+                        if(row.status==0 && row.user_type == 1){
                             return "<a href='javascript:;' onclick='dayin("+row.id+")'>点击打印</a>";
                         }else{
-                            return "";
+                            return "<a href='javascript:;'>未开通权限</a>";
                         }
 
                     }