Commit 6ebc53224bb0156b45a7beee440735c01f4de824

Authored by xqs
1 parent aca6122c

盘点单权限

src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
... ... @@ -58,9 +58,10 @@ public class CycleCountDetailController extends BaseController {
58 58  
59 59  
60 60  
61   -
62 61 private String prefix = "inventory/cycleCountDetail";
63 62  
  63 +
  64 + @RequiresPermissions("inventory:cyclecountDetail:view")
64 65 @GetMapping()
65 66 public String cyclecountHeader()
66 67 {
... ... @@ -70,7 +71,7 @@ public class CycleCountDetailController extends BaseController {
70 71 /**
71 72 * 查询盘点单主列表
72 73 */
73   - //@RequiresPermissions("inventory:cycleCount:list")
  74 + @RequiresPermissions("inventory:cycleCountDetail:list")
74 75 @PostMapping("/list")
75 76 @Log(title = "库存-盘点",operating = "查看盘点明细", action = BusinessType.GRANT)
76 77 @ResponseBody
... ... @@ -143,7 +144,7 @@ public class CycleCountDetailController extends BaseController {
143 144 /**
144 145 * 新增保存盘点明细
145 146 */
146   - //@RequiresPermissions("inventory:cyclecountDetail:add")
  147 + @RequiresPermissions("inventory:cyclecountDetail:add")
147 148 @Log(title = "库存-盘点", operating = "新增盘点补货明细", action = BusinessType.INSERT)
148 149 @PostMapping("/add")
149 150 @ResponseBody
... ... @@ -155,7 +156,7 @@ public class CycleCountDetailController extends BaseController {
155 156 /**
156 157 * 删除盘点明细
157 158 */
158   - //@RequiresPermissions("inventory:cyclecountDetail:remove")
  159 + @RequiresPermissions("inventory:cyclecountDetail:remove")
159 160 @Log(title = "库存-盘点", operating = "删除盘点明细", action = BusinessType.DELETE)
160 161 @PostMapping( "/remove")
161 162 @ResponseBody
... ... @@ -194,7 +195,7 @@ public class CycleCountDetailController extends BaseController {
194 195 }
195 196  
196 197 /**生成全部盘点任务*/
197   - //@RequiresPermissions("inventory:cyclecountDetail:createTask")
  198 + @RequiresPermissions("inventory:cyclecountDetail:createTask")
198 199 @PostMapping("/createCycleCountTaskByHeadId")
199 200 @ResponseBody
200 201 public AjaxResult createCycleCountTaskByHeadId(String cycleCountHeadCode){
... ... @@ -205,7 +206,7 @@ public class CycleCountDetailController extends BaseController {
205 206 }
206 207  
207 208 /**生成单条盘点任务*/
208   - //@RequiresPermissions("inventory:cyclecountDetail:createTask")
  209 + @RequiresPermissions("inventory:cyclecountDetail:createTask")
209 210 @PostMapping("/createCycleCoutTaskByDetailId")
210 211 @ResponseBody
211 212 public AjaxResult createCycleCoutTaskByDetailId(Integer cycleCoutdetailId){
... ... @@ -221,7 +222,7 @@ public class CycleCountDetailController extends BaseController {
221 222 * @param qty
222 223 * @return
223 224 */
224   - //@RequiresPermissions("inventory:cyclecountDetail:confirm")
  225 + @RequiresPermissions("inventory:cyclecountDetail:confirm")
225 226 @PostMapping("/confirmGapQty")
226 227 @ResponseBody
227 228 public AjaxResult confirmGapQty(Integer detailId, BigDecimal qty){
... ... @@ -233,7 +234,7 @@ public class CycleCountDetailController extends BaseController {
233 234 * @param cycleCountHeadCode
234 235 * @return
235 236 */
236   - //@RequiresPermissions("inventory:cyclecountDetail:cyclecountRepeat")
  237 + @RequiresPermissions("inventory:cyclecountDetail:cyclecountRepeat")
237 238 @PostMapping("/createCyclecountWithGapQty")
238 239 @ResponseBody
239 240 public AjaxResult createCyclecountWithGapQty(String cycleCountHeadCode){
... ...
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/controller/CycleCountHeaderController.java
... ... @@ -44,15 +44,12 @@ public class CycleCountHeaderController extends BaseController {
44 44 private CycleCountHeaderService cycleCountHeaderService;
45 45 @Resource
46 46 private CycleCountDetailService cycleCountDetailService;
47   - @Resource
48   - private AdjustHeaderService adjustHeaderService;
49   -
50 47  
51 48  
52 49 private String prefix = "inventory/cycleCountHeader";
53 50  
54 51  
55   - //@RequiresPermissions("inventory:cycleCount:view")
  52 + @RequiresPermissions("inventory:cycleCountHeader:view")
56 53 @GetMapping()
57 54 public String cyclecountHeader()
58 55 {
... ... @@ -62,7 +59,7 @@ public class CycleCountHeaderController extends BaseController {
62 59 /**
63 60 * 查询盘点单主列表
64 61 */
65   - //@RequiresPermissions("inventory:cycleCount:list")
  62 + @RequiresPermissions("inventory:cycleCountHeader:list")
66 63 @PostMapping("/list")
67 64 @Log(title = "库存-盘点",operating = "查看盘点主单", action = BusinessType.GRANT)
68 65 @ResponseBody
... ... @@ -95,6 +92,9 @@ public class CycleCountHeaderController extends BaseController {
95 92 }
96 93  
97 94 }
  95 +
  96 +
  97 +
98 98 /**
99 99 * 新增盘点单主
100 100 */
... ... @@ -107,7 +107,7 @@ public class CycleCountHeaderController extends BaseController {
107 107 /**
108 108 * 新增保存盘点单主
109 109 */
110   - //@RequiresPermissions("inventory:cycleCount:add")
  110 + @RequiresPermissions("inventory:cycleCountHeader:add")
111 111 @Log(title = "库存-盘点",operating = "新增盘点主单", action = BusinessType.INSERT)
112 112 @PostMapping("/add")
113 113 @ResponseBody
... ... @@ -137,7 +137,7 @@ public class CycleCountHeaderController extends BaseController {
137 137 /**
138 138 * 修改保存盘点单主
139 139 */
140   - //@RequiresPermissions("inventory:cycleCount:edit")
  140 + @RequiresPermissions("inventory:cycleCountHeader:edit")
141 141 @Log(title = "库存-盘点",operating = "修改盘点主单", action = BusinessType.UPDATE)
142 142 @PostMapping("/edit")
143 143 @ResponseBody
... ... @@ -151,7 +151,7 @@ public class CycleCountHeaderController extends BaseController {
151 151 /**
152 152 * 删除盘点单主
153 153 */
154   - //@RequiresPermissions("inventory:cycleCount:remove")
  154 + @RequiresPermissions("inventory:cycleCountHeader:remove")
155 155 @Log(title = "库存-盘点",operating = "删除盘点主单", action = BusinessType.DELETE)
156 156 @PostMapping( "/remove")
157 157 @ResponseBody
... ... @@ -173,7 +173,7 @@ public class CycleCountHeaderController extends BaseController {
173 173 *
174 174 * 生成调整单
175 175 * */
176   - //@RequiresPermissions("inventory:cyclecountHead:addAdjust")
  176 + @RequiresPermissions("inventory:cyclecountHead:addAdjust")
177 177 @Log(title = "库存-盘点", operating = "新增盘点差异调整单", action = BusinessType.INSERT)
178 178 @PostMapping("/goAdjust")
179 179 @ResponseBody
... ... @@ -187,7 +187,7 @@ public class CycleCountHeaderController extends BaseController {
187 187 * 盘点单报表打印
188 188 * @return
189 189 */
190   - //@RequiresPermissions("inventory:cycleCount:report")
  190 + @RequiresPermissions("inventory:cycleCountHeader:report")
191 191 @GetMapping("/report/{id}")
192 192 public String report(@PathVariable("id") Integer id, ModelMap mmap)
193 193 {
... ...
src/main/resources/templates/inventory/cycleCountDetail/cycleCountDetail.html
... ... @@ -85,7 +85,7 @@
85 85 </div>
86 86 <div class="btn-group hidden-xs" id="toolbar" role="group">
87 87 <a class="btn btn-outline btn-success btn-rounded" onclick="add()"
88   - shiro:hasPermission="inventory:cycleCountDetail:add">
  88 + shiro:hasPermission="inventory:cyclecountDetail:add">
89 89 <i class="fa fa-plus"></i> 新增
90 90 </a>
91 91 <a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()"
... ... @@ -98,7 +98,7 @@
98 98 </a>
99 99 <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()"
100 100 shiro:hasPermission="inventory:cyclecountDetail:remove">
101   - <i class="fa fa-trash-o"></i> 批量删除
  101 + <i class="fa fa-trash-o"></i> 删除
102 102 </a>
103 103 <a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()">
104 104 <i class="fa fa-refresh"></i> 刷新
... ... @@ -109,10 +109,10 @@
109 109 </div>
110 110 <div th:include="include :: footer"></div>
111 111 <script th:inline="javascript">
112   - var editFlag = [[${@permission.hasPermi('inventoryHeader:cycleCountDetail:edit')}]];
113   - var removeFlag = [[${@permission.hasPermi('inventoryHeader:cycleCountDetail:remove')}]];
114   - var confirmFlag=[[${@permission.hasPermi('inventoryHeader:cycleCountDetail:confirm')}]];
115   - var createTaskFalg=[[${@permission.hasPermi('inventoryHeader:cycleCountDetail:createTask')}]];
  112 + //var editFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:edit')}]];
  113 + var removeFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:remove')}]];
  114 + var confirmFlag = [[${@permission.hasPermi('inventory:cyclecountDetail:confirm')}]];
  115 + var createTaskFalg = [[${@permission.hasPermi('inventory:cyclecountDetail:createTask')}]];
116 116 var prefix = ctx + "inventory/cycleCountDetail";
117 117 var prefix_head = ctx + "inventory/cycleCountHeader";
118 118 var remove_url= prefix + "/remove";
... ... @@ -319,11 +319,12 @@
319 319 formatter: function (value, row, index) {
320 320 var actions = [];
321 321  
322   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> ');
  322 + actions.push('<a class="btn btn-success btn-xs ' + confirmFlag + '" href="#" onclick="confirmGapQty(\'' + row.id + '\')"><i class="fa fa-comment"></i>实盘登记</a> ');
323 323  
324   - actions.push('<a class="btn btn-primary btn-xs " href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点任务</a> ');
  324 + actions.push('<a class="btn btn-primary btn-xs ' + createTaskFalg + '" href="#" onclick="outcheck(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成盘点任务</a> ');
  325 +
  326 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
325 327  
326   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>');
327 328 return actions.join('');
328 329 }
329 330 }]
... ...
src/main/resources/templates/inventory/cycleCountHeader/cycleCountHeader.html
... ... @@ -70,13 +70,13 @@
70 70 </div>
71 71 <div class="btn-group hidden-xs" id="toolbar" role="group">
72 72 <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"
73   - shiro:hasPermission="inventory:cycleCount:add">
  73 + shiro:hasPermission="inventory:cycleCountHeader:add">
74 74 <i class="fa fa-plus"></i> 新增
75 75 </a>
76   - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
77   - shiro:hasPermission="inventory:cycleCount:remove">
  76 + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()"
  77 + shiro:hasPermission="inventory:cycleCountHeader:remove">
78 78 <i class="fa fa-trash-o"></i> 删除
79   - </a>
  79 + </a>-->
80 80 </div>
81 81 <table id="bootstrap-table" data-mobile-responsive="true"
82 82 class="table table-bordered table-hover"></table>
... ... @@ -89,10 +89,10 @@
89 89 </div>
90 90 <div th:include="include :: footer"></div>
91 91 <script th:inline="javascript">
92   - var reportFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:report')}]];
93   - var editFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:edit')}]];
94   - var addAdjust = [[${@permission.hasPermi('inventoryHeader:cyclecountHead:addAdjust')}]];
95   - var removeFlag = [[${@permission.hasPermi('inventoryHeader:cycleCount:remove')}]];
  92 + var reportFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:report')}]];
  93 + //var editFlag = [[${@permission.hasPermi('inventory:cycleCountHeader:edit')}]];
  94 + var addAdjust = [[${@permission.hasPermi('inventory:cyclecountHead:addAdjust')}]];
  95 + var removeFlag = [[${@permission.hasPermi('inventory:cycleCount:remove')}]];
96 96 var prefix = ctx + "inventory/cycleCountHeader";
97 97 var datas = [[${@dict.getType('sys_normal_disable')}]];
98 98 var types = [[${@dict.getType('cyclecountType')}]];
... ... @@ -274,12 +274,12 @@
274 274 align: 'center',
275 275 formatter: function (value, row, index) {
276 276 var actions = [];
277   - actions.push('<a class="btn btn-success btn-xs " href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
  277 + actions.push('<a class="btn btn-success btn-xs ' + reportFlag + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> ');
278 278  
279   - actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="goAdjust(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成调整单</a> ');
  279 + actions.push('<a class="btn btn-warning btn-xs ' + addAdjust + '" href="#" onclick="goAdjust(\'' + row.id + '\')"><i class="fa fa-gbp"></i>生成调整单</a> ');
280 280  
281   - //actions.push('<a class="btn btn-info btn-xs " href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
282   - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
  281 + //actions.push('<a class="btn btn-info btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> ');
  282 + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');
283 283 return actions.join('');
284 284 }
285 285 }]
... ...