Commit 772c3ef2fd68cbe6136b57cf1fad89ef89d2adf3
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
15 changed files
with
322 additions
and
50 deletions
src/main/java/com/huaheng/pc/config/container/service/ContainerService.java
... | ... | @@ -17,4 +17,7 @@ public interface ContainerService extends IService<Container>{ |
17 | 17 | |
18 | 18 | void updateLocationCodeAndStatus(String containerCode, String locationCode, String status); |
19 | 19 | |
20 | + void removeContainer(String containType, String containCode); | |
21 | + | |
22 | + void removeByCode(String containCode); | |
20 | 23 | } |
... | ... |
src/main/java/com/huaheng/pc/config/container/service/ContainerServiceImpl.java
... | ... | @@ -18,6 +18,7 @@ import java.util.List; |
18 | 18 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
19 | 19 | import com.huaheng.pc.config.container.domain.Container; |
20 | 20 | import com.huaheng.pc.config.container.mapper.ContainerMapper; |
21 | +import org.springframework.transaction.annotation.Transactional; | |
21 | 22 | |
22 | 23 | @Service |
23 | 24 | public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container> implements ContainerService{ |
... | ... | @@ -127,5 +128,38 @@ public class ContainerServiceImpl extends ServiceImpl<ContainerMapper, Container |
127 | 128 | containerMapper.updateLocationCodeAndStatus(ShiroUtils.getWarehouseCode(), containerCode, locationCode, status); |
128 | 129 | } |
129 | 130 | |
131 | + /** | |
132 | + * 如果为临时容器,在取消组盘和出库任务完成时删除容器 | |
133 | + * @param containerType 容器类型 | |
134 | + * @param containerCode 容器编码 | |
135 | + * @return | |
136 | + */ | |
137 | + @Transactional | |
138 | + public void removeContainer(String containerType, String containerCode) { | |
139 | + if ("LS".equals(containerType)) { | |
140 | + LambdaQueryWrapper<Container> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
141 | + lambdaQueryWrapper.eq(Container::getCode,containerCode); | |
142 | + if (!this.remove(lambdaQueryWrapper)){ | |
143 | + throw new ServiceException("删除临时容器失败"); | |
144 | + } | |
145 | + } | |
146 | + } | |
147 | + | |
148 | + /** | |
149 | + * 如果为临时容器出库任务完成时删除容器 | |
150 | + * @param containCode | |
151 | + */ | |
152 | + @Override | |
153 | + @Transactional | |
154 | + public void removeByCode(String containCode) { | |
155 | + LambdaQueryWrapper<Container> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
156 | + lambdaQueryWrapper.eq(Container::getCode, containCode); | |
157 | + Container container = this.getOne(lambdaQueryWrapper); | |
158 | + if ("LS".equals(container.getContainerType())) { | |
159 | + if (!this.removeById(container.getId())){ | |
160 | + throw new ServiceException("删除临时容器失败"); | |
161 | + } | |
162 | + } | |
130 | 163 | |
164 | + } | |
131 | 165 | } |
... | ... |
src/main/java/com/huaheng/pc/config/waveMaster/controller/WaveMasterController.java
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... | ... | @@ -16,7 +16,9 @@ import com.huaheng.framework.web.page.TableDataInfo; |
16 | 16 | import com.huaheng.framework.web.page.TableSupport; |
17 | 17 | import com.huaheng.pc.inventory.adjustDetail.domain.AdjustDetail; |
18 | 18 | import com.huaheng.pc.inventory.adjustDetail.service.AdjustDetailService; |
19 | +import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; | |
19 | 20 | import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; |
21 | +import org.apache.shiro.authz.annotation.RequiresPermissions; | |
20 | 22 | import org.springframework.stereotype.Controller; |
21 | 23 | import org.springframework.ui.ModelMap; |
22 | 24 | import org.springframework.web.bind.annotation.GetMapping; |
... | ... | @@ -117,11 +119,59 @@ public class adjustDetailController extends BaseController { |
117 | 119 | for (Integer id : integers) |
118 | 120 | { |
119 | 121 | AdjustDetail adjustDetailEdit = adjustDetailService.getById(id); |
122 | + //单据先审批 | |
123 | + if(StringUtils.isEmpty(adjustDetailEdit.getAgreeBy()) || adjustDetailEdit.getStatus() < 1 ){ | |
124 | + return AjaxResult.error("单据未审批不允许调整"); | |
125 | + } | |
120 | 126 | adjustDetailService.updateAdjustDetail(adjustDetailEdit); |
121 | 127 | } |
122 | 128 | return AjaxResult.success("调整下发成功!"); |
123 | 129 | } |
124 | 130 | |
131 | + /** | |
132 | + * 调整审批 | |
133 | + * @param ids | |
134 | + * @return | |
135 | + */ | |
136 | + @Log(title = "库存-调整单", operating = "调整审批", action = BusinessType.OTHER) | |
137 | + @PostMapping("/adjustAgree") | |
138 | + @ResponseBody | |
139 | + public AjaxResult adjustAgree (String ids){ | |
140 | + | |
141 | + if(ids == null){ | |
142 | + throw new SecurityException("ID不能为空!"); | |
143 | + } | |
144 | + Integer[] integers = Convert.toIntArray(ids); | |
145 | + for (Integer id : integers){ | |
146 | + AdjustDetail adjustDetailEdit = adjustDetailService.getById(id); | |
147 | + adjustDetailService.adjustAgree(adjustDetailEdit); | |
148 | + | |
149 | + } | |
150 | + return AjaxResult.success("审批已下发!"); | |
151 | + } | |
152 | + | |
153 | + /** | |
154 | + * 删除调整单明细 | |
155 | + */ | |
156 | + //@RequiresPermissions("inventory:cyclecountDetail:remove") | |
157 | + @Log(title = "库存-调整", operating = "删除调整单明细", action = BusinessType.DELETE) | |
158 | + @PostMapping( "/remove") | |
159 | + @ResponseBody | |
160 | + public AjaxResult remove(Integer id){ | |
161 | + if(id == null){ | |
162 | + return AjaxResult.error("ID不能为空!"); | |
163 | + } | |
164 | + AdjustDetail adjustDetail = adjustDetailService.getById(id); | |
165 | + if(adjustDetail.getStatus() > 0 ){ | |
166 | + return AjaxResult.error("单据状态不允许删除"); | |
167 | + } | |
168 | + adjustDetailService.removeById(id); | |
169 | + | |
170 | + return AjaxResult.success("删除成功!"); | |
171 | + } | |
172 | + | |
173 | + | |
174 | + | |
125 | 175 | |
126 | 176 | |
127 | 177 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailService.java
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
... | ... | @@ -39,10 +39,6 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
39 | 39 | @Resource |
40 | 40 | private AdjustHeaderService adjustHeaderService; |
41 | 41 | @Resource |
42 | - private CycleCountHeaderService cycleCountHeaderService; | |
43 | - @Resource | |
44 | - private CycleCountDetailService cycleCountDetailService; | |
45 | - @Resource | |
46 | 42 | private InventoryHeaderService inventoryHeaderService; |
47 | 43 | @Resource |
48 | 44 | private InventoryDetailService inventoryDetailService; |
... | ... | @@ -59,6 +55,30 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
59 | 55 | |
60 | 56 | |
61 | 57 | |
58 | + | |
59 | + /** | |
60 | + * 调整审批 | |
61 | + * @param adjustDetail | |
62 | + * @return | |
63 | + */ | |
64 | + @Transactional | |
65 | + @Override | |
66 | + public AjaxResult adjustAgree(AdjustDetail adjustDetail) { | |
67 | + //修改状态,审批人栏填入名称,修改状态 | |
68 | + if(adjustDetail.getStatus() > 1){ | |
69 | + return AjaxResult.error("单据状态无法审批!"); | |
70 | + } | |
71 | + adjustDetail.setAgreeBy(ShiroUtils.getLoginName()); | |
72 | + adjustDetail.setAgreeTime(new Date()); | |
73 | + adjustDetail.setStatus(1); | |
74 | + adjustDetail.setLastUpdated(new Date()); | |
75 | + adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
76 | + this.saveOrUpdate(adjustDetail); | |
77 | + | |
78 | + return AjaxResult.success("审批完成!"); | |
79 | + } | |
80 | + | |
81 | + | |
62 | 82 | /** |
63 | 83 | * 调整库存 |
64 | 84 | * 调整数量,调整库存状态 |
... | ... | @@ -89,7 +109,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
89 | 109 | LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(location); |
90 | 110 | location = locationService.getOne(lambdaQueryWrapper); |
91 | 111 | if (!location.getStatus().equals("empty")) { |
92 | - throw new SecurityException(inventoryDetail.getId() + "库存非空闲,请等待任务完成再进行调整!"); | |
112 | + throw new SecurityException(inventoryDetail.getId() + "库存非空闲,请等待其他任务完成再进行调整!"); | |
93 | 113 | } |
94 | 114 | |
95 | 115 | //判断调整哪一个属性值 |
... | ... | @@ -123,6 +143,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
123 | 143 | return AjaxResult.success("调整库存成功!"); |
124 | 144 | } |
125 | 145 | |
146 | + | |
126 | 147 | /** |
127 | 148 | * 调整修改库存数量 |
128 | 149 | * @param adjustDetail |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
... | ... | @@ -174,14 +174,14 @@ public class CycleCountDetailController extends BaseController { |
174 | 174 | if(cyclecountHeader == null){ |
175 | 175 | return AjaxResult.error("主单据不存在"); |
176 | 176 | } |
177 | - if(cyclecountHeader.getStatusCyc() > 5){ | |
177 | + if(cyclecountHeader.getStatusCyc() > 1){ | |
178 | 178 | return AjaxResult.error("主单据状态不允许删除"); |
179 | 179 | } |
180 | 180 | for (Integer id : detailsIds) |
181 | 181 | { |
182 | 182 | //只允许删除新建状态下的盘点明细。 |
183 | 183 | CycleCountDetail cyclecountDetails = cycleCountDetailService.getById(id); |
184 | - if(cyclecountDetails.getEnableStatus() > 5){ | |
184 | + if(cyclecountDetails.getEnableStatus() > 1){ | |
185 | 185 | return AjaxResult.error("盘点已开始执行,不允许删除该盘点明细!"); |
186 | 186 | } |
187 | 187 | cycleCountDetailService.removeById(id); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -14,6 +14,7 @@ import com.huaheng.pc.config.location.domain.Location; |
14 | 14 | import com.huaheng.pc.config.location.service.LocationService; |
15 | 15 | import com.huaheng.pc.config.material.domain.Material; |
16 | 16 | import com.huaheng.pc.config.material.service.MaterialService; |
17 | +import com.huaheng.pc.config.warehouse.domain.Warehouse; | |
17 | 18 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
18 | 19 | import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; |
19 | 20 | import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; |
... | ... | @@ -142,6 +143,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
142 | 143 | * @return |
143 | 144 | */ |
144 | 145 | @Override |
146 | + @Transactional | |
145 | 147 | public Boolean cancelByIds(List<Integer> ids) { |
146 | 148 | for (Integer id : ids) { |
147 | 149 | //如果已生成任务则不允许取消组盘 |
... | ... | @@ -160,6 +162,10 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
160 | 162 | containerDetailLambda = Wrappers.lambdaQuery(); |
161 | 163 | containerDetailLambda.eq(ReceiptContainerDetail::getReceiptId, receiptContainerDetail.getReceiptId()); |
162 | 164 | List<ReceiptContainerDetail> containerDetailList = receiptContainerDetailService.list(containerDetailLambda); |
165 | + | |
166 | + //如果是临时容器,取消组盘时删除容器表 | |
167 | + containerService.removeContainer(receiptContainerDetail.getContainerType(), receiptContainerDetail.getContainerCode()); | |
168 | + | |
163 | 169 | //如果入库组盘没有该入库单的组盘信息,回滚入库单状态 |
164 | 170 | if (containerDetailList == null){ |
165 | 171 | ReceiptHeader receiptHeader = new ReceiptHeader(); |
... | ... |
src/main/java/com/huaheng/pc/task/taskHeader/service/TaskHeaderServiceImpl.java
... | ... | @@ -1174,6 +1174,7 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1174 | 1174 | * 完成出库任务 |
1175 | 1175 | * */ |
1176 | 1176 | @Override |
1177 | + @Transactional | |
1177 | 1178 | public void completeShipmentTask(TaskHeader task) { |
1178 | 1179 | //获取所有子任务 |
1179 | 1180 | TaskDetail condition = new TaskDetail(); |
... | ... | @@ -1246,6 +1247,10 @@ public class TaskHeaderServiceImpl extends ServiceImpl<TaskHeaderMapper, TaskHea |
1246 | 1247 | task.setLastUpdatedBy(ShiroUtils.getLoginName()); |
1247 | 1248 | task.setLastUpdated(new Date()); |
1248 | 1249 | taskHeaderService.updateById(task); |
1250 | + | |
1251 | + //如果是临时容器出库完成后删除容器 | |
1252 | + containerService.removeByCode(task.getContainerCode()); | |
1253 | + | |
1249 | 1254 | //将库位状态改为空闲,如果是整出的对应的容器也清空 |
1250 | 1255 | Location locationRecord = new Location(); |
1251 | 1256 | locationRecord.setStatus("empty"); |
... | ... |
src/main/resources/templates/config/waveMaster/waveMaster.html
... | ... | @@ -48,10 +48,10 @@ |
48 | 48 | </div> |
49 | 49 | |
50 | 50 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
51 | - <a class="btn btn-outline btn-success btn-rounded" onclick="matserAdd()" shiro:hasPermission="config:waveMaster:add"> | |
51 | + <a class="btn btn-outline btn-success btn-rounded" onclick="masterAdd()" shiro:hasPermission="config:waveMaster:add"> | |
52 | 52 | <i class="fa fa-plus"></i> 新增 |
53 | 53 | </a> |
54 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:waveMaster:remove"> | |
54 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="masterBatRemove()" shiro:hasPermission="config:waveMaster:remove"> | |
55 | 55 | <i class="fa fa-trash-o"></i> 删除 |
56 | 56 | </a> |
57 | 57 | </div> |
... | ... | @@ -87,11 +87,11 @@ |
87 | 87 | </form> |
88 | 88 | </div> |
89 | 89 | <div class="btn-group hidden-xs" id="toolbar1" role="group"> |
90 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
90 | + <a class="btn btn-outline btn-success btn-rounded" onclick="headerAdd()" | |
91 | 91 | shiro:hasPermission="config:waveFlowHeader:add"> |
92 | 92 | <i class="fa fa-plus"></i> 新增 |
93 | 93 | </a> |
94 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
94 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="headerBatRemove()" | |
95 | 95 | shiro:hasPermission="config:waveFlowHeader:remove"> |
96 | 96 | <i class="fa fa-trash-o"></i> 删除 |
97 | 97 | </a> |
... | ... | @@ -102,6 +102,18 @@ |
102 | 102 | </div> |
103 | 103 | |
104 | 104 | <div class="tab-pane fade" id="tabDetail"> |
105 | + | |
106 | + <div class="btn-group hidden-xs" id="toolbar2" role="group"> | |
107 | + <a class="btn btn-outline btn-success btn-rounded" onclick="detailAdd()" | |
108 | + shiro:hasPermission="config:waveFlowHeader:add"> | |
109 | + <i class="fa fa-plus"></i> 新增 | |
110 | + </a> | |
111 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="detailBatRemove()" | |
112 | + shiro:hasPermission="config:waveFlowHeader:remove"> | |
113 | + <i class="fa fa-trash-o"></i> 删除 | |
114 | + </a> | |
115 | + </div> | |
116 | + | |
105 | 117 | <table id="bootstrap-table2" data-mobile-responsive="true" |
106 | 118 | class="table table-bordered table-hover"></table> |
107 | 119 | </div> |
... | ... | @@ -261,8 +273,8 @@ |
261 | 273 | align: 'center', |
262 | 274 | formatter: function(value, row, index) { |
263 | 275 | var actions = []; |
264 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); | |
265 | - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); | |
276 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="masterEdit(\''+row.id+'\')" ><i class="fa fa-edit"></i>编辑</a> '); | |
277 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="masterDel(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); | |
266 | 278 | return actions.join(''); |
267 | 279 | } |
268 | 280 | }], |
... | ... | @@ -342,8 +354,8 @@ |
342 | 354 | align: 'center', |
343 | 355 | formatter: function(value, row, index) { |
344 | 356 | var actions = []; |
345 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag1 + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
346 | - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag1 + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
357 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag1 + '" href="#" onclick="headerEdit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
358 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag1 + '" href="#" onclick="headerRemove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
347 | 359 | return actions.join(''); |
348 | 360 | } |
349 | 361 | }], |
... | ... | @@ -374,6 +386,7 @@ |
374 | 386 | search: false, |
375 | 387 | sortName: "id", |
376 | 388 | sortOrder: "desc", |
389 | + toolbar: "#toolbar2", | |
377 | 390 | columns: [{ |
378 | 391 | checkbox: true |
379 | 392 | }, |
... | ... | @@ -453,8 +466,8 @@ |
453 | 466 | align: 'center', |
454 | 467 | formatter: function(value, row, index) { |
455 | 468 | var actions = []; |
456 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
457 | - actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
469 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="detailEdit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
470 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="detailRemove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
458 | 471 | return actions.join(''); |
459 | 472 | } |
460 | 473 | }] |
... | ... | @@ -463,6 +476,7 @@ |
463 | 476 | function header() { |
464 | 477 | $("#myTab li").removeClass("active"); |
465 | 478 | $("#tabMaster").removeClass("in active"); |
479 | + $("#tabDetail").removeClass("in active"); | |
466 | 480 | $("#myTab li:eq(1)").addClass("active"); |
467 | 481 | $("#tabHeader").addClass("in active"); |
468 | 482 | loadHeader(); |
... | ... | @@ -513,9 +527,109 @@ |
513 | 527 | detail(); |
514 | 528 | } |
515 | 529 | |
516 | - function matserAdd() { | |
530 | + function masterAdd() { | |
517 | 531 | var url = prefix+"/add"; |
518 | - $.modal.open("添加" + $.table._option.modalName, url); | |
532 | + $.modal.open("添加波次主表", url); | |
533 | + } | |
534 | + | |
535 | + function masterEdit(id) { | |
536 | + var url = prefix+"/edit/"+id; | |
537 | + $.modal.open("修改主表",url); | |
538 | + } | |
539 | + | |
540 | + function masterDel(id) { | |
541 | + $.modal.confirm("确定删除该条波次主表信息吗?", function() { | |
542 | + var url = prefix+"remove"; | |
543 | + var data = { "ids": id }; | |
544 | + $.operate.submit(url, "post", "json", data); | |
545 | + }); | |
546 | + } | |
547 | + | |
548 | + function masterBatRemove() { | |
549 | + var rows = $("#bootstrap-table").bootstrapTable('getSelections'); | |
550 | + if (rows.length == 0) { | |
551 | + $.modal.alertWarning("请至少选择一条记录"); | |
552 | + return; | |
553 | + } | |
554 | + $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() { | |
555 | + var url = prefix+"/remove"; | |
556 | + var ids; | |
557 | + $.each(rows, function (i, row) { | |
558 | + ids = row.id+","; | |
559 | + }); | |
560 | + var data = { "ids": ids }; | |
561 | + $.operate.submit(url, "post", "json", data); | |
562 | + }); | |
563 | + } | |
564 | + | |
565 | + function headerAdd() { | |
566 | + var url = prefix1+"/add"; | |
567 | + $.modal.open("添加主表", url); | |
568 | + } | |
569 | + | |
570 | + function headerEdit(id){ | |
571 | + var url = prefix1+"/edit/"+id; | |
572 | + $.modal.open("修改主表", url); | |
573 | + } | |
574 | + | |
575 | + function headerRemove(id) { | |
576 | + $.modal.confirm("确定删除该条主表信息吗?", function() { | |
577 | + var url = prefix1+"remove"; | |
578 | + var data = { "ids": id }; | |
579 | + $.operate.submit(url, "post", "json", data); | |
580 | + }); | |
581 | + } | |
582 | + | |
583 | + function headerBatRemove() { | |
584 | + var rows = $("#bootstrap-table1").bootstrapTable('getSelections'); | |
585 | + if (rows.length == 0) { | |
586 | + $.modal.alertWarning("请至少选择一条记录"); | |
587 | + return; | |
588 | + } | |
589 | + $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() { | |
590 | + var url = prefix1+"/remove"; | |
591 | + var ids; | |
592 | + $.each(rows, function (i, row) { | |
593 | + ids = row.id+","; | |
594 | + }); | |
595 | + var data = { "ids": ids }; | |
596 | + $.operate.submit(url, "post", "json", data); | |
597 | + }); | |
598 | + } | |
599 | + | |
600 | + function detailAdd() { | |
601 | + var url = prefix2+"/add"; | |
602 | + $.modal.open("添加明细", url); | |
603 | + } | |
604 | + | |
605 | + function detailEdit(id) { | |
606 | + var url = prefix2+"/edit/"+id; | |
607 | + $.modal.open("修改明细", url); | |
608 | + } | |
609 | + | |
610 | + function detailRemove(id) { | |
611 | + $.modal.confirm("确定删除该条明细信息吗?", function() { | |
612 | + var url = prefix2+"remove"; | |
613 | + var data = { "ids": id }; | |
614 | + $.operate.submit(url, "post", "json", data); | |
615 | + }); | |
616 | + } | |
617 | + | |
618 | + function detailBatRemove() { | |
619 | + var rows = $("#bootstrap-table2").bootstrapTable('getSelections'); | |
620 | + if (rows.length == 0) { | |
621 | + $.modal.alertWarning("请至少选择一条记录"); | |
622 | + return; | |
623 | + } | |
624 | + $.modal.confirm("确认要删除选中的" + rows.length + "条数据吗?", function() { | |
625 | + var url = prefix2+"/remove"; | |
626 | + var ids; | |
627 | + $.each(rows, function (i, row) { | |
628 | + ids = row.id+","; | |
629 | + }); | |
630 | + var data = { "ids": ids }; | |
631 | + $.operate.submit(url, "post", "json", data); | |
632 | + }); | |
519 | 633 | } |
520 | 634 | </script> |
521 | 635 | </body> |
... | ... |
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... | ... | @@ -94,8 +94,8 @@ |
94 | 94 | <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> |
95 | 95 | <i class="fa fa-plus"></i> 新增 |
96 | 96 | </a> |
97 | - <a class="btn btn-outline btn-primary btn-rounded" onclick=""> | |
98 | - <i class="fa fa-edit"></i> 审核 | |
97 | + <a class="btn btn-outline btn-primary btn-rounded" onclick="agree()"> | |
98 | + <i class="fa fa-edit"></i> 审批 | |
99 | 99 | </a> |
100 | 100 | <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> |
101 | 101 | <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"--> |
... | ... | @@ -320,7 +320,7 @@ |
320 | 320 | align: 'center', |
321 | 321 | formatter: function (value, row, index) { |
322 | 322 | var actions = []; |
323 | - actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> '); | |
323 | + actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> '); | |
324 | 324 | return actions.join(''); |
325 | 325 | } |
326 | 326 | } |
... | ... | @@ -353,10 +353,22 @@ |
353 | 353 | |
354 | 354 | }); |
355 | 355 | |
356 | + /*审批*/ | |
357 | + function agree() { | |
358 | + var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id); | |
359 | + if (rows.length == 0) { | |
360 | + $.modal.alertWarning("请至少选择一条记录"); | |
361 | + return; | |
362 | + } | |
363 | + $.modal.confirm("审批请谨慎核对数据!" | |
364 | + , function() { | |
365 | + var url = prefix + "/adjustAgree"; | |
366 | + var data = { "ids": rows.join() }; | |
367 | + postInner(url, data); | |
368 | + }); | |
369 | + } | |
356 | 370 | |
357 | - /* | |
358 | - *盘点差异调整 | |
359 | - * */ | |
371 | + /*调整*/ | |
360 | 372 | function addAdjust() { |
361 | 373 | var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id); |
362 | 374 | if (rows.length == 0) { |
... | ... | @@ -365,9 +377,49 @@ |
365 | 377 | } |
366 | 378 | $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!" |
367 | 379 | , function() { |
368 | - var url = prefix + "/adjustEdit"; | |
369 | - var data = { "ids": rows.join() }; | |
370 | - postInner(url, data); | |
380 | + var url = prefix + "/adjustEdit"; | |
381 | + var data = { "ids": rows.join() }; | |
382 | + postInner(url, data); | |
383 | + }); | |
384 | + } | |
385 | + | |
386 | + function postInner(url,data) { | |
387 | + $.modal.loading("正在处理中,请稍后..."); | |
388 | + $.ajax({ | |
389 | + url:url, | |
390 | + type:"post", | |
391 | + data:data, | |
392 | + success:function (result) { | |
393 | + if (result.code == web_status.SUCCESS) { | |
394 | + $.modal.msgSuccess(result.msg); | |
395 | + $.table.refresh(); | |
396 | + } else { | |
397 | + $.modal.alertError(result.msg); | |
398 | + } | |
399 | + $.modal.closeLoading(); | |
400 | + } | |
401 | + }) | |
402 | + } | |
403 | + | |
404 | + /*单条删除*/ | |
405 | + function remove(id) { | |
406 | + $.modal.confirm("确定删除该条" + $.table._option.modalName + "信息吗?", function() { | |
407 | + var url = prefix+"/remove"; | |
408 | + var data = { "id": id }; | |
409 | + $.ajax({ | |
410 | + url: url, | |
411 | + type:"post", | |
412 | + data:data, | |
413 | + success:function (result) { | |
414 | + if (result.code == web_status.SUCCESS) { | |
415 | + $.modal.msgSuccess(result.msg); | |
416 | + $.table.refresh(); | |
417 | + } else { | |
418 | + $.modal.alertError(result.msg); | |
419 | + } | |
420 | + $.modal.closeLoading(); | |
421 | + } | |
422 | + }) | |
371 | 423 | }); |
372 | 424 | } |
373 | 425 | |
... | ... | @@ -402,24 +454,6 @@ |
402 | 454 | // shadeClose: true, //点击遮罩关闭层 |
403 | 455 | }) |
404 | 456 | } |
405 | - function postInner(url,data) { | |
406 | - $.modal.loading("正在处理中,请稍后..."); | |
407 | - $.ajax({ | |
408 | - url:url, | |
409 | - type:"post", | |
410 | - data:data, | |
411 | - success:function (result) { | |
412 | - if (result.code == web_status.SUCCESS) { | |
413 | - $.modal.msgSuccess(result.msg); | |
414 | - update(); | |
415 | - } else { | |
416 | - $.modal.alertError(result.msg); | |
417 | - } | |
418 | - $.modal.closeLoading(); | |
419 | - } | |
420 | - }) | |
421 | - } | |
422 | - | |
423 | 457 | |
424 | 458 | </script> |
425 | 459 | </body> |
... | ... |
src/main/resources/templates/receipt/receiptContainerHeader/receiptContainerHeader.html
... | ... | @@ -50,6 +50,7 @@ |
50 | 50 | </li> |
51 | 51 | <li> |
52 | 52 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
53 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptContainerHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
53 | 54 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptHeader:export"><i class="fa fa-download"></i> 导出</a>--> |
54 | 55 | </li> |
55 | 56 | </ul> |
... | ... |
src/main/resources/templates/receipt/receiptDetail/receiptDetail.html
... | ... | @@ -24,6 +24,7 @@ |
24 | 24 | <!--</li>--> |
25 | 25 | <li> |
26 | 26 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
27 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptDetail-form')"><i class="fa fa-refresh"></i> 重置</a> | |
27 | 28 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="receipt:receiptDetail:export"><i class="fa fa-download"></i> 导出</a>--> |
28 | 29 | </li> |
29 | 30 | </ul> |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -36,7 +36,7 @@ |
36 | 36 | 入库单号:<input type="text" name="code"/> |
37 | 37 | </li> |
38 | 38 | <li> |
39 | - 上游单号:<input type="text" name="sourceCode"/> | |
39 | + 上游单号:<input type="text" name="referCode"/> | |
40 | 40 | </li> |
41 | 41 | <li> |
42 | 42 | 货主:<select id="companyCode" name="companyCode" th:with="list=${@companyService.getCode()}"> |
... | ... | @@ -72,6 +72,7 @@ |
72 | 72 | </li> |
73 | 73 | <li> |
74 | 74 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
75 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
75 | 76 | </li> |
76 | 77 | </ul> |
77 | 78 | </div> |
... | ... |
src/main/resources/templates/receipt/receiptHeaderHistory/receiptHeaderHistory.html
... | ... | @@ -21,6 +21,9 @@ |
21 | 21 | 入库单号:<input type="text" name="code"/> |
22 | 22 | </li> |
23 | 23 | <li> |
24 | + 上游单号:<input type="text" name="referCode"/> | |
25 | + </li> | |
26 | + <li> | |
24 | 27 | <!--入库类型:<input type="text" name="sourceCode"/>--> |
25 | 28 | 入库类型:<select name="type" th:with="type=${@receiptTypeService.getType()}"> |
26 | 29 | <option value="">所有</option> |
... | ... |