Commit 3d04d270b6c692d7152c3aaec5806e31191d44ce
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
16 changed files
with
195 additions
and
148 deletions
src/main/java/com/huaheng/pc/check/checkDetail/controller/CheckDetailController.java
... | ... | @@ -131,8 +131,7 @@ public class CheckDetailController extends BaseController { |
131 | 131 | |
132 | 132 | /** |
133 | 133 | * 保存质检完成 |
134 | - * @param inventorySts 库存状态 | |
135 | - * @param qty 数量 | |
134 | + * @param id | |
136 | 135 | * @return AjaxResult |
137 | 136 | */ |
138 | 137 | @ApiOperation(value="完成质检详情", notes="完成质检详情", httpMethod = "POST") |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustHeader/controller/adjustHeaderController.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.support.Convert; | |
7 | 8 | import com.huaheng.common.utils.StringUtils; |
8 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
9 | 10 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
... | ... | @@ -13,17 +14,17 @@ import com.huaheng.framework.web.domain.AjaxResult; |
13 | 14 | import com.huaheng.framework.web.page.PageDomain; |
14 | 15 | import com.huaheng.framework.web.page.TableDataInfo; |
15 | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | +import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; | |
16 | 18 | import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService; |
17 | 19 | import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailServiceImpl; |
18 | 20 | import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; |
19 | 21 | import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; |
20 | 22 | import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderServiceImpl; |
21 | 23 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
24 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
22 | 25 | import org.springframework.stereotype.Controller; |
23 | -import org.springframework.web.bind.annotation.GetMapping; | |
24 | -import org.springframework.web.bind.annotation.PostMapping; | |
25 | -import org.springframework.web.bind.annotation.RequestMapping; | |
26 | -import org.springframework.web.bind.annotation.ResponseBody; | |
26 | +import org.springframework.ui.ModelMap; | |
27 | +import org.springframework.web.bind.annotation.*; | |
27 | 28 | |
28 | 29 | import javax.annotation.Resource; |
29 | 30 | import java.util.Date; |
... | ... | @@ -40,7 +41,6 @@ public class adjustHeaderController extends BaseController { |
40 | 41 | private AdjustDetailService adjustDetailService; |
41 | 42 | |
42 | 43 | |
43 | - | |
44 | 44 | private String prefix = "inventory/adjustHeader"; |
45 | 45 | |
46 | 46 | |
... | ... | @@ -90,7 +90,7 @@ public class adjustHeaderController extends BaseController { |
90 | 90 | } |
91 | 91 | |
92 | 92 | /** |
93 | - * 新增调整单主 | |
93 | + * 新增调整单主页面 | |
94 | 94 | */ |
95 | 95 | @GetMapping("/add") |
96 | 96 | public String add() |
... | ... | @@ -108,13 +108,50 @@ public class adjustHeaderController extends BaseController { |
108 | 108 | public AjaxResult addSave(AdjustHeader adjustHeader) |
109 | 109 | { |
110 | 110 | adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode()); |
111 | - adjustHeader.setCreated(new Date()); | |
112 | - adjustHeader.setCreatedBy(ShiroUtils.getLoginName()); | |
113 | - adjustHeader.setCode(adjustHeaderService.createCode()); | |
114 | - return toAjax(adjustHeaderService.save(adjustHeader)); | |
111 | + return AjaxResult.success(adjustHeaderService.addSave(adjustHeader)); | |
115 | 112 | } |
116 | 113 | |
114 | + /** | |
115 | + * 删除调整单主 | |
116 | + */ | |
117 | + //@RequiresPermissions("inventory:cycleCount:remove") | |
118 | + @Log(title = "库存-调整",operating = "删除调整主单", action = BusinessType.DELETE) | |
119 | + @PostMapping( "/remove") | |
120 | + @ResponseBody | |
121 | + public AjaxResult remove(String ids) | |
122 | + { | |
123 | + if (StringUtils.isEmpty(ids)) | |
124 | + return AjaxResult.error("id不能为空"); | |
125 | + for (Integer id : Convert.toIntArray(ids)) | |
126 | + { | |
127 | + AjaxResult result = adjustHeaderService.delete(id); | |
128 | + if(result.code!=200){ | |
129 | + return result; | |
130 | + } | |
131 | + } | |
132 | + return AjaxResult.success("删除成功!"); | |
133 | + } | |
117 | 134 | |
135 | + /** | |
136 | + * 调整单打印 | |
137 | + * @return | |
138 | + */ | |
139 | + //@RequiresPermissions("inventory:cyclecountAdjust:report") | |
140 | + @GetMapping("/report/{id}") | |
141 | + public String report(@PathVariable("id") Integer id, ModelMap mmap) | |
142 | + { | |
143 | + AdjustHeader adjustHeader = adjustHeaderService.getById(id); | |
144 | + mmap.put("adjustHeader", adjustHeader); | |
145 | + //明细 | |
146 | + AdjustDetail adjustDetail = new AdjustDetail(); | |
147 | + adjustDetail.setAdjustCode(adjustHeader.getCode()); | |
148 | + adjustDetail.setWarehouseCode(adjustHeader.getWarehouseCode()); | |
149 | + adjustDetail.setCompanyCode(adjustHeader.getCompanyCode()); | |
150 | + LambdaQueryWrapper<AdjustDetail> adjustDetailLambdaQueryWrapper = Wrappers.lambdaQuery(adjustDetail); | |
151 | + List<AdjustDetail> adjustDetails = adjustDetailService.list(adjustDetailLambdaQueryWrapper); | |
152 | + mmap.put("adjustDetails", adjustDetails); | |
153 | + return prefix + "/report"; | |
154 | + } | |
118 | 155 | |
119 | 156 | |
120 | 157 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderService.java
1 | 1 | package com.huaheng.pc.inventory.adjustHeader.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | +import com.huaheng.framework.web.domain.AjaxResult; | |
4 | 5 | import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; |
5 | 6 | import com.huaheng.pc.inventory.cycleCountHeader.domain.CycleCountHeader; |
6 | 7 | |
... | ... | @@ -10,8 +11,9 @@ public interface AdjustHeaderService extends IService<AdjustHeader> { |
10 | 11 | |
11 | 12 | String createCode(); |
12 | 13 | |
14 | + AjaxResult delete(Integer id); | |
13 | 15 | |
14 | - | |
16 | + AjaxResult addSave(AdjustHeader adjustHeader); | |
15 | 17 | |
16 | 18 | } |
17 | 19 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderServiceImpl.java
1 | 1 | package com.huaheng.pc.inventory.adjustHeader.service; |
2 | 2 | |
3 | +import com.huaheng.common.utils.StringUtils; | |
4 | +import com.huaheng.common.utils.security.ShiroUtils; | |
5 | +import com.huaheng.framework.web.domain.AjaxResult; | |
6 | +import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; | |
3 | 7 | import org.springframework.stereotype.Service; |
4 | 8 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
5 | 9 | import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; |
6 | 10 | import com.huaheng.pc.inventory.adjustHeader.mapper.AdjustHeaderMapper; |
11 | +import org.springframework.transaction.annotation.Transactional; | |
7 | 12 | |
8 | 13 | import javax.annotation.Resource; |
9 | 14 | import java.text.SimpleDateFormat; |
... | ... | @@ -21,6 +26,7 @@ public class AdjustHeaderServiceImpl extends ServiceImpl<AdjustHeaderMapper, Adj |
21 | 26 | |
22 | 27 | |
23 | 28 | |
29 | + | |
24 | 30 | //生成差异单号 |
25 | 31 | @Override |
26 | 32 | public String createCode() { |
... | ... | @@ -41,9 +47,56 @@ public class AdjustHeaderServiceImpl extends ServiceImpl<AdjustHeaderMapper, Adj |
41 | 47 | return code; |
42 | 48 | } |
43 | 49 | |
50 | + /** | |
51 | + * 删除 | |
52 | + * 空缺 | |
53 | + * @param id | |
54 | + * @return | |
55 | + */ | |
56 | + @Override | |
57 | + public AjaxResult delete(Integer id) { | |
58 | + AdjustHeader adjustHeader = this.getById(id); | |
59 | + if(adjustHeader == null){ | |
60 | + return AjaxResult.error("id为"+id.toString()+"的调整单不存在出,操作中止"); | |
61 | + } | |
44 | 62 | |
63 | + //批量删除子单据 | |
64 | + AdjustDetail temp = new AdjustDetail(); | |
65 | + temp.setAdjustCode(adjustHeader.getCode()); | |
66 | + | |
67 | + return AjaxResult.success("删除成功"); | |
68 | + } | |
45 | 69 | |
46 | 70 | |
71 | + /** | |
72 | + * 保存新增调整头 | |
73 | + * @param adjustHeader | |
74 | + * @return | |
75 | + */ | |
76 | + @Transactional | |
77 | + @Override | |
78 | + public AjaxResult addSave(AdjustHeader adjustHeader) { | |
79 | + //校验调整类型 | |
80 | + //盘点调整,质检调整需要和盘点和质检单据确认。 | |
81 | + switch (adjustHeader.getProblemType()){ | |
82 | + case "checkAdjust": //质检调整 | |
83 | + if(StringUtils.isEmpty(adjustHeader.getCheckCode())){ | |
84 | + throw new SecurityException("选择单据类型为质检调整时,质检单编码不能为空!"); | |
85 | + } | |
86 | + break; | |
87 | + case "adjust": //盘点调整 | |
88 | + if(StringUtils.isEmpty(adjustHeader.getCycleCountCode())){ | |
89 | + throw new SecurityException("选择单据类型为盘点调整时,盘点单编码不能为空!"); | |
90 | + } | |
91 | + break; | |
92 | + } | |
93 | + | |
94 | + adjustHeader.setCreated(new Date()); | |
95 | + adjustHeader.setCreatedBy(ShiroUtils.getLoginName()); | |
96 | + adjustHeader.setCode(this.createCode()); | |
97 | + this.save(adjustHeader); | |
98 | + return AjaxResult.success("新增调整头成功!"); | |
99 | + } | |
47 | 100 | |
48 | 101 | |
49 | 102 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/controller/InventoryDetailController.java
... | ... | @@ -18,6 +18,7 @@ import com.huaheng.pc.config.material.service.MaterialServiceImpl; |
18 | 18 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
19 | 19 | import com.huaheng.pc.inventory.inventoryDetail.service.InventoryDetailService; |
20 | 20 | import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | 22 | import org.springframework.stereotype.Controller; |
22 | 23 | import org.springframework.web.bind.annotation.GetMapping; |
23 | 24 | import org.springframework.web.bind.annotation.PostMapping; |
... | ... | @@ -160,9 +161,8 @@ public class InventoryDetailController extends BaseController |
160 | 161 | return AjaxResult.success("库存明细出库查看任务下发成功!"); |
161 | 162 | } |
162 | 163 | |
163 | - | |
164 | 164 | /**在库质检*/ |
165 | - //@RequiresPermissions("inventory:inventoryHeader:detailCheckTask") | |
165 | + @RequiresPermissions("inventory:inventoryDetail:detailCheckTask") | |
166 | 166 | @PostMapping("/detailCheckTask") |
167 | 167 | @ResponseBody |
168 | 168 | public AjaxResult detailCheckTask(String ids) throws InvocationTargetException, IllegalAccessException { |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryHeader/controller/InventoryHeaderController.java
... | ... | @@ -95,7 +95,7 @@ public class InventoryHeaderController extends BaseController |
95 | 95 | } |
96 | 96 | |
97 | 97 | /**移库*/ |
98 | - //@RequiresPermissions("inventory:inventoryHeader:transfer") | |
98 | + @RequiresPermissions("inventory:inventoryHeader:transfer") | |
99 | 99 | @PostMapping("/transfer") |
100 | 100 | @ResponseBody |
101 | 101 | public AjaxResult transfer(String sourceLocation, String destinationLocation){ |
... | ... | @@ -106,7 +106,7 @@ public class InventoryHeaderController extends BaseController |
106 | 106 | } |
107 | 107 | |
108 | 108 | /**出库查看*/ |
109 | - //@RequiresPermissions("inventory:inventoryHeader:seeOut") | |
109 | + @RequiresPermissions("inventory:inventoryHeader:seeOut") | |
110 | 110 | @PostMapping("/createCheckOutTask") |
111 | 111 | @ResponseBody |
112 | 112 | public AjaxResult createCheckOutTask(String[] ids){ |
... | ... | @@ -130,7 +130,7 @@ public class InventoryHeaderController extends BaseController |
130 | 130 | * @param destinationLocation |
131 | 131 | * @return |
132 | 132 | */ |
133 | - //@RequiresPermissions("task:task:emptyIn") | |
133 | + @RequiresPermissions("inventory:inventoryHeader:emptyIn") | |
134 | 134 | @PostMapping("/emptyIn") |
135 | 135 | @Log(title = "任务-任务管理", operating = "生成空托盘入库任务", action = BusinessType.INSERT) |
136 | 136 | @ResponseBody |
... | ... | @@ -155,7 +155,7 @@ public class InventoryHeaderController extends BaseController |
155 | 155 | * @param sourceLocation |
156 | 156 | * @return |
157 | 157 | */ |
158 | - //@RequiresPermissions("task:task:emptyOut") | |
158 | + @RequiresPermissions("inventory:inventoryHeader:emptyOut") | |
159 | 159 | @PostMapping("/emptyOut") |
160 | 160 | @Log(title = "任务-任务管理", operating = "生成空托盘出库任务", action = BusinessType.INSERT) |
161 | 161 | @ResponseBody |
... | ... | @@ -180,7 +180,7 @@ public class InventoryHeaderController extends BaseController |
180 | 180 | * @param location |
181 | 181 | * @return |
182 | 182 | */ |
183 | - //@RequiresPermissions("task:task:emptyInOut") | |
183 | + @RequiresPermissions("inventory:inventoryHeader:emptyCheckOut") | |
184 | 184 | @PostMapping("/emptyCheckOut") |
185 | 185 | @Log(title = "任务-任务管理", operating = "生成空托盘出库查看任务", action = BusinessType.INSERT) |
186 | 186 | @ResponseBody |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryTransaction/controller/InventoryTransactionController.java
... | ... | @@ -18,6 +18,7 @@ import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
18 | 18 | import com.huaheng.pc.inventory.inventoryTransaction.domain.InventoryTransaction; |
19 | 19 | import com.huaheng.pc.inventory.inventoryTransaction.service.InventoryTransactionService; |
20 | 20 | import io.swagger.models.auth.In; |
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
21 | 22 | import org.springframework.stereotype.Controller; |
22 | 23 | import org.springframework.ui.ModelMap; |
23 | 24 | import org.springframework.web.bind.annotation.*; |
... | ... | @@ -43,7 +44,7 @@ public class InventoryTransactionController extends BaseController{ |
43 | 44 | |
44 | 45 | private String prefix = "inventory/inventoryTransaction"; |
45 | 46 | |
46 | - //@RequiresPermissions("inventory:inventoryTransaction:view") | |
47 | + @RequiresPermissions("inventory:inventoryTransaction:view") | |
47 | 48 | @GetMapping() |
48 | 49 | public String inventoryTransaction() |
49 | 50 | { |
... | ... | @@ -53,7 +54,7 @@ public class InventoryTransactionController extends BaseController{ |
53 | 54 | /** |
54 | 55 | * 查询库存交易列表 |
55 | 56 | */ |
56 | - //@RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList") | |
57 | + @RequiresPermissions("inventory:inventoryTransaction:inventoryTransactionList") | |
57 | 58 | @Log(title = "库存-库存交易",operating = "查看库存交易列表", action = BusinessType.GRANT) |
58 | 59 | @PostMapping("/inventoryTransactionList") |
59 | 60 | @ResponseBody |
... | ... | @@ -95,15 +96,16 @@ public class InventoryTransactionController extends BaseController{ |
95 | 96 | } |
96 | 97 | } |
97 | 98 | |
98 | - //@RequiresPermissions("receipt:bill:report") | |
99 | + @RequiresPermissions("inventory:inventoryTransaction:view:report") | |
99 | 100 | @Log(title = "库存-库存交易明细", operating = "库存交易明细报表打印", action = BusinessType.OTHER) |
100 | 101 | @GetMapping("/report/{ids}") |
101 | 102 | public String report(@PathVariable("ids") Integer[] ids, ModelMap mmap) |
102 | 103 | { |
103 | - List<InventoryTransaction> list=new ArrayList<InventoryTransaction>(); | |
104 | + List<InventoryTransaction> list = new ArrayList<>(); | |
104 | 105 | for(Integer id:ids){ |
105 | - if(id!=null) { | |
106 | - //list.add(inventoryTransaction); | |
106 | + if(id != null) { | |
107 | + InventoryTransaction inventoryTransaction = inventoryTransactionService.getById(id); | |
108 | + list.add(inventoryTransaction); | |
107 | 109 | } |
108 | 110 | mmap.put("inventoryTransaction", list); |
109 | 111 | } |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -865,6 +865,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
865 | 865 | |
866 | 866 | for (String id : ids) { |
867 | 867 | InventoryHeader inventoryHeader = inventoryHeaderService.getById(Integer.parseInt(id)); |
868 | + //校验库位是否锁定 | |
868 | 869 | //检查库位容器 |
869 | 870 | Location temp = new Location(); |
870 | 871 | temp.setCode(inventoryHeader.getLocationCode()); |
... | ... | @@ -924,7 +925,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
924 | 925 | } |
925 | 926 | if (taskDetailService.saveBatch(taskDetails)) { |
926 | 927 | //锁定库位状态 |
927 | - locationService.updateStatus(loc.getContainerCode(), "lock"); | |
928 | + locationService.updateStatus(inventoryHeader.getLocationCode(), "lock"); | |
928 | 929 | } else { |
929 | 930 | throw new ServiceException("出库查看任务明细生成失败!"); |
930 | 931 | } |
... | ... |
src/main/resources/templates/check/checkHeader/checkHeader.html
... | ... | @@ -103,10 +103,12 @@ |
103 | 103 | </div> |
104 | 104 | |
105 | 105 | <div class="btn-group hidden-xs" id="toolbarReg" role="group"> |
106 | - <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" shiro:hasPermission="check:checkingRegister:remove"> | |
106 | + <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" | |
107 | + shiro:hasPermission="check:checkingRegister:remove"> | |
107 | 108 | <i class="fa fa-check-circle-o"></i> 质检完成 |
108 | 109 | </a> |
109 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="check:checkingRegister:remove"> | |
110 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
111 | + shiro:hasPermission="check:checkingRegister:remove"> | |
110 | 112 | <i class="fa fa-trash-o"></i> 删除 |
111 | 113 | </a> |
112 | 114 | </div> |
... | ... |
src/main/resources/templates/inventory/adjustHeader/add.html
... | ... | @@ -6,106 +6,66 @@ |
6 | 6 | <div class="wrapper wrapper-content animated fadeInRight ibox-content"> |
7 | 7 | |
8 | 8 | <form class="form-horizontal m" id="form-adjustHeader-add" > |
9 | + | |
9 | 10 | <div class="form-group"> |
10 | - <label class="col-sm-3 control-label">调整单编号:</label> | |
11 | + <label class="col-sm-3 control-label">货主:</label> | |
11 | 12 | <div class="col-sm-8"> |
12 | - <input id="code" name="code" class="form-control" type="text"> | |
13 | + <select id="companyCode" name="companyCode" class="form-control" th:with="list=${@companyService.getCode()}"> | |
14 | + <option th:each="item : ${list}" th:text="${item['name']}" th:value="${item['code']}" th:attr = " code = ${item['code']}"></option> | |
15 | + </select> | |
13 | 16 | </div> |
14 | 17 | </div> |
18 | + <!--<div class="form-group"> | |
19 | + <label class="col-sm-3 control-label">调整类型:</label> | |
20 | + <div class="col-sm-8"> | |
21 | + <div class="col-sm-8"> | |
22 | + <select id="problemType" name="problemType" class="form-control" th:with="problemType=${@dict.getType('adjustType')}"> | |
23 | + <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
24 | + </select> | |
25 | + </div> | |
26 | + </div> | |
27 | + </div>--> | |
28 | + | |
15 | 29 | <div class="form-group"> |
16 | - <label class="col-sm-3 control-label">货主编码:</label> | |
30 | + <label class="col-sm-3 control-label">调整类型:</label> | |
17 | 31 | <div class="col-sm-8"> |
18 | - <input id="companyCode" name="companyCode" class="form-control" type="text" readonly="readonly"> | |
32 | + <select id="problemType" name="problemType" class="form-control" th:with="problemType=${@dict.getType('adjustType')}"> | |
33 | + <option th:each="dict : ${problemType}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
34 | + </select> | |
19 | 35 | </div> |
20 | 36 | </div> |
21 | 37 | <div class="form-group"> |
22 | - <label class="col-sm-3 control-label">盘点单编号:</label> | |
38 | + <label class="col-sm-3 control-label">盘点单编码:</label> | |
23 | 39 | <div class="col-sm-8"> |
24 | - <input id="cyclecountHeadCode" name="cyclecountHeadCode" class="form-control" type="text" readonly="readonly"> | |
40 | + <input id="cyclecountHeadCode" name="cyclecountHeadCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
25 | 41 | </div> |
26 | 42 | </div> |
27 | 43 | <div class="form-group"> |
28 | - <label class="col-sm-3 control-label">物料编码:</label> | |
44 | + <label class="col-sm-3 control-label">质检单编码:</label> | |
29 | 45 | <div class="col-sm-8"> |
30 | - <input id="materialCode" name="materialCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
46 | + <input id="checkCode" name="checkCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
31 | 47 | </div> |
32 | 48 | </div> |
33 | 49 | <div class="form-group"> |
34 | - <label class="col-sm-3 control-label">库位编码:</label> | |
50 | + <label class="col-sm-3 control-label">关联上游单编码:</label> | |
35 | 51 | <div class="col-sm-8"> |
36 | - <input id="locationCode" name="locationCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
52 | + <input id="referCode" name="referCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
37 | 53 | </div> |
38 | 54 | </div> |
39 | 55 | <div class="form-group"> |
40 | - <label class="col-sm-3 control-label">容器编号:</label> | |
56 | + <label class="col-sm-3 control-label">关联上游说明:</label> | |
41 | 57 | <div class="col-sm-8"> |
42 | - <input id="containerCode" name="containerCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
58 | + <input id="referReason" name="referReason" class="form-control" type="text" > | |
43 | 59 | </div> |
44 | 60 | </div> |
45 | - <div class="form-group"> | |
61 | + <!--<div class="form-group"> | |
46 | 62 | <label class="col-sm-3 control-label">库存状态:</label> |
47 | 63 | <div class="col-sm-8"> |
48 | 64 | <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}"> |
49 | 65 | <option th:each="dict : ${inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> |
50 | 66 | </select> |
51 | 67 | </div> |
52 | - </div> | |
53 | - <div class="form-group"> | |
54 | - <label class="col-sm-3 control-label">系统数量:</label> | |
55 | - <div class="col-sm-8"> | |
56 | - <input id="systemQty" name="systemQty" value="0" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" readonly="readonly"> | |
57 | - </div> | |
58 | - </div> | |
59 | - <div class="form-group"> | |
60 | - <label class="col-sm-3 control-label">实际数量:</label> | |
61 | - <div class="col-sm-8"> | |
62 | - <input id="countedQty" name="countedQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > | |
63 | - </div> | |
64 | - </div> | |
65 | - <div class="form-group"> | |
66 | - <label class="col-sm-3 control-label">差异数量:</label> | |
67 | - <div class="col-sm-8"> | |
68 | - <input id="gapQty" name="gapQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > | |
69 | - </div> | |
70 | - </div> | |
71 | - <div class="form-group"> | |
72 | - <label class="col-sm-3 control-label">调整数量:</label> | |
73 | - <div class="col-sm-8"> | |
74 | - <input id="adjustQty" name="adjustQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')"> | |
75 | - </div> | |
76 | - </div> | |
77 | - | |
78 | - <div class="form-group"> | |
79 | - <label class="col-sm-3 control-label">批次:</label> | |
80 | - <div class="col-sm-8"> | |
81 | - <input id="batch" name="batch" class="form-control" type="text" > | |
82 | - </div> | |
83 | - </div> | |
84 | - <div class="form-group"> | |
85 | - <label class="col-sm-3 control-label">批号:</label> | |
86 | - <div class="col-sm-8"> | |
87 | - <input id="lot" name="lot" class="form-control" type="text" > | |
88 | - </div> | |
89 | - </div> | |
90 | - <div class="form-group"> | |
91 | - <label class="col-sm-3 control-label">项目号:</label> | |
92 | - <div class="col-sm-8"> | |
93 | - <input id="project" name="project" class="form-control" type="text" > | |
94 | - </div> | |
95 | - </div> | |
96 | - <div class="form-group"> | |
97 | - <label class="col-sm-3 control-label">生产日期:</label> | |
98 | - <div class="col-sm-8"> | |
99 | - <input id="manufactureDate" name="manufactureDate" class="form-control" type="text" > | |
100 | - </div> | |
101 | - </div> | |
102 | - <div class="form-group"> | |
103 | - <label class="col-sm-3 control-label">失效日期:</label> | |
104 | - <div class="col-sm-8"> | |
105 | - <input id="expirationDate" name="expirationDate" class="form-control" type="text"> | |
106 | - </div> | |
107 | - </div> | |
108 | - | |
68 | + </div>--> | |
109 | 69 | |
110 | 70 | <div class="form-group"> |
111 | 71 | <div class="form-control-static col-sm-offset-9"> |
... | ... | @@ -121,28 +81,12 @@ |
121 | 81 | |
122 | 82 | $("#form-adjustHeader-add").validate({ |
123 | 83 | rules:{ |
124 | - materialCode:{ | |
125 | - required:true, | |
126 | - }, | |
127 | - containerCode:{ | |
128 | - required:true, | |
129 | - }, | |
130 | - locationCode:{ | |
84 | + companyCode:{ | |
131 | 85 | required:true, |
132 | 86 | }, |
133 | - systemQty:{ | |
87 | + problemType:{ | |
134 | 88 | required:true, |
135 | 89 | }, |
136 | - countedQty:{ | |
137 | - required:true, | |
138 | - }, | |
139 | - gapQty:{ | |
140 | - required:true, | |
141 | - }, | |
142 | - adjustQty:{ | |
143 | - required:true, | |
144 | - }, | |
145 | - | |
146 | 90 | //必须填值判定 |
147 | 91 | }, |
148 | 92 | submitHandler: function(form) { |
... | ... |
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... | ... | @@ -131,10 +131,11 @@ |
131 | 131 | field: 'cycleCountCode', |
132 | 132 | title: '盘点单编码' |
133 | 133 | }, |
134 | - /*{ | |
135 | - field: 'problemType', | |
136 | - title: '调整类型' | |
137 | - },*/ | |
134 | + { | |
135 | + field: 'checkCode', | |
136 | + title: '质检单编码' | |
137 | + }, | |
138 | + | |
138 | 139 | { |
139 | 140 | field: 'referCode', |
140 | 141 | title: '关联上游单编码' |
... | ... | @@ -179,9 +180,9 @@ |
179 | 180 | align: 'center', |
180 | 181 | formatter: function (value, row, index) { |
181 | 182 | var actions = []; |
182 | - actions.push('<a class="btn btn-success btn-xs ' + report + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); | |
183 | - actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> '); | |
184 | - actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> '); | |
183 | + /* actions.push('<a class="btn btn-success btn-xs " href="#" onclick="adjustPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); | |
184 | + actions.push('<a class="btn btn-info btn-xs ' + upload + ' " href="#" onclick="upLoad(\'' + row.code + '\',\'' + row.sourceCode + '\')"><i class="fa fa-edit"></i>上传</a> '); | |
185 | + actions.push('<a class="btn btn-danger btn-xs " href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> ');*/ | |
185 | 186 | actions.push('<a style="background: #b5bdc0" class="btn btn-default btn-xs " href="#" onclick="detail(\'' + row.id + '\',\'' + row.code + '\')"><i class="fa fa-list-ul"></i>明细</a>'); |
186 | 187 | return actions.join(''); |
187 | 188 | } |
... | ... | @@ -212,7 +213,7 @@ |
212 | 213 | $("#tabDetail").addClass("in active"); |
213 | 214 | } |
214 | 215 | |
215 | - function cyclecountPrint(id) { | |
216 | + function adjustPrint(id) { | |
216 | 217 | var url = prefix + "/report/" + id; |
217 | 218 | $.modal.open("调整单打印", url); |
218 | 219 | } |
... | ... |
src/main/resources/templates/inventory/adjustHeader/report.html
... | ... | @@ -10,8 +10,8 @@ |
10 | 10 | <tr> |
11 | 11 | <td colspan="10"> |
12 | 12 | <span style="padding-top:40px;width: 40%; float:left;" class="time_c"></span> |
13 | - <h2 style="width:24%;text-align:center;float:left;padding-top:10px;">盘点差异调整单</h2> | |
14 | - <span style="padding-top:20px;width:35%;float:right; text-align: right"><img id="code" th:data="${cyclecountAdjust['code']}"></img></span> | |
13 | + <h2 style="width:24%;text-align:center;float:left;padding-top:10px;">调整单</h2> | |
14 | + <span style="padding-top:20px;width:35%;float:right; text-align: right"><img id="code" th:data="${adjustHeader['code']}"></img></span> | |
15 | 15 | </td> |
16 | 16 | </tr> |
17 | 17 | <tr style="padding:15px 0 5px 0;border-bottom:1px solid #606060"> |
... | ... | @@ -35,7 +35,7 @@ |
35 | 35 | </tr> |
36 | 36 | </thead> |
37 | 37 | <tbody> |
38 | - <tr th:each="row,rowStat : ${details}"> | |
38 | + <tr th:each="row,rowStat : ${adjustDetails}"> | |
39 | 39 | <td th:text="${row.containerCode}"></td> |
40 | 40 | <td th:text="${row.id}"></td> |
41 | 41 | <td th:text="${row.materialCode}"></td> |
... | ... |
src/main/resources/templates/inventory/inventoryDetail/inventoryDetail.html
... | ... | @@ -83,11 +83,11 @@ |
83 | 83 | </div> |
84 | 84 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
85 | 85 | <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" |
86 | - shiro:hasPermission="inventory:inventory:seeOut"> | |
86 | + shiro:hasPermission="inventory:inventoryHeader:seeOut"> | |
87 | 87 | <i class="fa fa-eye"></i> 出库查看 |
88 | 88 | </a> |
89 | 89 | <a class="btn btn-outline btn-primary btn-rounded" onclick="check()" |
90 | - > | |
90 | + shiro:hasPermission="inventory:inventoryDetail:detailCheckTask"> | |
91 | 91 | <i class="fa fa-eye"></i> 在库质检 |
92 | 92 | </a> |
93 | 93 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryHeader/inventoryHeader.html
... | ... | @@ -53,19 +53,24 @@ |
53 | 53 | </form> |
54 | 54 | </div> |
55 | 55 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
56 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()"> | |
56 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="transfer()" | |
57 | + shiro:hasPermission="inventory:inventoryHeader:transfer"> | |
57 | 58 | <i class="fa fa-exchange"></i> 立库移库 |
58 | 59 | </a> |
59 | - <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()"> | |
60 | + <a class="btn btn-outline btn-primary btn-rounded" onclick="checkOut()" | |
61 | + shiro:hasPermission="inventory:inventoryHeader:seeOut"> | |
60 | 62 | <i class="fa fa-eye"></i> 出库查看 |
61 | 63 | </a> |
62 | - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()" shiro:hasPermission="task:task:emptyIn"> | |
64 | + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyIn()" | |
65 | + shiro:hasPermission="inventory:inventoryHeader:emptyIn"> | |
63 | 66 | <i class="fa fa-level-down"></i> 空托入库 |
64 | 67 | </a> |
65 | - <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()" > | |
68 | + <a class="btn btn-outline btn-default btn-rounded" onclick="emptyCheckOut()" | |
69 | + shiro:hasPermission="inventory:inventoryHeader:emptyCheckOut"> | |
66 | 70 | <i class="fa fa fa-eye"></i> 空托出库查看 |
67 | 71 | </a> |
68 | - <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" shiro:hasPermission="task:task:emptyOut"> | |
72 | + <a class="btn btn-outline btn-info btn-rounded" onclick="emptyOut()" | |
73 | + shiro:hasPermission="inventory:inventoryHeader:emptyOut"> | |
69 | 74 | <i class="fa fa-level-up"></i> 空托出库 |
70 | 75 | </a> |
71 | 76 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryTransaction/inventoryTransaction.html
... | ... | @@ -81,7 +81,8 @@ |
81 | 81 | </div> |
82 | 82 | <div class="col-sm-12 select-info"> |
83 | 83 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
84 | - <a class="btn btn-outline btn-success btn-rounded" onclick="report()"> | |
84 | + <a class="btn btn-outline btn-success btn-rounded" onclick="report()" | |
85 | + shiro:hasPermission="inventory:inventoryTransaction:report"> | |
85 | 86 | <i class="fa fa-plus"></i> 打印 |
86 | 87 | </a> |
87 | 88 | </div> |
... | ... |
src/main/resources/templates/inventory/inventoryTransaction/report.html
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <head> |
5 | 5 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
6 | 6 | <head th:include="include :: header"></head> |
7 | - <title>文字</title> | |
7 | + <title>库存交易明细</title> | |
8 | 8 | <!--<link href="css/bootstrap.min.css" rel="stylesheet" />--> |
9 | 9 | <!--<link href="css/font-awesome.min.css" rel="stylesheet" />--> |
10 | 10 | <!--<!–[if IE]>--> |
... | ... | @@ -33,19 +33,19 @@ |
33 | 33 | <caption style="font-size:18px;text-align:center; color:#333; padding-bottom: 3px;">长沙华恒机器人系统有限公司</caption> |
34 | 34 | <tbody> |
35 | 35 | <tr> |
36 | - <td width="20%" scope="col">存货编码</td> | |
36 | + <td width="20%" scope="col">物料编码</td> | |
37 | 37 | <td colspan="2" scope="col" style="text-align:center"> |
38 | 38 | <span th:text="${row.materialCode}" ></span> |
39 | 39 | </td> |
40 | 40 | </tr> |
41 | 41 | <tr> |
42 | - <td scope="col">存货代码</td> | |
42 | + <td scope="col">重量</td> | |
43 | 43 | <td colspan="2" scope="col" style="text-align:center"> |
44 | - <span th:text="${row.userDef1}" ></span> | |
44 | + <span th:text="${row.weight}" ></span> | |
45 | 45 | </td> |
46 | 46 | </tr> |
47 | 47 | <tr style="vertical-align:middle"> |
48 | - <td>存货名称</td> | |
48 | + <td>物料名称</td> | |
49 | 49 | <td style="text-align:center"> |
50 | 50 | <span th:text="${row.materialName}"></span> |
51 | 51 | </td> |
... | ... | @@ -56,22 +56,22 @@ |
56 | 56 | </td> |
57 | 57 | </tr> |
58 | 58 | <tr> |
59 | - <td>规格型号</td> | |
59 | + <td>物料规格</td> | |
60 | 60 | <td style="text-align:center"> |
61 | 61 | <span th:text="${row.materialSpec}"></span> |
62 | 62 | </td> |
63 | 63 | </tr> |
64 | 64 | <tr> |
65 | - <td>数 量</td> | |
65 | + <td>任务数量</td> | |
66 | 66 | <td style="text-align:center; padding: 0"> |
67 | 67 | <!--<input name="" type="text" style="line-height:18px; border:0; text-align:center;" th:text="${receiptDetail.qty}"/>--> |
68 | - <input id="qty" name="qty" th:value="*{row.qty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/> | |
68 | + <input id="qty" name="qty" th:value="*{row.taskQty}" class="form-control" type="text" style="text-align:center;height:30px;border: none"/> | |
69 | 69 | </td> |
70 | 70 | </tr> |
71 | 71 | <tr> |
72 | - <td scope="col">生产编号</td> | |
72 | + <td scope="col">项目号</td> | |
73 | 73 | <td colspan="2" scope="col" style="text-align:center"> |
74 | - <span th:text="${row.project}" ></span> | |
74 | + <span th:text="${row.projectNo}" ></span> | |
75 | 75 | </td> |
76 | 76 | </tr> |
77 | 77 | </tbody> |
... | ... | @@ -102,12 +102,12 @@ |
102 | 102 | var code16=$(this).children()[1].children[1].innerText; |
103 | 103 | var name=$(this).children()[1].children[2].innerText; |
104 | 104 | var spec=$(this).children()[1].children[3].innerText; |
105 | - var project=$(this).children()[1].children[5].innerText; | |
105 | + var projectNo=$(this).children()[1].children[5].innerText; | |
106 | 106 | company=company.substring(5); |
107 | 107 | code16=code16.substring(5); |
108 | 108 | name=name.substring(5); |
109 | 109 | spec=spec.substring(5); |
110 | - project=project.substring(5); | |
110 | + projectNo=projectNo.substring(5); | |
111 | 111 | var reg=/\t/; |
112 | 112 | name=name.replace(reg,""); |
113 | 113 | var qty=$(this).find('input').val(); |
... | ... |