| | |
| | | public MatCodeCountDto() { |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, Double count, String supplier) { |
| | | public MatCodeCountDto(String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.supplier = supplier; |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, String supplier, Double count) { |
| | | this.matNo = matNo; |
| | | this.supplier = supplier; |
| | | this.count = count; |
| | | } |
| | | |
| | | public MatCodeCountDto(String billNo, Integer seqNo, String matNo, String supplier, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.billNo = billNo; |
| | | this.supplier = supplier; |
| | | this.seqNo = seqNo; |
| | | } |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(),elem.getSeqNo(),elem.getMatNo(), elem.getCount())); |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(),elem.getSeqNo(),elem.getMatNo(), elem.getSupplier(), elem.getCount())); |
| | | }); |
| | | for (MatCodeCountDto dto : matDtos) { |
| | | MatCode matCode = matCodeService.selectById(dto.getMatNo()); |
| | |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount(), elem.getSupplier())); |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getSupplier(), elem.getCount())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // 更新源站点信息 |
| | |
| | | } |
| | | // 遍历工作明细,更新库存明细和入库通知档 |
| | | for (WrkDetl wrkDetl : wrkDetls) { |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()).eq("mat_no", wrkDetl.getMatNo())); |
| | | LocDetl locDetl = locDetlService.selectOne(new EntityWrapper<LocDetl>().eq("loc_no", wrkMast.getLocNo()).eq("mat_no", wrkDetl.getMatNo()).eq("supplier", wrkDetl.getSupplier())); |
| | | if (null != locDetl) { |
| | | boolean res = locDetlService.updateAnfme(wrkDetl.getQty()+locDetl.getQty(), wrkMast.getLocNo(), wrkDetl.getMatNo()); |
| | | if (!res) { |
| | |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | pltBarcodes.forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(), elem.getSeqNo(), elem.getMatNo(), elem.getQty())); |
| | | matDtos.add(new MatCodeCountDto(elem.getBillNo(), elem.getSeqNo(), elem.getMatNo(), null, elem.getQty())); |
| | | |
| | | //更新组托数据状态为入库中 |
| | | Wrapper<PltBarcode> wrapper = new EntityWrapper<PltBarcode>().eq("barcode", elem.getBarcode()) |
| | |
| | | table.on('edit(chooseData)', function (obj) { |
| | | switch (obj.field) { |
| | | case 'count': |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | updateMatCodeData(obj.data.matNo, obj.data.supplier, Number(obj.value)); |
| | | break |
| | | case 'supplier': |
| | | // updateMatCodeSupplier(obj.data.matNo, obj.value); |
| | |
| | | } |
| | | } |
| | | |
| | | function updateMatCodeData(matNo, count) { |
| | | function updateMatCodeData(matNo, supplier, count) { |
| | | if (isNaN(count)) { |
| | | layer.msg("请输入数字"); |
| | | } else { |
| | | if (count > 0) { |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matNo"] === matNo){ |
| | | if (matCodeData[i]["matNo"] === matNo && matCodeData[i]["supplier"] === supplier){ |
| | | matCodeData[i]["count"] = count; |
| | | } |
| | | } |
| New file |
| | |
| | | asr_loc_detl、asr_wrk_detl、asr_wrk_detl_log 加入 supplier字段 |
| | | asr_wrk_detl supplier 加锁 |
| | | |
| | | loc_detl 去锁 |