| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional |
| | | public void adjustLocDetl(LocDetlAdjustParam param, Long userId) { |
| | | LocMast locMast = locMastService.selectById(param.getLocNo()); |
| | | if (Cools.isEmpty(locMast)) { |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | // 清除旧库存明细 |
| | | locDetlService.delete(new EntityWrapper<LocDetl>().eq("loc_no", locMast.getLocNo())); |
| | | // 保存新库存明细 |
| | | for (LocDetlAdjustParam.LocDetlAdjust adjust : param.getList()) { |
| | | LocDetl locDetl = new LocDetl(); |
| | | if (!locDetlService.insert(locDetl)) { |
| | | throw new CoolException("保存库存明细失败"); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | var initCountVal = 0; |
| | | var initAnfmeVal = "-"; |
| | | var removeBtn = true; |
| | | var matCodeData = []; |
| | | var currLocNo; |
| | | layui.use(['table','laydate', 'form'], function() { |
| | |
| | | anfme: data[i].anfme, |
| | | matNo: data[i].matnr, |
| | | matName: data[i].maktx, |
| | | |
| | | removeBtn: false |
| | | }) |
| | | } |
| | | locTips(true, locNo); |
| | |
| | | if (!isEmpty(parent.initAnfmeVal)) { |
| | | data[i]["anfme"] = parent.initAnfmeVal; |
| | | } |
| | | if (!isEmpty(parent.removeBtn)) { |
| | | data[i]["removeBtn"] = parent.removeBtn; |
| | | } |
| | | } |
| | | data.push.apply(data, parent.matCodeData); |
| | | parent.matCodeData = data; |
| | |
| | | |
| | | <!-- 行 --> |
| | | <script type="text/html" id="operate"> |
| | | {{# if(d.removeBtn){ }} |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</a> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <!-- 表格 --> |