Commit 55672fe57ccec9ee0635abcfa517fb3e70a5facd
Merge branch 'develop' of http://172.16.29.40:8010/wms/wms2 into develop
Showing
18 changed files
with
631 additions
and
182 deletions
src/main/java/com/huaheng/pc/config/materialType/service/MaterialTypeService.java
1 | 1 | package com.huaheng.pc.config.materialType.service; |
2 | 2 | |
3 | +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | |
4 | +import com.baomidou.mybatisplus.core.toolkit.Wrappers; | |
3 | 5 | import org.springframework.stereotype.Service; |
4 | 6 | import javax.annotation.Resource; |
5 | 7 | import java.util.List; |
8 | +import java.util.Map; | |
9 | + | |
6 | 10 | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
7 | 11 | import com.huaheng.pc.config.materialType.domain.MaterialType; |
8 | 12 | import com.huaheng.pc.config.materialType.mapper.MaterialTypeMapper; |
9 | -@Service | |
13 | +@Service("materialType") | |
10 | 14 | public class MaterialTypeService extends ServiceImpl<MaterialTypeMapper, MaterialType> { |
11 | 15 | |
16 | + public List<Map<String, Object>> queryType(){ | |
17 | + LambdaQueryWrapper<MaterialType> lambda = Wrappers.lambdaQuery(); | |
18 | + lambda.select(MaterialType::getCode, MaterialType::getName); | |
19 | + return this.listMaps(lambda); | |
20 | + } | |
12 | 21 | } |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/controller/adjustDetailController.java
... | ... | @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
4 | 4 | import com.baomidou.mybatisplus.core.metadata.IPage; |
5 | 5 | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
6 | 6 | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
7 | +import com.huaheng.common.support.Convert; | |
7 | 8 | import com.huaheng.common.utils.StringUtils; |
8 | 9 | import com.huaheng.common.utils.security.ShiroUtils; |
9 | 10 | import com.huaheng.framework.aspectj.lang.annotation.Log; |
... | ... | @@ -99,34 +100,26 @@ public class adjustDetailController extends BaseController { |
99 | 100 | } |
100 | 101 | |
101 | 102 | /** |
102 | - * 只调整数量 | |
103 | - * 修改 | |
104 | - */ | |
105 | - @GetMapping("/adjustEdit") | |
106 | - public String editAdjust(Integer id, ModelMap mmap) | |
107 | - { | |
108 | - AdjustDetail adjustDetailEdit = adjustDetailService.getById(id); | |
109 | - mmap.put("adjustDetailEdit", adjustDetailEdit); | |
110 | - return prefix + "/adjustEdit"; | |
111 | - } | |
112 | - | |
113 | - /** | |
114 | - * 修改保存调整数量 | |
103 | + * 调整, | |
104 | + * 调整数量,调整库存状态 | |
105 | + * 调整插入库存 | |
115 | 106 | */ |
116 | 107 | //@RequiresPermissions("inventory:cyclecountAdjustDetail:addAdjust") |
117 | 108 | @Log(title = "库存-调整单", operating = "调整单调整库存差异,调整数量", action = BusinessType.UPDATE) |
118 | - @PostMapping("/editAdjustSave") | |
109 | + @PostMapping("/adjustEdit") | |
119 | 110 | @ResponseBody |
120 | - public AjaxResult editAdjustSave(AdjustDetail adjustDetail) | |
111 | + public AjaxResult editAdjustSave(String ids) | |
121 | 112 | { |
122 | - //未上传不允许进行明细差异调整 | |
123 | -// CyclecountAdjust cyclecountAdjust = cycleconutAdjustService.selectEntityById(cyclecountAdjustDetail.getCyclecountAdjustId()); | |
124 | -// if(cyclecountAdjust.getStatus() != 30 ){ | |
125 | -// return AjaxResult.error("单据未上传,没有调整单下发,不允许差异调整!!"); | |
126 | -// //throw new ServiceException("单据未上传,没有调整单下发,不允许差异调整!"); | |
127 | -// } | |
128 | - AjaxResult result = adjustDetailService.updateAdjustDetail(adjustDetail); | |
129 | - return result; | |
113 | + if(ids == null){ | |
114 | + throw new SecurityException("ID不能为空!"); | |
115 | + } | |
116 | + Integer[] integers = Convert.toIntArray(ids); | |
117 | + for (Integer id : integers) | |
118 | + { | |
119 | + AdjustDetail adjustDetailEdit = adjustDetailService.getById(id); | |
120 | + adjustDetailService.updateAdjustDetail(adjustDetailEdit); | |
121 | + } | |
122 | + return AjaxResult.success("调整下发成功!"); | |
130 | 123 | } |
131 | 124 | |
132 | 125 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/adjustDetail/service/AdjustDetailServiceImpl.java
... | ... | @@ -2,9 +2,11 @@ package com.huaheng.pc.inventory.adjustDetail.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.utils.StringUtils; | |
5 | 6 | import com.huaheng.common.utils.security.ShiroUtils; |
6 | 7 | import com.huaheng.framework.web.domain.AjaxResult; |
7 | 8 | import com.huaheng.pc.config.container.service.ContainerService; |
9 | +import com.huaheng.pc.config.location.domain.Location; | |
8 | 10 | import com.huaheng.pc.config.location.service.LocationService; |
9 | 11 | import com.huaheng.pc.inventory.adjustHeader.domain.AdjustHeader; |
10 | 12 | import com.huaheng.pc.inventory.adjustHeader.service.AdjustHeaderService; |
... | ... | @@ -58,25 +60,80 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
58 | 60 | |
59 | 61 | |
60 | 62 | /** |
61 | - * 调整库存数量 | |
63 | + * 调整库存 | |
64 | + * 调整数量,调整库存状态 | |
65 | + * 调整插入库存 | |
62 | 66 | * @param adjustDetail |
63 | 67 | * @return |
64 | 68 | */ |
65 | 69 | @Transactional |
66 | 70 | @Override |
67 | 71 | public AjaxResult updateAdjustDetail(AdjustDetail adjustDetail) { |
68 | - /*修改库存数量,调整单据状态,写入库存交易*/ | |
69 | 72 | |
70 | - //已调整过不允许修改。 | |
71 | 73 | if(adjustDetail.getStatus() == 1){ |
72 | 74 | AjaxResult.error("该单据已调整,不允许再次调整!" ); |
73 | 75 | } |
74 | 76 | //查询调整的库存明细 |
75 | - InventoryDetail inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId()); | |
77 | + InventoryDetail inventoryDetail = new InventoryDetail(); | |
78 | + //调整单中不带库存明细时不查询 | |
79 | + if(adjustDetail.getInventoryDetailId() != null) { | |
80 | + inventoryDetail = inventoryDetailService.getById(adjustDetail.getInventoryDetailId()); | |
81 | + //验证该条库存是不是正在使用,通过库位是否锁定来判断 | |
82 | + if (!adjustDetail.getLocationCode().equals(inventoryDetail.getLocationCode()) || | |
83 | + !adjustDetail.getContainerCode().equals(inventoryDetail.getContainerCode())) { | |
84 | + throw new SecurityException("调整单和所调整库存的库位容器不符,前检查数据"); | |
85 | + } | |
86 | + Location location = new Location(); | |
87 | + location.setCode(inventoryDetail.getLocationCode()); | |
88 | + location.setWarehouseCode(inventoryDetail.getWarehouseCode()); | |
89 | + LambdaQueryWrapper<Location> lambdaQueryWrapper = Wrappers.lambdaQuery(location); | |
90 | + location = locationService.getOne(lambdaQueryWrapper); | |
91 | + if (!location.getStatus().equals("empty")) { | |
92 | + throw new SecurityException(inventoryDetail.getId() + "库存非空闲,请等待任务完成再进行调整!"); | |
93 | + } | |
94 | + | |
95 | + //判断调整哪一个属性值 | |
96 | + /*以下方法有待验证讨论,BigDecimal传入null,如何避免传入0?*/ | |
97 | + | |
98 | + //把BigDecimal类型转换成String再判断null | |
99 | + | |
100 | + String toQtyString = adjustDetail.getToQty().toString(); //调整后库存 | |
101 | + String gapQtyString = adjustDetail.getGapQty().toString(); //调整变动数量 | |
102 | + if (StringUtils.isNotEmpty(toQtyString) || StringUtils.isNotEmpty(gapQtyString)) { | |
103 | + //调整数量 | |
104 | + updateAdjustDetailNumber(adjustDetail, inventoryDetail); | |
105 | + } | |
106 | + if (StringUtils.isNotEmpty(adjustDetail.getFromInventorySts()) && StringUtils.isNotEmpty(adjustDetail.getToInventorySts())) { | |
107 | + //调整库存状态 | |
108 | + updateAdjustDetailState(adjustDetail, inventoryDetail); | |
109 | + } | |
110 | + } | |
111 | + String fromQtyString = adjustDetail.getFromQty().toString(); //调整前库存数量 | |
112 | + if(StringUtils.isNotEmpty(fromQtyString)){ | |
113 | + //调整插入库存 | |
114 | + updateAdjustDetailInsert(adjustDetail); | |
115 | + } | |
116 | + | |
117 | + //修改调整单明细状态 | |
118 | + adjustDetail.setStatus(1); | |
119 | + adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
120 | + adjustDetail.setLastUpdated(new Date()); | |
121 | + this.saveOrUpdate(adjustDetail); | |
122 | + | |
123 | + return AjaxResult.success("调整库存成功!"); | |
124 | + } | |
125 | + | |
126 | + /** | |
127 | + * 调整修改库存数量 | |
128 | + * @param adjustDetail | |
129 | + */ | |
130 | + @Transactional | |
131 | + public void updateAdjustDetailNumber (AdjustDetail adjustDetail,InventoryDetail inventoryDetail){ | |
132 | + /*修改库存数量,调整单据状态,写入库存交易*/ | |
133 | + | |
76 | 134 | /*调整后的数量写入库存*/ |
77 | 135 | //比较大小可以用 .compareTo()返回值 -1 小于 0 等于 1 大于 |
78 | 136 | //Bigdecimal 自带运算方法.add加法 .subtract减法 |
79 | - | |
80 | 137 | if(adjustDetail.getToQty().compareTo(BigDecimal.ZERO) == 0){ |
81 | 138 | //当调整后数量为0时,直接删除该条库存,并写入库存交易 |
82 | 139 | //删除库存,并查询当前库位还有没有其他物料,没有则删除库存头,恢复容器和库位状态 |
... | ... | @@ -87,13 +144,13 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
87 | 144 | LambdaQueryWrapper<InventoryDetail> lamdDetail = Wrappers.lambdaQuery(inv); |
88 | 145 | List<InventoryDetail> inventoryDetailList = inventoryDetailService.list(lamdDetail); |
89 | 146 | inventoryDetailService.removeById(adjustDetail.getInventoryDetailId());//删除实际库存数量为0的库存明细 |
90 | - if(inventoryDetailList.size() == 0){ | |
147 | + if(inventoryDetailList.size() == 0){ | |
91 | 148 | //恢复库位和容器状态,删除库存头 |
92 | 149 | inventoryHeaderService.removeById(inventoryDetail.getInventoryHeaderId()); |
93 | 150 | locationService.updateContainerCodeAndStatus(inventoryDetail.getLocationCode(),"","empty"); |
94 | 151 | containerService.updateLocationCodeAndStatus(inventoryDetail.getContainerCode(),"","empty"); |
95 | - } | |
96 | - }else{ | |
152 | + } | |
153 | + }else{ | |
97 | 154 | //修改库存 |
98 | 155 | //BigDecimal temp =(adjustDetail.getFromQty()).add(adjustDetail.getGapQty()); |
99 | 156 | inventoryDetail.setQty(adjustDetail.getToQty());//调整后的数量 |
... | ... | @@ -113,7 +170,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
113 | 170 | inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); |
114 | 171 | inventoryTransaction.setMaterialSpec(inventoryDetail.getMaterialSpec()); |
115 | 172 | inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); |
116 | - inventoryTransaction.setTaskQty(inventoryDetail.getTaskQty()); | |
173 | + inventoryTransaction.setTaskQty(adjustDetail.getGapQty()); | |
117 | 174 | inventoryTransaction.setInventorySts(inventoryDetail.getInventorySts()); |
118 | 175 | inventoryTransaction.setReferCode(inventoryDetail.getReferCode()); |
119 | 176 | inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId()); |
... | ... | @@ -142,15 +199,100 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
142 | 199 | inventoryTransaction.setSupplierCode(inventoryDetail.getSupplierCode()); |
143 | 200 | inventoryTransactionService.saveOrUpdate(inventoryTransaction); |
144 | 201 | |
145 | - //修改调整单明细状态 | |
146 | - adjustDetail.setStatus(1); | |
147 | - adjustDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
148 | - adjustDetail.setLastUpdated(new Date()); | |
149 | - this.saveOrUpdate(adjustDetail); | |
202 | + } | |
203 | + | |
204 | + /** | |
205 | + * 调整库存属性 | |
206 | + * @param adjustDetail | |
207 | + */ | |
208 | + @Transactional | |
209 | + public void updateAdjustDetailState (AdjustDetail adjustDetail,InventoryDetail inventoryDetail) { | |
210 | + /*不考虑其他只改变库存状态即可,也需要写入库存交易。*/ | |
211 | + | |
212 | + //修改库存的状态 | |
213 | + inventoryDetail.setInventorySts(adjustDetail.getToInventorySts());//修改为调整库存 | |
214 | + inventoryDetail.setLastUpdatedBy(ShiroUtils.getLoginName()); | |
215 | + inventoryDetail.setLastUpdated(new Date()); | |
216 | + inventoryDetailService.saveOrUpdate(inventoryDetail); | |
217 | + | |
218 | + //写入库存交易,库存交易2条一条出,一条入 | |
219 | + //调整出 | |
220 | + InventoryTransaction inventoryTransaction = new InventoryTransaction(); | |
221 | + inventoryTransaction.setWarehouseCode(inventoryDetail.getWarehouseCode()); | |
222 | + inventoryTransaction.setCompanyCode(inventoryDetail.getCompanyCode()); | |
223 | + inventoryTransaction.setLocationCode(inventoryDetail.getLocationCode()); | |
224 | + inventoryTransaction.setContainerCode(inventoryDetail.getContainerCode()); | |
225 | + inventoryTransaction.setTransactionType(40); | |
226 | + inventoryTransaction.setMaterialCode(inventoryDetail.getMaterialCode()); | |
227 | + inventoryTransaction.setMaterialName(inventoryDetail.getMaterialName()); | |
228 | + inventoryTransaction.setMaterialSpec(inventoryDetail.getMaterialSpec()); | |
229 | + inventoryTransaction.setMaterialUnit(inventoryDetail.getMaterialUnit()); | |
230 | + inventoryTransaction.setTaskQty(null);//数量不变 | |
231 | + inventoryTransaction.setInventorySts(adjustDetail.getFromInventorySts());//状态 | |
232 | + inventoryTransaction.setReferCode(inventoryDetail.getReferCode()); | |
233 | + inventoryTransaction.setReferDetailId(inventoryDetail.getReferDetailId()); | |
234 | + inventoryTransaction.setBatch(inventoryDetail.getBatch()); | |
235 | + inventoryTransaction.setLot(inventoryDetail.getLot()); | |
236 | + inventoryTransaction.setProjectNo(inventoryDetail.getProjectNo()); | |
237 | + inventoryTransaction.setQcCheck(inventoryDetail.getQcCheck()); | |
238 | + inventoryTransaction.setWeight(inventoryDetail.getWeight()); | |
239 | + inventoryTransaction.setManufactureDate(inventoryDetail.getManufactureDate()); | |
240 | + inventoryTransaction.setExpirationDate(inventoryDetail.getExpirationDate()); | |
241 | + inventoryTransaction.setAgingDate(inventoryDetail.getCreated()); | |
242 | + inventoryTransaction.setAttributeId(inventoryDetail.getAttributeId()); | |
243 | + inventoryTransaction.setAttribute1(inventoryDetail.getAttribute1()); | |
244 | + inventoryTransaction.setAttribute2(inventoryDetail.getAttribute2()); | |
245 | + inventoryTransaction.setAttribute3(inventoryDetail.getAttribute3()); | |
246 | + inventoryTransaction.setCreated(new Date()); | |
247 | + inventoryTransaction.setCreatedBy(ShiroUtils.getLoginName()); | |
248 | + inventoryTransaction.setBillDetailId(inventoryDetail.getReceiptDetailId()); | |
249 | + inventoryTransaction.setSupplierCode(inventoryDetail.getSupplierCode()); | |
250 | + inventoryTransactionService.saveOrUpdate(inventoryTransaction); | |
251 | + | |
252 | + //调整入 | |
253 | + InventoryTransaction inventoryTransaction2 = new InventoryTransaction(); | |
254 | + inventoryTransaction2.setWarehouseCode(inventoryDetail.getWarehouseCode()); | |
255 | + inventoryTransaction2.setCompanyCode(inventoryDetail.getCompanyCode()); | |
256 | + inventoryTransaction2.setLocationCode(inventoryDetail.getLocationCode()); | |
257 | + inventoryTransaction2.setContainerCode(inventoryDetail.getContainerCode()); | |
258 | + inventoryTransaction2.setTransactionType(30); | |
259 | + inventoryTransaction2.setMaterialCode(inventoryDetail.getMaterialCode()); | |
260 | + inventoryTransaction2.setMaterialName(inventoryDetail.getMaterialName()); | |
261 | + inventoryTransaction2.setMaterialSpec(inventoryDetail.getMaterialSpec()); | |
262 | + inventoryTransaction2.setMaterialUnit(inventoryDetail.getMaterialUnit()); | |
263 | + inventoryTransaction2.setTaskQty(null);//数量不变 | |
264 | + inventoryTransaction2.setInventorySts(inventoryDetail.getInventorySts());//状态 | |
265 | + inventoryTransaction2.setReferCode(inventoryDetail.getReferCode()); | |
266 | + inventoryTransaction2.setReferDetailId(inventoryDetail.getReferDetailId()); | |
267 | + inventoryTransaction2.setBatch(inventoryDetail.getBatch()); | |
268 | + inventoryTransaction2.setLot(inventoryDetail.getLot()); | |
269 | + inventoryTransaction2.setProjectNo(inventoryDetail.getProjectNo()); | |
270 | + inventoryTransaction2.setQcCheck(inventoryDetail.getQcCheck()); | |
271 | + inventoryTransaction2.setWeight(inventoryDetail.getWeight()); | |
272 | + inventoryTransaction2.setManufactureDate(inventoryDetail.getManufactureDate()); | |
273 | + inventoryTransaction2.setExpirationDate(inventoryDetail.getExpirationDate()); | |
274 | + inventoryTransaction2.setAgingDate(inventoryDetail.getCreated()); | |
275 | + inventoryTransaction2.setAttributeId(inventoryDetail.getAttributeId()); | |
276 | + inventoryTransaction2.setAttribute1(inventoryDetail.getAttribute1()); | |
277 | + inventoryTransaction2.setAttribute2(inventoryDetail.getAttribute2()); | |
278 | + inventoryTransaction2.setAttribute3(inventoryDetail.getAttribute3()); | |
279 | + inventoryTransaction2.setCreated(new Date()); | |
280 | + inventoryTransaction2.setCreatedBy(ShiroUtils.getLoginName()); | |
281 | + inventoryTransaction2.setBillDetailId(inventoryDetail.getReceiptDetailId()); | |
282 | + inventoryTransaction2.setSupplierCode(inventoryDetail.getSupplierCode()); | |
283 | + inventoryTransactionService.saveOrUpdate(inventoryTransaction2); | |
150 | 284 | |
151 | - return AjaxResult.success("调整库存数量成功!"); | |
152 | 285 | } |
153 | 286 | |
287 | + /** | |
288 | + * 调整插入库存 | |
289 | + * @param adjustDetail | |
290 | + */ | |
291 | + @Transactional | |
292 | + public void updateAdjustDetailInsert (AdjustDetail adjustDetail) { | |
293 | + /*当实际库存为0时,调整单触发插入新库存状态*/ | |
294 | + //判断是否存在库存头,没有需要生成,有库存头直接插入库存明细即可 | |
295 | + //新生成库存头时,库位,容器都需要更新数据 | |
154 | 296 | |
155 | 297 | |
156 | 298 | |
... | ... | @@ -159,6 +301,7 @@ public class AdjustDetailServiceImpl extends ServiceImpl<AdjustDetailMapper, Adj |
159 | 301 | |
160 | 302 | |
161 | 303 | |
304 | + } | |
162 | 305 | |
163 | 306 | |
164 | 307 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/controller/CycleCountDetailController.java
... | ... | @@ -237,6 +237,7 @@ public class CycleCountDetailController extends BaseController { |
237 | 237 | @PostMapping("/createCyclecountWithGapQty") |
238 | 238 | @ResponseBody |
239 | 239 | public AjaxResult createCyclecountWithGapQty(String cycleCountHeadCode){ |
240 | + | |
240 | 241 | return cycleCountDetailService.createCyclecountWithGapQty(cycleCountHeadCode); |
241 | 242 | } |
242 | 243 | |
... | ... |
src/main/java/com/huaheng/pc/inventory/cycleCountDetail/service/CycleCountDetailServiceImpl.java
... | ... | @@ -415,6 +415,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
415 | 415 | cycleCountDetail.setCompanyCode(cycleCountHeader.getCompanyCode()); |
416 | 416 | LambdaQueryWrapper<CycleCountDetail> cycleCountDetailLambdaQueryWrapper = Wrappers.lambdaQuery(); |
417 | 417 | List<CycleCountDetail> cycleCountDetails = this.list(cycleCountDetailLambdaQueryWrapper);//明细 |
418 | + if(cycleCountDetails.size() == 0){ | |
419 | + throw new SecurityException("没有明细!"); | |
420 | + } | |
418 | 421 | //生成复盘盘点主单 |
419 | 422 | cycleCountHeader.setCode(cycleCountHeaderService.createCode()); |
420 | 423 | cycleCountHeader.setRound(cycleCountHeader.getRound() + 1);//盘点轮次+1 |
... | ... | @@ -438,6 +441,9 @@ public class CycleCountDetailServiceImpl extends ServiceImpl<CycleCountDetailMap |
438 | 441 | } |
439 | 442 | |
440 | 443 | } |
444 | + if(cycleCountDetailList.size() == 0){ | |
445 | + throw new SecurityException("该单据没有符合复盘条件的明细!"); | |
446 | + } | |
441 | 447 | if(!this.saveBatch(cycleCountDetailList)){ |
442 | 448 | throw new ServiceException("复盘明细子单生成失败"); |
443 | 449 | } |
... | ... |
src/main/resources/static/huaheng/js/huahengUI.js
... | ... | @@ -29,7 +29,7 @@ |
29 | 29 | pageList: [10, 25, 50], // 可供选择的每页的行数(*) |
30 | 30 | iconSize: 'outline', // 图标大小:undefined默认的按钮尺寸 xs超小按钮sm小按钮lg大按钮 |
31 | 31 | toolbar: '#toolbar', // 指定工作栏 |
32 | - sidePagination: "server", // 启用服务端分页 | |
32 | + sidePagination: "server", // 启用服务端分页 | |
33 | 33 | search: $.common.visible(options.search), // 是否显示搜索框功能 |
34 | 34 | showRefresh: $.common.visible(options.showRefresh), // 是否显示刷新按钮 |
35 | 35 | showColumns: $.common.visible(options.showColumns), // 是否显示隐藏某列下拉框 |
... | ... |
src/main/resources/templates/config/filterConfigDetail/filterConfigDetail.html
src/main/resources/templates/config/filterConfigHeader/add.html
... | ... | @@ -8,7 +8,9 @@ |
8 | 8 | <div class="form-group"> |
9 | 9 | <label class="col-sm-3 control-label">模块:</label> |
10 | 10 | <div class="col-sm-8"> |
11 | - <input id="moduleType" name="moduleType" class="form-control" type="text"> | |
11 | + <select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}"> | |
12 | + <option th:each="e : ${moduleType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> | |
13 | + </select> | |
12 | 14 | </div> |
13 | 15 | </div> |
14 | 16 | <div class="form-group"> |
... | ... | @@ -81,6 +83,7 @@ |
81 | 83 | submitHandler: function (form) { |
82 | 84 | // $.operate.save(prefix + "/add", $('#form-locationType-add').serialize()); |
83 | 85 | var tableValue = $.common.getTableValue("#form-filterConfigHeader-add"); |
86 | + tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val()); | |
84 | 87 | $.operate.save(prefix + "/add", tableValue); |
85 | 88 | } |
86 | 89 | }); |
... | ... |
src/main/resources/templates/config/filterConfigHeader/edit.html
... | ... | @@ -9,7 +9,9 @@ |
9 | 9 | <div class="form-group"> |
10 | 10 | <label class="col-sm-3 control-label">模块:</label> |
11 | 11 | <div class="col-sm-8"> |
12 | - <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}"> | |
12 | + <select class="form-control" name="moduleType" th:with="moduleType=${@dict.getType('moduleType')}" th:field="*{moduleType}"> | |
13 | + <option th:each="e : ${moduleType}" th:text="${e['dictLabel']}" th:value="${e['dictValue']}"></option> | |
14 | + </select> | |
13 | 15 | </div> |
14 | 16 | </div> |
15 | 17 | <div class="form-group"> |
... | ... | @@ -90,6 +92,7 @@ |
90 | 92 | }, |
91 | 93 | submitHandler: function(form) { |
92 | 94 | var tableValue = $.common.getTableValue("#form-filterConfigHeader-edit"); |
95 | + tableValue = formValueReplace(tableValue, "moduleType", $("#moduleType option:selected").val()); | |
93 | 96 | $.operate.save(prefix + "/edit", tableValue); |
94 | 97 | } |
95 | 98 | }); |
... | ... |
src/main/resources/templates/config/filterConfigHeader/filterConfigHeader.html
... | ... | @@ -74,14 +74,14 @@ |
74 | 74 | var editFlag = [[${@permission.hasPermi('config:filterConfigHeader:edit')}]]; |
75 | 75 | var removeFlag = [[${@permission.hasPermi('config:filterConfigHeader:remove')}]]; |
76 | 76 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
77 | - | |
77 | + var moduleType = [[${@dict.getType('moduleType')}]]; | |
78 | 78 | $(function() { |
79 | 79 | var options = { |
80 | 80 | url: prefix + "/list", |
81 | 81 | createUrl: prefix + "/add", |
82 | 82 | updateUrl: prefix + "/edit/{id}", |
83 | 83 | removeUrl: prefix + "/remove", |
84 | - modalName: "订单分析主表", | |
84 | + modalName: "规则配置主表", | |
85 | 85 | search: false, |
86 | 86 | sortName: "id", |
87 | 87 | sortOrder: "desc", |
... | ... | @@ -97,7 +97,11 @@ |
97 | 97 | }, |
98 | 98 | { |
99 | 99 | field : 'moduleType', |
100 | - title : '模块' | |
100 | + title : '模块', | |
101 | + align : "center", | |
102 | + formatter: function (value, item, index) { | |
103 | + return $.table.selectDictLabel(moduleType, value); | |
104 | + } | |
101 | 105 | }, |
102 | 106 | { |
103 | 107 | field : 'recordType', |
... | ... |
src/main/resources/templates/config/material/add.html
... | ... | @@ -40,8 +40,8 @@ |
40 | 40 | <div class="form-group"> |
41 | 41 | <label class="col-sm-3 control-label">物料类别:</label> |
42 | 42 | <div class="col-sm-8"> |
43 | - <select id="type" name="type" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> | |
44 | - <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
43 | + <select id="type" name="type" class="form-control" th:with="materialType=${@materialType.queryType()}"> | |
44 | + <option th:each="item : ${materialType}" th:text="${item['name']}" th:value="${item['code']}"></option> | |
45 | 45 | </select> |
46 | 46 | </div> |
47 | 47 | </div> |
... | ... |
src/main/resources/templates/config/material/edit.html
... | ... | @@ -35,9 +35,8 @@ |
35 | 35 | <div class="form-group"> |
36 | 36 | <label class="col-sm-3 control-label">物料类别:</label> |
37 | 37 | <div class="col-sm-8"> |
38 | - <select id="type" name="type" class="form-control" th:with="materialType=${@dict.getType('materialType')}"> | |
39 | - <option th:each="item : ${materialType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}" | |
40 | - th:field="*{type}"></option> | |
38 | + <select id="type" name="type" class="form-control" th:with="materialType=${@materialType.queryType()}" th:field="*{type}"> | |
39 | + <option th:each="item : ${materialType}" th:text="${item['name']}" th:value="${item['code']}"></option> | |
41 | 40 | </select> |
42 | 41 | </div> |
43 | 42 | </div> |
... | ... |
src/main/resources/templates/config/material/material.html
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | var removeFlag = [[${@permission.hasPermi('config:material:remove')}]]; |
67 | 67 | var prefix = ctx + "config/material"; |
68 | 68 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
69 | - var mType = [[${@dict.getType('materialType')}]]; | |
69 | + var mType = [[${@materialType.queryType()}]]; | |
70 | 70 | $(function() { |
71 | 71 | var options = { |
72 | 72 | url: prefix + "/list", |
... | ... | @@ -95,7 +95,14 @@ |
95 | 95 | title : '物料类别' , |
96 | 96 | align: 'center', |
97 | 97 | formatter: function(value, row, index) { |
98 | - return $.table.selectDictLabel(mType, value); | |
98 | + var actions = []; | |
99 | + $.each(mType, function(index, dict) { | |
100 | + if (dict.code == value) { | |
101 | + actions.push("<span class='badge badge-" + dict.code + "'>" + dict.name + "</span>"); | |
102 | + return false; | |
103 | + } | |
104 | + }); | |
105 | + return actions.join(''); | |
99 | 106 | } |
100 | 107 | }, |
101 | 108 | { |
... | ... |
src/main/resources/templates/config/statusFlowHeader/add.html
... | ... | @@ -20,7 +20,9 @@ |
20 | 20 | <div class="form-group"> |
21 | 21 | <label class="col-sm-3 control-label">模块:</label> |
22 | 22 | <div class="col-sm-8"> |
23 | - <input id="moduleType" name="moduleType" class="form-control" type="text"> | |
23 | + <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}"> | |
24 | + <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
25 | + </select> | |
24 | 26 | </div> |
25 | 27 | </div> |
26 | 28 | <div class="form-group"> |
... | ... |
src/main/resources/templates/config/statusFlowHeader/edit.html
... | ... | @@ -21,7 +21,9 @@ |
21 | 21 | <div class="form-group"> |
22 | 22 | <label class="col-sm-3 control-label">模块:</label> |
23 | 23 | <div class="col-sm-8"> |
24 | - <input id="moduleType" name="moduleType" class="form-control" type="text" th:field="*{moduleType}"> | |
24 | + <select id="moduleType" name="moduleType" class="form-control" th:with="moduleTyped=${@dict.getType('moduleType')}" th:field="*{moduleType}"> | |
25 | + <option th:each="item : ${moduleType}" th:text="${item['dictLabel']}" th:value="${item['dictValue']}"></option> | |
26 | + </select> | |
25 | 27 | </div> |
26 | 28 | </div> |
27 | 29 | <div class="form-group"> |
... | ... |
src/main/resources/templates/config/waveMaster/waveMaster.html
... | ... | @@ -6,61 +6,138 @@ |
6 | 6 | <div class="container-div"> |
7 | 7 | <div class="row"> |
8 | 8 | <div class="col-sm-12 select-info"> |
9 | - <form id="waveMaster-form"> | |
10 | - <div class="select-list"> | |
11 | - <ul> | |
12 | - <li> | |
13 | - 编码:<input type="text" name="code"/> | |
14 | - </li> | |
15 | - <li> | |
16 | - 出库单条件:<input type="text" name="shipmentFilterCode"/> | |
17 | - </li> | |
18 | - <li> | |
19 | - 波次流程:<input type="text" name="waveFlowCode"/> | |
20 | - </li> | |
21 | - <li class="time"> | |
22 | - <label>创建时间: </label> | |
23 | - <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/> | |
24 | - <span>-</span> | |
25 | - <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/> | |
26 | - </li> | |
27 | - <li> | |
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> | |
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>--> | |
31 | - </li> | |
32 | - </ul> | |
9 | + <div class="col-sm-12 select-info"> | |
10 | + <ul id="myTab" class="nav nav-tabs"> | |
11 | + <li class="active"><a href="#tabMaster" data-toggle="tab">波次主表</a></li> | |
12 | + <li><a href="#tabHeader" data-toggle="tab" onclick="header()">主表</a></li> | |
13 | + <li><a href="#tabDetail" data-toggle="tab" onclick="detail()">明细</a></li> | |
14 | + </ul> | |
15 | + <div id="myTabContent" class="tab-content"> | |
16 | + <div class="tab-pane fade in active" id="tabMaster"> | |
17 | + <div class="col-sm-12 select-info"> | |
18 | + <form id="waveMaster-form"> | |
19 | + <div class="select-list"> | |
20 | + <ul> | |
21 | + <li> | |
22 | + 编码:<input type="text" name="code"/> | |
23 | + </li> | |
24 | + <li> | |
25 | + 出库单条件:<input type="text" name="shipmentFilterCode"/> | |
26 | + </li> | |
27 | + <li> | |
28 | + 波次流程:<input type="text" name="waveFlowCode"/> | |
29 | + </li> | |
30 | + <li class="time"> | |
31 | + <label>创建时间: </label> | |
32 | + <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="createdBegin"/> | |
33 | + <span>-</span> | |
34 | + <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="createdEnd"/> | |
35 | + </li> | |
36 | + <li> | |
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('waveMaster-form')"><i class="fa fa-refresh"></i> 重置</a> | |
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>--> | |
40 | + </li> | |
41 | + </ul> | |
42 | + </div> | |
43 | + </form> | |
44 | + </div> | |
45 | + | |
46 | + <div class="col-sm-12 select-info"> | |
47 | + <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
48 | + </div> | |
49 | + | |
50 | + <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
51 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:waveMaster:add"> | |
52 | + <i class="fa fa-plus"></i> 新增 | |
53 | + </a> | |
54 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:waveMaster:remove"> | |
55 | + <i class="fa fa-trash-o"></i> 删除 | |
56 | + </a> | |
57 | + </div> | |
58 | + </div> | |
59 | + | |
60 | + <div class="tab-pane fade" id="tabHeader"> | |
61 | + <div class="col-sm-12 select-info"> | |
62 | + <form id="waveFlowHeader-form"> | |
63 | + <div class="select-list"> | |
64 | + <ul> | |
65 | + <li> | |
66 | + 编码:<input type="text" name="code"/> | |
67 | + </li> | |
68 | + <li> | |
69 | + 出库单条件:<input type="text" name="shipmentFilterCode"/> | |
70 | + </li> | |
71 | + <li> | |
72 | + 波次流程:<input type="text" name="waveFlowCode"/> | |
73 | + </li> | |
74 | + <li class="time"> | |
75 | + <label>创建时间: </label> | |
76 | + <input type="text" class="time-input" id="waveFlowHeaderStartTime" placeholder="开始时间" name="createdBegin"/> | |
77 | + <span>-</span> | |
78 | + <input type="text" class="time-input" id="waveFlowHeaderEndTime" placeholder="结束时间" name="createdEnd"/> | |
79 | + </li> | |
80 | + <li> | |
81 | + <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i> 搜索</a> | |
82 | + <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset('waveMaster-form')"><i class="fa fa-refresh"></i> 重置</a> | |
83 | + <!--<a class="btn btn-success btn-rounded btn-sm" onclick="$.table.exportExcel()" shiro:hasPermission="system:role:export"><i class="fa fa-download"></i> 导出</a>--> | |
84 | + </li> | |
85 | + </ul> | |
86 | + </div> | |
87 | + </form> | |
88 | + </div> | |
89 | + <div class="btn-group hidden-xs" id="toolbar1" role="group"> | |
90 | + <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" | |
91 | + shiro:hasPermission="config:waveFlowHeader:add"> | |
92 | + <i class="fa fa-plus"></i> 新增 | |
93 | + </a> | |
94 | + <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" | |
95 | + shiro:hasPermission="config:waveFlowHeader:remove"> | |
96 | + <i class="fa fa-trash-o"></i> 删除 | |
97 | + </a> | |
98 | + </div> | |
99 | + | |
100 | + <table id="bootstrap-table1" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
101 | + | |
102 | + </div> | |
103 | + | |
104 | + <div class="tab-pane fade" id="tabDetail"> | |
105 | + <table id="bootstrap-table2" data-mobile-responsive="true" | |
106 | + class="table table-bordered table-hover"></table> | |
107 | + </div> | |
33 | 108 | </div> |
34 | - </form> | |
35 | - </div> | |
36 | - <div class="btn-group hidden-xs" id="toolbar" role="group"> | |
37 | - <a class="btn btn-outline btn-success btn-rounded" onclick="$.operate.add()" shiro:hasPermission="config:waveMaster:add"> | |
38 | - <i class="fa fa-plus"></i> 新增 | |
39 | - </a> | |
40 | - <a class="btn btn-outline btn-danger btn-rounded" onclick="$.operate.batRemove()" shiro:hasPermission="config:waveMaster:remove"> | |
41 | - <i class="fa fa-trash-o"></i> 删除 | |
42 | - </a> | |
43 | - </div> | |
44 | 109 | |
45 | - <div class="col-sm-12 select-info"> | |
46 | - <table id="bootstrap-table" data-mobile-responsive="true" class="table table-bordered table-hover"></table> | |
47 | - </div> | |
48 | - <div> | |
49 | 110 | </div> |
111 | + | |
112 | + | |
50 | 113 | <div th:include="include :: footer"></div> |
51 | 114 | <script th:inline="javascript"> |
52 | 115 | var editFlag = [[${@permission.hasPermi('config:waveMaster:edit')}]]; |
53 | 116 | var removeFlag = [[${@permission.hasPermi('config:waveMaster:remove')}]]; |
54 | 117 | var prefix = ctx + "config/waveMaster"; |
55 | 118 | var datas = [[${@dict.getType('sys_normal_disable')}]]; |
119 | + var code = ""; | |
120 | + var headerId = ""; | |
121 | + var prefix1 = ctx + "config/waveFlowHeader"; | |
122 | + var prefix2 = ctx + "config/waveFlowDetail"; | |
123 | + var editFlag1 = [[${@permission.hasPermi('config:waveFlowHeader:edit')}]]; | |
124 | + var removeFlag1 = [[${@permission.hasPermi('config:waveFlowHeader:remove')}]]; | |
125 | + | |
56 | 126 | $(function() { |
57 | - var options = { | |
127 | + $("#bootstrap-table").bootstrapTable({ | |
58 | 128 | url: prefix + "/list", |
59 | 129 | createUrl: prefix + "/add", |
60 | 130 | updateUrl: prefix + "/edit/{id}", |
61 | 131 | removeUrl: prefix + "/remove", |
62 | 132 | modalName: "波次主表", |
63 | 133 | search: false, |
134 | + showRefresh: true, | |
135 | + showColumns: true, | |
136 | + showExport: true, | |
137 | + smartDisplay:true, | |
138 | + iconSize: 'outline', | |
139 | + method: "post", | |
140 | + toolbar: "#toolbar", | |
64 | 141 | columns: [{ |
65 | 142 | checkbox: true |
66 | 143 | }, |
... | ... | @@ -188,10 +265,253 @@ |
188 | 265 | actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')" ><i class="fa fa-trash-o"></i>删除</a>'); |
189 | 266 | return actions.join(''); |
190 | 267 | } |
191 | - }] | |
192 | - }; | |
193 | - $.table.init(options); | |
268 | + }], | |
269 | + onDblClickRow: function (row) { | |
270 | + headerReg(row.waveFlowCode) | |
271 | + } | |
272 | + }); | |
273 | + }); | |
274 | + | |
275 | + $("#bootstrap-table1").bootstrapTable({ | |
276 | + url: prefix1 + "/list", | |
277 | + createUrl: prefix1 + "/add", | |
278 | + updateUrl: prefix1 + "/edit/{id}", | |
279 | + removeUrl: prefix1 + "/remove", | |
280 | + modalName: "波次流主表", | |
281 | + search: false, | |
282 | + sortName: "id", | |
283 | + sortOrder: "desc", | |
284 | + toolbar: "#toolbar1", | |
285 | + onRefresh: function(){ | |
286 | + loadHeader(); | |
287 | + }, | |
288 | + columns: [{ | |
289 | + checkbox: true | |
290 | + }, | |
291 | + { | |
292 | + field : 'id', | |
293 | + title : 'id' | |
294 | + }, | |
295 | + { | |
296 | + field : 'code', | |
297 | + title : '流程名称' | |
298 | + }, | |
299 | + { | |
300 | + field : 'version', | |
301 | + title : '数据版本', | |
302 | + visible : false | |
303 | + }, | |
304 | + { | |
305 | + field : 'processStamp', | |
306 | + title : '处理标记', | |
307 | + visible : false | |
308 | + }, | |
309 | + { | |
310 | + field : 'created', | |
311 | + title : '创建时间' | |
312 | + }, | |
313 | + { | |
314 | + field : 'createdBy', | |
315 | + title : '创建用户' | |
316 | + }, | |
317 | + { | |
318 | + field : 'lastUpdated', | |
319 | + title : '更新时间' | |
320 | + }, | |
321 | + { | |
322 | + field : 'lastUpdatedBy', | |
323 | + title : '更新用户' | |
324 | + }, | |
325 | + { | |
326 | + field : 'userDef1', | |
327 | + title : '自定义字段1', | |
328 | + visible:false | |
329 | + }, | |
330 | + { | |
331 | + field : 'userDef2', | |
332 | + title : '自定义字段2' , | |
333 | + visible:false | |
334 | + }, | |
335 | + { | |
336 | + field : 'userDef3', | |
337 | + title : '自定义字段3' , | |
338 | + visible:false | |
339 | + }, | |
340 | + { | |
341 | + title: '操作', | |
342 | + align: 'center', | |
343 | + formatter: function(value, row, index) { | |
344 | + var actions = []; | |
345 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag1 + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
346 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag1 + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
347 | + return actions.join(''); | |
348 | + } | |
349 | + }], | |
350 | + onDblClickRow: function (row) { | |
351 | + detailReg(row.id) | |
352 | + } | |
194 | 353 | }); |
354 | + | |
355 | + $("#bootstrap-table2").bootstrapTable({ | |
356 | + url: prefix + "/list", | |
357 | + createUrl: prefix + "/add", | |
358 | + updateUrl: prefix + "/edit/{id}", | |
359 | + removeUrl: prefix + "/remove", | |
360 | + modalName: "波次流明细", | |
361 | + queryParams:function(params) { | |
362 | + return { | |
363 | + // 传递参数查询参数 | |
364 | + pageSize: params.limit, | |
365 | + pageNum: params.offset / params.limit + 1, | |
366 | + searchValue: params.search, | |
367 | + orderByColumn: params.sort, | |
368 | + isAsc: params.order | |
369 | + }; | |
370 | + }, | |
371 | + onRefresh: function(){ | |
372 | + loadDeatil(); | |
373 | + }, | |
374 | + search: false, | |
375 | + sortName: "id", | |
376 | + sortOrder: "desc", | |
377 | + columns: [{ | |
378 | + checkbox: true | |
379 | + }, | |
380 | + { | |
381 | + field : 'id', | |
382 | + title : 'id' | |
383 | + }, | |
384 | + { | |
385 | + field : 'headerId', | |
386 | + title : '头表id', | |
387 | + visible: false | |
388 | + }, | |
389 | + { | |
390 | + field : 'waveFlowCode', | |
391 | + title : '波次流程' | |
392 | + }, | |
393 | + { | |
394 | + field : 'sequence', | |
395 | + title : '序号' | |
396 | + }, | |
397 | + { | |
398 | + field : 'waveStepCode', | |
399 | + title : '波次步骤' | |
400 | + }, | |
401 | + { | |
402 | + field : 'waveStepName', | |
403 | + title : '描述' | |
404 | + }, | |
405 | + { | |
406 | + field : 'value1', | |
407 | + title : '参数1', | |
408 | + visible : false | |
409 | + }, | |
410 | + { | |
411 | + field : 'value2', | |
412 | + title : '参数2', | |
413 | + visible : false | |
414 | + }, | |
415 | + { | |
416 | + field : 'value3', | |
417 | + title : '参数3', | |
418 | + visible : false | |
419 | + }, | |
420 | + { | |
421 | + field : 'created', | |
422 | + title : '创建时间' | |
423 | + }, | |
424 | + { | |
425 | + field : 'createdBy', | |
426 | + title : '创建用户' | |
427 | + }, | |
428 | + { | |
429 | + field : 'lastUpdated', | |
430 | + title : '更新时间' | |
431 | + }, | |
432 | + { | |
433 | + field : 'lastUpdatedBy', | |
434 | + title : '更新用户' | |
435 | + }, | |
436 | + { | |
437 | + field : 'userDef1', | |
438 | + title : '自定义字段1' , | |
439 | + visible:false | |
440 | + }, | |
441 | + { | |
442 | + field : 'userDef2', | |
443 | + title : '自定义字段2' , | |
444 | + visible:false | |
445 | + }, | |
446 | + { | |
447 | + field : 'userDef3', | |
448 | + title : '自定义字段3' , | |
449 | + visible:false | |
450 | + }, | |
451 | + { | |
452 | + title: '操作', | |
453 | + align: 'center', | |
454 | + formatter: function(value, row, index) { | |
455 | + var actions = []; | |
456 | + actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="#" onclick="$.operate.edit(\'' + row.id + '\')"><i class="fa fa-edit"></i>编辑</a> '); | |
457 | + actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="#" onclick="$.operate.remove(\'' + row.id + '\')"><i class="fa fa-trash-o"></i>删除</a>'); | |
458 | + return actions.join(''); | |
459 | + } | |
460 | + }] | |
461 | + }) | |
462 | + | |
463 | + function header() { | |
464 | + $("#myTab li").removeClass("active"); | |
465 | + $("#tabMaster").removeClass("in active"); | |
466 | + $("#myTab li:eq(1)").addClass("active"); | |
467 | + $("#tabHeader").addClass("in active"); | |
468 | + loadHeader(); | |
469 | + } | |
470 | + | |
471 | + function detail() { | |
472 | + $("#myTab li").removeClass("active"); | |
473 | + $("#tabMaster").removeClass("in active"); | |
474 | + $("#tabHeader").removeClass("in active"); | |
475 | + $("#myTab li:eq(2)").addClass("active"); | |
476 | + $("#tabDetail").addClass("in active"); | |
477 | + loadDeatil(); | |
478 | + } | |
479 | + | |
480 | + function loadHeader(){ | |
481 | + $.ajax({ | |
482 | + url:prefix1+'/list', | |
483 | + type:"post", | |
484 | + data:{ | |
485 | + code: code, | |
486 | + }, | |
487 | + success:function (value) { | |
488 | + $("#bootstrap-table1").bootstrapTable('load',value.data); | |
489 | + } | |
490 | + }); | |
491 | + } | |
492 | + | |
493 | + function loadDeatil() { | |
494 | + $.ajax({ | |
495 | + url:prefix2+'/list', | |
496 | + type:"post", | |
497 | + data:{ | |
498 | + headerId: headerId, | |
499 | + }, | |
500 | + success:function (value) { | |
501 | + $("#bootstrap-table2").bootstrapTable('load',value.data); | |
502 | + } | |
503 | + }); | |
504 | + } | |
505 | + | |
506 | + function headerReg(waveFlowCode) { | |
507 | + code = waveFlowCode; | |
508 | + header(); | |
509 | + } | |
510 | + | |
511 | + function detailReg(rowId){ | |
512 | + headerId = rowId; | |
513 | + detail(); | |
514 | + } | |
195 | 515 | </script> |
196 | 516 | </body> |
197 | 517 | </html> |
198 | 518 | \ No newline at end of file |
... | ... |
src/main/resources/templates/inventory/adjustDetail/adjustDetail.html
... | ... | @@ -118,9 +118,6 @@ |
118 | 118 | var created; |
119 | 119 | |
120 | 120 | $(function () { |
121 | - update(); | |
122 | - }); | |
123 | - function update() { | |
124 | 121 | let adjustCode=null; |
125 | 122 | let options = { |
126 | 123 | url:prefix + "/list", |
... | ... | @@ -129,9 +126,12 @@ |
129 | 126 | sortOrder: "desc", |
130 | 127 | search: false, |
131 | 128 | showRefresh: true, |
129 | + onRefresh: function(){ | |
130 | + update(); | |
131 | + }, | |
132 | 132 | columns: [ |
133 | 133 | { |
134 | - radio: true | |
134 | + checkbox: true | |
135 | 135 | }, |
136 | 136 | /*{ |
137 | 137 | title: '调整操作', |
... | ... | @@ -351,44 +351,24 @@ |
351 | 351 | $.table.init(options); |
352 | 352 | } |
353 | 353 | |
354 | - /*$.ajax({ | |
355 | - url: prefix_head + "/getHeader", | |
356 | - type: "post", | |
357 | - data: { | |
358 | - id: $('#cyclecountAdjustId').val() | |
359 | - }, | |
360 | - success: function (value) { | |
361 | - if (value.data) { | |
362 | - $('#code').val(value.data.code); | |
363 | - // $('#type').val(value.data.typeLabel); | |
364 | - $('#status').val(value.data.statusLabel); | |
365 | - $('#created').val(value.data.created); | |
366 | - var text_val = $('#created').val(); | |
367 | - $('#created').val(text_val.replace("T", " ")); | |
368 | - //$('#createdBy').val(value.data.createdBy); | |
369 | - $('#lastUpdated').val(value.data.lastUpdated); | |
370 | - var text_val_t = $('#lastUpdated').val(); | |
371 | - $('#lastUpdated').val(text_val_t.replace("T", " ")); | |
372 | - //$('#lastUpdatedBy').val(value.data.lastUpdatedBy); | |
373 | - } | |
374 | - } | |
375 | - })*/ | |
376 | - } | |
377 | - | |
378 | - /**盘点差异调整*/ | |
379 | - function addAdjust() { | |
380 | - var row = $('#bootstrap-table').bootstrapTable('getSelections'); | |
354 | + }); | |
381 | 355 | |
382 | - $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", | |
383 | - function () { | |
384 | - /*判断是否已经调整过*/ | |
385 | - if (row[0].status == 2) { | |
386 | - $.modal.msg('该条明细已调整,请勿重复调整!') | |
387 | - } else { | |
388 | - $.modal.open("差异调整单", prefix + "/adjustEdit?id=" + row[0].id) | |
389 | - } | |
390 | 356 | |
391 | - }); | |
357 | + /* | |
358 | + *盘点差异调整 | |
359 | + * */ | |
360 | + function addAdjust() { | |
361 | + var rows = $.common.isEmpty($.table._option.id) ? $.table.selectFirstColumns() : $.table.selectColumns($.table._option.id); | |
362 | + if (rows.length == 0) { | |
363 | + $.modal.alertWarning("请至少选择一条记录"); | |
364 | + return; | |
365 | + } | |
366 | + $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!" | |
367 | + , function() { | |
368 | + var url = prefix + "/adjustEdit"; | |
369 | + var data = { "ids": rows.join() }; | |
370 | + postInner(url, data); | |
371 | + }); | |
392 | 372 | } |
393 | 373 | |
394 | 374 | // |
... | ... | @@ -422,51 +402,23 @@ |
422 | 402 | // shadeClose: true, //点击遮罩关闭层 |
423 | 403 | }) |
424 | 404 | } |
425 | - | |
426 | - /* | |
427 | - * 差异复盘 | |
428 | - */ | |
429 | - function createCyclecountWithGapQty() { | |
430 | - $.modal.confirm("确认进行差异复盘么?该操作会将有差异的明细重新生成一个新的盘点单。", function () { | |
431 | - var url = prefix + "/createCyclecountWithGapQty"; | |
432 | - var data = {"headId": $('#headId').val()}; | |
433 | - postInner(url, data); | |
434 | - }); | |
435 | - } | |
436 | - | |
437 | - /* //调整差异库存 | |
438 | - function adjust() { | |
439 | - $.modal.confirm("注意:该操作将更改库存,当实盘数量为0且库位上只剩空容器时,请手动执行空托出库任务,容器上有货则无需其他操作!", | |
440 | - function() { | |
441 | - var url = prefix + "/adjust"; | |
442 | - var data = { "headId": $('#headId').val() }; | |
443 | - postInner(url,data); | |
444 | - }); | |
445 | - } | |
446 | - function postInner(url,data) { | |
447 | - $.modal.loading("正在处理中,请稍后..."); | |
448 | - $.ajax({ | |
449 | - url:url, | |
450 | - type:"post", | |
451 | - data:data, | |
452 | - success:function (result) { | |
453 | - if (result.code == web_status.SUCCESS) { | |
454 | - $.modal.msgSuccess(result.msg); | |
455 | - update(); | |
456 | - } else { | |
457 | - $.modal.alertError(result.msg); | |
458 | - } | |
459 | - $.modal.closeLoading(); | |
405 | + function postInner(url,data) { | |
406 | + $.modal.loading("正在处理中,请稍后..."); | |
407 | + $.ajax({ | |
408 | + url:url, | |
409 | + type:"post", | |
410 | + data:data, | |
411 | + success:function (result) { | |
412 | + if (result.code == web_status.SUCCESS) { | |
413 | + $.modal.msgSuccess(result.msg); | |
414 | + update(); | |
415 | + } else { | |
416 | + $.modal.alertError(result.msg); | |
460 | 417 | } |
461 | - }) | |
462 | - }*/ | |
463 | - | |
464 | - /* //下发单条盘点 | |
465 | - function outcheck(id) { | |
466 | - var url = prefix + "/createCyccoutTaskByDetailId"; | |
467 | - var data = { "detailId": id }; | |
468 | - postInner(url,data); | |
469 | - }*/ | |
418 | + $.modal.closeLoading(); | |
419 | + } | |
420 | + }) | |
421 | + } | |
470 | 422 | |
471 | 423 | |
472 | 424 | </script> |
... | ... |
src/main/resources/templates/system/dict/data/data.html
... | ... | @@ -146,7 +146,12 @@ |
146 | 146 | |
147 | 147 | function queryParams(params) { |
148 | 148 | return { |
149 | - dictType: $("#dictType").val() | |
149 | + dictType: $("#dictType").val(), | |
150 | + pageSize: params.limit, | |
151 | + pageNum: params.offset / params.limit + 1, | |
152 | + searchValue: params.search, | |
153 | + orderByColumn: params.sort, | |
154 | + isAsc: params.order | |
150 | 155 | }; |
151 | 156 | } |
152 | 157 | |
... | ... |