Commit 17a8597c27b30245a1e3e28195d10162c7c30126
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
14 changed files
with
230 additions
and
47 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/shipmentPreference/service/ShipmentPreferenceServiceImpl.java
... | ... | @@ -7,6 +7,8 @@ import com.huaheng.common.exception.service.ServiceException; |
7 | 7 | import com.huaheng.common.support.Convert; |
8 | 8 | import com.huaheng.common.utils.StringUtils; |
9 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
10 | +import com.huaheng.pc.config.configValue.domain.ConfigValue; | |
11 | +import com.huaheng.pc.config.configValue.service.ConfigValueService; | |
10 | 12 | import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference; |
11 | 13 | import com.huaheng.pc.config.shipmentPreference.mapper.ShipmentPreferenceMapper; |
12 | 14 | import com.huaheng.pc.config.statusFlow.domain.StatusFlowDetail; |
... | ... | @@ -32,6 +34,8 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc |
32 | 34 | private StatusFlowDetailService statusFlowDetailService; |
33 | 35 | @Autowired |
34 | 36 | private ShipmentHeaderService shipmentHeaderService; |
37 | + @Autowired | |
38 | + private ConfigValueService configValueService; | |
35 | 39 | |
36 | 40 | |
37 | 41 | /** |
... | ... | @@ -46,6 +50,15 @@ public class ShipmentPreferenceServiceImpl extends ServiceImpl<ShipmentPreferenc |
46 | 50 | */ |
47 | 51 | @Override |
48 | 52 | public List<ShipmentHeader> checkShipmentProcess(String ids, Integer code) { |
53 | + | |
54 | + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery(); | |
55 | + configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment") | |
56 | + .eq(ConfigValue::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
57 | + ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper); | |
58 | + if(configValue==null){ | |
59 | + throw new ServiceException("仓库的出库配置不存在"); | |
60 | + } | |
61 | + | |
49 | 62 | //查找出库首选项 |
50 | 63 | ShipmentPreference shipmentPreference = shipmentPreferenceService.list().get(0); |
51 | 64 | if(shipmentPreference == null){ |
... | ... |
src/main/java/com/huaheng/pc/config/waveMaster/controller/WaveMasterController.java
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailService.java
... | ... | @@ -2,6 +2,7 @@ package com.huaheng.pc.inventory.inventoryDetail.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.extension.service.IService; |
4 | 4 | import com.huaheng.framework.web.domain.AjaxResult; |
5 | +import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference; | |
5 | 6 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
6 | 7 | import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; |
7 | 8 | |
... | ... | @@ -14,7 +15,7 @@ public interface InventoryDetailService extends IService<InventoryDetail> { |
14 | 15 | |
15 | 16 | void detailcreateCheckOutTask (Integer id); |
16 | 17 | |
17 | - List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail,String sqll); | |
18 | + List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail, String sqll, ShipmentPreference shipmentPreference); | |
18 | 19 | |
19 | 20 | |
20 | 21 | AjaxResult detailCheckTask (Integer[] ids) throws InvocationTargetException, IllegalAccessException; |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
... | ... | @@ -12,6 +12,7 @@ import com.huaheng.pc.check.checkHeader.domain.CheckHeader; |
12 | 12 | import com.huaheng.pc.check.checkHeader.service.CheckHeaderService; |
13 | 13 | import com.huaheng.pc.config.location.domain.Location; |
14 | 14 | import com.huaheng.pc.config.location.service.LocationService; |
15 | +import com.huaheng.pc.config.shipmentPreference.domain.ShipmentPreference; | |
15 | 16 | import com.huaheng.pc.inventory.inventoryDetail.domain.InventoryDetail; |
16 | 17 | import com.huaheng.pc.inventory.inventoryHeader.service.InventoryHeaderService; |
17 | 18 | import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; |
... | ... | @@ -128,18 +129,19 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
128 | 129 | } |
129 | 130 | |
130 | 131 | @Override |
131 | - public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail,String sqll) { | |
132 | - if(StringUtils.isEmpty(sqll)) { | |
133 | - sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + | |
134 | - "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + | |
135 | - "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + | |
136 | - "and inventorySts='" + shipmentDetail.getInventorySts() + "'"; | |
137 | - }else { | |
138 | - sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + | |
139 | - "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + | |
140 | - "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + | |
141 | - "and inventorySts='" + shipmentDetail.getInventorySts() + "'"+ " \n" +sqll; | |
142 | - } | |
132 | + public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail, String sqll, ShipmentPreference shipmentPreference) { | |
133 | + if(shipmentPreference.getAllowQcCheckResult() == true) { | |
134 | + sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + | |
135 | + "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + | |
136 | + "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + | |
137 | + "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ | |
138 | + "and inventorySts='" + shipmentDetail.getInventorySts() + "'\n"+ sqll; | |
139 | + }else { | |
140 | + sql = sql + " \n" + "and warehouseCode='" + shipmentDetail.getWarehouseCode() + "' \n" + | |
141 | + "and companyCode='" + shipmentDetail.getCompanyCode() + "' \n" + | |
142 | + "and materialCode='" + shipmentDetail.getMaterialCode() + "' \n" + | |
143 | + "and qcCheck=1\n"+ sqll; | |
144 | + } | |
143 | 145 | return inventoryDetailMapper.selectBysql(sql); |
144 | 146 | } |
145 | 147 | |
... | ... |
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/shipment/shippingCombination/service/ShippingCombinationService.java
... | ... | @@ -46,6 +46,23 @@ public class ShippingCombinationService { |
46 | 46 | |
47 | 47 | //根据分配规则查找库存 |
48 | 48 | public List<InventoryDetail> getInventorys(ShipmentDetail shipmentDetail) { |
49 | + LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery(); | |
50 | + configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment") | |
51 | + .eq(ConfigValue::getWarehouseCode,shipmentDetail.getWarehouseCode()); | |
52 | + ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper); | |
53 | + if(configValue==null){ | |
54 | + throw new ServiceException("仓库的出库配置不存在"); | |
55 | + } | |
56 | + | |
57 | + //查找出库首选项 | |
58 | + LambdaQueryWrapper<ShipmentPreference> slam=Wrappers.lambdaQuery(); | |
59 | + slam.eq(ShipmentPreference::getCode,configValue.getIdentifier()) | |
60 | + .eq(ShipmentPreference::getWarehouseCode,configValue.getWarehouseCode()); | |
61 | + ShipmentPreference shipmentPreference=shipmentPreferenceService.getOne(slam); | |
62 | + if(shipmentPreference==null){ | |
63 | + throw new ServiceException("仓库的出库配置中出库首选项不存在"); | |
64 | + } | |
65 | + | |
49 | 66 | List<InventoryDetail> list=new ArrayList<>(); |
50 | 67 | FilterConfigDetail filterConfigDetail=new FilterConfigDetail(); |
51 | 68 | LambdaQueryWrapper<FilterConfigDetail> filterConfigDetailLambdaQueryWrapper= Wrappers.lambdaQuery(); |
... | ... | @@ -61,7 +78,7 @@ public class ShippingCombinationService { |
61 | 78 | |
62 | 79 | //根据sql查库存 |
63 | 80 | try { |
64 | - list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
81 | + list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
65 | 82 | }catch (Exception e){ |
66 | 83 | throw new ServiceException("sql错误"); |
67 | 84 | } |
... | ... | @@ -81,27 +98,12 @@ public class ShippingCombinationService { |
81 | 98 | } |
82 | 99 | |
83 | 100 | //根据sql查库存 |
84 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
101 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
85 | 102 | return list; |
86 | 103 | } |
87 | 104 | |
88 | 105 | //都没有时,默认仓库的分配规则 |
89 | - LambdaQueryWrapper<ConfigValue> configValueLambdaQueryWrapper=Wrappers.lambdaQuery(); | |
90 | - configValueLambdaQueryWrapper.eq(ConfigValue::getModuleType,"shipment") | |
91 | - .eq(ConfigValue::getWarehouseCode,shipmentDetail.getWarehouseCode()); | |
92 | - ConfigValue configValue=configValueService.getOne(configValueLambdaQueryWrapper); | |
93 | - if(configValue==null){ | |
94 | - throw new ServiceException("仓库的出库配置不存在"); | |
95 | - } | |
96 | 106 | |
97 | - //查找出库首选项 | |
98 | - LambdaQueryWrapper<ShipmentPreference> slam=Wrappers.lambdaQuery(); | |
99 | - slam.eq(ShipmentPreference::getCode,configValue.getIdentifier()) | |
100 | - .eq(ShipmentPreference::getWarehouseCode,configValue.getWarehouseCode()); | |
101 | - ShipmentPreference shipmentPreference=shipmentPreferenceService.getOne(slam); | |
102 | - if(shipmentPreference==null){ | |
103 | - throw new ServiceException("仓库的出库配置中出库首选项不存在"); | |
104 | - } | |
105 | 107 | //查找分配规则 |
106 | 108 | filterConfigDetailLambdaQueryWrapper.eq(FilterConfigDetail::getCode,shipmentPreference.getAllocationRule()); |
107 | 109 | filterConfigDetail=filterConfigDetailService.getOne(filterConfigDetailLambdaQueryWrapper); |
... | ... | @@ -110,7 +112,7 @@ public class ShippingCombinationService { |
110 | 112 | } |
111 | 113 | |
112 | 114 | //根据sql查库存 |
113 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
115 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll(),shipmentPreference); | |
114 | 116 | return list; |
115 | 117 | } |
116 | 118 | |
... | ... |
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/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> |
... | ... |