diff --git a/application/admin/controller/salary/Detail.php b/application/admin/controller/salary/Detail.php index aeab20d..5640a67 100644 --- a/application/admin/controller/salary/Detail.php +++ b/application/admin/controller/salary/Detail.php @@ -150,6 +150,8 @@ class Detail extends Backend $result = array("total" => count($res), "rows" => $res); + + $this->assignconfig("manage", $this->auth->isSuperAdmin()); return json($result); } diff --git a/public/assets/js/backend/salary/detail.js b/public/assets/js/backend/salary/detail.js index 359cadf..eebc6a8 100644 --- a/public/assets/js/backend/salary/detail.js +++ b/public/assets/js/backend/salary/detail.js @@ -95,6 +95,12 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin return 'salary/detail/custom_edit?target_admin_id=' + row.target_admin_id + '&month=' + row.month; }, extend: 'data-area=\'["800px", "600px"]\'', + visible:function(row){ + if (!Config.manage) { + return false; + } + return true; + } }, { name: 'complete', @@ -118,6 +124,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin return false; }, visible: function (row) { + if (!Config.manage) { + return false; + } //返回true时按钮显示,返回false隐藏 if (row.settle_status != 1) { return true;