Commit 1b4e7ed61f768d1937d2908283330d375ca27a16
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
69 changed files
with
1061 additions
and
265 deletions
src/main/java/com/huaheng/pc/check/checkDetail/controller/CheckDetailController.java
... | ... | @@ -130,15 +130,6 @@ public class CheckDetailController extends BaseController { |
130 | 130 | } |
131 | 131 | |
132 | 132 | /** |
133 | - * 完成质检 | |
134 | - */ | |
135 | - @GetMapping("complete/{id}") | |
136 | - public String complete(@PathVariable("id") Integer id, ModelMap mmap) { | |
137 | - mmap.put("checkDetailId", id); | |
138 | - return prefix + "/checkComplete"; | |
139 | - } | |
140 | - | |
141 | - /** | |
142 | 133 | * 保存质检完成 |
143 | 134 | * @param inventorySts 库存状态 |
144 | 135 | * @param qty 数量 |
... | ... | @@ -149,9 +140,7 @@ public class CheckDetailController extends BaseController { |
149 | 140 | @Log(title = "质检-质检详情 ",operating = "质检详情删除", action = BusinessType.DELETE) |
150 | 141 | @PostMapping("/complete") |
151 | 142 | @ResponseBody |
152 | - public AjaxResult complete(@ApiParam(name="质检明细id",value="id")Integer id, | |
153 | - @ApiParam(name="库存状态",value="inventorySts",example="good,bad")String inventorySts, | |
154 | - @ApiParam(name = "数量",value = "qty",example = "10,20") String qty) { | |
155 | - return checkDetailService.complete(id, inventorySts, qty); | |
143 | + public AjaxResult complete(@ApiParam(name="质检明细id",value="id")Integer id) { | |
144 | + return checkDetailService.complete(id); | |
156 | 145 | } |
157 | 146 | } |
... | ... |
src/main/java/com/huaheng/pc/check/checkDetail/service/CheckDetailService.java
... | ... | @@ -26,77 +26,58 @@ import org.springframework.transaction.annotation.Transactional; |
26 | 26 | public class CheckDetailService extends ServiceImpl<CheckDetailMapper, CheckDetail> { |
27 | 27 | |
28 | 28 | @Resource |
29 | - private CheckingRegisterService checkingRegisterService; | |
30 | - @Resource | |
31 | 29 | private CheckHeaderService checkHeaderService; |
30 | + @Resource | |
31 | + private CheckingRegisterService checkingRegisterService; | |
32 | 32 | |
33 | 33 | /** |
34 | 34 | * 质检完成 |
35 | 35 | * @param id 质检明细id |
36 | - * @param inventorySts 库存状态 good, | |
37 | - * @param qty 数量 10,20 | |
38 | 36 | * @return AjaxResult |
39 | 37 | */ |
40 | 38 | @Transactional |
41 | - public AjaxResult complete(Integer id, String inventorySts, String qty){ | |
39 | + public AjaxResult complete(Integer id){ | |
40 | + LambdaQueryWrapper<CheckingRegister> checkingRegisterLambda = Wrappers.lambdaQuery(); | |
41 | + checkingRegisterLambda.eq(CheckingRegister::getCheckDetailId, id); | |
42 | + List<CheckingRegister> checkingRegisters = checkingRegisterService.list(checkingRegisterLambda); | |
43 | + int total = 0; //质检登记中的总数量 | |
44 | + for (CheckingRegister checkingRegister: checkingRegisters){ | |
45 | + total += checkingRegister.getQty(); | |
46 | + } | |
42 | 47 | |
43 | - //将库存状态、数量字符串转为List | |
44 | - List<String> inventoryStsList = Arrays.asList(Convert.toStrArray(inventorySts)); | |
45 | - List<Integer> qtyList = Arrays.asList(Convert.toIntArray(qty)); | |
48 | + //更新传入明细id为完成质检状态 | |
46 | 49 | CheckDetail checkDetail = this.getById(id); |
47 | - | |
48 | - // | |
49 | - int sum = 0; | |
50 | - for (Integer quantity : qtyList) { | |
51 | - sum += quantity; | |
52 | - } | |
53 | - if (checkDetail.getQty() == sum) { | |
54 | - AjaxResult.error("质检登记数量和质检明细系统数量核对错误"); | |
50 | + if ( !(total == checkDetail.getQty())){ | |
51 | + return AjaxResult.error("质检登记中总数量不等于质检明细中数量,不能完成质检"); | |
55 | 52 | } |
53 | + checkDetail.setCheckBy(ShiroUtils.getLoginName()); | |
54 | + checkDetail.setCheckAt(new Date()); | |
55 | + | |
56 | 56 | checkDetail.setStatus("20"); |
57 | - if ( !this.updateById(checkDetail)){ | |
58 | - throw new ServiceException("更新质检明细表错误"); | |
57 | + checkDetail.setLastUpdated(new Date()); | |
58 | + checkDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
59 | + if (!this.updateById(checkDetail)){ | |
60 | + throw new ServiceException("更新质检明细表失败"); | |
59 | 61 | } |
60 | - CheckingRegister checkingRegister = new CheckingRegister(); | |
61 | - checkingRegister.setCheckDetailId(checkDetail.getId()); | |
62 | - checkingRegister.setCheckHeaderId(checkDetail.getCheckHeaderId()); | |
63 | - checkingRegister.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
64 | - checkingRegister.setCheckCode(checkDetail.getCheckCode()); | |
65 | - checkingRegister.setReceiptDetailId(checkDetail.getReceiptDetailId()); | |
66 | - checkingRegister.setReceiptCode(checkDetail.getReceiptCode()); | |
67 | - checkingRegister.setReferCode(checkDetail.getReferCode()); | |
68 | - checkingRegister.setReferLineId(checkDetail.getReferLineId()); | |
69 | - checkingRegister.setReferPlatform(checkDetail.getReferPlatform()); | |
70 | - checkingRegister.setMaterialCode(checkDetail.getMaterialCode()); | |
71 | - checkingRegister.setMaterialName(checkDetail.getMaterialName()); | |
72 | - checkingRegister.setMaterialSpec(checkDetail.getMaterialSpec()); | |
73 | - checkingRegister.setMaterialUnit(checkDetail.getMaterialUnit()); | |
74 | - checkingRegister.setCompanyCode(checkDetail.getCompanyCode()); | |
75 | - checkingRegister.setCheckBy(ShiroUtils.getLoginName()); | |
76 | - checkingRegister.setCheckAt(new Date()); | |
77 | - checkingRegister.setCreatedBy(ShiroUtils.getLoginName()); | |
78 | - checkingRegister.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
62 | + LambdaQueryWrapper<CheckDetail> lambda = Wrappers.lambdaQuery(); | |
63 | + lambda.eq(CheckDetail::getCheckHeaderId, checkDetail.getCheckHeaderId()); | |
64 | + List<CheckDetail> checkDetails = this.list(lambda); | |
79 | 65 | |
80 | - for (int i = 0; i<inventoryStsList.size(); i++){ | |
81 | - checkingRegister.setInventorySts(inventoryStsList.get(i)); | |
82 | - checkingRegister.setQty(qtyList.get(0)); | |
83 | - if ( !checkingRegisterService.save(checkingRegister)){ | |
84 | - throw new ServiceException("生成质检报告失败"); | |
66 | + //判断头表下所有明细是否全部完成 | |
67 | + boolean result = false; | |
68 | + for (CheckDetail checkDetail1 : checkDetails){ | |
69 | + if ("20".equals(checkDetail1.getStatus())){ | |
70 | + result = true; | |
71 | + } else { | |
72 | + result = false; | |
85 | 73 | } |
86 | 74 | } |
87 | - | |
88 | - LambdaQueryWrapper<CheckDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
89 | - lambdaQueryWrapper.eq(CheckDetail::getCheckHeaderId, checkDetail.getCheckHeaderId()) | |
90 | - .ne(CheckDetail::getStatus, 20); | |
91 | - List<CheckDetail> checkDetails = this.list(lambdaQueryWrapper); | |
92 | - | |
93 | - //如果改质检单的全部明细都完成质检则更新质检头表状态 | |
94 | - if (checkDetails == null){ | |
75 | + if (result){ | |
95 | 76 | CheckHeader checkHeader = new CheckHeader(); |
96 | 77 | checkHeader.setId(checkDetail.getCheckHeaderId()); |
97 | - checkHeader.setStatus("20"); | |
98 | - if (!checkHeaderService.updateById(checkHeader)){ | |
99 | - throw new ServiceException("更新质检头表发生错误"); | |
78 | + checkHeader.setStatus("30"); | |
79 | + if ( !checkHeaderService.updateById(checkHeader)){ | |
80 | + throw new ServiceException("质检头表更新失败"); | |
100 | 81 | } |
101 | 82 | } |
102 | 83 | return AjaxResult.success("质检完成"); |
... | ... |
src/main/java/com/huaheng/pc/config/FilterConfigDetail/domain/FilterConfigDetail.java
... | ... | @@ -78,6 +78,10 @@ public class FilterConfigDetail implements Serializable { |
78 | 78 | @ApiModelProperty(value="全SQL") |
79 | 79 | private String statement; |
80 | 80 | |
81 | + @TableField(value = "sqll") | |
82 | + @ApiModelProperty(value="后续分组排序") | |
83 | + private String sqll; | |
84 | + | |
81 | 85 | /** |
82 | 86 | * 是否系统创建 |
83 | 87 | */ |
... | ... |
src/main/java/com/huaheng/pc/config/waveMaster/domain/WaveMaster.java
... | ... | @@ -23,13 +23,20 @@ public class WaveMaster implements Serializable { |
23 | 23 | private Integer id; |
24 | 24 | |
25 | 25 | /** |
26 | - * 主表名称 | |
26 | + * 主表编码 | |
27 | 27 | */ |
28 | 28 | @TableField(value = "code") |
29 | - @ApiModelProperty(value="主表名称") | |
29 | + @ApiModelProperty(value="主表编码") | |
30 | 30 | private String code; |
31 | 31 | |
32 | 32 | /** |
33 | + * 主表名称 | |
34 | + */ | |
35 | + @TableField(value = "name") | |
36 | + @ApiModelProperty(value="主表名称") | |
37 | + private String name; | |
38 | + | |
39 | + /** | |
33 | 40 | * 仓库编码 |
34 | 41 | */ |
35 | 42 | @TableField(value = "warehouseCode") |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustHeader/service/AdjustHeaderServiceImpl.java
... | ... | @@ -32,11 +32,11 @@ public class AdjustHeaderServiceImpl extends ServiceImpl<AdjustHeaderMapper, Adj |
32 | 32 | if (maxCode != null && maxCode.substring(maxCode.length() - 13, maxCode.length() - 5).equals(df.format(now))) |
33 | 33 | { |
34 | 34 | Integer Count = Integer.valueOf(maxCode.substring(maxCode.length() - 5, maxCode.length())); |
35 | - code = "CY" + df.format(now) + String.format("%05d", Count + 1); | |
35 | + code = "AD" + df.format(now) + String.format("%05d", Count + 1); | |
36 | 36 | } |
37 | 37 | else |
38 | 38 | { |
39 | - code = "CY" + df.format(now) + "00001"; | |
39 | + code = "AD" + df.format(now) + "00001"; | |
40 | 40 | } |
41 | 41 | return code; |
42 | 42 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -349,7 +349,7 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
349 | 349 | if(cyclecountDetail.getEnableStatus() == 100){ |
350 | 350 | return AjaxResult.error("盘点任务完成后不能再登记数量!"); |
351 | 351 | } |
352 | - if(cycleCountHeader==null){ | |
352 | + if(cycleCountHeader == null){ | |
353 | 353 | return AjaxResult.error("主单据不存在"); |
354 | 354 | } |
355 | 355 | /*if(cyclecountDetail.getEnableStatus() == 10){ |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountHeader/service/CycleCountHeaderServiceImpl.java
... | ... | @@ -178,7 +178,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
178 | 178 | AdjustHeader adjustHeader = new AdjustHeader(); |
179 | 179 | adjustHeader.setWarehouseCode(ShiroUtils.getWarehouseCode());//仓库 |
180 | 180 | adjustHeader.setCode(adjustHeaderService.createCode());//生成差异单号 |
181 | - adjustHeader.setProblemType("盘点调整"); | |
181 | + adjustHeader.setProblemType("cyclecountAdjust"); | |
182 | 182 | adjustHeader.setCycleCountCode(cyclecountHeader.getCode()); |
183 | 183 | adjustHeader.setCompanyCode(cyclecountHeader.getCompanyCode()); |
184 | 184 | adjustHeader.setCreated(new Date()); |
... | ... | @@ -199,6 +199,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
199 | 199 | AdjustDetail adjustDetail = new AdjustDetail(); |
200 | 200 | for(CycleCountDetail item:cycleCountDetailList){ |
201 | 201 | //BigDecimal的比较 .compareTo(BigDecimal.ZERO) != 0 |
202 | + | |
202 | 203 | if(item.getGapQty().compareTo(BigDecimal.ZERO) != 0){ |
203 | 204 | //比较差异数量不为0的就生成差异单 |
204 | 205 | adjustDetail.setAdjustCode(adjustHeader.getCode()); |
... | ... | @@ -212,7 +213,7 @@ public class CycleCountHeaderServiceImpl extends ServiceImpl<CycleCountHeaderMap |
212 | 213 | adjustDetail.setMaterialSpec(item.getMaterialSpec()); |
213 | 214 | adjustDetail.setMaterialUnit(item.getMaterialUnit()); |
214 | 215 | adjustDetail.setCycleDetailId(item.getId()); |
215 | - adjustDetail.setProblemType("盘点调整"); | |
216 | + adjustDetail.setProblemType("cyclecountAdjust"); | |
216 | 217 | adjustDetail.setToInventorySts(item.getInventorySts());//盘点不涉及属性 |
217 | 218 | adjustDetail.setFromInventorySts(item.getInventorySts()); |
218 | 219 | adjustDetail.setFromQty(item.getSystemQty());//调整前数量 |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailService.java
... | ... | @@ -14,7 +14,7 @@ public interface InventoryDetailService extends IService<InventoryDetail> { |
14 | 14 | |
15 | 15 | void detailcreateCheckOutTask (Integer id); |
16 | 16 | |
17 | - List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail); | |
17 | + List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail,String sqll); | |
18 | 18 | |
19 | 19 | |
20 | 20 | AjaxResult detailCheckTask (Integer[] ids) throws InvocationTargetException, IllegalAccessException; |
... | ... |
src/main/java/com/huaheng/pc/inventory/inventoryDetail/service/InventoryDetailServiceImpl.java
... | ... | @@ -128,11 +128,18 @@ public class InventoryDetailServiceImpl extends ServiceImpl<InventoryDetailMappe |
128 | 128 | } |
129 | 129 | |
130 | 130 | @Override |
131 | - public List<InventoryDetail> selectBysql(String sql, ShipmentDetail shipmentDetail) { | |
132 | - sql=sql+" \n" +"and warehouseCode='" + shipmentDetail.getWarehouseCode()+"' \n" + | |
133 | - "and companyCode='" + shipmentDetail.getCompanyCode()+"' \n" + | |
134 | - "and materialCode='" + shipmentDetail.getMaterialCode() +"' \n" + | |
135 | - "and inventorySts='" + shipmentDetail.getInventorySts() + "'"; | |
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 | + } | |
136 | 143 | return inventoryDetailMapper.selectBysql(sql); |
137 | 144 | } |
138 | 145 | |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/controller/ReceiptContainerDetailController.java
... | ... | @@ -74,6 +74,7 @@ public class ReceiptContainerDetailController extends BaseController { |
74 | 74 | @RequiresPermissions("receipt:receiptContainerDetail:remove") |
75 | 75 | @Log(title = "入库-入库详情列表", operating = "入库详情列表", action = BusinessType.GRANT) |
76 | 76 | @PostMapping("remove") |
77 | + @ResponseBody | |
77 | 78 | public AjaxResult remove(String ids) { |
78 | 79 | if (StringUtils.isEmpty(ids)){ |
79 | 80 | return AjaxResult.error("id不能为空"); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/domain/ReceiptContainerDetail.java
... | ... | @@ -65,6 +65,13 @@ public class ReceiptContainerDetail implements Serializable { |
65 | 65 | private String receiptType; |
66 | 66 | |
67 | 67 | /** |
68 | + * 库位编码 | |
69 | + */ | |
70 | + @TableField(value = "locationCode") | |
71 | + @ApiModelProperty(value="库位编码") | |
72 | + private String locationCode; | |
73 | + | |
74 | + /** | |
68 | 75 | * 货箱号 |
69 | 76 | */ |
70 | 77 | @TableField(value = "containerCode") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerDetail/service/ReceiptContainerDetailServiceImpl.java
... | ... | @@ -8,11 +8,14 @@ import com.huaheng.common.utils.security.ShiroUtils; |
8 | 8 | import com.huaheng.framework.web.domain.AjaxResult; |
9 | 9 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
10 | 10 | import com.huaheng.pc.receipt.receiptContainerDetail.mapper.ReceiptContainerDetailMapper; |
11 | +import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; | |
12 | +import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService; | |
11 | 13 | import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; |
12 | 14 | import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; |
13 | 15 | import com.huaheng.pc.receipt.receiptHeader.domain.ReceiptHeader; |
14 | 16 | import com.huaheng.pc.receipt.receiptHeader.service.ReceiptHeaderService; |
15 | 17 | import org.springframework.stereotype.Service; |
18 | +import org.springframework.web.bind.annotation.ResponseBody; | |
16 | 19 | |
17 | 20 | import javax.annotation.Resource; |
18 | 21 | import java.util.List; |
... | ... | @@ -24,6 +27,8 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
24 | 27 | private ReceiptDetailService receiptDetailService; |
25 | 28 | @Resource |
26 | 29 | private ReceiptHeaderService receiptHeaderService; |
30 | + @Resource | |
31 | + private ReceiptContainerHeaderService receiptContainerHeaderService; | |
27 | 32 | /** |
28 | 33 | * 根据入库单编码查询入库组盘明细 |
29 | 34 | * @param receiptCode 入库单编码 |
... | ... | @@ -53,8 +58,18 @@ public class ReceiptContainerDetailServiceImpl extends ServiceImpl<ReceiptContai |
53 | 58 | //回滚入库单明细收货数量 |
54 | 59 | ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); |
55 | 60 | receiptDetail.setOpenQty(receiptDetail.getOpenQty() - receiptContainerDetail.getQty()); |
56 | - if (!receiptDetailService.updateById(receiptDetail)){throw new SecurityException("回滚入库单明细失败");} | |
57 | 61 | |
62 | + if (!receiptDetailService.updateById(receiptDetail)){throw new SecurityException("回滚入库单明细失败");} | |
63 | + //删除组盘明细 | |
64 | + if (!this.removeById(id)){ throw new ServiceException("回滚入库组盘失败");} | |
65 | + LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
66 | + lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerDetail.getReceiptContainerId()); | |
67 | + List<ReceiptContainerDetail> list = this.list(lambdaQueryWrapper); | |
68 | + if (list.size() == 0){ | |
69 | + if (!receiptContainerHeaderService.removeById(receiptContainerDetail.getReceiptContainerId())){ | |
70 | + throw new ServiceException("删除入库组盘头失败"); | |
71 | + } | |
72 | + } | |
58 | 73 | //查询入库头表 |
59 | 74 | LambdaQueryWrapper<ReceiptContainerDetail> containerDetailLambda = Wrappers.lambdaQuery(); |
60 | 75 | containerDetailLambda.eq(ReceiptContainerDetail::getReceiptId, receiptContainerDetail.getReceiptId()); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/controller/ReceiptContainerHeaderController.java
... | ... | @@ -158,6 +158,28 @@ public class ReceiptContainerHeaderController extends BaseController { |
158 | 158 | for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails) |
159 | 159 | receivingService.position(receiptContainerDetail); |
160 | 160 | } |
161 | - return AjaxResult.success(""); | |
161 | + return AjaxResult.success("定位成功"); | |
162 | + } | |
163 | + | |
164 | + /** | |
165 | + * 取消定位 | |
166 | + */ | |
167 | + @RequiresPermissions("receipt:receiptContainer:canalPosition") | |
168 | + @Log(title = "入库-取消定位", operating = "取消定位", action = BusinessType.OTHER) | |
169 | + @PostMapping( "/cancelPosition") | |
170 | + @ResponseBody | |
171 | + public AjaxResult cancelPosition(String ids){ | |
172 | + if (StringUtils.isEmpty(ids)){ | |
173 | + return AjaxResult.error("id不能为空"); | |
174 | + } | |
175 | + List<Integer> idList = Arrays.asList(Convert.toIntArray(ids)); | |
176 | + for (int i = 0; i<idList.size(); i++){ | |
177 | + LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); | |
178 | + lambda.eq(ReceiptContainerDetail::getReceiptContainerId, idList.get(i)); | |
179 | + List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); | |
180 | + for (ReceiptContainerDetail receiptContainerDetail : receiptContainerDetails) | |
181 | + receivingService.cancelPosition(receiptContainerDetail); | |
182 | + } | |
183 | + return AjaxResult.success("取消定位成功"); | |
162 | 184 | } |
163 | 185 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptContainerHeader/service/ReceiptContainerHeaderServiceImpl.java
... | ... | @@ -113,7 +113,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
113 | 113 | |
114 | 114 | receiptDetail = receiptDetailService.getById(receiptDetailId); |
115 | 115 | |
116 | - receiptContainerDetailAdd(receiptContainerHeaders.get(0).getId(), receiptDetail, qty, containerCode); | |
116 | + receiptContainerDetailAdd(receiptContainerHeaders.get(0).getId(), receiptDetail, qty, containerCode, locationCode); | |
117 | 117 | //如果单据数量等于已收数量,更新入库详情状态和入库单状态 |
118 | 118 | if (receiptDetail.getTotalQty() == receiptDetail.getOpenQty()){ |
119 | 119 | ReceiptDetail receiptDetail1 = receiptDetailService.queryflow(receiptDetail); |
... | ... | @@ -285,7 +285,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
285 | 285 | * @param containerCode 容器编码 |
286 | 286 | */ |
287 | 287 | @Transactional |
288 | - public void receiptContainerDetailAdd(Integer receiptContainerHeaderId, ReceiptDetail receiptDetail, Integer qty, String containerCode){ | |
288 | + public void receiptContainerDetailAdd(Integer receiptContainerHeaderId, ReceiptDetail receiptDetail, Integer qty, String containerCode, String locationCode){ | |
289 | 289 | LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); |
290 | 290 | lambda.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeaderId) |
291 | 291 | .eq(ReceiptContainerDetail::getReceiptId, receiptDetail.getReceiptId()) |
... | ... | @@ -312,6 +312,7 @@ public class ReceiptContainerHeaderServiceImpl extends ServiceImpl<ReceiptContai |
312 | 312 | receiptContainerDetail.setReceiptDetailId(receiptDetail.getId()); |
313 | 313 | receiptContainerDetail.setReceiptCode(receiptDetail.getReceiptCode()); |
314 | 314 | receiptContainerDetail.setReceiptType(receiptHeader.getReceiptType()); |
315 | + receiptContainerDetail.setLocationCode(locationCode); | |
315 | 316 | receiptContainerDetail.setContainerCode(container.getCode()); |
316 | 317 | receiptContainerDetail.setContainerType(container.getContainerType()); |
317 | 318 | receiptContainerDetail.setCompanyCode(receiptDetail.getCompanyCode()); |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptDetail/service/ReceiptDetailServiceImpl.java
... | ... | @@ -253,7 +253,7 @@ public class ReceiptDetailServiceImpl extends ServiceImpl<ReceiptDetailMapper, R |
253 | 253 | } |
254 | 254 | } |
255 | 255 | |
256 | - //从数据子典中获取单据当前状态 | |
256 | + //从数据字典中获取单据当前状态 | |
257 | 257 | List<DictData> dictData = dictDataService.selectDictDataByType("receiptHeaderStatus"); |
258 | 258 | for (int i = 0; i<dictData.size(); i++){ |
259 | 259 | if (dictData.get(i).getDictValue().equals(minStatus)){ |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiptHeader/controller/ReceiptHeaderController.java
... | ... | @@ -281,7 +281,10 @@ public class ReceiptHeaderController extends BaseController { |
281 | 281 | @Log(title = "入库-入库单 ",operating = "查询入库单 ", action = BusinessType.OTHER) |
282 | 282 | @PostMapping("/getReceiptHeader") |
283 | 283 | @ResponseBody |
284 | - public AjaxResult<ReceiptHeader> getReceiptHeader(int id) { | |
284 | + public AjaxResult<ReceiptHeader> getReceiptHeader(String id) { | |
285 | + if (StringUtils.isEmpty(id)){ | |
286 | + return AjaxResult.success(""); | |
287 | + } | |
285 | 288 | return AjaxResult.success(receiptHeaderService.getById(id)); |
286 | 289 | } |
287 | 290 | } |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/controller/ReceivingController.java
... | ... | @@ -41,8 +41,6 @@ public class ReceivingController extends BaseController { |
41 | 41 | @Resource |
42 | 42 | private ReceiptContainerDetailService receiptContainerDetailService; |
43 | 43 | @Resource |
44 | - private TaskHeaderService taskHeaderService; | |
45 | - @Resource | |
46 | 44 | private ReceiptContainerHeaderService receiptContainerHeaderService; |
47 | 45 | |
48 | 46 | @RequiresPermissions("receipt:receiving:view") |
... | ... |
src/main/java/com/huaheng/pc/receipt/receiving/service/ReceivingService.java
... | ... | @@ -19,10 +19,12 @@ import com.huaheng.pc.config.materialType.domain.MaterialType; |
19 | 19 | import com.huaheng.pc.config.materialType.service.MaterialTypeService; |
20 | 20 | import com.huaheng.pc.config.receiptPreference.service.ReceiptPreferenceService; |
21 | 21 | import com.huaheng.pc.receipt.receiptContainerDetail.domain.ReceiptContainerDetail; |
22 | +import com.huaheng.pc.receipt.receiptContainerDetail.service.ReceiptContainerDetailService; | |
22 | 23 | import com.huaheng.pc.receipt.receiptContainerHeader.domain.ReceiptContainerHeader; |
23 | 24 | import com.huaheng.pc.receipt.receiptContainerHeader.service.ReceiptContainerHeaderService; |
24 | 25 | import com.huaheng.pc.receipt.receiptDetail.domain.ReceiptDetail; |
25 | 26 | import com.huaheng.pc.receipt.receiptDetail.service.ReceiptDetailService; |
27 | +import org.aspectj.weaver.loadtime.Aj; | |
26 | 28 | import org.springframework.stereotype.Service; |
27 | 29 | import org.springframework.transaction.annotation.Transactional; |
28 | 30 | |
... | ... | @@ -44,6 +46,8 @@ public class ReceivingService { |
44 | 46 | @Resource |
45 | 47 | private ReceiptContainerHeaderService receiptContainerHeaderService; |
46 | 48 | @Resource |
49 | + private ReceiptContainerDetailService receiptContainerDetailService; | |
50 | + @Resource | |
47 | 51 | private LocationService locationService; |
48 | 52 | @Resource |
49 | 53 | private MaterialService materialService; |
... | ... | @@ -79,9 +83,11 @@ public class ReceivingService { |
79 | 83 | @Transactional |
80 | 84 | public Boolean position(ReceiptContainerDetail receiptContainerDetail){ |
81 | 85 | ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId()); |
82 | - | |
86 | + if (!(0 ==receiptContainerHeader.getStatus())){ | |
87 | + throw new ServiceException("该入库组盘已生成任务不能重新定位"); | |
88 | + } | |
83 | 89 | //如果入库组盘表中有目标库位说明已经指定 |
84 | - if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){return true;} | |
90 | + if (StringUtils.isNotEmpty(receiptContainerHeader.getToLocation())){throw new ServiceException("该入库组盘已有库位,不需要定位;如需定位请先取消定位");} | |
85 | 91 | String locatingRule = receiptContainerHeader.getLocatingRule(); //定位规则 |
86 | 92 | if (StringUtils.isNotEmpty(locatingRule)){ |
87 | 93 | //入库组盘头表中定位规则不为空时执行 |
... | ... | @@ -132,12 +138,21 @@ public class ReceivingService { |
132 | 138 | throw new ServiceException("定位失败,请检查定位规则是否正确"); |
133 | 139 | } |
134 | 140 | |
141 | + //更新库位编码到组盘头表 | |
135 | 142 | receiptContainerHeader.setToLocation(locationCode); |
136 | - | |
137 | 143 | if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){ |
138 | 144 | throw new ServiceException("更新库位失败"); |
139 | 145 | } |
140 | 146 | |
147 | + //把库位编码赋到该入库组盘头表下的所有明细 | |
148 | + LambdaQueryWrapper<ReceiptContainerDetail> lambda = Wrappers.lambdaQuery(); | |
149 | + lambda.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerHeader.getId()); | |
150 | + List<ReceiptContainerDetail> receiptContainerDetails = receiptContainerDetailService.list(lambda); | |
151 | + for (ReceiptContainerDetail receiptContainerDetail2: receiptContainerDetails) { | |
152 | + receiptContainerDetail2.setLocationCode(locationCode); | |
153 | + if (!receiptContainerDetailService.updateById(receiptContainerDetail2)){throw new ServiceException("更新库位编码到入库组盘明细");} | |
154 | + } | |
155 | + | |
141 | 156 | ReceiptDetail receiptDetail = receiptDetailService.queryflow(receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId())); |
142 | 157 | //更新入库单详情状态 |
143 | 158 | if (!receiptDetailService.updateById(receiptDetail)){ throw new ServiceException("更新入库单详情失败");} |
... | ... | @@ -146,4 +161,44 @@ public class ReceivingService { |
146 | 161 | |
147 | 162 | return true; |
148 | 163 | } |
164 | + | |
165 | + /** | |
166 | + * 取消定位 | |
167 | + * @param receiptContainerDetail 入库组盘明细 | |
168 | + * @return | |
169 | + */ | |
170 | + @Transactional | |
171 | + public AjaxResult cancelPosition(ReceiptContainerDetail receiptContainerDetail){ | |
172 | + //查询入库组盘头 | |
173 | + ReceiptContainerHeader receiptContainerHeader = receiptContainerHeaderService.getById(receiptContainerDetail.getReceiptContainerId()); | |
174 | + if (!(receiptContainerHeader.getStatus() == 0)){ | |
175 | + throw new ServiceException("组盘已生成任务不能取消定位"); | |
176 | + } | |
177 | + //将入库组盘头表中的而库位编码赋值null | |
178 | + receiptContainerHeader.setToLocation(null); | |
179 | + if (!receiptContainerHeaderService.updateById(receiptContainerHeader)){ | |
180 | + throw new ServiceException("回滚入库组盘头失败"); | |
181 | + } | |
182 | + | |
183 | + LambdaQueryWrapper<ReceiptContainerDetail> lambdaQueryWrapper = Wrappers.lambdaQuery(); | |
184 | + lambdaQueryWrapper.eq(ReceiptContainerDetail::getReceiptContainerId, receiptContainerDetail.getReceiptContainerId()); | |
185 | + List<ReceiptContainerDetail> receiptContainerDetailList = receiptContainerDetailService.list(lambdaQueryWrapper); | |
186 | + for (ReceiptContainerDetail receiptContainerDetail2 : receiptContainerDetailList) { | |
187 | + receiptContainerDetail2.setLocationCode(null); | |
188 | + if (!receiptContainerDetailService.updateById(receiptContainerDetail2)){ | |
189 | + throw new ServiceException("回滚入库组盘明细失败"); | |
190 | + } | |
191 | + } | |
192 | + | |
193 | + //回滚入库明细状态 | |
194 | + ReceiptDetail receiptDetail = receiptDetailService.getById(receiptContainerDetail.getReceiptDetailId()); | |
195 | + receiptDetail.setProcessStamp("240"); | |
196 | + if ( !receiptDetailService.updateById(receiptDetail)){ | |
197 | + throw new ServiceException("回滚入库明细状态失败"); | |
198 | + } | |
199 | + | |
200 | + receiptDetailService.updateReceiptHeaderLastStatus(receiptDetail.getReceiptId()); | |
201 | + | |
202 | + return AjaxResult.success("取消定位成功"); | |
203 | + } | |
149 | 204 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentDetail/service/ShipmentDetailService.java
src/main/java/com/huaheng/pc/shipment/shipmentDetail/service/ShipmentDetailServiceImpl.java
... | ... | @@ -2,17 +2,25 @@ package com.huaheng.pc.shipment.shipmentDetail.service; |
2 | 2 | |
3 | 3 | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
5 | +import com.huaheng.common.exception.service.ServiceException; | |
6 | +import com.huaheng.common.support.Convert; | |
5 | 7 | import com.huaheng.common.utils.DataUtils; |
6 | 8 | import com.huaheng.common.utils.StringUtils; |
7 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
8 | 10 | import com.huaheng.framework.web.domain.AjaxResult; |
9 | 11 | import com.huaheng.pc.config.material.domain.Material; |
10 | 12 | import com.huaheng.pc.config.material.service.MaterialService; |
13 | +import com.huaheng.pc.config.waveMaster.domain.WaveMaster; | |
14 | +import com.huaheng.pc.config.waveMaster.service.WaveMasterService; | |
11 | 15 | import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; |
12 | 16 | import com.huaheng.pc.shipment.shipmentHeader.service.ShipmentHeaderService; |
17 | +import com.huaheng.pc.shipment.wave.domain.Wave; | |
18 | +import com.huaheng.pc.shipment.wave.service.WaveService; | |
13 | 19 | import org.springframework.beans.factory.annotation.Autowired; |
14 | 20 | import org.springframework.stereotype.Service; |
15 | 21 | import javax.annotation.Resource; |
22 | +import java.math.BigDecimal; | |
23 | +import java.util.ArrayList; | |
16 | 24 | import java.util.List; |
17 | 25 | import java.util.Map; |
18 | 26 | |
... | ... | @@ -31,6 +39,10 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, |
31 | 39 | private MaterialService materialService; |
32 | 40 | @Resource |
33 | 41 | private ShipmentDetailMapper shipmentDetailMapper; |
42 | + @Autowired | |
43 | + private WaveMasterService waveMasterService; | |
44 | + @Autowired | |
45 | + private WaveService waveService; | |
34 | 46 | |
35 | 47 | /** |
36 | 48 | * 新增出库明细 |
... | ... | @@ -137,4 +149,93 @@ public class ShipmentDetailServiceImpl extends ServiceImpl<ShipmentDetailMapper, |
137 | 149 | public Integer countUnCompleted(Integer shipmentId) { |
138 | 150 | return shipmentDetailMapper.countUnCompleted(shipmentId); |
139 | 151 | } |
152 | + | |
153 | + | |
154 | + //选中的单据加入波次 | |
155 | + @Override | |
156 | + @Transactional | |
157 | + public void saveWave(String ids, String code) { | |
158 | + //找到波次主表,看系统是否有此波次 | |
159 | + LambdaQueryWrapper<WaveMaster> lam=Wrappers.lambdaQuery(); | |
160 | + lam.eq(WaveMaster::getCode,code) | |
161 | + .eq(WaveMaster::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
162 | + WaveMaster waveMaster=waveMasterService.getOne(lam); | |
163 | + if(waveMaster == null){ | |
164 | + throw new ServiceException("系统没有此波次"); | |
165 | + } | |
166 | + | |
167 | + if(Convert.toIntArray(ids).length >waveMaster.getMaxShipments()){ | |
168 | + throw new ServiceException("加入波次的单据数量超过波次的单据限制"); | |
169 | + } | |
170 | + | |
171 | + List<ShipmentDetail> shipmentDetailList=new ArrayList<>(); | |
172 | + BigDecimal qty=new BigDecimal(0); | |
173 | + //检查出库子表是否有处于波次的 | |
174 | + for (Integer id : Convert.toIntArray(ids)) | |
175 | + { | |
176 | + LambdaQueryWrapper<ShipmentDetail> lamDetail=Wrappers.lambdaQuery(); | |
177 | + lamDetail.eq(ShipmentDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
178 | + .eq(ShipmentDetail::getShipmentId,id); | |
179 | + List<ShipmentDetail> shipmentDetails=this.list(lamDetail); | |
180 | + if(shipmentDetails == null || shipmentDetails.size() == 0){ | |
181 | + throw new ServiceException("系统没有主单id为"+id+"的子单"); | |
182 | + } | |
183 | + | |
184 | + //查看是否有单据处于波次中 | |
185 | + for(ShipmentDetail shipmentDetail : shipmentDetails) { | |
186 | + if (shipmentDetail.getWaveId() != 0) { | |
187 | + throw new ServiceException("主单id为" + id + "子单id为" + shipmentDetail.getId() + "的子单已加入波次,不可再加入波次"); | |
188 | + } | |
189 | + shipmentDetailList.add(shipmentDetail); | |
190 | + qty=qty.add(shipmentDetail.getShipQty()); | |
191 | + } | |
192 | + } | |
193 | + | |
194 | + if(shipmentDetailList.size()>waveMaster.getMaxLines()){ | |
195 | + throw new ServiceException("加入波次的总行数超过波次的行数限制"); | |
196 | + } | |
197 | + | |
198 | + Boolean flag=false; | |
199 | + | |
200 | + //查看波次是否建成未执行 | |
201 | + LambdaQueryWrapper<Wave> waveLam = Wrappers.lambdaQuery(); | |
202 | + waveLam.eq(Wave::getStatus,0) | |
203 | + .eq(Wave::getWaveMode,code) | |
204 | + .eq(Wave::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
205 | + Wave wave = waveService.getOne(waveLam); | |
206 | + if(wave != null && (wave.getTotalShipments()+Convert.toIntArray(ids).length)<= waveMaster.getMaxShipments() | |
207 | + && (wave.getTotalLines()+shipmentDetailList.size()<= waveMaster.getMaxLines())){ | |
208 | + //修改波次 | |
209 | + wave.setTotalShipments(Convert.toIntArray(ids).length + wave.getTotalShipments()); | |
210 | + wave.setTotalLines(shipmentDetailList.size() + wave.getTotalLines()); | |
211 | + wave.setTotalQty(qty.add(wave.getTotalQty())); | |
212 | + wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
213 | + | |
214 | + }else { | |
215 | + //创建波次 | |
216 | + wave.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
217 | + wave.setMasterCode(code); | |
218 | + wave.setWaveName(waveMaster.getName()); | |
219 | + wave.setStatus(0); | |
220 | + wave.setCurrentWaveStep("0"); | |
221 | + wave.setTotalShipments(Convert.toIntArray(ids).length); | |
222 | + wave.setTotalLines(shipmentDetailList.size()); | |
223 | + wave.setTotalQty(qty); | |
224 | + wave.setCreatedBy(ShiroUtils.getLoginName()); | |
225 | + flag = waveService.save(wave); | |
226 | + if (flag == false) { | |
227 | + throw new ServiceException("波次建立失败"); | |
228 | + } | |
229 | + } | |
230 | + | |
231 | + //修改出库子单 | |
232 | + for(ShipmentDetail shipmentDetail :shipmentDetailList){ | |
233 | + shipmentDetail.setWaveId(wave.getId()); | |
234 | + } | |
235 | + | |
236 | + flag = this.updateBatchById(shipmentDetailList); | |
237 | + if(flag == false){ | |
238 | + throw new ServiceException("出库子单加入波次失败"); | |
239 | + } | |
240 | + } | |
140 | 241 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shipmentHeader/controller/ShipmentHeaderController.java
... | ... | @@ -15,6 +15,8 @@ import com.huaheng.framework.web.domain.AjaxResult; |
15 | 15 | import com.huaheng.framework.web.page.PageDomain; |
16 | 16 | import com.huaheng.framework.web.page.TableDataInfo; |
17 | 17 | import com.huaheng.framework.web.page.TableSupport; |
18 | +import com.huaheng.pc.config.waveMaster.domain.WaveMaster; | |
19 | +import com.huaheng.pc.config.waveMaster.service.WaveMasterService; | |
18 | 20 | import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; |
19 | 21 | import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService; |
20 | 22 | import com.huaheng.pc.shipment.shipmentHeader.domain.ShipmentHeader; |
... | ... | @@ -46,6 +48,9 @@ public class ShipmentHeaderController extends BaseController |
46 | 48 | private ShipmentHeaderService shipmentHeaderService; |
47 | 49 | @Autowired |
48 | 50 | private ShipmentDetailService shipmentDetailService; |
51 | + @Autowired | |
52 | + private WaveMasterService waveMasterService; | |
53 | + | |
49 | 54 | |
50 | 55 | @RequiresPermissions("shipment:bill:view") |
51 | 56 | @GetMapping() |
... | ... | @@ -225,4 +230,49 @@ public class ShipmentHeaderController extends BaseController |
225 | 230 | // |
226 | 231 | // } |
227 | 232 | |
233 | + /** | |
234 | + * 加入波次 | |
235 | + */ | |
236 | + @GetMapping("/wave") | |
237 | + public String addZoneCode() | |
238 | + { | |
239 | + return prefix + "/addWave"; | |
240 | + } | |
241 | + | |
242 | + /** | |
243 | + * 查询波次列表 | |
244 | + */ | |
245 | + @RequiresPermissions("shipment:bill:list") | |
246 | + @Log(title = "出库-出库单", operating = "查询库区列表", action = BusinessType.GRANT) | |
247 | + @PostMapping("/waveList") | |
248 | + @ResponseBody | |
249 | + public TableDataInfo waveList() | |
250 | + { | |
251 | + LambdaQueryWrapper<WaveMaster> lam = Wrappers.lambdaQuery(); | |
252 | + lam.eq(WaveMaster::getWarehouseCode,ShiroUtils.getWarehouseCode()); | |
253 | + List<WaveMaster> waveMasters = waveMasterService.list(lam); | |
254 | + return getDataTable(waveMasters); | |
255 | + } | |
256 | + | |
257 | + | |
258 | + | |
259 | + /** | |
260 | + * 波次 | |
261 | + */ | |
262 | + @RequiresPermissions("shipment:bill:wave") | |
263 | + @Log(title = "出库-出库单", operating="波次", action = BusinessType.OTHER) | |
264 | + @PostMapping( "/addWave") | |
265 | + @ResponseBody | |
266 | + @Transactional | |
267 | + public AjaxResult analysis(String ids,String code){ | |
268 | + if (StringUtils.isEmpty(ids)) | |
269 | + throw new ServiceException("id不能为空"); | |
270 | + if(StringUtils.isEmpty(code)){ | |
271 | + throw new ServiceException("波次不能为空"); | |
272 | + } | |
273 | + | |
274 | + shipmentDetailService.saveWave(ids,code); | |
275 | + return AjaxResult.success("加入波次成功"); | |
276 | + } | |
277 | + | |
228 | 278 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/shippingCombination/service/ShippingCombinationService.java
... | ... | @@ -61,7 +61,7 @@ public class ShippingCombinationService { |
61 | 61 | |
62 | 62 | //根据sql查库存 |
63 | 63 | try { |
64 | - list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail); | |
64 | + list = inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
65 | 65 | }catch (Exception e){ |
66 | 66 | throw new ServiceException("sql错误"); |
67 | 67 | } |
... | ... | @@ -81,7 +81,7 @@ public class ShippingCombinationService { |
81 | 81 | } |
82 | 82 | |
83 | 83 | //根据sql查库存 |
84 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail); | |
84 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
85 | 85 | return list; |
86 | 86 | } |
87 | 87 | |
... | ... | @@ -110,7 +110,7 @@ public class ShippingCombinationService { |
110 | 110 | } |
111 | 111 | |
112 | 112 | //根据sql查库存 |
113 | - list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail); | |
113 | + list=inventoryDetailService.selectBysql(filterConfigDetail.getStatement(),shipmentDetail,filterConfigDetail.getSqll()); | |
114 | 114 | return list; |
115 | 115 | } |
116 | 116 | |
... | ... |
src/main/java/com/huaheng/pc/shipment/wave/controller/WaveController.java
... | ... | @@ -15,6 +15,8 @@ import com.huaheng.framework.web.domain.AjaxResult; |
15 | 15 | import com.huaheng.framework.web.page.PageDomain; |
16 | 16 | import com.huaheng.framework.web.page.TableDataInfo; |
17 | 17 | import com.huaheng.framework.web.page.TableSupport; |
18 | +import com.huaheng.pc.shipment.shipmentDetail.domain.ShipmentDetail; | |
19 | +import com.huaheng.pc.shipment.shipmentDetail.service.ShipmentDetailService; | |
18 | 20 | import com.huaheng.pc.shipment.wave.domain.Wave; |
19 | 21 | import com.huaheng.pc.shipment.wave.service.WaveService; |
20 | 22 | import io.swagger.annotations.Api; |
... | ... | @@ -43,6 +45,8 @@ public class WaveController extends BaseController { |
43 | 45 | |
44 | 46 | @Autowired |
45 | 47 | private WaveService waveService; |
48 | + @Autowired | |
49 | + private ShipmentDetailService shipmentDetailService; | |
46 | 50 | |
47 | 51 | @RequiresPermissions("shipment:wave:view") |
48 | 52 | @GetMapping() |
... | ... | @@ -86,48 +90,48 @@ public class WaveController extends BaseController { |
86 | 90 | } |
87 | 91 | } |
88 | 92 | |
89 | - /** | |
90 | - * 新增波次 | |
91 | - */ | |
92 | - @GetMapping("/add") | |
93 | - public String add() { | |
94 | - return prefix + "/add"; | |
95 | - } | |
96 | - | |
97 | - /** | |
98 | - * 新增波次 | |
99 | - */ | |
100 | - @RequiresPermissions("shipment:wave:add") | |
101 | - @Log(title = "出库-波次", operating = "新增波次", action = BusinessType.INSERT) | |
102 | - @PostMapping("/add") | |
103 | - @ResponseBody | |
104 | - public AjaxResult addSave(Wave wave){ | |
105 | - wave.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
106 | - wave.setCreatedBy(ShiroUtils.getLoginName()); | |
107 | - wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
108 | - return toAjax(waveService.save(wave)); | |
109 | - } | |
110 | - | |
111 | - /** | |
112 | - * 修改波次 | |
113 | - */ | |
114 | - @GetMapping("/edit/{id}") | |
115 | - public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | |
116 | - mmap.put("wave", waveService.getById(id)); | |
117 | - return prefix + "/edit"; | |
118 | - } | |
119 | - | |
120 | - /** | |
121 | - * 修改波次 | |
122 | - */ | |
123 | - @RequiresPermissions("shipment:wave:edit") | |
124 | - @Log(title = "出库-波次", operating = "修改波次", action = BusinessType.UPDATE) | |
125 | - @PostMapping("/edit") | |
126 | - @ResponseBody | |
127 | - public AjaxResult editSave(Wave wave) { | |
128 | - wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
129 | - return toAjax(waveService.updateById(wave)); | |
130 | - } | |
93 | +// /** | |
94 | +// * 新增波次 | |
95 | +// */ | |
96 | +// @GetMapping("/add") | |
97 | +// public String add() { | |
98 | +// return prefix + "/add"; | |
99 | +// } | |
100 | +// | |
101 | +// /** | |
102 | +// * 新增波次 | |
103 | +// */ | |
104 | +// @RequiresPermissions("shipment:wave:add") | |
105 | +// @Log(title = "出库-波次", operating = "新增波次", action = BusinessType.INSERT) | |
106 | +// @PostMapping("/add") | |
107 | +// @ResponseBody | |
108 | +// public AjaxResult addSave(Wave wave){ | |
109 | +// wave.setWarehouseCode(ShiroUtils.getWarehouseCode()); | |
110 | +// wave.setCreatedBy(ShiroUtils.getLoginName()); | |
111 | +// wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
112 | +// return toAjax(waveService.save(wave)); | |
113 | +// } | |
114 | + | |
115 | +// /** | |
116 | +// * 修改波次 | |
117 | +// */ | |
118 | +// @GetMapping("/edit/{id}") | |
119 | +// public String edit(@PathVariable("id") Integer id, ModelMap mmap) { | |
120 | +// mmap.put("wave", waveService.getById(id)); | |
121 | +// return prefix + "/edit"; | |
122 | +// } | |
123 | +// | |
124 | +// /** | |
125 | +// * 修改波次 | |
126 | +// */ | |
127 | +// @RequiresPermissions("shipment:wave:edit") | |
128 | +// @Log(title = "出库-波次", operating = "修改波次", action = BusinessType.UPDATE) | |
129 | +// @PostMapping("/edit") | |
130 | +// @ResponseBody | |
131 | +// public AjaxResult editSave(Wave wave) { | |
132 | +// wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
133 | +// return toAjax(waveService.updateById(wave)); | |
134 | +// } | |
131 | 135 | |
132 | 136 | /** |
133 | 137 | * 删除波次 |
... | ... | @@ -142,10 +146,28 @@ public class WaveController extends BaseController { |
142 | 146 | } |
143 | 147 | List<Integer> list = new ArrayList<>(); |
144 | 148 | for (Integer id : Convert.toIntArray(ids)) { |
149 | + LambdaQueryWrapper<ShipmentDetail> lam=Wrappers.lambdaQuery(); | |
150 | + lam.eq(ShipmentDetail::getWarehouseCode,ShiroUtils.getWarehouseCode()) | |
151 | + .eq(ShipmentDetail::getWaveId,id); | |
152 | + List<ShipmentDetail> shipmentDetails=shipmentDetailService.list(lam); | |
153 | + if(shipmentDetails !=null || shipmentDetails.size()>0){ | |
154 | + return AjaxResult.error("id为"+ id +"的波次不能删除,有单据处于此波次中"); | |
155 | + } | |
145 | 156 | list.add(id); |
146 | 157 | } |
147 | 158 | return toAjax(waveService.removeByIds(list)); |
148 | 159 | } |
149 | 160 | |
161 | + /** | |
162 | + * 开始波次 | |
163 | + */ | |
164 | + @RequiresPermissions("shipment:wave:startWave") | |
165 | + @Log(title = "出库-波次", operating = "开始波次", action = BusinessType.UPDATE) | |
166 | + @PostMapping("/startWave") | |
167 | + @ResponseBody | |
168 | + public AjaxResult editSave(Wave wave) { | |
169 | + wave.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
170 | + return toAjax(waveService.updateById(wave)); | |
171 | + } | |
150 | 172 | |
151 | 173 | } |
... | ... |
src/main/java/com/huaheng/pc/shipment/wave/domain/Wave.java
... | ... | @@ -9,6 +9,7 @@ import io.swagger.annotations.ApiModelProperty; |
9 | 9 | import lombok.Data; |
10 | 10 | |
11 | 11 | import java.io.Serializable; |
12 | +import java.math.BigDecimal; | |
12 | 13 | import java.util.Date; |
13 | 14 | |
14 | 15 | @ApiModel(value="com.huaheng.pc.shipment.wave.domain.Wave") |
... | ... | @@ -83,7 +84,7 @@ public class Wave implements Serializable { |
83 | 84 | */ |
84 | 85 | @TableField(value = "totalQty") |
85 | 86 | @ApiModelProperty(value="总数量") |
86 | - private Integer totalQty; | |
87 | + private BigDecimal totalQty; | |
87 | 88 | |
88 | 89 | /** |
89 | 90 | * 波次开始时间 |
... | ... |
src/main/resources/application-druid.properties
... | ... | @@ -2,14 +2,14 @@ |
2 | 2 | spring.datasource.type=com.alibaba.druid.pool.DruidDataSource |
3 | 3 | spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver |
4 | 4 | # \u4E3B\u5E93 |
5 | -#spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false | |
5 | +spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/wms_v2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false | |
6 | 6 | #spring.datasource.druid.master.url=jdbc:mysql://172.16.29.45:3306/huahengExample?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false |
7 | -spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms2.0?characterEncoding=utf8&serverTimezone=GMT%2b8 | |
7 | +#spring.datasource.druid.master.url=jdbc:mysql://localhost:3306/wms2.0?characterEncoding=utf8&serverTimezone=GMT%2b8 | |
8 | 8 | |
9 | -#spring.datasource.druid.master.username=softhuaheng | |
10 | -#spring.datasource.druid.master.password=HHrobot123. | |
11 | -spring.datasource.druid.master.username=root | |
12 | -spring.datasource.druid.master.password=123456 | |
9 | +spring.datasource.druid.master.username=softhuaheng | |
10 | +spring.datasource.druid.master.password=HHrobot123. | |
11 | +#spring.datasource.druid.master.username=root | |
12 | +#spring.datasource.druid.master.password=123456 | |
13 | 13 | # \u4ECE\u5E93 |
14 | 14 | #spring.datasource.druid.slave.open = true |
15 | 15 | #spring.datasource.druid.slave.url=jdbc:mysql://172.16.29.45:3306/huaheng?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false |
... | ... |
src/main/resources/mybatis/receipt/ReceiptContainerDetailMapper.xml
... | ... | @@ -8,6 +8,7 @@ |
8 | 8 | <result column="warehouseCode" jdbcType="VARCHAR" property="warehouseCode" /> |
9 | 9 | <result column="receiptId" jdbcType="INTEGER" property="receiptId" /> |
10 | 10 | <result column="receiptDetailId" jdbcType="INTEGER" property="receiptDetailId" /> |
11 | + <result column="locationCode" jdbcType="VARCHAR" property="locationCode" /> | |
11 | 12 | <result column="receiptCode" jdbcType="VARCHAR" property="receiptCode" /> |
12 | 13 | <result column="receiptType" jdbcType="VARCHAR" property="receiptType" /> |
13 | 14 | <result column="containerCode" jdbcType="VARCHAR" property="containerCode" /> |
... | ... | @@ -53,7 +54,7 @@ |
53 | 54 | </resultMap> |
54 | 55 | <sql id="Base_Column_List"> |
55 | 56 | <!--@mbg.generated--> |
56 | - id, receiptContainerId, warehouseCode, receiptId, receiptDetailId, receiptCode, receiptType, | |
57 | + id, receiptContainerId, warehouseCode, receiptId, receiptDetailId,locationCode , receiptCode, receiptType, | |
57 | 58 | containerCode, containerType, companyCode, materialCode, materialName, materialSpec, |
58 | 59 | materialUnit, qty, `status`, attributeId, attribute1, attribute2, attribute3, attribute4, |
59 | 60 | supplierCode, batch, lot, projectNo, weight, manufactureDate, expirationDate, agingDate, |
... | ... |
src/main/resources/static/huaheng/js/common.js
... | ... | @@ -21,8 +21,10 @@ $(function(){ |
21 | 21 | if ($(".time").length > 0) { |
22 | 22 | layui.use('laydate', function() { |
23 | 23 | var laydate = layui.laydate; |
24 | - laydate.render({ elem: '#startTime', theme: 'molv' }); | |
25 | - laydate.render({ elem: '#endTime', theme: 'molv' }); | |
24 | + var day1 = new Date(); | |
25 | + day1.setTime(day1.getTime()-24*60*60*1000*7); | |
26 | + laydate.render({ elem: '#startTime', theme: 'molv',value: new Date(day1), isInitValue: true}); | |
27 | + laydate.render({ elem: '#endTime', theme: 'molv',value: new Date(), isInitValue: true }); | |
26 | 28 | }); |
27 | 29 | } |
28 | 30 | }); |
... | ... |
src/main/resources/templates/check/checkHeader/checkHeader.html
... | ... | @@ -32,9 +32,9 @@ |
32 | 32 | </li> |
33 | 33 | <li class="time"> |
34 | 34 | <label>创建时间: </label> |
35 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[createdBegin]"/> | |
35 | + <input type="text" class="time-input" id="startCreatedTime" placeholder="开始时间" name="params[createdBegin]"/> | |
36 | 36 | <span>-</span> |
37 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[createdEnd]"/> | |
37 | + <input type="text" class="time-input" id="endCreatedTime" placeholder="结束时间" name="params[createdEnd]"/> | |
38 | 38 | </li> |
39 | 39 | <li> |
40 | 40 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
... | ... | @@ -103,8 +103,8 @@ |
103 | 103 | </div> |
104 | 104 | |
105 | 105 | <div class="btn-group hidden-xs" id="toolbarReg" role="group"> |
106 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="complete()" shiro:hasPermission="check:checkingRegister:remove"> | |
107 | - <i class="fa fa-trash-o"></i> 质检完成 | |
106 | + <a class="btn btn-outline btn-success btn-rounded" onclick="complete()" shiro:hasPermission="check:checkingRegister:remove"> | |
107 | + <i class="fa fa-check-circle-o"></i> 质检完成 | |
108 | 108 | </a> |
109 | 109 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="check:checkingRegister:remove"> |
110 | 110 | <i class="fa fa-trash-o"></i> 删除 |
... | ... | @@ -259,7 +259,6 @@ |
259 | 259 | |
260 | 260 | //质检明细表格初始化 |
261 | 261 | $("#bootstrap-table1").bootstrapTable({ |
262 | - url: prefix + "/list", | |
263 | 262 | createUrl: prefix1 + "/add", |
264 | 263 | updateUrl: prefix1 + "/edit/{id}", |
265 | 264 | removeUrl: prefix1 + "/remove", |
... | ... | @@ -269,7 +268,6 @@ |
269 | 268 | sortOrder: "desc", |
270 | 269 | iconSize: "outline", |
271 | 270 | toolbar: "#toolbar1", |
272 | - contentType: "application/x-www-form-urlencoded", | |
273 | 271 | pagination: true, // 是否显示分页(*) |
274 | 272 | pageNumber: 1, // 初始化加载第一页,默认第一页 |
275 | 273 | pageSize: 50, // 每页的记录行数(*) |
... | ... | @@ -282,11 +280,13 @@ |
282 | 280 | }, |
283 | 281 | { |
284 | 282 | field : 'id', |
285 | - title : 'id' | |
283 | + title : 'id', | |
284 | + visible: false | |
286 | 285 | }, |
287 | 286 | { |
288 | 287 | field : 'checkHeaderId', |
289 | - title : '质检头id' | |
288 | + title : '质检头id', | |
289 | + visible : false | |
290 | 290 | }, |
291 | 291 | { |
292 | 292 | field : 'warehouseCode', |
... | ... | @@ -299,7 +299,8 @@ |
299 | 299 | }, |
300 | 300 | { |
301 | 301 | field : 'inventoryDetailId', |
302 | - title : '库存明细标识' | |
302 | + title : '库存明细标识', | |
303 | + visible : false | |
303 | 304 | }, |
304 | 305 | { |
305 | 306 | field : 'locationCode', |
... | ... | @@ -311,7 +312,8 @@ |
311 | 312 | }, |
312 | 313 | { |
313 | 314 | field : 'receiptDetailId', |
314 | - title : '入库单明细标识' | |
315 | + title : '入库单明细标识', | |
316 | + visible : false | |
315 | 317 | }, |
316 | 318 | { |
317 | 319 | field : 'receiptCode', |
... | ... | @@ -402,7 +404,6 @@ |
402 | 404 | }); |
403 | 405 | //质检登记表格初始化 |
404 | 406 | $("#bootstrap-table2").bootstrapTable({ |
405 | - contentType: "application/x-www-form-urlencoded", | |
406 | 407 | editable: true, |
407 | 408 | clickEdit: true, |
408 | 409 | clickToSelect: true, |
... | ... | @@ -586,6 +587,7 @@ |
586 | 587 | }); |
587 | 588 | } |
588 | 589 | }); |
590 | + | |
589 | 591 | /* 质检单列表-详细 */ |
590 | 592 | function detail(id, code) { |
591 | 593 | checkId = id; |
... | ... | @@ -647,8 +649,23 @@ |
647 | 649 | |
648 | 650 | function complete() { |
649 | 651 | var url = prefix1+"/complete"; |
652 | + var data = {id: checkDetailId}; | |
650 | 653 | $.operate.submit(url, "post", "json", data); |
651 | 654 | } |
655 | + | |
656 | + layui.use('laydate', function(){ | |
657 | + var laydate = layui.laydate; | |
658 | + var day1 = new Date(); | |
659 | + day1.setTime(day1.getTime()-24*60*60*1000*7); | |
660 | + //执行一个laydate实例 | |
661 | + laydate.render({ | |
662 | + elem: '#startCreatedTime' //指定元素 | |
663 | + ,theme: 'molv',value: new Date(day1), isInitValue: true | |
664 | + }); | |
665 | + laydate.render({ | |
666 | + elem: '#endCreatedTime', theme: 'molv',value: new Date(), isInitValue: true | |
667 | + }) | |
668 | + }); | |
652 | 669 | </script> |
653 | 670 | </body> |
654 | 671 | </html> |
655 | 672 | \ No newline at end of file |
... | ... |
src/main/resources/templates/config/alarmLevel/alarmLevel.html
... | ... | @@ -17,6 +17,7 @@ |
17 | 17 | </li> |
18 | 18 | <li> |
19 | 19 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
20 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('alarmLevel-form')"><i class="fa fa-refresh"></i> 重置</a> | |
20 | 21 | </li> |
21 | 22 | </ul> |
22 | 23 | </div> |
... | ... |
src/main/resources/templates/config/bomHeader/bomHeader.html
... | ... | @@ -34,6 +34,7 @@ |
34 | 34 | <li> |
35 | 35 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i |
36 | 36 | class="fa fa-search"></i> 搜索</a> |
37 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('alarmFlow-form')"><i class="fa fa-refresh"></i> 重置</a> | |
37 | 38 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
38 | 39 | </li> |
39 | 40 | </ul> |
... | ... |
src/main/resources/templates/config/carrier/carrier.html
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('company-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | </li> |
27 | 28 | </ul> |
28 | 29 | </div> |
... | ... |
src/main/resources/templates/config/company/company.html
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('company-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:company:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/configValue/add.html
src/main/resources/templates/config/configValue/configValue.html
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('company-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:company:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/container/container.html
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | </li> |
36 | 36 | <li> |
37 | 37 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
38 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('container-form')"><i class="fa fa-refresh"></i> 重置</a> | |
38 | 39 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:container:export"><i class="fa fa-download"></i> 导出</a>--> |
39 | 40 | </li> |
40 | 41 | </ul> |
... | ... |
src/main/resources/templates/config/containerCapacity/containerCapacity.html
... | ... | @@ -32,6 +32,7 @@ |
32 | 32 | </li> |
33 | 33 | <li> |
34 | 34 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
35 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('containerCapacity-form')"><i class="fa fa-refresh"></i> 重置</a> | |
35 | 36 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
36 | 37 | </li> |
37 | 38 | </ul> |
... | ... |
src/main/resources/templates/config/containerType/containerType.html
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | </li> |
30 | 30 | <li> |
31 | 31 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
32 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('containerType-form')"><i class="fa fa-refresh"></i> 重置</a> | |
32 | 33 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
33 | 34 | </li> |
34 | 35 | </ul> |
... | ... |
src/main/resources/templates/config/customer/customer.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="material-form"> | |
9 | + <form id="customer-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('customer-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:customer:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/cycleCountPreference/cycleCountPreference.html
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | </li> |
36 | 36 | <li> |
37 | 37 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
38 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('cycleCountPreference-form')"><i class="fa fa-refresh"></i> 重置</a> | |
38 | 39 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
39 | 40 | </li> |
40 | 41 | </ul> |
... | ... |
src/main/resources/templates/config/excelTemplate/excelTemplate.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="locationType-form"> | |
9 | + <form id="execlTemplate-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | </li> |
21 | 21 | <li> |
22 | 22 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
23 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('execlTemplate-form')"><i class="fa fa-refresh"></i> 重置</a> | |
23 | 24 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
24 | 25 | </li> |
25 | 26 | </ul> |
... | ... |
src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html
... | ... | @@ -37,6 +37,7 @@ |
37 | 37 | <li> |
38 | 38 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i |
39 | 39 | class="fa fa-search"></i> 搜索</a> |
40 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('filterConfigHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
40 | 41 | </li> |
41 | 42 | </ul> |
42 | 43 | </div> |
... | ... |
src/main/resources/templates/config/location/location.html
... | ... | @@ -56,6 +56,7 @@ |
56 | 56 | </li> |
57 | 57 | <li> |
58 | 58 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
59 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('location-form')"><i class="fa fa-refresh"></i> 重置</a> | |
59 | 60 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:location:export"><i class="fa fa-download"></i> 导出</a>--> |
60 | 61 | </li> |
61 | 62 | </ul> |
... | ... |
src/main/resources/templates/config/locationType/locationType.html
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | </li> |
30 | 30 | <li> |
31 | 31 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
32 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('alarmLevel-form')"><i class="fa fa-refresh"></i> 重置</a> | |
32 | 33 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
33 | 34 | </li> |
34 | 35 | </ul> |
... | ... |
src/main/resources/templates/config/material/material.html
... | ... | @@ -35,6 +35,7 @@ |
35 | 35 | </li> |
36 | 36 | <li> |
37 | 37 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
38 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('material-form')"><i class="fa fa-refresh"></i> 重置</a> | |
38 | 39 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:material:export"><i class="fa fa-download"></i> 导出</a>--> |
39 | 40 | </li> |
40 | 41 | </ul> |
... | ... |
src/main/resources/templates/config/materialMultiple/materialMultiple.html
... | ... | @@ -5,7 +5,7 @@ |
5 | 5 | <div class="container-div"> |
6 | 6 | <div class="row"> |
7 | 7 | <div class="col-sm-12 select-info"> |
8 | - <form id="locationType-form"> | |
8 | + <form id="materialMultiple-form"> | |
9 | 9 | <div class="select-list"> |
10 | 10 | <ul> |
11 | 11 | <li> |
... | ... | @@ -22,6 +22,7 @@ |
22 | 22 | </li> |
23 | 23 | <li> |
24 | 24 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
25 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('materialMultiple-form')"><i class="fa fa-refresh"></i> 重置</a> | |
25 | 26 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
26 | 27 | </li> |
27 | 28 | </ul> |
... | ... |
src/main/resources/templates/config/materialType/materialType.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="locationType-form"> | |
9 | + <form id="materialType-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('materialType-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/materialUnit/materialUnit.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="locationType-form"> | |
9 | + <form id="materialUnit-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -27,6 +27,7 @@ |
27 | 27 | </li> |
28 | 28 | <li> |
29 | 29 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
30 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('materialUnit-form')"><i class="fa fa-refresh"></i> 重置</a> | |
30 | 31 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
31 | 32 | </li> |
32 | 33 | </ul> |
... | ... |
src/main/resources/templates/config/receiptPreference/receiptPreference.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="locationType-form"> | |
9 | + <form id="receiptPreference-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | </li> |
30 | 30 | <li> |
31 | 31 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
32 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptPreference-form')"><i class="fa fa-refresh"></i> 重置</a> | |
32 | 33 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
33 | 34 | </li> |
34 | 35 | </ul> |
... | ... |
src/main/resources/templates/config/receiptType/receiptType.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="locationType-form"> | |
9 | + <form id="receiptType-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -20,6 +20,7 @@ |
20 | 20 | </li> |
21 | 21 | <li> |
22 | 22 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
23 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('receiptType-form')"><i class="fa fa-refresh"></i> 重置</a> | |
23 | 24 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
24 | 25 | </li> |
25 | 26 | </ul> |
... | ... |
src/main/resources/templates/config/shipmentPreference/shipmentPreference.html
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | </li> |
27 | 27 | <li> |
28 | 28 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
29 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('shipmentPreference-form')"><i class="fa fa-refresh"></i> 重置</a> | |
29 | 30 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
30 | 31 | </li> |
31 | 32 | </ul> |
... | ... |
src/main/resources/templates/config/shipmentType/shipmentType.html
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('shipmentType-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/statusFlowHeader/statusFlowHeader.html
... | ... | @@ -40,6 +40,7 @@ |
40 | 40 | <li> |
41 | 41 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i |
42 | 42 | class="fa fa-search"></i> 搜索</a> |
43 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('statusFlowHeader-form')"><i class="fa fa-refresh"></i> 重置</a> | |
43 | 44 | </li> |
44 | 45 | </ul> |
45 | 46 | </div> |
... | ... |
src/main/resources/templates/config/supplier/supplier.html
... | ... | @@ -23,6 +23,7 @@ |
23 | 23 | </li> |
24 | 24 | <li> |
25 | 25 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
26 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('supplier-form')"><i class="fa fa-refresh"></i> 重置</a> | |
26 | 27 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:supplier:export"><i class="fa fa-download"></i> 导出</a>--> |
27 | 28 | </li> |
28 | 29 | </ul> |
... | ... |
src/main/resources/templates/config/warehouse/warehouse.html
... | ... | @@ -6,7 +6,7 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="company-form"> | |
9 | + <form id="warehouse-form"> | |
10 | 10 | <div class="select-list"> |
11 | 11 | <ul> |
12 | 12 | <li> |
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | </li> |
30 | 30 | <li> |
31 | 31 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
32 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('warehouse-form')"><i class="fa fa-refresh"></i> 重置</a> | |
32 | 33 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:company:export"><i class="fa fa-download"></i> 导出</a>--> |
33 | 34 | </li> |
34 | 35 | </ul> |
... | ... |
src/main/resources/templates/config/waveFlowHeader/waveFlowHeader.html
... | ... | @@ -31,6 +31,7 @@ |
31 | 31 | <li> |
32 | 32 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i |
33 | 33 | class="fa fa-search"></i> 搜索</a> |
34 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('waveFlowHeader')"><i class="fa fa-refresh"></i> 重置</a> | |
34 | 35 | </li> |
35 | 36 | </ul> |
36 | 37 | </div> |
... | ... |
src/main/resources/templates/config/waveMaster/waveMaster.html
... | ... | @@ -26,6 +26,7 @@ |
26 | 26 | </li> |
27 | 27 | <li> |
28 | 28 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
29 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('waveMaster-form')"><i class="fa fa-refresh"></i> 重置</a> | |
29 | 30 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
30 | 31 | </li> |
31 | 32 | </ul> |
... | ... |
src/main/resources/templates/config/zone/zone.html
... | ... | @@ -29,6 +29,7 @@ |
29 | 29 | </li> |
30 | 30 | <li> |
31 | 31 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
32 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('zone-form')"><i class="fa fa-refresh"></i> 重置</a> | |
32 | 33 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> |
33 | 34 | </li> |
34 | 35 | </ul> |
... | ... |
src/main/resources/templates/config/zoneCapacity/zoneCapacity.html
... | ... | @@ -30,6 +30,7 @@ |
30 | 30 | </li> |
31 | 31 | <li> |
32 | 32 | <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> |
33 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('zoneCapacity-form')"><i class="fa fa-refresh"></i> 重置</a> | |
33 | 34 | <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="config:zoneCapacity:export"><i class="fa fa-download"></i> 导出</a>--> |
34 | 35 | </li> |
35 | 36 | </ul> |
... | ... |
src/main/resources/templates/include.html
... | ... | @@ -20,7 +20,7 @@ |
20 | 20 | <div th:fragment="footer"> |
21 | 21 | <script th:src="@{/js/jquery.min.js}"></script> |
22 | 22 | <script th:src="@{/js/bootstrap.min.js}"></script> |
23 | - | |
23 | + <script th:src="@{/huaheng/js/common.js?v=2.3.0}"></script> | |
24 | 24 | <!-- bootstrap-table 表格插件 --> |
25 | 25 | <script th:src="@{/ajax/libs/bootstrap-table/bootstrap-table.min.js}"></script> |
26 | 26 | <script th:src="@{/ajax/libs/bootstrap3-editable/js/bootstrap-editable.js}"></script> |
... | ... | @@ -42,7 +42,6 @@ |
42 | 42 | <script th:src="@{/ajax/libs/layer/layer.min.js}"></script> |
43 | 43 | <script th:src="@{/ajax/libs/layui/layui.js}"></script> |
44 | 44 | <script th:src="@{/ajax/libs/layui/lay/modules/upload.js}"></script> |
45 | - <script th:src="@{/huaheng/js/common.js?v=2.3.0}"></script> | |
46 | 45 | <script th:src="@{/huaheng/js/huahengUI.js?v=2.3.2}"></script> |
47 | 46 | <script th:inline="javascript"> var ctx = [[@{/}]]; </script> |
48 | 47 | </div> |
... | ... |
src/main/resources/templates/inventory/adjustHeader/addAdjust.html renamed to src/main/resources/templates/inventory/adjustDetail/add.html
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... | ... | @@ -55,8 +55,8 @@ |
55 | 55 | 物料规格:<input id="materialSpec" type="text" name="materialSpec"/> |
56 | 56 | </li> |
57 | 57 | <li> |
58 | - 调整单类型:<select name="problemType" | |
59 | - th:with="problemType=${@dict.getType('cyclecountStatus')}"> | |
58 | + 调整类型:<select name="problemType" | |
59 | + th:with="problemType=${@dict.getType('adjustType')}"> | |
60 | 60 | <option value="">所有</option> |
61 | 61 | <option th:each="e : ${problemType}" th:text="${e['dictLabel']}" |
62 | 62 | th:value="${e['dictValue']}"></option> |
... | ... | @@ -91,11 +91,13 @@ |
91 | 91 | </div> |
92 | 92 | </div> |
93 | 93 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
94 | - | |
95 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> | |
96 | - <!--shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"--> | |
97 | - <i class="fa fa-vcard"></i>差异调整 | |
94 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()"> | |
95 | + <i class="fa fa-plus"></i> 新增 | |
98 | 96 | </a> |
97 | + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="addAdjust()"/> | |
98 | + <!–shiro:hasPermission="inventory:cyclecountAdjustDetail:addAdjust"–> | |
99 | + <i class="fa fa-vcard"></i>调整 | |
100 | + </a>--> | |
99 | 101 | <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="createCyclecountWithGapQty()" |
100 | 102 | shiro:hasPermission="inventoryHeader:cycleCountDetail:cyclecountRepeat"> |
101 | 103 | <i class="fa fa-vcard"></i> 差异复盘 |
... | ... | @@ -104,9 +106,9 @@ |
104 | 106 | shiro:hasPermission="inventoryHeader:cycleCountDetail:adjust"> |
105 | 107 | <i class="fa fa-vcard"></i> 差异库存调整 |
106 | 108 | </a>--> |
107 | - <a class="btn btn-outline btn-success btn-rounded" onclick="update()"> | |
108 | - <i class="fa fa-refresh"></i> 刷 新 | |
109 | - </a> | |
109 | + <!--<a class="btn btn-outline btn-success btn-rounded" onclick="$.table.refresh()"> | |
110 | + <i class="fa fa-refresh"></i> 刷新 | |
111 | + </a>--> | |
110 | 112 | </div> |
111 | 113 | <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
112 | 114 | </div> |
... | ... | @@ -115,14 +117,14 @@ |
115 | 117 | <script th:inline="javascript"> |
116 | 118 | var prefix = ctx + "inventory/adjustDetail"; |
117 | 119 | var prefix_head = ctx + "inventory/adjustHeader"; |
118 | - var datas = [[${@dict.getType('adjustType')}]]; | |
120 | + var type2 = [[${@dict.getType('adjustType')}]]; | |
121 | + var adjustStatus = [[${@dict.getType('adjustStatus')}]]; | |
119 | 122 | var inventoryStatus = [[${@dict.getType('inventoryStatus')}]]; |
120 | 123 | var created; |
121 | 124 | |
122 | 125 | $(function () { |
123 | 126 | update(); |
124 | 127 | }); |
125 | - | |
126 | 128 | function update() { |
127 | 129 | let adjustCode=null; |
128 | 130 | let options = { |
... | ... | @@ -130,13 +132,22 @@ |
130 | 132 | modalName: "调整单明细", |
131 | 133 | sortName: "id", |
132 | 134 | sortOrder: "desc", |
133 | - showRefresh: false, | |
134 | 135 | search: false, |
136 | + showRefresh: true, | |
135 | 137 | columns: [ |
136 | 138 | { |
137 | 139 | radio: true |
138 | 140 | }, |
139 | 141 | { |
142 | + title: '调整操作', | |
143 | + align: 'center', | |
144 | + formatter: function (value, row, index) { | |
145 | + var actions = []; | |
146 | + actions.push('<a class="btn btn-warning btn-xs " href="#" onclick="$.operate.addAdjust()"><i class="fa fa-trash-o"></i>调整</a> '); | |
147 | + return actions.join(''); | |
148 | + } | |
149 | + }, | |
150 | + { | |
140 | 151 | field: 'id', |
141 | 152 | title: '明细id', |
142 | 153 | sortable: true |
... | ... | @@ -201,7 +212,7 @@ |
201 | 212 | { |
202 | 213 | field: 'checkDetailId', |
203 | 214 | title: '质检单明细行号', |
204 | - visible: false | |
215 | + visible: true | |
205 | 216 | }, |
206 | 217 | { |
207 | 218 | field: 'referCode', |
... | ... | @@ -211,14 +222,18 @@ |
211 | 222 | { |
212 | 223 | field: 'referDetailId', |
213 | 224 | title: '调整单关联明细ID', |
214 | - visible: false | |
225 | + visible: true | |
215 | 226 | }, |
216 | 227 | |
217 | 228 | { |
218 | 229 | field: 'problemType', |
219 | 230 | title: '调整类型', |
220 | - sortable: true, | |
221 | - visible: true | |
231 | + align: 'center', | |
232 | + formatter: function (value, row, index) { | |
233 | + return $.table.selectDictLabel(type2, value); | |
234 | + }, | |
235 | + visible: true, | |
236 | + //sortable: true | |
222 | 237 | }, |
223 | 238 | { |
224 | 239 | field: 'fromQty', |
... | ... | @@ -278,9 +293,9 @@ |
278 | 293 | }, |
279 | 294 | { |
280 | 295 | field: 'status', |
281 | - title: '明细状态', | |
296 | + title: '调整状态', | |
282 | 297 | formatter: function (value, row, index) { |
283 | - return $.table.selectDictLabel(datas, value); | |
298 | + return $.table.selectDictLabel(adjustStatus, value); | |
284 | 299 | }, |
285 | 300 | sortable: true |
286 | 301 | }, |
... | ... | @@ -299,7 +314,15 @@ |
299 | 314 | title: '处理标记', |
300 | 315 | visible: false |
301 | 316 | }, |
302 | - | |
317 | + { | |
318 | + title: '操作', | |
319 | + align: 'center', | |
320 | + formatter: function (value, row, index) { | |
321 | + var actions = []; | |
322 | + actions.push('<a class="btn btn-danger btn-xs" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a> '); | |
323 | + return actions.join(''); | |
324 | + } | |
325 | + } | |
303 | 326 | |
304 | 327 | ] |
305 | 328 | }; |
... | ... |
src/main/resources/templates/inventory/adjustDetail/adjustEdit.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg"> | |
6 | +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + <form class="form-horizontal m" id="form-cyclecountAdjustDetail-AdjustEdit" th:object="${cyclecountAdjustDetailEdit}" > | |
8 | + <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="*{cyclecountAdjustId}"> | |
9 | + | |
10 | + <div class="form-group"> | |
11 | + <label class="col-sm-3 control-label">明细id:</label> | |
12 | + <div class="col-sm-8"> | |
13 | + <input id="id" name="id" th:value="*{id}" class="form-control" type="text"readonly="readonly"> | |
14 | + </div> | |
15 | + </div> | |
16 | + <div class="form-group"> | |
17 | + <label class="col-sm-3 control-label">调整单编号:</label> | |
18 | + <div class="col-sm-8"> | |
19 | + <input id="cyclecountAdjustCode" name="cyclecountAdjustCode" th:value="*{cyclecountAdjustCode}" class="form-control" type="text" readonly="readonly"> | |
20 | + </div> | |
21 | + </div> | |
22 | + <div class="form-group"> | |
23 | + <label class="col-sm-3 control-label">货主编码:</label> | |
24 | + <div class="col-sm-8"> | |
25 | + <input id="companyCode" name="companyCode" th:value="*{companyCode}" class="form-control" type="text" readonly="readonly"> | |
26 | + </div> | |
27 | + </div> | |
28 | + <div class="form-group"> | |
29 | + <label class="col-sm-3 control-label">盘点单编号:</label> | |
30 | + <div class="col-sm-8"> | |
31 | + <input id="cyclecountHeadCode" name="cyclecountHeadCode" th:value="*{cyclecountHeadCode}" class="form-control" type="text" readonly="readonly"> | |
32 | + </div> | |
33 | + </div> | |
34 | + <div class="form-group"> | |
35 | + <label class="col-sm-3 control-label">物料编码:</label> | |
36 | + <div class="col-sm-8"> | |
37 | + <input id="materialCode" name="materialCode" th:value="*{materialCode}" class="form-control" type="text"readonly="readonly"> | |
38 | + </div> | |
39 | + </div> | |
40 | + | |
41 | + <div class="form-group"> | |
42 | + <label class="col-sm-3 control-label">库位编码:</label> | |
43 | + <div class="col-sm-8"> | |
44 | + <input id="locationCode" name="locationCode" th:value="*{locationCode}" class="form-control" type="text" readonly="readonly"> | |
45 | + </div> | |
46 | + </div> | |
47 | + <div class="form-group"> | |
48 | + <label class="col-sm-3 control-label">容器编号:</label> | |
49 | + <div class="col-sm-8"> | |
50 | + <input id="containerCode" name="containerCode" th:value="*{containerCode}" class="form-control" type="text" readonly="readonly"> | |
51 | + </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="receiptCode" name="receiptCode" th:value="*{receiptCode}" class="form-control" type="text"readonly="readonly"> | |
57 | + </div> | |
58 | + </div> | |
59 | + <!--<div class="form-group"> | |
60 | + <label class="col-sm-3 control-label">重量kg:</label> | |
61 | + <div class="col-sm-8"> | |
62 | + <input id="weight" name="weight" th:value="*{weight}" class="form-control" type="text" readonly="readonly"> | |
63 | + </div> | |
64 | + </div>--> | |
65 | + <div class="form-group"> | |
66 | + <label class="col-sm-3 control-label">库存id:</label> | |
67 | + <div class="col-sm-8"> | |
68 | + <input id="inventoryId" name="inventoryId" th:value="*{inventoryId}" class="form-control" type="text"readonly="readonly"> | |
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 | + <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}" disabled="disabled"> | |
75 | + <option th:each="dict : ${inventoryStatus}" th:field="*{inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
76 | + </select> | |
77 | + </div> | |
78 | + </div> | |
79 | + <div class="form-group"> | |
80 | + <label class="col-sm-3 control-label">系统数量:</label> | |
81 | + <div class="col-sm-8"> | |
82 | + <input id="systemQty" name="systemQty" th:value="*{systemQty}" class="form-control" type="text"readonly="readonly"> | |
83 | + </div> | |
84 | + </div> | |
85 | + <div class="form-group"> | |
86 | + <label class="col-sm-3 control-label">实际数量:</label> | |
87 | + <div class="col-sm-8"> | |
88 | + <input id="countedQty" name="countedQty" th:value="*{countedQty}" class="form-control" type="text" readonly="readonly"> | |
89 | + </div> | |
90 | + </div> | |
91 | + <div class="form-group"> | |
92 | + <label class="col-sm-3 control-label">差异数量:</label> | |
93 | + <div class="col-sm-8"> | |
94 | + <input id="gapQty" name="gapQty" th:value="*{gapQty}" class="form-control" type="text" readonly="readonly"> | |
95 | + </div> | |
96 | + </div> | |
97 | + <div class="form-group"> | |
98 | + <label class="col-sm-3 control-label">调整数量:</label> | |
99 | + <div class="col-sm-8"> | |
100 | + <input id="adjustQty" name="adjustQty" class="form-control" type="text" placeholder="填写物料的差异数值" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')"> | |
101 | + </div> | |
102 | + </div> | |
103 | + | |
104 | + <div class="form-group"> | |
105 | + <label class="col-sm-3 control-label">批次:</label> | |
106 | + <div class="col-sm-8"> | |
107 | + <input id="batch" name="batch" th:value="*{batch}" class="form-control" type="text" readonly="readonly"> | |
108 | + </div> | |
109 | + </div> | |
110 | + <div class="form-group"> | |
111 | + <label class="col-sm-3 control-label">批号:</label> | |
112 | + <div class="col-sm-8"> | |
113 | + <input id="lot" name="lot" th:value="*{lot}" class="form-control" type="text"readonly="readonly"> | |
114 | + </div> | |
115 | + </div> | |
116 | + <div class="form-group"> | |
117 | + <label class="col-sm-3 control-label">项目号:</label> | |
118 | + <div class="col-sm-8"> | |
119 | + <input id="project" name="project" th:value="*{project}" class="form-control"readonly="readonly"> | |
120 | + </div> | |
121 | + </div> | |
122 | + <!--<div class="form-group"> | |
123 | + <label class="col-sm-3 control-label">生产日期:</label> | |
124 | + <div class="col-sm-8"> | |
125 | + <input id="manufactureDate" name="manufactureDate" th:value="*{manufactureDate}" class="form-control" type="text" readonly="readonly"> | |
126 | + </div> | |
127 | + </div>--> | |
128 | + <div class="form-group"> | |
129 | + <label class="col-sm-3 control-label">失效日期:</label> | |
130 | + <div class="col-sm-8"> | |
131 | + <input id="expirationDate" name="expirationDate" th:value="*{expirationDate}" class="form-control" type="text"readonly="readonly"> | |
132 | + </div> | |
133 | + </div> | |
134 | + | |
135 | + <div class="form-group"> | |
136 | + <div class="form-control-static col-sm-offset-9"> | |
137 | + <button type="submit" class="btn btn-success">确认</button><!--只调整数量 adjustUpdate--> | |
138 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
139 | + </div> | |
140 | + </div> | |
141 | + </form> | |
142 | +</div> | |
143 | +<div th:include="include::footer"></div> | |
144 | +<script type="text/javascript"> | |
145 | + var prefix = ctx + "inventory/cyclecountAdjustDetail" | |
146 | + $("#form-cyclecountAdjustDetail-AdjustEdit").validate({ | |
147 | + rules:{ | |
148 | + adjustQty:{ | |
149 | + required:true, | |
150 | + }, | |
151 | + //必填判定 | |
152 | + }, | |
153 | + submitHandler: function(form) { | |
154 | + $.operate.save(prefix + "/editAdjustSave", $('#form-cyclecountAdjustDetail-AdjustEdit').serialize()); | |
155 | + } | |
156 | + }); | |
157 | + /*时间弹框*/ | |
158 | + $(function () { | |
159 | + layui.use('laydate', function() { | |
160 | + var laydate = layui.laydate; | |
161 | + laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'}); | |
162 | + laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'}); | |
163 | + }); | |
164 | + }) | |
165 | + | |
166 | +</script> | |
167 | +</body> | |
168 | +</html> | |
... | ... |
src/main/resources/templates/inventory/adjustHeader/add.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body class="white-bg"> | |
6 | + <div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + | |
8 | + <form class="form-horizontal m" id="form-cyclecountAdjustDetail-addAdjust" > | |
9 | + <input type="hidden" id="cyclecountAdjustId" name="cyclecountAdjustId" th:value="${cyclecountAdjustId}"> | |
10 | + | |
11 | + <div class="form-group"> | |
12 | + <label class="col-sm-3 control-label">调整单编号:</label> | |
13 | + <div class="col-sm-8"> | |
14 | + <input id="code" name="code" th:value="${code}" class="form-control" type="text" readonly="readonly"> | |
15 | + </div> | |
16 | + </div> | |
17 | + <div class="form-group"> | |
18 | + <label class="col-sm-3 control-label">货主编码:</label> | |
19 | + <div class="col-sm-8"> | |
20 | + <input id="companyId" name="companyId" type="hidden" th:value="*{companyId}"> | |
21 | + <input id="companyCode" name="companyCode" th:value="${companyCode}" class="form-control" type="text" readonly="readonly"> | |
22 | + </div> | |
23 | + </div> | |
24 | + <div class="form-group"> | |
25 | + <label class="col-sm-3 control-label">盘点单编号:</label> | |
26 | + <div class="col-sm-8"> | |
27 | + <input id="cyclecountHeadCode" name="cyclecountHeadCode" th:value="${cyclecountHeadCode}" class="form-control" type="text" readonly="readonly"> | |
28 | + </div> | |
29 | + </div> | |
30 | + <div class="form-group"> | |
31 | + <label class="col-sm-3 control-label">物料编码:</label> | |
32 | + <div class="col-sm-8"> | |
33 | + <input id="materialCode" name="materialCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
34 | + </div> | |
35 | + </div> | |
36 | + <div class="form-group"> | |
37 | + <label class="col-sm-3 control-label">库位编码:</label> | |
38 | + <div class="col-sm-8"> | |
39 | + <input id="locationCode" name="locationCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
40 | + </div> | |
41 | + </div> | |
42 | + <div class="form-group"> | |
43 | + <label class="col-sm-3 control-label">容器编号:</label> | |
44 | + <div class="col-sm-8"> | |
45 | + <input id="containerCode" name="containerCode" class="form-control" type="text" onkeyup="this.value=this.value.replace(/(^\s*)|(\s*$)/g,'')"> | |
46 | + </div> | |
47 | + </div> | |
48 | + <div class="form-group"> | |
49 | + <label class="col-sm-3 control-label">库存状态:</label> | |
50 | + <div class="col-sm-8"> | |
51 | + <select id="inventoryStatus" name="inventoryStatus" class="form-control" th:with="inventoryStatus=${@dict.getType('inventoryStatus')}"> | |
52 | + <option th:each="dict : ${inventoryStatus}" th:text="${dict['dictLabel']}" th:value="${dict['dictValue']}"></option> | |
53 | + </select> | |
54 | + </div> | |
55 | + </div> | |
56 | + <div class="form-group"> | |
57 | + <label class="col-sm-3 control-label">系统数量:</label> | |
58 | + <div class="col-sm-8"> | |
59 | + <input id="systemQty" name="systemQty" value="0" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" readonly="readonly"> | |
60 | + </div> | |
61 | + </div> | |
62 | + <div class="form-group"> | |
63 | + <label class="col-sm-3 control-label">实际数量:</label> | |
64 | + <div class="col-sm-8"> | |
65 | + <input id="countedQty" name="countedQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > | |
66 | + </div> | |
67 | + </div> | |
68 | + <div class="form-group"> | |
69 | + <label class="col-sm-3 control-label">差异数量:</label> | |
70 | + <div class="col-sm-8"> | |
71 | + <input id="gapQty" name="gapQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')" > | |
72 | + </div> | |
73 | + </div> | |
74 | + <div class="form-group"> | |
75 | + <label class="col-sm-3 control-label">调整数量:</label> | |
76 | + <div class="col-sm-8"> | |
77 | + <input id="adjustQty" name="adjustQty" class="form-control" type="text" onkeyup="this.value=this.value.replace(/[^\-?\d.]/g,'')"> | |
78 | + </div> | |
79 | + </div> | |
80 | + | |
81 | + <div class="form-group"> | |
82 | + <label class="col-sm-3 control-label">批次:</label> | |
83 | + <div class="col-sm-8"> | |
84 | + <input id="batch" name="batch" class="form-control" type="text" > | |
85 | + </div> | |
86 | + </div> | |
87 | + <div class="form-group"> | |
88 | + <label class="col-sm-3 control-label">批号:</label> | |
89 | + <div class="col-sm-8"> | |
90 | + <input id="lot" name="lot" class="form-control" type="text" > | |
91 | + </div> | |
92 | + </div> | |
93 | + <div class="form-group"> | |
94 | + <label class="col-sm-3 control-label">项目号:</label> | |
95 | + <div class="col-sm-8"> | |
96 | + <input id="project" name="project" class="form-control" type="text" > | |
97 | + </div> | |
98 | + </div> | |
99 | + <div class="form-group"> | |
100 | + <label class="col-sm-3 control-label">生产日期:</label> | |
101 | + <div class="col-sm-8"> | |
102 | + <input id="manufactureDate" name="manufactureDate" class="form-control" type="text" > | |
103 | + </div> | |
104 | + </div> | |
105 | + <div class="form-group"> | |
106 | + <label class="col-sm-3 control-label">失效日期:</label> | |
107 | + <div class="col-sm-8"> | |
108 | + <input id="expirationDate" name="expirationDate" class="form-control" type="text"> | |
109 | + </div> | |
110 | + </div> | |
111 | + | |
112 | + | |
113 | + <div class="form-group"> | |
114 | + <div class="form-control-static col-sm-offset-9"> | |
115 | + <button type="submit" class="btn btn-primary">提交</button><!--盘有 adjustInsert--> | |
116 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
117 | + </div> | |
118 | + </div> | |
119 | + </form> | |
120 | + </div> | |
121 | + <div th:include="include::footer"></div> | |
122 | + <script type="text/javascript"> | |
123 | + var prefix = ctx + "inventory/cyclecountAdjustDetail" | |
124 | + | |
125 | + $("#form-cyclecountAdjustDetail-addAdjust").validate({ | |
126 | + rules:{ | |
127 | + materialCode:{ | |
128 | + required:true, | |
129 | + }, | |
130 | + containerCode:{ | |
131 | + required:true, | |
132 | + }, | |
133 | + locationCode:{ | |
134 | + required:true, | |
135 | + }, | |
136 | + systemQty:{ | |
137 | + required:true, | |
138 | + }, | |
139 | + countedQty:{ | |
140 | + required:true, | |
141 | + }, | |
142 | + gapQty:{ | |
143 | + required:true, | |
144 | + }, | |
145 | + adjustQty:{ | |
146 | + required:true, | |
147 | + }, | |
148 | + | |
149 | + //必须填值判定 | |
150 | + }, | |
151 | + submitHandler: function(form) { | |
152 | + $.operate.save(prefix + "/addAdjust", $('#form-cyclecountAdjustDetail-addAdjust').serialize()); | |
153 | + } | |
154 | + }); | |
155 | + | |
156 | + /*时间弹框*/ | |
157 | + $(function () { | |
158 | + layui.use('laydate', function() { | |
159 | + var laydate = layui.laydate; | |
160 | + laydate.render({ elem: '#manufactureDate',max: 0, theme: 'molv' ,type: 'datetime'}); | |
161 | + laydate.render({ elem: '#expirationDate',min: 0, theme: 'molv' ,type: 'datetime'}); | |
162 | + }); | |
163 | + }) | |
164 | + | |
165 | + </script> | |
166 | +</body> | |
167 | +</html> | |
... | ... |
src/main/resources/templates/inventory/adjustHeader/adjustHeader.html
... | ... | @@ -67,6 +67,16 @@ |
67 | 67 | </div> |
68 | 68 | </form> |
69 | 69 | </div> |
70 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
71 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
72 | + shiro:hasPermission="inventory:cycleCount:add"> | |
73 | + <i class="fa fa-plus"></i> 新增 | |
74 | + </a> | |
75 | + <!--<a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
76 | + shiro:hasPermission="inventory:cycleCount:remove"> | |
77 | + <i class="fa fa-trash-o"></i> 删除 | |
78 | + </a>--> | |
79 | + </div> | |
70 | 80 | <table id="bootstrap-table" data-mobile-responsive="true" |
71 | 81 | class="table table-bordered table-hover"></table> |
72 | 82 | </div> |
... | ... | @@ -82,7 +92,7 @@ |
82 | 92 | var upload = [[${@permission.hasPermi('inventoryHeader:adjustHeader:upload')}]]; |
83 | 93 | var report = [[${@permission.hasPermi('inventoryHeader:adjustHeader:report')}]]; |
84 | 94 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
85 | - var status2 = [[${@dict.getType('adjustType')}]]; | |
95 | + var type2 = [[${@dict.getType('adjustType')}]]; | |
86 | 96 | |
87 | 97 | $(function () { |
88 | 98 | var options = { |
... | ... | @@ -121,10 +131,10 @@ |
121 | 131 | field: 'cycleCountCode', |
122 | 132 | title: '盘点单编码' |
123 | 133 | }, |
124 | - { | |
134 | + /*{ | |
125 | 135 | field: 'problemType', |
126 | 136 | title: '调整类型' |
127 | - }, | |
137 | + },*/ | |
128 | 138 | { |
129 | 139 | field: 'referCode', |
130 | 140 | title: '关联上游单编码' |
... | ... | @@ -138,9 +148,10 @@ |
138 | 148 | title: '调整类型', |
139 | 149 | align: 'center', |
140 | 150 | formatter: function (value, row, index) { |
141 | - return $.table.selectDictLabel(status2, value); | |
151 | + return $.table.selectDictLabel(type2, value); | |
142 | 152 | }, |
143 | - sortable: true | |
153 | + visible: true, | |
154 | + //sortable: true | |
144 | 155 | }, |
145 | 156 | |
146 | 157 | { |
... | ... | @@ -170,7 +181,7 @@ |
170 | 181 | var actions = []; |
171 | 182 | actions.push('<a class="btn btn-success btn-xs ' + report + '" href="#" onclick="cyclecountPrint(\'' + row.id + '\')"><i class="fa fa-print"></i>打印</a> '); |
172 | 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> '); |
173 | - /* actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></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> '); | |
174 | 185 | 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>'); |
175 | 186 | return actions.join(''); |
176 | 187 | } |
... | ... |
src/main/resources/templates/receipt/receiptHeader/receiptHeader.html
... | ... | @@ -195,7 +195,6 @@ |
195 | 195 | { |
196 | 196 | field : 'code', |
197 | 197 | title : '入库单号', |
198 | - visible:false | |
199 | 198 | }, |
200 | 199 | { |
201 | 200 | field : 'companyCode', |
... | ... | @@ -214,8 +213,8 @@ |
214 | 213 | formatter: function(value, row, index) { |
215 | 214 | var actions = []; |
216 | 215 | $.each(receiptTypes, function(index, dict) { |
217 | - if (dict.code == value) { | |
218 | - actions.push("<span class='badge badge-info'>" + dict.name + "</span>"); | |
216 | + if (dict.dictValue == value) { | |
217 | + actions.push("<span class='badge badge-info'>" + dict.dictLabel + "</span>"); | |
219 | 218 | return false; |
220 | 219 | } |
221 | 220 | }); |
... | ... |
src/main/resources/templates/receipt/receiving/receiving.html
... | ... | @@ -47,10 +47,22 @@ |
47 | 47 | </div> |
48 | 48 | </form> |
49 | 49 | </div> |
50 | + | |
50 | 51 | <div class="col-sm-12 select-info table-striped-left" style="padding-top: 20px;"> |
51 | 52 | <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
52 | 53 | </div> |
53 | 54 | <div class="col-sm-12 select-info table-striped-right"> |
55 | + <div class="btn-group hidden-xs" id="toolbar1" role="group"> | |
56 | + <a class="btn btn-outline btn-success btn-rounded" onclick="positioning()" shiro:hasPermission="receipt:receiptDetail:add"> | |
57 | + <i class="fa fa-map-pin"></i> 定位 | |
58 | + </a> | |
59 | + <a class="btn btn-outline btn-info btn-rounded" onclick="cancelPositioning()" shiro:hasPermission="receipt:receiptDetail:remove"> | |
60 | + <i class="fa fa-times"></i> 取消定位 | |
61 | + </a> | |
62 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="batRemove()" shiro:hasPermission="receipt:receiptDetail:remove"> | |
63 | + <i class="fa fa-trash-o"></i> 取消收货 | |
64 | + </a> | |
65 | + </div> | |
54 | 66 | <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
55 | 67 | </div> |
56 | 68 | </div> |
... | ... | @@ -255,19 +267,20 @@ |
255 | 267 | clickToSelect: true, |
256 | 268 | showColumns:true, //列选择 |
257 | 269 | // detailView:true, |
270 | + toolbar: "#toolbar1", | |
258 | 271 | showExport: true, //导出 |
259 | 272 | exportDataType: "all", //导出类型basic', 'all', 'selected'.当前页、所有数据、选中数据 |
260 | 273 | modalName: "入库组盘", |
261 | 274 | iconSize: "outline", |
262 | - toolbar: "#toolbar", | |
275 | + toolbar: "#toolbar1", | |
263 | 276 | contentType: "application/x-www-form-urlencoded", |
264 | 277 | onRefresh: function(){ |
265 | 278 | list_receiptInfo($("#code").val()); |
266 | 279 | }, |
267 | 280 | columns: [ |
268 | - // { | |
269 | - // checkbox: true | |
270 | - // }, | |
281 | + { | |
282 | + checkbox: true | |
283 | + }, | |
271 | 284 | { |
272 | 285 | field : 'id', |
273 | 286 | title : '组盘明细id', |
... | ... | @@ -371,52 +384,58 @@ |
371 | 384 | function remove(id) { |
372 | 385 | $.modal.confirm("确定删除该组盘?", function() { |
373 | 386 | var url = ctx + "receipt/receiptContainerDetail/remove"; |
374 | - var data = { "id": id }; | |
387 | + var data = { "ids": id }; | |
375 | 388 | $.operate.submitAndCallback(url, "post", "json", data, initTable); |
376 | 389 | }); |
377 | 390 | } |
378 | 391 | |
379 | - // var url = location.search; //获取url中"?"符后的字串 | |
380 | - // var theRequest = new Object(); | |
381 | - // if ( url.indexOf( "?" ) != -1 ) { | |
382 | - // var str = url.substr( 1 ); //substr()方法返回从参数值开始到结束的字符串; | |
383 | - // var strs = str.split( "&" ); | |
384 | - // for ( var i = 0; i < strs.length; i++ ) { | |
385 | - // theRequest[ strs[ i ].split( "=" )[ 0 ] ] = ( strs[ i ].split( "=" )[ 1 ] ); | |
386 | - // }} | |
387 | - // // console.log(theRequest.code); | |
388 | - // $("#code").val(theRequest.code); | |
389 | - // list_select(theRequest.code); | |
390 | - // function open(title, url, width, height){ | |
391 | - // if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) { | |
392 | - // width = 'auto'; | |
393 | - // height = 'auto'; | |
394 | - // } | |
395 | - // if (title==null){ | |
396 | - // title = false; | |
397 | - // } | |
398 | - // if (url==null){ | |
399 | - // url="404.html"; | |
400 | - // } | |
401 | - // if ($.common.isEmpty(width)) { | |
402 | - // width = 800; | |
403 | - // // width = ($(window).width() - 100); | |
404 | - // } | |
405 | - // if ($.common.isEmpty(height)) { | |
406 | - // height = ($(window).height() - 50); | |
407 | - // } | |
408 | - // layer.open({ | |
409 | - // type: 2, | |
410 | - // area: [width + 'px', height + 'px'], | |
411 | - // fix: false, | |
412 | - // //不固定 | |
413 | - // maxmin: true, | |
414 | - // shade: 0.3, | |
415 | - // title: title, | |
416 | - // content: url | |
417 | - // // shadeClose: true, //点击遮罩关闭层 | |
418 | - // }) | |
419 | - // } | |
392 | + function positioning() { | |
393 | + let rows = $("#bootstrap-table1").bootstrapTable('getSelections'); | |
394 | + if (rows.length == 0) { | |
395 | + $.modal.alertWarning("请至少选择一条记录"); | |
396 | + return; | |
397 | + } | |
398 | + var url = ctx+"receipt/receiptContainerHeader/position"; | |
399 | + var ids = ""; | |
400 | + for (var i = 0; i<rows.length; i++){ | |
401 | + ids += rows[i].receiptContainerId; | |
402 | + ids += ","; | |
403 | + } | |
404 | + var data = { "ids": ids }; | |
405 | + $.operate.submit(url, "post", "json", data); | |
406 | + } | |
407 | + | |
408 | + function cancelPositioning() { | |
409 | + let rows = $("#bootstrap-table1").bootstrapTable('getSelections'); | |
410 | + if (rows.length == 0) { | |
411 | + $.modal.alertWarning("请至少选择一条记录"); | |
412 | + return; | |
413 | + } | |
414 | + var url = ctx+"receipt/receiptContainerHeader/cancelPosition"; | |
415 | + var ids = ""; | |
416 | + for (var i = 0; i<rows.length; i++){ | |
417 | + ids += rows[i].receiptContainerId; | |
418 | + ids += ","; | |
419 | + } | |
420 | + var data = { "ids": ids }; | |
421 | + $.operate.submit(url, "post", "json", data); | |
422 | + } | |
423 | + | |
424 | + function batRemove() { | |
425 | + let rows = $("#bootstrap-table1").bootstrapTable('getSelections'); | |
426 | + if (rows.length == 0) { | |
427 | + $.modal.alertWarning("请至少选择一条记录"); | |
428 | + return; | |
429 | + } | |
430 | + var url = ctx+"receipt/receiptContainerDetail/remove"; | |
431 | + var ids = ""; | |
432 | + for (var i = 0; i<rows.length; i++){ | |
433 | + ids += rows[i].receiptContainerId; | |
434 | + ids += ","; | |
435 | + } | |
436 | + var data = { "ids": ids }; | |
437 | + $.operate.submit(url, "post", "json", data); | |
438 | + } | |
420 | 439 | </script> |
421 | 440 | </body> |
422 | 441 | </html> |
423 | 442 | \ No newline at end of file |
... | ... |
src/main/resources/templates/shipment/shipmentHeader/addWave.html
0 → 100644
1 | +<!DOCTYPE HTML> | |
2 | +<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"> | |
3 | +<meta charset="utf-8"> | |
4 | +<head th:include="include :: header"></head> | |
5 | +<body> | |
6 | +<div class="wrapper wrapper-content animated fadeInRight ibox-content"> | |
7 | + <form class="form-horizontal m"> | |
8 | + <div class="form-group"> | |
9 | + <label class="col-sm-3 control-label">请选择:</label> | |
10 | + <div class="col-sm-8"> | |
11 | + <select id="code" class="form-control"></select> | |
12 | + </div> | |
13 | + </div> | |
14 | + <div class="form-group"> | |
15 | + <div class="form-control-static col-sm-offset-9"> | |
16 | + <input type="button" onclick="reSubmit()" class="btn btn-primary" value="提交"> | |
17 | + <button onclick="$.modal.close()" class="btn btn-danger" type="button">关闭</button> | |
18 | + </div> | |
19 | + </div> | |
20 | + </form> | |
21 | +</div> | |
22 | + | |
23 | +<div th:include="include :: footer"></div> | |
24 | +</body> | |
25 | +<script type="text/javascript"> | |
26 | + let prefix = ctx + "shipment/shipmentHeader"; | |
27 | + let url = location.search; | |
28 | + if (url.indexOf("?") !== -1){ | |
29 | + var ids=url.substr(url.indexOf("?")+5); | |
30 | + } | |
31 | + $(function () { | |
32 | + $.ajax({ | |
33 | + url:prefix+'/waveList', | |
34 | + type:'post', | |
35 | + success:function (res) { | |
36 | + if (res.code === 200) { | |
37 | + $("#code").children().remove(); | |
38 | + for (let i = 0; i < res.data.length; i++) { | |
39 | + $("#code").append("<option value='"+res.data[i].code+"'>"+res.data[i].name+"</option>") | |
40 | + } | |
41 | + } | |
42 | + else { | |
43 | + $.modal.msgError(res.msg); | |
44 | + } | |
45 | + } | |
46 | + }) | |
47 | + }); | |
48 | + function reSubmit() { | |
49 | + let code=$("#code option:selected").val(); | |
50 | + $.ajax({ | |
51 | + url:prefix+'/addWave', | |
52 | + type:'post', | |
53 | + data:{ | |
54 | + ids:ids, | |
55 | + code:code | |
56 | + }, | |
57 | + success:function (res) { | |
58 | + if (res.code === 200) { | |
59 | + $.modal.msgSuccess("成功!"); | |
60 | + $.modal.close(); | |
61 | + window.parent.loadDetail(); | |
62 | + } | |
63 | + else { | |
64 | + $.modal.msgError(res.msg); | |
65 | + } | |
66 | + } | |
67 | + }) | |
68 | + } | |
69 | +</script> | |
70 | +</html> | |
0 | 71 | \ No newline at end of file |
... | ... |
src/main/resources/templates/shipment/shipmentHeader/shipmentHeader.html
... | ... | @@ -91,10 +91,10 @@ |
91 | 91 | <!--shiro:hasPermission="shipment:bill:analysis">--> |
92 | 92 | <!--<i class="fa fa-plus"></i> 订单分析--> |
93 | 93 | <!--</a>--> |
94 | - <!--<a class="btn btn-outline btn-success btn-rounded" onclick="wave()"--> | |
95 | - <!--shiro:hasPermission="shipment:bill:analysis">--> | |
96 | - <!--<i class="fa fa-plus"></i> 加入波次--> | |
97 | - <!--</a>--> | |
94 | + <a class="btn btn-outline btn-success btn-rounded" onclick="wave()" | |
95 | + shiro:hasPermission="shipment:bill:wave"> | |
96 | + <i class="fa fa-plus"></i> 加入波次 | |
97 | + </a> | |
98 | 98 | </div> |
99 | 99 | <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> |
100 | 100 | </div> |
... | ... | @@ -705,23 +705,23 @@ |
705 | 705 | }) |
706 | 706 | }); |
707 | 707 | |
708 | - // function addzone() { | |
709 | - // let url=prefix_detail+'/addZoneCode?ids='; | |
710 | - // let rows=$("#bootstrap-table-detail").bootstrapTable('getSelections'); | |
711 | - // if (rows.length === 0) { | |
712 | - // $.modal.msgWarning("请至少选择一条记录"); | |
713 | - // } | |
714 | - // else { | |
715 | - // let ids = ""; | |
716 | - // for(let i=0; i<rows.length; i++) { | |
717 | - // ids = ids + rows[i].id + "," | |
718 | - // } | |
719 | - // ids = ids.substring(0, ids.length-1); | |
720 | - // url=url+ids; | |
721 | - // $.modal.open("分配库区",url,800,250) | |
722 | - // } | |
723 | - // } | |
724 | - // | |
708 | + function wave() { | |
709 | + let url=prefix+'/wave?ids='; | |
710 | + let rows=$("#bootstrap-table").bootstrapTable('getSelections'); | |
711 | + if (rows.length === 0) { | |
712 | + $.modal.msgWarning("请至少选择一条记录"); | |
713 | + } | |
714 | + else { | |
715 | + let ids = ""; | |
716 | + for(let i=0; i<rows.length; i++) { | |
717 | + ids = ids + rows[i].id + "," | |
718 | + } | |
719 | + ids = ids.substring(0, ids.length-1); | |
720 | + url=url+ids; | |
721 | + $.modal.open("加入波次",url,800,250) | |
722 | + } | |
723 | + } | |
724 | + | |
725 | 725 | // //自动分配库区 |
726 | 726 | // function autoZone() { |
727 | 727 | // let code=$("#shipmentCode").val(); |
... | ... |
src/main/resources/templates/shipment/wave/wave.html
... | ... | @@ -30,8 +30,14 @@ |
30 | 30 | </form> |
31 | 31 | </div> |
32 | 32 | <div class="btn-group hidden-xs" id="toolbar" role="group"> |
33 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="shipment:wave:add"> | |
34 | - <i class="fa fa-plus"></i> 新增 | |
33 | + <!--<a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="shipment:wave:add">--> | |
34 | + <!--<i class="fa fa-plus"></i> 新增--> | |
35 | + <!--</a>--> | |
36 | + <a class="btn btn-outline btn-success btn-rounded" onclick="startWave()" shiro:hasPermission="shipment:wave:startWave"> | |
37 | + <i class="fa fa-plus"></i> 开始波次 | |
38 | + </a> | |
39 | + <a class="btn btn-outline btn-success btn-rounded" onclick="freed()" shiro:hasPermission="shipment:wave:freed"> | |
40 | + <i class="fa fa-plus"></i> 释放 | |
35 | 41 | </a> |
36 | 42 | <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="shipment:wave:remove"> |
37 | 43 | <i class="fa fa-trash-o"></i> 删除 |
... | ... | @@ -200,7 +206,7 @@ |
200 | 206 | align: 'center', |
201 | 207 | formatter: function(value, row, index) { |
202 | 208 | var actions = []; |
203 | - actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); | |
209 | + // actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')" ><i class="fa fa-edit"></i>编辑</a> '); | |
204 | 210 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); |
205 | 211 | return actions.join(''); |
206 | 212 | } |
... | ... | @@ -208,6 +214,23 @@ |
208 | 214 | }; |
209 | 215 | $.table.init(options); |
210 | 216 | }); |
217 | + | |
218 | + | |
219 | + //开始波次 | |
220 | + function startWave() { | |
221 | + var rows = $("#bootstrap-table").bootstrapTable('getSelections'); | |
222 | + if (rows.length == 0) { | |
223 | + $.modal.alertWarning("请至少选择一条记录"); | |
224 | + return; | |
225 | + } | |
226 | + var url = prefix + "/startWave"; | |
227 | + var data = { | |
228 | + "ids": rows.map(function (v) { | |
229 | + return v.id; | |
230 | + }).join(',') | |
231 | + }; | |
232 | + localSubmit(url, "post", "json", data); | |
233 | + } | |
211 | 234 | </script> |
212 | 235 | </body> |
213 | 236 | </html> |
214 | 237 | \ No newline at end of file |
... | ... |