Commit aacc83187357337ec8da68d83d4d3677a091e943

Authored by xqs
1 parent e2f20f81

盘点首选项权限

src/main/java/com/huaheng/pc/config/cycleCountPreference/controller/cycleCountPreferenceController.java
... ... @@ -44,6 +44,8 @@ public class cycleCountPreferenceController extends BaseController {
44 44  
45 45 private String prefix = "config/cycleCountPreference";
46 46  
  47 +
  48 + @RequiresPermissions("config:cycleCountPreference:view")
47 49 @GetMapping()
48 50 public String cyclecountHeader()
49 51 {
... ... @@ -53,7 +55,7 @@ public class cycleCountPreferenceController extends BaseController {
53 55 /**
54 56 * 查询盘点单主列表
55 57 */
56   - //@RequiresPermissions("inventory:cycleCount:list")
  58 + @RequiresPermissions("config:cycleCountPreference:list")
57 59 @PostMapping("/list")
58 60 @Log(title = "配置-库存配置",operating = "盘点首选项", action = BusinessType.GRANT)
59 61 @ResponseBody
... ... @@ -102,7 +104,7 @@ public class cycleCountPreferenceController extends BaseController {
102 104 /**
103 105 * 新增保存盘点首选项
104 106 */
105   - //@RequiresPermissions("config:receiptPreference:add")
  107 + @RequiresPermissions("config:cycleCountPreference:add")
106 108 @Log(title = "配置-盘点首选项", operating = "新增盘点首选项", action = BusinessType.INSERT)
107 109 @PostMapping("/addSave")
108 110 @ResponseBody
... ... @@ -125,7 +127,7 @@ public class cycleCountPreferenceController extends BaseController {
125 127 /**
126 128 * 修改保存盘点首选项
127 129 */
128   - //@RequiresPermissions("config:receiptPreference:edit")
  130 + @RequiresPermissions("config:cycleCountPreference:edit")
129 131 @Log(title = "通用-盘点首选项", operating = "修改盘点首选项", action = BusinessType.UPDATE)
130 132 @PostMapping("/edit")
131 133 @ResponseBody
... ... @@ -151,7 +153,7 @@ public class cycleCountPreferenceController extends BaseController {
151 153 /**
152 154 * 删除盘点首选项
153 155 */
154   - //@RequiresPermissions("config:receiptPreference:remove")
  156 + @RequiresPermissions("config:cycleCountPreference:remove")
155 157 @Log(title = "通用-盘点首选项", operating = "删除盘点首选项", action = BusinessType.DELETE)
156 158 @PostMapping( "/remove")
157 159 @ResponseBody
... ...
src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html
1 1 <!DOCTYPE HTML>
2   -<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
  2 +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
3 3 <meta charset="utf-8">
4 4 <head th:include="include :: header"></head>
5 5 <body class="gray-bg">
... ... @@ -43,7 +43,8 @@
43 43 </form>
44 44 </div>
45 45 <div class="btn-group hidden-xs" id="toolbar" role="group">
46   - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" >
  46 + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
  47 + shiro:hasPermission="config:cycleCountPreference:add">
47 48 <i class="fa fa-plus"></i> 新增
48 49 </a>
49 50 </div>
... ... @@ -224,8 +225,8 @@
224 225 align: 'center',
225 226 formatter: function(value, row, index) {
226 227 var actions = [];
227   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> ');
228   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
  228 + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>修改</a> ');
  229 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
229 230 return actions.join('');
230 231 }
231 232 }]
... ...