Merge branch 'master' of http://47.97.1.152:5880/r/wms_saas
| New file | 
|  |  |  | 
|---|
|  |  |  | package zy.cloud.wms.common.model; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class PickOutDto { | 
|---|
|  |  |  | private Integer anfme; | 
|---|
|  |  |  | private String locNo; | 
|---|
|  |  |  | private String maktx; | 
|---|
|  |  |  | private String matnr; | 
|---|
|  |  |  | private Integer nodeId; | 
|---|
|  |  |  | private Boolean prior; | 
|---|
|  |  |  | private Integer reduce; | 
|---|
|  |  |  | private Integer remQty; | 
|---|
|  |  |  | private String title; | 
|---|
|  |  |  | private Integer total; | 
|---|
|  |  |  | private Integer type; | 
|---|
|  |  |  | private String waveId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
| New file | 
|  |  |  | 
|---|
|  |  |  | package zy.cloud.wms.common.model; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import lombok.Data; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.OrderDetl; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.WaveDetl; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Data | 
|---|
|  |  |  | public class WaveStoDto { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String orderNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private List<MatnrDto> dtos; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaveStoDto() { | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public WaveStoDto create(String id, List<WaveDetl> orderDetls){ | 
|---|
|  |  |  | this.setOrderNo(id); | 
|---|
|  |  |  | List<MatnrDto> matnrDtos = new ArrayList<>(); | 
|---|
|  |  |  | for (WaveDetl waveDetl : orderDetls) { | 
|---|
|  |  |  | MatnrDto matnrDto = new MatnrDto(); | 
|---|
|  |  |  | matnrDto.setMatnr(waveDetl.getMatnr()); | 
|---|
|  |  |  | matnrDto.setCount(waveDetl.getAnfme()); | 
|---|
|  |  |  | matnrDto.setBatch(waveDetl.getBatch()); | 
|---|
|  |  |  | matnrDtos.add(matnrDto); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | this.setDtos(matnrDtos); | 
|---|
|  |  |  | return this; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import zy.cloud.wms.common.model.MatnrDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.OrderStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.ReceiveStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.WaveStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.utils.VersionUtils; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.*; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ReceiveService receiveService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private ReceiveDetlService receiveDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutService pickoutService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutDetlService pickoutDetlService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public List<StoPreTab> stockOutPreview(OrderStoDto orderStoDto, Long hostId) { | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public List<StoPreTab> orderOutPreview(OrderStoDto orderStoDto, Long hostId){ | 
|---|
|  |  |  | if (Cools.isEmpty(orderStoDto) || Cools.isEmpty(orderStoDto.getDtos())) { | 
|---|
|  |  |  | throw new CoolException("数据异常,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<StoPreTab> res = new ArrayList<>(); | 
|---|
|  |  |  | // 检查库存是否足够 | 
|---|
|  |  |  | //        locDetlService.checkLocDetlCount(orderStoDto.getDtos()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (MatnrDto matnrDto : orderStoDto.getDtos()) { | 
|---|
|  |  |  | // 判断物料是否存在 | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(hostId, matnrDto.getMatnr()); | 
|---|
|  |  |  | if (null == mat) { | 
|---|
|  |  |  | throw new CoolException(matnrDto.getMatnr() + "物料尚未更新。" + orderStoDto.getOrderNo() +"单据因此中断!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Double sumAnfme = Optional.ofNullable(locDetlService.selectCountByMatnr(mat.getMatnr(), hostId)).orElse(0.0D); | 
|---|
|  |  |  | double lack = 0.0D; | 
|---|
|  |  |  | // 缺货 | 
|---|
|  |  |  | if (sumAnfme < matnrDto.getCount()) { | 
|---|
|  |  |  | lack = matnrDto.getCount() - sumAnfme; | 
|---|
|  |  |  | // 视图对象 | 
|---|
|  |  |  | StoPreTab tab = new StoPreTab(); | 
|---|
|  |  |  | tab.setTitle(mat.getMaktx() + "(" + mat.getMatnr() + ")"); | 
|---|
|  |  |  | tab.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | tab.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | tab.setAnfme(matnrDto.getCount()); | 
|---|
|  |  |  | tab.setLocNo("缺货"); | 
|---|
|  |  |  | tab.setTotal(lack); | 
|---|
|  |  |  | tab.setReduce(lack); | 
|---|
|  |  |  | tab.setRemQty(0.0D); | 
|---|
|  |  |  | tab.setPrior(false); | 
|---|
|  |  |  | tab.setPrior$("×"); | 
|---|
|  |  |  | tab.setType(0); | 
|---|
|  |  |  | res.add(tab); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询存有当前物料的货位 | 
|---|
|  |  |  | List<LocDetl> locDetls = locDetlService.findOfSort(hostId, mat.getMatnr()); | 
|---|
|  |  |  | double issued = Optional.of(matnrDto.getCount() - lack).orElse(0.0D) ; | 
|---|
|  |  |  | double anfme = issued; | 
|---|
|  |  |  | for (LocDetl locDetl : locDetls) { | 
|---|
|  |  |  | if (issued > 0) { | 
|---|
|  |  |  | // 视图对象 | 
|---|
|  |  |  | StoPreTab tab = new StoPreTab(); | 
|---|
|  |  |  | tab.setTitle(mat.getMaktx() + "(" + mat.getMatnr() + ")"); | 
|---|
|  |  |  | tab.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | tab.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | tab.setAnfme(matnrDto.getCount()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | tab.setLocNo(locDetl.getLocNo()); | 
|---|
|  |  |  | tab.setNodeId(locDetl.getNodeId()); | 
|---|
|  |  |  | tab.setTotal(locDetl.getAnfme()); | 
|---|
|  |  |  | tab.setReduce(issued>=locDetl.getAnfme()?locDetl.getAnfme():issued); | 
|---|
|  |  |  | tab.setRemQty(tab.getTotal() - tab.getReduce()); | 
|---|
|  |  |  | tab.setPrior(locDetlService.isPrior(locDetl.getNodeId(), mat.getMatnr())); | 
|---|
|  |  |  | tab.setPrior$(tab.getPrior()?"✔":"×"); | 
|---|
|  |  |  | tab.setType(1); | 
|---|
|  |  |  | res.add(tab); | 
|---|
|  |  |  | // 剩余待出数量递减 | 
|---|
|  |  |  | issued = issued - locDetl.getAnfme(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | res.sort(new Comparator<StoPreTab>() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public int compare(StoPreTab o1, StoPreTab o2) { | 
|---|
|  |  |  | //                return o1.getMatnr().length() - o2.getMatnr().length(); | 
|---|
|  |  |  | return (int) (o1.getAnfme() - o2.getAnfme()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @Transactional | 
|---|
|  |  |  | public void stockOutProcess(OrderStoDto orderStoDto, Long hostId) { | 
|---|
|  |  |  | if (Cools.isEmpty(orderStoDto) || Cools.isEmpty(orderStoDto.getDtos())) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public static void main(String[] args) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (int i = 2; i < 51; i++) { | 
|---|
|  |  |  | 
|---|
|  |  |  | "GO"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void orderStockOutProcess(OrderStoDto orderStoDto, Long hostId, Long userId) { | 
|---|
|  |  |  | if (Cools.isEmpty(orderStoDto) || Cools.isEmpty(orderStoDto.getDtos())) { | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        Receive receive = receiveService.selectByOrderNo(receiveStoDto.getOrderNo(), hostId); | 
|---|
|  |  |  | Order order = orderService.selectByOrderNo(orderStoDto.getOrderNo(), hostId); | 
|---|
|  |  |  | if (order == null) { | 
|---|
|  |  |  | throw new CoolException(orderStoDto.getOrderNo() + "单据不存在"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Date now = new Date(); | 
|---|
|  |  |  | // 检查库存是否足够 | 
|---|
|  |  |  | locDetlService.checkLocDetlCount(orderStoDto.getDtos(), hostId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (MatnrDto matnrDto : orderStoDto.getDtos()) { | 
|---|
|  |  |  | // 判断物料是否存在 | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(hostId, matnrDto.getMatnr()); | 
|---|
|  |  |  | if (null == mat) { | 
|---|
|  |  |  | throw new CoolException(matnrDto.getMatnr() + "物料尚未更新。" + matnrDto.getCount() +"单据因此中断!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 查询存有当前物料的货位 | 
|---|
|  |  |  | List<LocDetl> locDetls = locDetlService.findOfSort(hostId, mat.getMatnr()); | 
|---|
|  |  |  | double issued = Optional.ofNullable(matnrDto.getCount()).orElse(0.0D); | 
|---|
|  |  |  | Pickout pickout = new Pickout(); | 
|---|
|  |  |  | pickout.setHostId(hostId); | 
|---|
|  |  |  | pickout.setUserId(userId); | 
|---|
|  |  |  | pickout.setWrkNo(String.valueOf(snowflakeIdWorker.nextId())); | 
|---|
|  |  |  | pickout.setWrkSts(1L); | 
|---|
|  |  |  | pickout.setOrderQty(1); | 
|---|
|  |  |  | pickout.setOrderNos(orderStoDto.getOrderNo()); | 
|---|
|  |  |  | pickout.setCreateBy(userId.intValue()); | 
|---|
|  |  |  | pickout.setUpdateBy(userId.intValue()); | 
|---|
|  |  |  | pickoutService.insert(pickout); | 
|---|
|  |  |  | for (LocDetl locDetl : locDetls) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (issued > 0) { | 
|---|
|  |  |  | PickoutDetl pickoutDetl = new PickoutDetl(); | 
|---|
|  |  |  | pickoutDetl.setHeadId(pickout.getId()); | 
|---|
|  |  |  | pickoutDetl.setNodeId(locDetl.getNodeId()); | 
|---|
|  |  |  | pickoutDetl.setNodeName(locDetl.getLocNo()); | 
|---|
|  |  |  | pickoutDetl.setAnfme(issued>=locDetl.getAnfme()?locDetl.getAnfme():issued); | 
|---|
|  |  |  | pickoutDetl.setMatnr(locDetl.getMatnr()); | 
|---|
|  |  |  | pickoutDetl.setMaktx(locDetl.getMaktx()); | 
|---|
|  |  |  | pickoutDetl.setName(locDetl.getName()); | 
|---|
|  |  |  | pickoutDetl.setSpecs(locDetl.getSpecs()); | 
|---|
|  |  |  | pickoutDetl.setModel(locDetl.getModel()); | 
|---|
|  |  |  | pickoutDetl.setBatch(locDetl.getBatch()); | 
|---|
|  |  |  | pickoutDetl.setUnit(locDetl.getUnit()); | 
|---|
|  |  |  | pickoutDetl.setBarcode(locDetl.getBarcode()); | 
|---|
|  |  |  | pickoutDetl.setPrice(locDetl.getPrice()); | 
|---|
|  |  |  | pickoutDetl.setWeight(locDetl.getWeight()); | 
|---|
|  |  |  | pickoutDetl.setStatus(1); | 
|---|
|  |  |  | pickoutDetl.setCreateBy(userId.intValue()); | 
|---|
|  |  |  | pickoutDetl.setUpdateBy(userId.intValue()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //                    // 保存出库通知单 | 
|---|
|  |  |  | //                    Pakout pakout = new Pakout(); | 
|---|
|  |  |  | //                    pakout.setHostId(hostId); | 
|---|
|  |  |  | //                    pakout.setWrkSts(1L); | 
|---|
|  |  |  | //                    pakout.setAnfme(issued>=locDetl.getAnfme()?locDetl.getAnfme():issued); | 
|---|
|  |  |  | //                    pakout.setZpallet(locDetl.getZpallet()); | 
|---|
|  |  |  | //                    pakout.setLocNo(locDetl.getLocNo()); | 
|---|
|  |  |  | //                    pakout.setNodeId(locDetl.getNodeId()); | 
|---|
|  |  |  | //                    pakout.setWrkNo(String.valueOf(snowflakeIdWorker.nextId())); | 
|---|
|  |  |  | //                    VersionUtils.setPakout(pakout, mat); | 
|---|
|  |  |  | //                    pakout.setDocId(receive.getDocType()); // 单据类型 | 
|---|
|  |  |  | //                    pakout.setDocNum(receive.getOrderNo());    // 单据编号 | 
|---|
|  |  |  | //                    pakout.setCreateTime(now); | 
|---|
|  |  |  | //                    pakout.setUpdateTime(now); | 
|---|
|  |  |  | //                    pakout.setStatus(1); | 
|---|
|  |  |  | if (!pickoutDetlService.insert(pickoutDetl)) { | 
|---|
|  |  |  | throw new CoolException("保存出库通知单失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (issued>=locDetl.getAnfme()) { | 
|---|
|  |  |  | //                        // 删除库存明细 | 
|---|
|  |  |  | //                        if (!locDetlService.removeStock(locDetl.getNodeId(), mat.getMatnr())) { | 
|---|
|  |  |  | //                            throw new CoolException("删除库存明细失败"); | 
|---|
|  |  |  | //                        } | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | //                        // 修改库存明细数量 | 
|---|
|  |  |  | //                        if (!locDetlService.reduceStock(locDetl.getNodeId(), mat.getMatnr(), issued)) { | 
|---|
|  |  |  | //                            throw new CoolException("修改库存明细数量失败"); | 
|---|
|  |  |  | //                        } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 剩余待出数量递减 | 
|---|
|  |  |  | issued = issued - locDetl.getAnfme(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 修改单据状态 | 
|---|
|  |  |  | if (!orderService.updateSettle(orderStoDto.getOrderNo(), 2L, hostId)) { | 
|---|
|  |  |  | throw new CoolException("修改单据状态失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Object waveOutPreview(WaveStoDto waveStoDto, Long hostId) { | 
|---|
|  |  |  | if (Cools.isEmpty(waveStoDto) || Cools.isEmpty(waveStoDto.getDtos())) { | 
|---|
|  |  |  | throw new CoolException("数据异常,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<StoPreTab> res = new ArrayList<>(); | 
|---|
|  |  |  | // 检查库存是否足够 | 
|---|
|  |  |  | //        locDetlService.checkLocDetlCount(orderStoDto.getDtos()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | for (MatnrDto matnrDto : waveStoDto.getDtos()) { | 
|---|
|  |  |  | // 判断物料是否存在 | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(hostId, matnrDto.getMatnr()); | 
|---|
|  |  |  | if (null == mat) { | 
|---|
|  |  |  | throw new CoolException(matnrDto.getMatnr() + "物料尚未更新。" + waveStoDto.getOrderNo() +"单据因此中断!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | Double sumAnfme = Optional.ofNullable(locDetlService.selectCountByMatnr(mat.getMatnr(), hostId)).orElse(0.0D); | 
|---|
|  |  |  | double lack = 0.0D; | 
|---|
|  |  |  | // 缺货 | 
|---|
|  |  |  | if (sumAnfme < matnrDto.getCount()) { | 
|---|
|  |  |  | lack = matnrDto.getCount() - sumAnfme; | 
|---|
|  |  |  | // 视图对象 | 
|---|
|  |  |  | StoPreTab tab = new StoPreTab(); | 
|---|
|  |  |  | tab.setTitle(mat.getMaktx() + "(" + mat.getMatnr() + ")"); | 
|---|
|  |  |  | tab.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | tab.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | tab.setAnfme(matnrDto.getCount()); | 
|---|
|  |  |  | tab.setLocNo("缺货"); | 
|---|
|  |  |  | tab.setTotal(lack); | 
|---|
|  |  |  | tab.setReduce(lack); | 
|---|
|  |  |  | tab.setRemQty(0.0D); | 
|---|
|  |  |  | tab.setPrior(false); | 
|---|
|  |  |  | tab.setPrior$("×"); | 
|---|
|  |  |  | tab.setType(0); | 
|---|
|  |  |  | tab.setWaveId(waveStoDto.getOrderNo()); | 
|---|
|  |  |  | res.add(tab); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 查询存有当前物料的货位 | 
|---|
|  |  |  | List<LocDetl> locDetls = locDetlService.findOfSort(hostId, mat.getMatnr()); | 
|---|
|  |  |  | double issued = Optional.of(matnrDto.getCount() - lack).orElse(0.0D) ; | 
|---|
|  |  |  | double anfme = issued; | 
|---|
|  |  |  | for (LocDetl locDetl : locDetls) { | 
|---|
|  |  |  | if (issued > 0) { | 
|---|
|  |  |  | // 视图对象 | 
|---|
|  |  |  | StoPreTab tab = new StoPreTab(); | 
|---|
|  |  |  | tab.setTitle(mat.getMaktx() + "(" + mat.getMatnr() + ")"); | 
|---|
|  |  |  | tab.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | tab.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | tab.setAnfme(matnrDto.getCount()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | tab.setLocNo(locDetl.getLocNo()); | 
|---|
|  |  |  | tab.setNodeId(locDetl.getNodeId()); | 
|---|
|  |  |  | tab.setTotal(locDetl.getAnfme()); | 
|---|
|  |  |  | tab.setReduce(issued>=locDetl.getAnfme()?locDetl.getAnfme():issued); | 
|---|
|  |  |  | tab.setRemQty(tab.getTotal() - tab.getReduce()); | 
|---|
|  |  |  | tab.setPrior(locDetlService.isPrior(locDetl.getNodeId(), mat.getMatnr())); | 
|---|
|  |  |  | tab.setPrior$(tab.getPrior()?"✔":"×"); | 
|---|
|  |  |  | tab.setType(1); | 
|---|
|  |  |  | tab.setWaveId(waveStoDto.getOrderNo()); | 
|---|
|  |  |  | res.add(tab); | 
|---|
|  |  |  | // 剩余待出数量递减 | 
|---|
|  |  |  | issued = issued - locDetl.getAnfme(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | res.sort(new Comparator<StoPreTab>() { | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public int compare(StoPreTab o1, StoPreTab o2) { | 
|---|
|  |  |  | //                return o1.getMatnr().length() - o2.getMatnr().length(); | 
|---|
|  |  |  | return (int) (o1.getAnfme() - o2.getAnfme()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | return res; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | for (Long id : ids) { | 
|---|
|  |  |  | Order target = orderService.selectOne(new EntityWrapper<Order>() | 
|---|
|  |  |  | .eq("id", id)); | 
|---|
|  |  |  | if (target.getSettle() != 0 || target.getSettle() != 1) { | 
|---|
|  |  |  | if (target.getSettle() == 0 || target.getSettle() == 1) { | 
|---|
|  |  |  | orderService.deleteById(id); | 
|---|
|  |  |  | orderDetlService.delete(new EntityWrapper<OrderDetl>() | 
|---|
|  |  |  | .eq("order_id",id)); | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | throw new CoolException("仅允许删除'初始化','待处理'状态的订单"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (Cools.isEmpty((Object) ids)){ | 
|---|
|  |  |  | return R.error(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | for (Long id : ids){ | 
|---|
|  |  |  | if (!orderService.deleteById(id)) { | 
|---|
|  |  |  | throw new CoolException("服务器错误,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Integer seqNo = 1; | 
|---|
|  |  |  | for (Order order : orders) { | 
|---|
|  |  |  | if (order.getSettle() != 2L) { | 
|---|
|  |  |  | return R.error("仅支持'未拣货'状态生成波次"); | 
|---|
|  |  |  | if (order.getSettle() != 1L) { | 
|---|
|  |  |  | return R.error("仅支持'待处理'状态生成波次"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import zy.cloud.wms.common.web.BaseController; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Order; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Pakout; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.OrderService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.PakoutService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PakoutService pakoutService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderService orderService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/pakout/{id}/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/pakout/print/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R print(@RequestParam String docNumber) { | 
|---|
|  |  |  | List<Pakout> pakouts = pakoutService.selectList(new EntityWrapper<Pakout>().eq("doc_num", docNumber).eq("host_id", getHostId())); | 
|---|
|  |  |  | if (!Cools.isEmpty(pakouts)) { | 
|---|
|  |  |  | if (pakouts.get(0).getWrkSts() == 1) { | 
|---|
|  |  |  | pakoutService.stockOutPrint(null, docNumber, getUserId(), getHostId()); | 
|---|
|  |  |  | Order order_no = orderService.selectOne(new EntityWrapper<Order>() | 
|---|
|  |  |  | .eq("order_no", docNumber)); | 
|---|
|  |  |  | if (!Cools.isEmpty(order_no)) { | 
|---|
|  |  |  | if (order_no.getSettle() == 2) { | 
|---|
|  |  |  | order_no.setSettle(7L); | 
|---|
|  |  |  | orderService.update(order_no,new EntityWrapper<Order>() | 
|---|
|  |  |  | .eq("order_no",docNumber)); | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | return R.error(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.plugins.Page; | 
|---|
|  |  |  | import com.core.common.DateUtils; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Pickout; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.PickoutDetl; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.PickoutDetlService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.PickoutService; | 
|---|
|  |  |  | import com.core.annotations.ManagerAuth; | 
|---|
|  |  |  | import com.core.common.BaseRes; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutService pickoutService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutDetlService pickoutDetlService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/pickout/{id}/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R delete(@RequestParam(value="ids[]") Long[] ids){ | 
|---|
|  |  |  | for (Long id : ids){ | 
|---|
|  |  |  | Pickout picout = pickoutService.selectOne(new EntityWrapper<Pickout>() | 
|---|
|  |  |  | .eq("id", id)); | 
|---|
|  |  |  | pickoutDetlService.delete(new EntityWrapper<PickoutDetl>() | 
|---|
|  |  |  | .eq("head_id",id)); | 
|---|
|  |  |  | pickoutService.deleteById(id); | 
|---|
|  |  |  | pickoutService.updateWaveStatus(picout.getWaveNo()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.mapper.Wrapper; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.plugins.Page; | 
|---|
|  |  |  | import com.core.common.DateUtils; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.PickOutDto; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Wave; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.WaveDetl; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.param.StockOutParam; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.OrderService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.WaveDetlService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.WaveService; | 
|---|
|  |  |  | 
|---|
|  |  |  | import zy.cloud.wms.common.web.BaseController; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.WorkService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RestController | 
|---|
|  |  |  | public class WaveController extends BaseController { | 
|---|
|  |  |  | 
|---|
|  |  |  | private WaveDetlService waveDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OrderService orderService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WorkService workService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping(value = "/wave/{id}/auth") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/wave/createOut") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R createWaveOut(@RequestBody Wave wave){ | 
|---|
|  |  |  | waveService.createOut(wave,getUserId(),getHostId()); | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | public R createWaveOut(@RequestBody List<PickOutDto> pickOutDtosk){ | 
|---|
|  |  |  | return waveService.createOut(pickOutDtosk,getUserId(),getHostId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/wave/preview") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R createWavePreview(@RequestBody StockOutParam stockOutParam){ | 
|---|
|  |  |  | return workService.wavePreview(stockOutParam, getUserId(), getHostId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | @RequestMapping("/stock/out/print") | 
|---|
|  |  |  | @ManagerAuth(memo = "拣货单打印") | 
|---|
|  |  |  | public R stockOutPrint(@RequestBody StockOutParam stockOutParam) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return workService.stockInPrint(stockOutParam, getUserId(), getHostId()); | 
|---|
|  |  |  | return workService.stockOutPrint(stockOutParam, getUserId(), getHostId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/stock/allot") | 
|---|
|  |  |  | 
|---|
|  |  |  | return workService.initOrder(param, getUserId(), getHostId()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @RequestMapping("/stock/transfer") | 
|---|
|  |  |  | @ManagerAuth(memo = "库存调拨") | 
|---|
|  |  |  | public R stockTransfer(@RequestBody AsrsTransferParam number) { | 
|---|
|  |  |  | 
|---|
|  |  |  | eq("host_id", getHostId()).orderBy("create_time", false).eq("doc_class",docClass)); | 
|---|
|  |  |  | return R.ok().add(docTypes); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | @RequestMapping("docType/out/get") | 
|---|
|  |  |  | @ManagerAuth | 
|---|
|  |  |  | public R getDocOutTypeData(Integer docClass){ | 
|---|
|  |  |  | List<DocType> docTypes = docTypeService.selectList(new EntityWrapper<DocType>().eq("status", 1). | 
|---|
|  |  |  | eq("host_id", getHostId()).orderBy("create_time", false).eq("doc_class",docClass)); | 
|---|
|  |  |  | return R.ok().add(docTypes); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 获取所有客户 | 
|---|
|  |  |  | @RequestMapping("/cstmr/all/get") | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField("order_qty") | 
|---|
|  |  |  | private Integer orderQty; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField("order_nos") | 
|---|
|  |  |  | private String orderNos; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField("wave_no") | 
|---|
|  |  |  | private String waveNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Pickout() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | //            null    // | 
|---|
|  |  |  | //    ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getWrkSts$(){ | 
|---|
|  |  |  | if (this.wrkSts == 1) { | 
|---|
|  |  |  | return "未打印"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.wrkSts == 2) { | 
|---|
|  |  |  | return "未拣货"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.wrkSts == 3) { | 
|---|
|  |  |  | return "开始拣货"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (this.wrkSts == 4) { | 
|---|
|  |  |  | return "拣货完成"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | public Long getId() { | 
|---|
|  |  |  | return id; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | * 库位ID | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "库位ID") | 
|---|
|  |  |  | @TableField("node_id") | 
|---|
|  |  |  | @TableField("nodeId") | 
|---|
|  |  |  | private Long nodeId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | @ApiModelProperty(value= "修改人员ID") | 
|---|
|  |  |  | @TableField("update_by") | 
|---|
|  |  |  | @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | 
|---|
|  |  |  | private Date updateBy; | 
|---|
|  |  |  | private Integer updateBy; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 备注 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @ApiModelProperty(value= "备注") | 
|---|
|  |  |  | private String memo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @TableField("wrk_no") | 
|---|
|  |  |  | private String wrkNo; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public PickoutDetl() {} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | this.updateTime = updateTime; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public Date getUpdateBy() { | 
|---|
|  |  |  | return updateBy; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getUpdateBy$(){ | 
|---|
|  |  |  | if (Cools.isEmpty(this.updateBy)){ | 
|---|
|  |  |  | return ""; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateBy); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public void setUpdateBy(Date updateBy) { | 
|---|
|  |  |  | this.updateBy = updateBy; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public String getMemo() { | 
|---|
|  |  |  | return memo; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private Integer type; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private String waveId; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | void updateStatus(@Param("orderNo") String order); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void changeSettleTo12(@Param("orderNo") String orderIds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void updateWrkSts(@Param("wrkNo") String wrkNo, @Param("docNum") String docNum, @Param("wrkSts") Integer wrkSts, @Param("userId") Long userId, @Param("hostId") | 
|---|
|  |  |  | Long hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | package zy.cloud.wms.manager.mapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Param; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Pickout; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.mapper.BaseMapper; | 
|---|
|  |  |  | import org.apache.ibatis.annotations.Mapper; | 
|---|
|  |  |  | 
|---|
|  |  |  | @Repository | 
|---|
|  |  |  | public interface PickoutMapper extends BaseMapper<Pickout> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void updateWaveStatus(@Param("waveNo") String waveNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | void updateStatus(String order); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void changeSettleTo12(String orderIds); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void stockOutPrint(String wrkNo, String docNumber, Long userId, Long hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface PickoutService extends IService<Pickout> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void updateWaveStatus(String waveNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | package zy.cloud.wms.manager.service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.core.common.R; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.PickOutDto; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Wave; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.service.IService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | public interface WaveService extends IService<Wave> { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | void createOut(Wave wave, Long userId, Long hostId); | 
|---|
|  |  |  | R createOut(List<PickOutDto> pickOutDtosk, Long userId, Long hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | R stockCheckAuditing(Long checkId, Long userId, Long hostId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | R initOutOrder(InitOrderParam param, Long userId, Long hostId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | R wavePreview(StockOutParam stockOutParam, Long userId, Long hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | this.baseMapper.changeSettleTo12(orderIds); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void stockOutPrint(String wrkNo, String docNumber, Long userId, Long hostId) { | 
|---|
|  |  |  | this.baseMapper.updateWrkSts(wrkNo, docNumber, 7, userId, hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public Boolean stockOutPrint(String wrkNo, String docNum, Long userId, Long hostId) { | 
|---|
|  |  |  | return this.baseMapper.updateWrkSts(wrkNo, docNum, 2, userId, hostId)>0; | 
|---|
|  |  |  | boolean b = this.baseMapper.updateWrkSts(wrkNo, docNum, 7, userId, hostId) > 0; | 
|---|
|  |  |  | return b; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  | @Service("pickoutService") | 
|---|
|  |  |  | public class PickoutServiceImpl extends ServiceImpl<PickoutMapper, Pickout> implements PickoutService { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void updateWaveStatus(String waveNo) { | 
|---|
|  |  |  | this.baseMapper.updateWaveStatus(waveNo); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.baomidou.mybatisplus.mapper.EntityWrapper; | 
|---|
|  |  |  | import com.core.common.Cools; | 
|---|
|  |  |  | import com.core.common.R; | 
|---|
|  |  |  | import com.core.exception.CoolException; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.WaveDetl; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.PickOutDto; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.*; | 
|---|
|  |  |  | import zy.cloud.wms.manager.mapper.WaveMapper; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.Wave; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.OrderService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.WaveDetlService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.WaveService; | 
|---|
|  |  |  | import zy.cloud.wms.manager.service.*; | 
|---|
|  |  |  | import com.baomidou.mybatisplus.service.impl.ServiceImpl; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.text.SimpleDateFormat; | 
|---|
|  |  |  | import java.util.ArrayList; | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | import java.util.HashSet; | 
|---|
|  |  |  | import java.util.List; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | private OrderService orderService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaveService waveService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutService pickoutService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private PickoutDetlService pickoutDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private MatService matService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 通过波次生成拣货单 | 
|---|
|  |  |  | * @param wave | 
|---|
|  |  |  | * @param | 
|---|
|  |  |  | * @param userId | 
|---|
|  |  |  | * @param hostId | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public void createOut(Wave wave, Long userId, Long hostId) { | 
|---|
|  |  |  | public R createOut(List<PickOutDto> pickOutDtosk, Long userId, Long hostId) { | 
|---|
|  |  |  | HashSet<String> orderIds = new HashSet<>(); | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 控管 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | if (Cools.isEmpty(pickOutDtosk)) { | 
|---|
|  |  |  | throw new CoolException("数据传输错误,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Wave wave = waveService.selectOne(new EntityWrapper<Wave>() | 
|---|
|  |  |  | .eq("id", pickOutDtosk.get(0).getWaveId())); | 
|---|
|  |  |  | List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() | 
|---|
|  |  |  | .eq("wave_id", wave.getId())); | 
|---|
|  |  |  | if (Cools.isEmpty(waveDetls)) { | 
|---|
|  |  |  | throw new CoolException("找不到该波次单的详情,请联系管理员"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 生成拣货单 | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | Pickout pickout = new Pickout(); | 
|---|
|  |  |  | pickout.setHostId(hostId); | 
|---|
|  |  |  | pickout.setUserId(userId); | 
|---|
|  |  |  | pickout.setWrkNo("PO-"+new SimpleDateFormat("yyyyMMddHHmmss").format(new Date())); | 
|---|
|  |  |  | pickout.setWrkSts(1L); | 
|---|
|  |  |  | pickout.setCreateBy(userId.intValue()); | 
|---|
|  |  |  | pickout.setUpdateBy(userId.intValue()); | 
|---|
|  |  |  | pickout.setOrderQty(wave.getOrdersQty()); | 
|---|
|  |  |  | pickout.setWaveNo(wave.getWaveNo()); | 
|---|
|  |  |  | pickoutService.insert(pickout); | 
|---|
|  |  |  | for (PickOutDto pickOutDto : pickOutDtosk) { | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(hostId, pickOutDto.getMatnr()); | 
|---|
|  |  |  | if (Cools.isEmpty(mat)) { | 
|---|
|  |  |  | pickoutService.delete(new EntityWrapper<Pickout>() | 
|---|
|  |  |  | .eq("id",pickout.getId())); | 
|---|
|  |  |  | throw new CoolException("查询不到该物料明细"); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | PickoutDetl pickoutDetl = new PickoutDetl(); | 
|---|
|  |  |  | pickoutDetl.setHeadId(pickout.getId()); | 
|---|
|  |  |  | pickoutDetl.setNodeId(pickOutDto.getNodeId().longValue()); | 
|---|
|  |  |  | pickoutDetl.setNodeName(pickOutDto.getLocNo()); | 
|---|
|  |  |  | pickoutDetl.setAnfme(pickOutDto.getAnfme().doubleValue()); | 
|---|
|  |  |  | pickoutDetl.setMatnr(pickOutDto.getMatnr()); | 
|---|
|  |  |  | pickoutDetl.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | pickoutDetl.setName(mat.getName()); | 
|---|
|  |  |  | pickoutDetl.setSpecs(mat.getSpecs()); | 
|---|
|  |  |  | pickoutDetl.setModel(mat.getModel()); | 
|---|
|  |  |  | pickoutDetl.setUnit(mat.getUnit()); | 
|---|
|  |  |  | pickoutDetl.setPrice(mat.getPrice()); | 
|---|
|  |  |  | pickoutDetl.setWeight(mat.getWeight()); | 
|---|
|  |  |  | pickoutDetl.setStatus(1); | 
|---|
|  |  |  | pickoutDetl.setCreateBy(userId.intValue()); | 
|---|
|  |  |  | pickoutDetl.setUpdateBy(userId.intValue()); | 
|---|
|  |  |  | pickoutDetl.setWrkNo(pickout.getWrkNo()); | 
|---|
|  |  |  | pickoutDetlService.insert(pickoutDetl); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | wave.setStatus((short) 1); | 
|---|
|  |  |  | waveService.update(wave,new EntityWrapper<Wave>() | 
|---|
|  |  |  | .eq("id",wave.getId())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | import zy.cloud.wms.common.model.MatnrDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.OrderStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.ReceiveStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.model.WaveStoDto; | 
|---|
|  |  |  | import zy.cloud.wms.common.service.MainService; | 
|---|
|  |  |  | import zy.cloud.wms.common.utils.VersionUtils; | 
|---|
|  |  |  | import zy.cloud.wms.manager.entity.*; | 
|---|
|  |  |  | 
|---|
|  |  |  | private ReceiveDetlService receiveDetlService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | ReceiveLogService receiveLogService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaveService waveService; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private WaveDetlService waveDetlService; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R stockOutPreview(StockOutParam param, Long userId, Long hostId) { | 
|---|
|  |  |  | Wrapper<Receive> wrapper = new EntityWrapper<Receive>() | 
|---|
|  |  |  | Wrapper<Order> wrapper = new EntityWrapper<Order>() | 
|---|
|  |  |  | .eq("order_no", param.getOrderNo()); | 
|---|
|  |  |  | if (hostId != null) { | 
|---|
|  |  |  | wrapper.eq("host_id", hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Receive order_no = receiveService.selectOne(wrapper); | 
|---|
|  |  |  | Order order_no = orderService.selectOne(wrapper); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (order_no.getSettle() != 1){ | 
|---|
|  |  |  | return R.error("此单据无法生成拣货单"); | 
|---|
|  |  |  | 
|---|
|  |  |  | //        if (order.getSettle() != 1) { | 
|---|
|  |  |  | //            return R.error("此单据无法生成拣货单"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | List<ReceiveDetl> receiveDetls = receiveDetlService.selectByOrderNo(order_no.getOrderNo(), hostId); | 
|---|
|  |  |  | if (Cools.isEmpty(receiveDetls)) { | 
|---|
|  |  |  | List<OrderDetl> orderDetls = orderDetlService.selectByOrderNo(order_no.getOrderNo(), hostId); | 
|---|
|  |  |  | if (Cools.isEmpty(orderDetls)) { | 
|---|
|  |  |  | return R.error("此单据已失效,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        List<OrderDetl> orderDetls = orderDetlService.selectByOrderNo(order.getOrderNo(), hostId); | 
|---|
|  |  |  | 
|---|
|  |  |  | //            return R.error("此单据已失效,请联系管理员"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ReceiveStoDto receiveStoDto = new ReceiveStoDto().create(order_no.getOrderNo(), receiveDetls); | 
|---|
|  |  |  | OrderStoDto orderStoDto = new OrderStoDto().create(order_no.getOrderNo(), orderDetls); | 
|---|
|  |  |  | //        OrderStoDto dto = new OrderStoDto().create(order.getOrderNo(), orderDetls); | 
|---|
|  |  |  | return R.ok().add(mainService.receiveStockOutPreview(receiveStoDto, hostId)); | 
|---|
|  |  |  | return R.ok().add(mainService.orderOutPreview(orderStoDto, hostId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R stockOutCreate(StockOutParam param, Long userId, Long hostId) { | 
|---|
|  |  |  | Receive receive = receiveService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | //        Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | if (receive.getSettle() != 1) { | 
|---|
|  |  |  | //        Receive receive = receiveService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | if (order.getSettle() != 1) { | 
|---|
|  |  |  | return R.error("此单据无法生成拣货单"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | List<ReceiveDetl> receiveDetls = receiveDetlService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | List<OrderDetl> orderDetls = orderDetlService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | //        List<OrderDetl> orderDetls = orderDetlService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | if (Cools.isEmpty(receiveDetls)) { | 
|---|
|  |  |  | if (Cools.isEmpty(orderDetls)) { | 
|---|
|  |  |  | return R.error("此单据已失效,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ReceiveStoDto receiveStoDto = new ReceiveStoDto().create(receive.getOrderNo(), receiveDetls); | 
|---|
|  |  |  | OrderStoDto orderStoDto = new OrderStoDto().create(order.getOrderNo(), orderDetls); | 
|---|
|  |  |  | //        OrderStoDto dto = new OrderStoDto().create(receive.getOrderNo(), receiveDetls); | 
|---|
|  |  |  | // 开始整理出库数据 | 
|---|
|  |  |  | mainService.receiveStockOutProcess(receiveStoDto,hostId); | 
|---|
|  |  |  | mainService.orderStockOutProcess(orderStoDto,hostId,userId); | 
|---|
|  |  |  | return R.ok("生成拣货单成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | order1.setOrderNo(param.getOrderNo()); | 
|---|
|  |  |  | order1.setOrderTime(param.getOrderTime()); | 
|---|
|  |  |  | order1.setDocType(param.getDocType()); | 
|---|
|  |  |  | order1.setItemId(item.getId()); | 
|---|
|  |  |  | order1.setItemId(item == null? null : item.getId()); | 
|---|
|  |  |  | order1.setItemName(param.getItem()); | 
|---|
|  |  |  | order1.setCstmr(cstmr.getId()); | 
|---|
|  |  |  | order1.setCstmr(cstmr == null? null : cstmr.getId()); | 
|---|
|  |  |  | order1.setCstmrName(param.getCstmr()); | 
|---|
|  |  |  | order1.setSettle(1L); | 
|---|
|  |  |  | order1.setStatus(1); | 
|---|
|  |  |  | 
|---|
|  |  |  | log.error("{}商品不存在。", dto.getMatnr()); | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ReceiveDetl receiveDetl = new ReceiveDetl(); | 
|---|
|  |  |  | receiveDetl.setHostId(hostId); | 
|---|
|  |  |  | receiveDetl.setOrderId(order1.getId()); | 
|---|
|  |  |  | receiveDetl.setAnfme(dto.getCount()); | 
|---|
|  |  |  | receiveDetl.setCreateTime(now); | 
|---|
|  |  |  | receiveDetl.setCreateBy(userId); | 
|---|
|  |  |  | receiveDetl.setUpdateBy(userId); | 
|---|
|  |  |  | receiveDetl.setUpdateTime(now); | 
|---|
|  |  |  | receiveDetl.setStatus(1); | 
|---|
|  |  |  | receiveDetl.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | receiveDetl.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | receiveDetl.setName(mat.getName()); | 
|---|
|  |  |  | receiveDetl.setSpecs(mat.getSpecs()); | 
|---|
|  |  |  | receiveDetl.setModel(mat.getModel()); | 
|---|
|  |  |  | receiveDetl.setBatch(mat.getBatch()); | 
|---|
|  |  |  | receiveDetl.setUnit(mat.getUnit()); | 
|---|
|  |  |  | receiveDetl.setBarcode(mat.getBarcode()); | 
|---|
|  |  |  | receiveDetl.setItemNum(mat.getItemNum()); | 
|---|
|  |  |  | receiveDetl.setCount(Double.valueOf(mat.getCount())); | 
|---|
|  |  |  | receiveDetl.setUnitPrice(mat.getPrice()); | 
|---|
|  |  |  | receiveDetl.setWeight(mat.getWeight()); | 
|---|
|  |  |  | if (!receiveDetlService.insert(receiveDetl)) { | 
|---|
|  |  |  | OrderDetl orderDetl = new OrderDetl(); | 
|---|
|  |  |  | orderDetl.setHostId(hostId); | 
|---|
|  |  |  | orderDetl.setOrderId(order1.getId()); | 
|---|
|  |  |  | orderDetl.setAnfme(dto.getCount()); | 
|---|
|  |  |  | orderDetl.setCreateTime(now); | 
|---|
|  |  |  | orderDetl.setCreateBy(userId); | 
|---|
|  |  |  | orderDetl.setUpdateBy(userId); | 
|---|
|  |  |  | orderDetl.setUpdateTime(now); | 
|---|
|  |  |  | orderDetl.setStatus(1); | 
|---|
|  |  |  | orderDetl.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | orderDetl.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | orderDetl.setName(mat.getName()); | 
|---|
|  |  |  | orderDetl.setSpecs(mat.getSpecs()); | 
|---|
|  |  |  | orderDetl.setModel(mat.getModel()); | 
|---|
|  |  |  | orderDetl.setBatch(mat.getBatch()); | 
|---|
|  |  |  | orderDetl.setUnit(mat.getUnit()); | 
|---|
|  |  |  | orderDetl.setBarcode(mat.getBarcode()); | 
|---|
|  |  |  | orderDetl.setItemNum(mat.getItemNum()); | 
|---|
|  |  |  | orderDetl.setCount(mat.getCount() == null ? 0 : mat.getCount()); | 
|---|
|  |  |  | orderDetl.setUnitPrice(mat.getPrice()); | 
|---|
|  |  |  | orderDetl.setWeight(mat.getWeight()); | 
|---|
|  |  |  | if (!orderDetlService.insert(orderDetl)) { | 
|---|
|  |  |  | throw new CoolException("保存订单明细失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | return R.ok(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | //    @Transactional | 
|---|
|  |  |  | public R initOutOrder(InitOrderParam param, Long userId, Long hostId) { | 
|---|
|  |  |  | Order order_no = orderService.selectOne(new EntityWrapper<Order>() | 
|---|
|  |  |  | .eq("order_no", param.getOrderNo())); | 
|---|
|  |  |  | //        Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | if (order_no != null) { | 
|---|
|  |  |  | return R.error("抱歉单号已存在,请修改单号"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Date now = new Date(); | 
|---|
|  |  |  | Item item = itemService.selectByName(param.getItem()); | 
|---|
|  |  |  | Cstmr cstmr = cstmrService.selectByName(param.getCstmr()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 新增订单表头 | 
|---|
|  |  |  | order_no = new Order(); | 
|---|
|  |  |  | order_no.setHostId(hostId); | 
|---|
|  |  |  | order_no.setUuid(String.valueOf(snowflakeIdWorker.nextId())); | 
|---|
|  |  |  | order_no.setOrderNo(param.getOrderNo()); | 
|---|
|  |  |  | order_no.setOrderTime(param.getOrderTime()); | 
|---|
|  |  |  | order_no.setDocType(param.getDocType()); | 
|---|
|  |  |  | order_no.setItemId(item==null?null:item.getId()); | 
|---|
|  |  |  | order_no.setItemName(param.getItem()); | 
|---|
|  |  |  | order_no.setCstmr(cstmr==null?null:cstmr.getId()); | 
|---|
|  |  |  | order_no.setCstmrName(param.getCstmr()); | 
|---|
|  |  |  | order_no.setSettle(1L); | 
|---|
|  |  |  | order_no.setStatus(1); | 
|---|
|  |  |  | order_no.setCreateTime(now); | 
|---|
|  |  |  | order_no.setCreateBy(userId); | 
|---|
|  |  |  | order_no.setUpdateTime(now); | 
|---|
|  |  |  | order_no.setUpdateBy(userId); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        if (!orderService.insert(order)) { | 
|---|
|  |  |  | //            throw new CoolException("保存订单表头失败!"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | if (!orderService.insert(order_no)) { | 
|---|
|  |  |  | throw new CoolException("保存订单表头失败!"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //        // 遍历商品数量并保存 | 
|---|
|  |  |  | //        for (MatnrDto dto : param.getList()){ | 
|---|
|  |  |  | //            Mat mat = matService.selectByMatnr(hostId, dto.getMatnr()); | 
|---|
|  |  |  | //            if (mat == null) { | 
|---|
|  |  |  | //                log.error("{}商品不存在。", dto.getMatnr()); | 
|---|
|  |  |  | //                continue; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            OrderDetl orderDetl = new OrderDetl(); | 
|---|
|  |  |  | //            orderDetl.setHostId(hostId); | 
|---|
|  |  |  | //            orderDetl.setOrderId(order.getId());  // 订单内码 | 
|---|
|  |  |  | //            orderDetl.setAnfme(dto.getCount());         // 数量 | 
|---|
|  |  |  | //            orderDetl.setCreateBy(userId); | 
|---|
|  |  |  | //            orderDetl.setCreateTime(now); | 
|---|
|  |  |  | //            orderDetl.setUpdateBy(userId); | 
|---|
|  |  |  | //            orderDetl.setUpdateTime(now); | 
|---|
|  |  |  | //            orderDetl.setStatus(1); | 
|---|
|  |  |  | //            VersionUtils.setOrderDetl(orderDetl, mat); | 
|---|
|  |  |  | //            if (!orderDetlService.insert(orderDetl)) { | 
|---|
|  |  |  | //                throw new CoolException("保存订单明细失败"); | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | // 遍历商品数量并保存 | 
|---|
|  |  |  | for (MatnrDto dto : param.getList()){ | 
|---|
|  |  |  | Mat mat = matService.selectByMatnr(hostId, dto.getMatnr()); | 
|---|
|  |  |  | if (mat == null) { | 
|---|
|  |  |  | log.error("{}商品不存在。", dto.getMatnr()); | 
|---|
|  |  |  | continue; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | OrderDetl orderDtel = new OrderDetl(); | 
|---|
|  |  |  | orderDtel.setHostId(hostId); | 
|---|
|  |  |  | orderDtel.setOrderId(order_no.getId()); | 
|---|
|  |  |  | orderDtel.setAnfme(dto.getCount()); | 
|---|
|  |  |  | orderDtel.setCreateTime(now); | 
|---|
|  |  |  | orderDtel.setCreateBy(userId); | 
|---|
|  |  |  | orderDtel.setUpdateBy(userId); | 
|---|
|  |  |  | orderDtel.setUpdateTime(now); | 
|---|
|  |  |  | orderDtel.setStatus(1); | 
|---|
|  |  |  | orderDtel.setMatnr(mat.getMatnr()); | 
|---|
|  |  |  | orderDtel.setMaktx(mat.getMaktx()); | 
|---|
|  |  |  | orderDtel.setName(mat.getName()); | 
|---|
|  |  |  | orderDtel.setSpecs(mat.getSpecs()); | 
|---|
|  |  |  | orderDtel.setModel(mat.getModel()); | 
|---|
|  |  |  | orderDtel.setBatch(mat.getBatch()); | 
|---|
|  |  |  | orderDtel.setUnit(mat.getUnit()); | 
|---|
|  |  |  | orderDtel.setBarcode(mat.getBarcode()); | 
|---|
|  |  |  | orderDtel.setItemNum(mat.getItemNum()); | 
|---|
|  |  |  | orderDtel.setCount(mat.getCount() == null ? 0 : mat.getCount()); | 
|---|
|  |  |  | orderDtel.setUnitPrice(mat.getPrice()); | 
|---|
|  |  |  | orderDtel.setWeight(mat.getWeight()); | 
|---|
|  |  |  | if (!orderDetlService.insert(orderDtel)) { | 
|---|
|  |  |  | throw new CoolException("保存订单明细失败"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return R.ok("创建订单成功"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public R wavePreview(StockOutParam stockOutParam, Long userId, Long hostId) { | 
|---|
|  |  |  | Wrapper<Wave> wrapper = new EntityWrapper<Wave>() | 
|---|
|  |  |  | .eq("id", stockOutParam.getOrderNo()); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (hostId != null) { | 
|---|
|  |  |  | wrapper.eq("host_id", hostId); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | Wave wave = waveService.selectOne(wrapper); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (wave.getStatus() != 0){ | 
|---|
|  |  |  | return R.error("此单据无法生成拣货单"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        Order order = orderService.selectByOrderNo(param.getOrderNo(), hostId); | 
|---|
|  |  |  | //        if (order.getSettle() != 1) { | 
|---|
|  |  |  | //            return R.error("此单据无法生成拣货单"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  | List<WaveDetl> waveDetls = waveDetlService.selectList(new EntityWrapper<WaveDetl>() | 
|---|
|  |  |  | .eq("wave_id", stockOutParam.getOrderNo())); | 
|---|
|  |  |  | if (Cools.isEmpty(waveDetls)) { | 
|---|
|  |  |  | return R.error("此单据已失效,请联系管理员"); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | //        List<OrderDetl> orderDetls = orderDetlService.selectByOrderNo(order.getOrderNo(), hostId); | 
|---|
|  |  |  | //        if (Cools.isEmpty(orderDetls)) { | 
|---|
|  |  |  | //            return R.error("此单据已失效,请联系管理员"); | 
|---|
|  |  |  | //        } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | WaveStoDto waveStoDto = new WaveStoDto().create(stockOutParam.getOrderNo(),waveDetls); | 
|---|
|  |  |  | //        OrderStoDto dto = new OrderStoDto().create(order.getOrderNo(), orderDetls); | 
|---|
|  |  |  | return R.ok().add(mainService.waveOutPreview(waveStoDto, hostId)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <update id="updateSettle"> | 
|---|
|  |  |  | update man_receive set settle = #{settle} where 1=1 and order_no = #{orderNo} and host_id = #{hostId} | 
|---|
|  |  |  | update man_order set settle = #{settle} where 1=1 and order_no = #{orderNo} and host_id = #{hostId} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  | <update id="updateStatus"> | 
|---|
|  |  |  | UPDATE man_order set settle = 2, wave_no = null WHERE order_no = #{orderNo} | 
|---|
|  |  |  | 
|---|
|  |  |  | <update id="changeSettleTo12"> | 
|---|
|  |  |  | UPDATE man_order set settle = 12 Where 1 = 1 and order_no = #{orderNo} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  | <update id="updateWrkSts"> | 
|---|
|  |  |  | update man_order | 
|---|
|  |  |  | set wrk_sts = #{wrkSts} | 
|---|
|  |  |  | , update_by = #{userId} | 
|---|
|  |  |  | , update_time = getdate() | 
|---|
|  |  |  | where 1=1 | 
|---|
|  |  |  | <if test="hostId != null and hostId != ''"> | 
|---|
|  |  |  | and host_id = #{hostId} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="wrkNo != null and wrkNo != ''"> | 
|---|
|  |  |  | and wrk_no = #{wrkNo} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="docNum != null and docNum != ''"> | 
|---|
|  |  |  | and order_no = #{docNum} | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <select id="getPage" resultMap="BaseResultMap"> | 
|---|
|  |  |  | select * from | 
|---|
|  |  |  | 
|---|
|  |  |  | <result column="update_time" property="updateTime" /> | 
|---|
|  |  |  | <result column="update_by" property="updateBy" /> | 
|---|
|  |  |  | <result column="memo" property="memo" /> | 
|---|
|  |  |  | <result column="wrk_no" property="wrkNo" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | <result column="update_time" property="updateTime" /> | 
|---|
|  |  |  | <result column="update_by" property="updateBy" /> | 
|---|
|  |  |  | <result column="memo" property="memo" /> | 
|---|
|  |  |  | <result column="order_qty" property="orderQty" /> | 
|---|
|  |  |  | <result column="order_nos" property="orderNos" /> | 
|---|
|  |  |  | <result column="wave_no" property="waveNo" /> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  | <update id="updateWaveStatus"> | 
|---|
|  |  |  | update man_wave set status = 0 where wave_no = #{waveNo} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </mapper> | 
|---|
|  |  |  | 
|---|
|  |  |  | // 单据类型 | 
|---|
|  |  |  | var docTypeData; | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/work/docType/all/get", | 
|---|
|  |  |  | url: baseUrl+"/work/docType/out/get", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data:{docClass: 2}, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 表格搜索 */ | 
|---|
|  |  |  | form.on('submit(docTypeTableSearch)', function (data) { | 
|---|
|  |  |  | insTb.reload({where: {doc_name: data.field.docName,doc_class:2}}); | 
|---|
|  |  |  | 
|---|
|  |  |  | var form = layui.form; | 
|---|
|  |  |  | var admin = layui.admin; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 数据渲染 | 
|---|
|  |  |  | tableIns = table.render({ | 
|---|
|  |  |  | elem: '#pickout', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | url: baseUrl+'/pickout/list/auth', | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | limit: 16, | 
|---|
|  |  |  | limits: [16, 30, 50, 100, 200, 500], | 
|---|
|  |  |  | toolbar: '#toolbar', | 
|---|
|  |  |  | cellMinWidth: 50, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {type: 'checkbox'} | 
|---|
|  |  |  | ,{field: 'id', align: 'center',title: '唯一ID'} | 
|---|
|  |  |  | ,{field: 'hostId', align: 'center',title: '商户ID'} | 
|---|
|  |  |  | ,{field: 'userId', align: 'center',title: '用户ID'} | 
|---|
|  |  |  | ,{field: 'wrkNo', align: 'center',title: '工作号'} | 
|---|
|  |  |  | ,{field: 'wrkSts', align: 'center',title: '工作状态'} | 
|---|
|  |  |  | ,{field: 'zpallet', align: 'center',title: '条形码'} | 
|---|
|  |  |  | ,{field: 'createTime$', align: 'center',title: ''} | 
|---|
|  |  |  | ,{field: 'createBy', align: 'center',title: ''} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: ''} | 
|---|
|  |  |  | ,{field: 'updateBy', align: 'center',title: ''} | 
|---|
|  |  |  | ,{field: 'memo', align: 'center',title: ''} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | /****************************************** 左边表 *************************************************/ | 
|---|
|  |  |  | var leftTB = table.render({ | 
|---|
|  |  |  | elem: '#leftTable', | 
|---|
|  |  |  | url: baseUrl + '/pickout/list/auth', | 
|---|
|  |  |  | height: 'full-100', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | request: { | 
|---|
|  |  |  | pageName: 'curr', | 
|---|
|  |  |  | pageSize: 'limit' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | parseData: function (res) { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | 'code': res.code, | 
|---|
|  |  |  | 'msg': res.msg, | 
|---|
|  |  |  | 'count': res.data.total, | 
|---|
|  |  |  | 'data': res.data.records | 
|---|
|  |  |  | } | 
|---|
|  |  |  | parseData: function (res){ | 
|---|
|  |  |  | return{ | 
|---|
|  |  |  | 'code': res.code, | 
|---|
|  |  |  | 'msg': res.msg, | 
|---|
|  |  |  | 'count': res.data.total, | 
|---|
|  |  |  | 'data': res.data.records | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | response: { | 
|---|
|  |  |  | statusCode: 200 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | done: function(res, curr, count) { | 
|---|
|  |  |  | if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pageCurr=curr; | 
|---|
|  |  |  | limit(); | 
|---|
|  |  |  | defaultToolbar: [], | 
|---|
|  |  |  | cols:[[ | 
|---|
|  |  |  | // {type: 'checkbox'} | 
|---|
|  |  |  | {field: 'wrkNo', align: 'center',title: '任务号',width: 180} | 
|---|
|  |  |  | ,{field: 'id', align: 'center',title: '唯一ID',hide: true} | 
|---|
|  |  |  | ,{field: 'hostId', align: 'center',title: '商户ID', hide: true} | 
|---|
|  |  |  | ,{field: 'userId', align: 'center',title: '用户ID', hide: true} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ,{field: 'wrkSts$', align: 'center',title: '工作状态' ,templet: '#wrkStsTpl' , width: 100} | 
|---|
|  |  |  | ,{field: 'zpallet', align: 'center',title: '条形码' , hide:true} | 
|---|
|  |  |  | ,{field: 'createTime$', align: 'center',title: '', hide:true} | 
|---|
|  |  |  | ,{field: 'createBy', align: 'center',title: '', hide:true} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: '', hide:true} | 
|---|
|  |  |  | ,{field: 'updateBy', align: 'center',title: '', hide:true} | 
|---|
|  |  |  | ,{field: 'memo', align: 'center',title: '', hide:true} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate'} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | done: function (res,curr,count){ | 
|---|
|  |  |  | $('#dictTable+.layui-table-view .layui-table-body tbody>tr:first').trigger('click'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听排序事件 | 
|---|
|  |  |  | table.on('sort(pickout)', function (obj) { | 
|---|
|  |  |  | var searchData = {}; | 
|---|
|  |  |  | $.each($('#search-box [name]').serializeArray(), function() { | 
|---|
|  |  |  | searchData[this.name] = this.value; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | searchData['orderByField'] = obj.field; | 
|---|
|  |  |  | searchData['orderByType'] = obj.type; | 
|---|
|  |  |  | tableIns.reload({ | 
|---|
|  |  |  | where: searchData, | 
|---|
|  |  |  | page: {curr: 1} | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听头工具栏事件 | 
|---|
|  |  |  | table.on('toolbar(pickout)', function (obj) { | 
|---|
|  |  |  | var checkStatus = table.checkStatus(obj.config.id).data; | 
|---|
|  |  |  | switch(obj.event) { | 
|---|
|  |  |  | case 'addData': | 
|---|
|  |  |  | showEditModel(); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'deleteData': | 
|---|
|  |  |  | if (checkStatus.length === 0) { | 
|---|
|  |  |  | layer.msg('请选择要删除的数据', {icon: 2}); | 
|---|
|  |  |  | return; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | var ids = checkStatus.map(function (d) { | 
|---|
|  |  |  | return d.id; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | del(ids); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case 'exportData': | 
|---|
|  |  |  | layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ | 
|---|
|  |  |  | var titles=[]; | 
|---|
|  |  |  | var fields=[]; | 
|---|
|  |  |  | obj.config.cols[0].map(function (col) { | 
|---|
|  |  |  | if (col.type === 'normal' && col.hide === false && col.toolbar == null) { | 
|---|
|  |  |  | titles.push(col.title); | 
|---|
|  |  |  | fields.push(col.field); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | var exportData = {}; | 
|---|
|  |  |  | $.each($('#search-box [name]').serializeArray(), function() { | 
|---|
|  |  |  | exportData[this.name] = this.value; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | var param = { | 
|---|
|  |  |  | 'pickout': exportData, | 
|---|
|  |  |  | 'fields': fields | 
|---|
|  |  |  | }; | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/pickout/export/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data: JSON.stringify(param), | 
|---|
|  |  |  | dataType:'json', | 
|---|
|  |  |  | contentType:'application/json;charset=UTF-8', | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | layer.closeAll(); | 
|---|
|  |  |  | if (res.code === 200) { | 
|---|
|  |  |  | table.exportFile(titles,res.data,'xls'); | 
|---|
|  |  |  | } else if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 监听行工具事件 | 
|---|
|  |  |  | table.on('tool(pickout)', function(obj){ | 
|---|
|  |  |  | table.on('tool(leftTable)', function(obj){ | 
|---|
|  |  |  | var data = obj.data; | 
|---|
|  |  |  | switch (obj.event) { | 
|---|
|  |  |  | case 'edit': | 
|---|
|  |  |  | showEditModel(data); | 
|---|
|  |  |  | case 'complete': | 
|---|
|  |  |  | complete(data); | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | case "del": | 
|---|
|  |  |  | var ids = [data.id]; | 
|---|
|  |  |  | 
|---|
|  |  |  | break; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 弹窗 - 新增、修改 */ | 
|---|
|  |  |  | function showEditModel(mData) { | 
|---|
|  |  |  | admin.open({ | 
|---|
|  |  |  | type: 1, | 
|---|
|  |  |  | area: '600px', | 
|---|
|  |  |  | title: (mData ? '修改' : '添加') + '订单状态', | 
|---|
|  |  |  | content: $('#editDialog').html(), | 
|---|
|  |  |  | success: function (layero, dIndex) { | 
|---|
|  |  |  | layDateRender(); | 
|---|
|  |  |  | form.val('detail', mData); | 
|---|
|  |  |  | form.on('submit(editSubmit)', function (data) { | 
|---|
|  |  |  | var loadIndex = layer.load(2); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl+"/pickout/"+(mData?'update':'add')+"/auth", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | data: data.field, | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | layer.close(loadIndex); | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | layer.close(dIndex); | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 1}); | 
|---|
|  |  |  | tableReload(); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | }else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | $(layero).children('.layui-layer-content').css('overflow', 'visible'); | 
|---|
|  |  |  | layui.form.render('select'); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | /* 监听行单击事件 */ | 
|---|
|  |  |  | var selObj; | 
|---|
|  |  |  | table.on('row(leftTable)', function (obj) { | 
|---|
|  |  |  | selObj = obj; | 
|---|
|  |  |  | obj.tr.addClass('layui-table-click').siblings().removeClass('layui-table-click'); | 
|---|
|  |  |  | tableIns.reload({where: {head_id: obj.data.id}, page: {curr: 1}}); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 删除 */ | 
|---|
|  |  |  | function del(ids) { | 
|---|
|  |  |  | layer.confirm('确定要删除选中数据吗?', { | 
|---|
|  |  |  | layer.confirm('确定要撤销选中数据吗?', { | 
|---|
|  |  |  | skin: 'layui-layer-admin', | 
|---|
|  |  |  | shade: .1 | 
|---|
|  |  |  | }, function (i) { | 
|---|
|  |  |  | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | form.on('submit(leftResearch)', function (data) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 搜索 | 
|---|
|  |  |  | form.on('submit(search)', function (data) { | 
|---|
|  |  |  | pageCurr = 1; | 
|---|
|  |  |  | tableReload(false); | 
|---|
|  |  |  | leftTB.reload({where: {wrk_no: data.field.docName}}); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 重置 | 
|---|
|  |  |  | form.on('submit(reset)', function (data) { | 
|---|
|  |  |  | pageCurr = 1; | 
|---|
|  |  |  | clearFormVal($('#search-box')); | 
|---|
|  |  |  | tableReload(false); | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /****************************************** 右边表 *************************************************/ | 
|---|
|  |  |  | // 数据渲染 | 
|---|
|  |  |  | tableIns = table.render({ | 
|---|
|  |  |  | elem: '#pickout', | 
|---|
|  |  |  | headers: {token: localStorage.getItem('token')}, | 
|---|
|  |  |  | url: baseUrl+'/pickoutDetl/list/auth', | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | limit: 16, | 
|---|
|  |  |  | limits: [16, 30, 50, 100, 200, 500], | 
|---|
|  |  |  | toolbar: '#toolbar', | 
|---|
|  |  |  | cellMinWidth: 50, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | // {type: 'checkbox'} | 
|---|
|  |  |  | {field: 'id', align: 'center',title: '唯一ID', hide:true} | 
|---|
|  |  |  | ,{field: 'headId', align: 'center',title: '表头ID', hide:true} | 
|---|
|  |  |  | ,{field: 'nodeId', align: 'center',title: '库位ID', hide:true} | 
|---|
|  |  |  | ,{field: 'nodeName', align: 'center',title: '库位名称'} | 
|---|
|  |  |  | ,{field: 'anfme', align: 'center',title: '数量'} | 
|---|
|  |  |  | ,{field: 'matnr', align: 'center',title: '商品编码'} | 
|---|
|  |  |  | ,{field: 'maktx', align: 'center',title: '商品名称'} | 
|---|
|  |  |  | ,{field: 'name', align: 'center',title: '名称', hide:true} | 
|---|
|  |  |  | ,{field: 'specs', align: 'center',title: '规格', hide:true} | 
|---|
|  |  |  | ,{field: 'model', align: 'center',title: '型号', hide:true} | 
|---|
|  |  |  | ,{field: 'batch', align: 'center',title: '批号', hide:true} | 
|---|
|  |  |  | ,{field: 'unit', align: 'center',title: '单位', hide:true} | 
|---|
|  |  |  | ,{field: 'barcode', align: 'center',title: '托盘码', hide:true} | 
|---|
|  |  |  | ,{field: 'docType', align: 'center',title: '单据类型', hide:true} | 
|---|
|  |  |  | ,{field: 'docId', align: 'center',title: '单据编号', hide:true} | 
|---|
|  |  |  | ,{field: 'price', align: 'center',title: '价格', hide:true} | 
|---|
|  |  |  | ,{field: 'weight', align: 'center',title: '重量', hide:true} | 
|---|
|  |  |  | ,{field: 'status', align: 'center',title: '状态' , hide:true} | 
|---|
|  |  |  | ,{field: 'pickStaff', align: 'center',title: '拣货员ID'} | 
|---|
|  |  |  | ,{field: 'pickStart$', align: 'center',title: '拣货开始时间'} | 
|---|
|  |  |  | ,{field: 'pickEnd$', align: 'center',title: '拣货结束时间'} | 
|---|
|  |  |  | ,{field: 'createTime$', align: 'center',title: '创建时间', hide:true} | 
|---|
|  |  |  | ,{field: 'createBy', align: 'center',title: '创建人员ID', hide:true} | 
|---|
|  |  |  | ,{field: 'updateTime$', align: 'center',title: '修改时间', hide:true} | 
|---|
|  |  |  | ,{field: 'updateBy$', align: 'center',title: '修改人员ID', hide:true} | 
|---|
|  |  |  | ,{field: 'memo', align: 'center',title: '备注', hide:true} | 
|---|
|  |  |  |  | 
|---|
|  |  |  | ,{fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:150, hide:true} | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | request: { | 
|---|
|  |  |  | pageName: 'curr', | 
|---|
|  |  |  | pageSize: 'limit' | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | parseData: function (res) { | 
|---|
|  |  |  | return { | 
|---|
|  |  |  | 'code': res.code, | 
|---|
|  |  |  | 'msg': res.msg, | 
|---|
|  |  |  | 'count': res.data.total, | 
|---|
|  |  |  | 'data': res.data.records | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | response: { | 
|---|
|  |  |  | statusCode: 200 | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | done: function(res, curr, count) { | 
|---|
|  |  |  | if (res.code === 403) { | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | pageCurr=curr; | 
|---|
|  |  |  | limit(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | /* 表格2搜索 */ | 
|---|
|  |  |  | form.on('submit(rightSearch)', function (data) { | 
|---|
|  |  |  |  | 
|---|
|  |  |  | tableIns.reload({where: data.field , page: {curr: 1}}); | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | // // 监听排序事件 | 
|---|
|  |  |  | // table.on('sort(pickout)', function (obj) { | 
|---|
|  |  |  | //     var searchData = {}; | 
|---|
|  |  |  | //     $.each($('#search-box [name]').serializeArray(), function() { | 
|---|
|  |  |  | //         searchData[this.name] = this.value; | 
|---|
|  |  |  | //     }); | 
|---|
|  |  |  | //     searchData['orderByField'] = obj.field; | 
|---|
|  |  |  | //     searchData['orderByType'] = obj.type; | 
|---|
|  |  |  | //     tableIns.reload({ | 
|---|
|  |  |  | //         where: searchData, | 
|---|
|  |  |  | //         page: {curr: 1} | 
|---|
|  |  |  | //     }); | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // // 监听头工具栏事件 | 
|---|
|  |  |  | // table.on('toolbar(pickout)', function (obj) { | 
|---|
|  |  |  | //     var checkStatus = table.checkStatus(obj.config.id).data; | 
|---|
|  |  |  | //     switch(obj.event) { | 
|---|
|  |  |  | //         case 'addData': | 
|---|
|  |  |  | //             showEditModel(); | 
|---|
|  |  |  | //             break; | 
|---|
|  |  |  | //         case 'deleteData': | 
|---|
|  |  |  | //            if (checkStatus.length === 0) { | 
|---|
|  |  |  | //                layer.msg('请选择要删除的数据', {icon: 2}); | 
|---|
|  |  |  | //                return; | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | //            var ids = checkStatus.map(function (d) { | 
|---|
|  |  |  | //                return d.id; | 
|---|
|  |  |  | //            }); | 
|---|
|  |  |  | //            del(ids); | 
|---|
|  |  |  | //            break; | 
|---|
|  |  |  | //         case 'exportData': | 
|---|
|  |  |  | //             layer.confirm('确定导出Excel吗', {shadeClose: true}, function(){ | 
|---|
|  |  |  | //                 var titles=[]; | 
|---|
|  |  |  | //                 var fields=[]; | 
|---|
|  |  |  | //                 obj.config.cols[0].map(function (col) { | 
|---|
|  |  |  | //                     if (col.type === 'normal' && col.hide === false && col.toolbar == null) { | 
|---|
|  |  |  | //                         titles.push(col.title); | 
|---|
|  |  |  | //                         fields.push(col.field); | 
|---|
|  |  |  | //                     } | 
|---|
|  |  |  | //                 }); | 
|---|
|  |  |  | //                 var exportData = {}; | 
|---|
|  |  |  | //                 $.each($('#search-box [name]').serializeArray(), function() { | 
|---|
|  |  |  | //                     exportData[this.name] = this.value; | 
|---|
|  |  |  | //                 }); | 
|---|
|  |  |  | //                 var param = { | 
|---|
|  |  |  | //                     'pickout': exportData, | 
|---|
|  |  |  | //                     'fields': fields | 
|---|
|  |  |  | //                 }; | 
|---|
|  |  |  | //                 $.ajax({ | 
|---|
|  |  |  | //                     url: baseUrl+"/pickout/export/auth", | 
|---|
|  |  |  | //                     headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | //                     data: JSON.stringify(param), | 
|---|
|  |  |  | //                     dataType:'json', | 
|---|
|  |  |  | //                     contentType:'application/json;charset=UTF-8', | 
|---|
|  |  |  | //                     method: 'POST', | 
|---|
|  |  |  | //                     success: function (res) { | 
|---|
|  |  |  | //                         layer.closeAll(); | 
|---|
|  |  |  | //                         if (res.code === 200) { | 
|---|
|  |  |  | //                             table.exportFile(titles,res.data,'xls'); | 
|---|
|  |  |  | //                         } else if (res.code === 403) { | 
|---|
|  |  |  | //                             top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | //                         } else { | 
|---|
|  |  |  | //                             layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | //                         } | 
|---|
|  |  |  | //                     } | 
|---|
|  |  |  | //                 }); | 
|---|
|  |  |  | //             }); | 
|---|
|  |  |  | //             break; | 
|---|
|  |  |  | //     } | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | // /* 表格搜索 */ | 
|---|
|  |  |  | // form.on('submit(leftResearch)', function (data) { | 
|---|
|  |  |  | //     insTb.reload({where: {doc_name: data.field.docName,doc_class:2}}); | 
|---|
|  |  |  | //     return false; | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // // 搜索 | 
|---|
|  |  |  | // form.on('submit(search)', function (data) { | 
|---|
|  |  |  | //     pageCurr = 1; | 
|---|
|  |  |  | //     tableReload(false); | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // // 重置 | 
|---|
|  |  |  | // form.on('submit(reset)', function (data) { | 
|---|
|  |  |  | //     pageCurr = 1; | 
|---|
|  |  |  | //     clearFormVal($('#search-box')); | 
|---|
|  |  |  | //     tableReload(false); | 
|---|
|  |  |  | // }); | 
|---|
|  |  |  | // | 
|---|
|  |  |  | // 时间选择器 | 
|---|
|  |  |  | function layDateRender() { | 
|---|
|  |  |  | layDate.render({ | 
|---|
|  |  |  | 
|---|
|  |  |  | var pageCurr; | 
|---|
|  |  |  | layui.config({ | 
|---|
|  |  |  | base: baseUrl + "/static/layui/lay/modules/" | 
|---|
|  |  |  | }).use(['table','laydate', 'form', 'admin'], function(){ | 
|---|
|  |  |  | }).use(['table','laydate', 'form', 'admin','tableMerge'], function(){ | 
|---|
|  |  |  | var table = layui.table; | 
|---|
|  |  |  | var $ = layui.jquery; | 
|---|
|  |  |  | var layer = layui.layer; | 
|---|
|  |  |  | var layDate = layui.laydate; | 
|---|
|  |  |  | var form = layui.form; | 
|---|
|  |  |  | var admin = layui.admin; | 
|---|
|  |  |  | var tableMerge = layui.tableMerge; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | // 数据渲染 | 
|---|
|  |  |  | tableIns = table.render({ | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function createWaveOut(mData) { | 
|---|
|  |  |  | layer.confirm('确定生成该波次的拣货单?', { | 
|---|
|  |  |  | function createWaveOut(data) { | 
|---|
|  |  |  | console.log(data) | 
|---|
|  |  |  | var loadIndex = layer.load(2); | 
|---|
|  |  |  | $.ajax({ | 
|---|
|  |  |  | url: baseUrl + "/wave/preview", | 
|---|
|  |  |  | headers: {'token': localStorage.getItem('token')}, | 
|---|
|  |  |  | contentType: 'application/json;charset=UTF-8', | 
|---|
|  |  |  | data: JSON.stringify({ | 
|---|
|  |  |  | orderNo: data.id | 
|---|
|  |  |  | }), | 
|---|
|  |  |  | method: 'POST', | 
|---|
|  |  |  | success: function (res) { | 
|---|
|  |  |  | layer.close(loadIndex); | 
|---|
|  |  |  | if (res.code === 200){ | 
|---|
|  |  |  | layer.open({ | 
|---|
|  |  |  | type: 1 | 
|---|
|  |  |  | ,title: false | 
|---|
|  |  |  | ,closeBtn: false | 
|---|
|  |  |  | ,offset: '100px' | 
|---|
|  |  |  | ,area: '1000px' | 
|---|
|  |  |  | ,shade: 0.5 | 
|---|
|  |  |  | ,shadeClose: true | 
|---|
|  |  |  | ,btn: ['立即生成', '稍后处理'] | 
|---|
|  |  |  | ,btnAlign: 'c' | 
|---|
|  |  |  | ,moveType: 1 //拖拽模式,0或者1 | 
|---|
|  |  |  | ,content: $('#stoukOutPreview') | 
|---|
|  |  |  | ,success: function(layero, index){ | 
|---|
|  |  |  | table.render({ | 
|---|
|  |  |  | elem: '#stoPreTab', | 
|---|
|  |  |  | data: res.data, | 
|---|
|  |  |  | page: true, | 
|---|
|  |  |  | cellMinWidth: 100, | 
|---|
|  |  |  | height: 432, | 
|---|
|  |  |  | cols: [[ | 
|---|
|  |  |  | {field: 'title', title: '商品', merge: true, align: 'center'}, | 
|---|
|  |  |  | {field: 'anfme', title: '总数量', merge: ['title'], align: 'center', style: 'font-weight: bold', width: 90}, | 
|---|
|  |  |  | {field: 'type', title: '仓库', merge: true, align: 'center', templet: '#typeTpl', width: 90}, | 
|---|
|  |  |  | {field: 'locNo', title: '货位', align: 'center'}, | 
|---|
|  |  |  | {field: 'prior$', title: '推荐货位', align: 'center', width: 100}, | 
|---|
|  |  |  | {field: 'reduce', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, | 
|---|
|  |  |  | // {field: 'remQty', title: '余量', align: 'center', width: 80}, | 
|---|
|  |  |  | {field: 'total', title: '总量', align: 'center', width: 90}, | 
|---|
|  |  |  | ]], | 
|---|
|  |  |  | done: function () { | 
|---|
|  |  |  | tableMerge.render(this); | 
|---|
|  |  |  | $('.layui-table-body.layui-table-main').css("overflow", "auto") | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ,yes: function(index, layero){ | 
|---|
|  |  |  | //按钮【马上拣货】的回调 | 
|---|
|  |  |  | stockOut(res.data,data); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | ,btn2: function(index, layero){ | 
|---|
|  |  |  | //按钮【稍后处理】的回调 | 
|---|
|  |  |  | //return false 开启该代码可禁止点击该按钮关闭 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | } else if (res.code === 403){ | 
|---|
|  |  |  | top.location.href = baseUrl+"/"; | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | layer.msg(res.msg, {icon: 2}) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | function stockOut(mData, data){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | console.log(mData); | 
|---|
|  |  |  | layer.confirm('确定生成该波次的拣货单?(不可逆)', { | 
|---|
|  |  |  | skin: 'layui-layer-admin', | 
|---|
|  |  |  | shade: .1 | 
|---|
|  |  |  | }, function (i) { | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | // 监听行工具事件 | 
|---|
|  |  |  | table.on('tool(wave)', function(obj){ | 
|---|
|  |  |  | 
|---|
|  |  |  | <link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all"> | 
|---|
|  |  |  | <link rel="stylesheet" href="../../static/css/cool.css" media="all"> | 
|---|
|  |  |  | <link rel="stylesheet" href="../../static/css/common.css" media="all"> | 
|---|
|  |  |  | <style> | 
|---|
|  |  |  | body { | 
|---|
|  |  |  | color: #595959; | 
|---|
|  |  |  | background-color: #f5f7f9; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /* 左表 */ | 
|---|
|  |  |  | #leftTable + .layui-table-view .layui-table-tool-temp { | 
|---|
|  |  |  | padding-right: 0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #leftTable + .layui-table-view .layui-table-body tbody > tr td { | 
|---|
|  |  |  | cursor: pointer; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #leftTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click { | 
|---|
|  |  |  | background-color: #fff3e0; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #leftTable + .layui-table-view .layui-table-body tbody > tr.layui-table-click td:last-child > div:before { | 
|---|
|  |  |  | position: absolute; | 
|---|
|  |  |  | right: 6px; | 
|---|
|  |  |  | content: "\e602"; | 
|---|
|  |  |  | font-size: 12px; | 
|---|
|  |  |  | font-style: normal; | 
|---|
|  |  |  | font-family: layui-icon,serif !important; | 
|---|
|  |  |  | -webkit-font-smoothing: antialiased; | 
|---|
|  |  |  | -moz-osx-font-smoothing: grayscale; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | #left-table .layui-table-grid-down { | 
|---|
|  |  |  | display: none; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | .layui-form.layui-border-box.layui-table-view { | 
|---|
|  |  |  | border-width: 1px; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #left-table .layui-table thead th { | 
|---|
|  |  |  | /* font-weight: bold; */ | 
|---|
|  |  |  | text-align: left; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | </style> | 
|---|
|  |  |  | </head> | 
|---|
|  |  |  | <body> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 搜索栏 --> | 
|---|
|  |  |  | <div id="search-box" class="layui-form layui-card-header"> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off"> | 
|---|
|  |  |  | <!-- 正文开始 --> | 
|---|
|  |  |  | <div class="layui-fluid" style="padding-bottom: 0;"> | 
|---|
|  |  |  | <div class="layui-row layui-col-space15"> | 
|---|
|  |  |  | <div class="layui-col-md3" id="left-table"> | 
|---|
|  |  |  | <div class="layui-card"> | 
|---|
|  |  |  | <div class="layui-card-body" style="padding: 10px;"> | 
|---|
|  |  |  | <!-- 表格工具栏1 --> | 
|---|
|  |  |  | <form class="layui-form toolbar"> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <div class="layui-inline" style="max-width: 140px;"> | 
|---|
|  |  |  | <input name="docName" class="layui-input" placeholder="请输入任务号"/> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <button class="layui-btn icon-btn" lay-filter="leftResearch" lay-submit> | 
|---|
|  |  |  | <i class="layui-icon"></i>搜索 | 
|---|
|  |  |  | </button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </form> | 
|---|
|  |  |  | <!-- 数据表格1 --> | 
|---|
|  |  |  | <table id="leftTable" lay-filter="leftTable"></table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-col-md9"> | 
|---|
|  |  |  | <div class="layui-card"> | 
|---|
|  |  |  | <div class="layui-card-body" style="padding: 10px;"> | 
|---|
|  |  |  | <!-- 表格工具栏2 --> | 
|---|
|  |  |  | <form class="layui-form toolbar"> | 
|---|
|  |  |  | <div class="layui-form-item"> | 
|---|
|  |  |  | <div class="layui-inline"> | 
|---|
|  |  |  | <label class="layui-form-label">商品编码:</label> | 
|---|
|  |  |  | <div class="layui-input-inline"> | 
|---|
|  |  |  | <input name="matnr" class="layui-input"type="text"  placeholder="编码" autocomplete="off"/> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div class="layui-inline">  | 
|---|
|  |  |  | <button class="layui-btn icon-btn" lay-filter="rightSearch" lay-submit> | 
|---|
|  |  |  | <i class="layui-icon"></i>搜索 | 
|---|
|  |  |  | </button> | 
|---|
|  |  |  | <button class="layui-btn icon-btn" lay-filter="reset" lay-submit> | 
|---|
|  |  |  | <i class="layui-icon"></i>重置 | 
|---|
|  |  |  | </button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </form> | 
|---|
|  |  |  | <!-- 数据表格2 --> | 
|---|
|  |  |  | <table id="pickout" lay-filter="pickout"></table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!-- 待添加 --> | 
|---|
|  |  |  | <div id="data-search-btn" class="layui-btn-container layui-form-item"> | 
|---|
|  |  |  | <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button> | 
|---|
|  |  |  | <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!-- 表格 --> | 
|---|
|  |  |  | <div class="layui-form"> | 
|---|
|  |  |  | <table class="layui-hide" id="pickout" lay-filter="pickout"></table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <!--<!– 搜索栏 –>--> | 
|---|
|  |  |  | <!--<div id="search-box" class="layui-form layui-card-header">--> | 
|---|
|  |  |  | <!--    <div class="layui-inline">--> | 
|---|
|  |  |  | <!--        <div class="layui-input-inline">--> | 
|---|
|  |  |  | <!--            <input class="layui-input" type="text" name="id" placeholder="编号" autocomplete="off">--> | 
|---|
|  |  |  | <!--        </div>--> | 
|---|
|  |  |  | <!--    </div>--> | 
|---|
|  |  |  | <!--    <!– 待添加 –>--> | 
|---|
|  |  |  | <!--    <div id="data-search-btn" class="layui-btn-container layui-form-item">--> | 
|---|
|  |  |  | <!--        <button id="search" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="search">搜索</button>--> | 
|---|
|  |  |  | <!--        <button id="reset" class="layui-btn layui-btn-primary layui-btn-radius" lay-submit lay-filter="reset">重置</button>--> | 
|---|
|  |  |  | <!--    </div>--> | 
|---|
|  |  |  | <!--</div>--> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--<!– 表格 –>--> | 
|---|
|  |  |  | <!--<div class="layui-form">--> | 
|---|
|  |  |  | <!--    <table class="layui-hide" id="pickout" lay-filter="pickout"></table>--> | 
|---|
|  |  |  | <!--</div>--> | 
|---|
|  |  |  | <script type="text/html" id="toolbar"> | 
|---|
|  |  |  | <div class="layui-btn-container"> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button> | 
|---|
|  |  |  | <!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData">新增</button>--> | 
|---|
|  |  |  | <!--        <button class="layui-btn layui-btn-sm" id="btn-delete" lay-event="deleteData">删除</button>--> | 
|---|
|  |  |  | <button class="layui-btn layui-btn-primary layui-btn-sm" id="btn-export" lay-event="exportData">导出</button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/html" id="operate"> | 
|---|
|  |  |  | <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a> | 
|---|
|  |  |  | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">删除</a> | 
|---|
|  |  |  | {{#if (d.wrkSts == 3){ }} | 
|---|
|  |  |  | <a class="layui-btn layui-btn-xs btn-complete" lay-event="complete">完成</a> | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  | {{#if (d.wrkSts == 1||d.wrkSts == 2){ }} | 
|---|
|  |  |  | <a class="layui-btn layui-btn-xs layui-btn-normal" lay-event="printOrder">打印拣货单</a> | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <!--    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">详情</a>--> | 
|---|
|  |  |  | {{#if (d.wrkSts == 1||d.wrkSts == 2){ }} | 
|---|
|  |  |  | <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">撤销</a> | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  | <!--    <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">修改</a>--> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  | <script type="text/html" id="wrkStsTpl"> | 
|---|
|  |  |  | <span name="wrkSts" | 
|---|
|  |  |  | {{# if( d.wrkSts === 1){ }} | 
|---|
|  |  |  | class="layui-badge layui-badge-blue" | 
|---|
|  |  |  | {{# } else if(d.wrkSts === 2){ }} | 
|---|
|  |  |  | class="layui-badge layui-badge-red" | 
|---|
|  |  |  | {{# } else if(d.wrkSts === 3){ }} | 
|---|
|  |  |  | class="layui-badge layui-badge-green" | 
|---|
|  |  |  | {{# } }} | 
|---|
|  |  |  | >{{d.wrkSts$}}</span> | 
|---|
|  |  |  | </script> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> | 
|---|
|  |  |  | 
|---|
|  |  |  | <div class="layui-form"> | 
|---|
|  |  |  | <table class="layui-hide" id="wave" lay-filter="wave"></table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div id="stoukOutPreview" style="display: none"> | 
|---|
|  |  |  | <div  style="padding: 25px; line-height: 22px; background-color: #393D49; color: #fff; font-weight: 300;"> | 
|---|
|  |  |  | <span style="font-size: large; font-weight: bold">拣货单预览</span> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <table id="stoPreTab" lay-filter="stoPreTab"></table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | <script type="text/html" id="toolbar"> | 
|---|
|  |  |  | <div class="layui-btn-container"> | 
|---|
|  |  |  | <!--        <button class="layui-btn layui-btn-sm" id="btn-add" lay-event="addData" >新增</button>--> | 
|---|