| | |
| | | |
| | | private Double count; |
| | | |
| | | private String supplier; |
| | | |
| | | public MatCodeCountDto() { |
| | | } |
| | | |
| | | public MatCodeCountDto(String matNo, Double count) { |
| | | public MatCodeCountDto(String matNo, Double count, String supplier) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.supplier = supplier; |
| | | } |
| | | |
| | | public MatCodeCountDto(String billNo, Integer seqNo, String matNo, Double count) { |
| | | this.matNo = matNo; |
| | | this.count = count; |
| | | this.billNo = billNo; |
| | | this.seqNo = seqNo; |
| | | } |
| | | |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getSupplier() { |
| | | return supplier; |
| | | } |
| | | |
| | | public void setSupplier(String supplier) { |
| | | this.supplier = supplier; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty(value= "单重") |
| | | private Double weight; |
| | | |
| | |
| | | @ApiModelProperty(value= "颜色") |
| | | private String color; |
| | | |
| | | @ApiModelProperty(value= "批号") |
| | | private String supplier; |
| | | |
| | | @ApiModelProperty(value= "单重") |
| | | private Double weight; |
| | | |
| | |
| | | // 产品数量 |
| | | private Double count; |
| | | |
| | | // 批号 |
| | | private String supplier; |
| | | |
| | | public String getBillNo() { return billNo; } |
| | | |
| | | public void setBillNo(String billNo) { this.billNo = billNo; } |
| | |
| | | public void setCount(Double count) { |
| | | this.count = count; |
| | | } |
| | | |
| | | public String getSupplier() { |
| | | return supplier; |
| | | } |
| | | |
| | | public void setSupplier(String supplier) { |
| | | this.supplier = supplier; |
| | | } |
| | | } |
| | | |
| | | public String getBarcode() { |
| | |
| | | // 生成工作档明细 |
| | | List<MatCodeCountDto> matDtos = new ArrayList<>(); |
| | | param.getList().forEach(elem -> { |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount())); |
| | | matDtos.add(new MatCodeCountDto(elem.getMatNo(), elem.getCount(), elem.getSupplier())); |
| | | }); |
| | | wrkDetlService.createWorkDetail(workNo, matDtos, param.getBarcode(), userId); |
| | | // 更新源站点信息 |
| | |
| | | VersionUtils.setWrkDetl(wrkDetl, matCode); // 版本控制 |
| | | wrkDetl.setBillNo((null != dto.getBillNo()) ? dto.getBillNo() : "0"); |
| | | wrkDetl.setSeqNo((null != dto.getSeqNo()) ? dto.getSeqNo() : 0); |
| | | wrkDetl.setSupplier(dto.getSupplier()); |
| | | wrkDetl.setZpallet(barcode); // 托盘条码 |
| | | wrkDetl.setAppeUser(userId); |
| | | wrkDetl.setAppeTime(new Date()); |
| | |
| | | } |
| | | } |
| | | |
| | | //更新组托数据状态为入库完成 IoStatus ====>> 2 |
| | | Wrapper<PltBarcode> wrapper = new EntityWrapper<PltBarcode>().eq("barcode", wrkDetl.getZpallet()) |
| | | .eq("bill_no", wrkDetl.getBillNo()).eq("seq_no", wrkDetl.getSeqNo()).eq("mat_no", wrkDetl.getMatNo()); |
| | | PltBarcode pltBarcode = pltBarcodeService.selectOne(wrapper); |
| | | if(null != pltBarcode) { |
| | | pltBarcode.setIoStatus(2);//入库完成 |
| | | boolean res = pltBarcodeService.update(pltBarcode, wrapper); |
| | | if(!res){ |
| | | //更新组托数据状态为入库完成 IoStatus ====>> 2 |
| | | Wrapper<PltBarcode> wrapper = new EntityWrapper<PltBarcode>().eq("barcode", wrkDetl.getZpallet()) |
| | | .eq("bill_no", wrkDetl.getBillNo()).eq("seq_no", wrkDetl.getSeqNo()).eq("mat_no", wrkDetl.getMatNo()); |
| | | PltBarcode pltBarcode = pltBarcodeService.selectOne(wrapper); |
| | | if(null != pltBarcode) { |
| | | pltBarcode.setIoStatus(2);//入库完成 |
| | | boolean res = pltBarcodeService.update(pltBarcode, wrapper); |
| | | if(!res){ |
| | | // exceptionHandle("全板入库 ===>> 更新组托数据失败;[workNo={0}],[billNo={1}],[seqNo={2}]", wrkMast.getWrkNo(),wrkDetl.getBillNo(),wrkDetl.getSeqNo()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 更新入库通知档 ioStatus ====>> 2 |
| | | WaitMatin waitMatin = waitMatinService.selectOne(new EntityWrapper<WaitMatin>().eq("bill_no",wrkDetl.getBillNo()).eq("seq_no",wrkDetl.getSeqNo())); |
| | | // 更新入库通知档 ioStatus ====>> 2 |
| | | WaitMatin waitMatin = waitMatinService.selectOne(new EntityWrapper<WaitMatin>().eq("bill_no",wrkDetl.getBillNo()).eq("seq_no",wrkDetl.getSeqNo())); |
| | | if(null != waitMatin && waitMatin.getInQty() >= waitMatin.getQty()){ |
| | | waitMatin.setIoStatus(2); |
| | | waitMatin.setModiTime(now); |
| | |
| | | wrkDetl.setColor(locDetl.getColor()); // 颜色 |
| | | wrkDetl.setWeight(locDetl.getWeight()); // 单重 |
| | | wrkDetl.setZpallet(locDetl.getZpallet()); // 托盘条码 |
| | | wrkDetl.setSupplier(locDetl.getSupplier()); |
| | | } |
| | | |
| | | public static void setLocDetl(LocDetl locDetl, MatCode matCode) { |
| | |
| | | locDetl.setColor(wrkDetl.getColor()); // 颜色 |
| | | locDetl.setQty(wrkDetl.getQty()); // 数量 |
| | | locDetl.setZpallet(wrkDetl.getZpallet()); // 托盘条码 |
| | | locDetl.setSupplier(wrkDetl.getSupplier()); |
| | | } |
| | | |
| | | public static void setWaitPakIn(WaitPakin waitPakIn, MatCode matCode) { |
| | |
| | | <result column="specs" property="specs" /> |
| | | <result column="size" property="size" /> |
| | | <result column="color" property="color" /> |
| | | <result column="supplier" property="supplier" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="bill_no" property="billNo" /> |
| | | <result column="seq_no" property="seqNo" /> |
| | |
| | | <result column="specs" property="specs" /> |
| | | <result column="size" property="size" /> |
| | | <result column="color" property="color" /> |
| | | <result column="supplier" property="supplier" /> |
| | | <result column="weight" property="weight" /> |
| | | <result column="bill_no" property="billNo" /> |
| | | <result column="seq_no" property="seqNo" /> |
| | |
| | | var matCodeData = []; |
| | | function getCol() { |
| | | var cols = [ |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'}, |
| | | {field: 'supplier', title: '批号', align: 'center', edit:'text', width: 120, style:'color: blue;font-weight: bold'} |
| | | ]; |
| | | cols.push.apply(cols, matCols); |
| | | cols.push( |
| | |
| | | |
| | | // 页面修改 |
| | | table.on('edit(chooseData)', function (obj) { |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | switch (obj.field) { |
| | | case 'count': |
| | | updateMatCodeData(obj.data.matNo, Number(obj.value)); |
| | | break |
| | | case 'supplier': |
| | | // updateMatCodeSupplier(obj.data.matNo, obj.value); |
| | | break |
| | | } |
| | | |
| | | }); |
| | | |
| | | // 监听头工具栏事件 |
| | |
| | | }}); |
| | | } |
| | | |
| | | |
| | | function updateMatCodeSupplier(matNo, supplier) { |
| | | console.log('-') |
| | | debugger |
| | | for (var i=0;i<matCodeData.length;i++){ |
| | | if (matCodeData[i]["matNo"] === matNo){ |
| | | if (matCodeData[i]["supplier"] === supplier) { |
| | | console.log(supplier); |
| | | console.log(matCodeData[i]["supplier"]) |
| | | layer.msg("批号已存在", {icon: 2}); |
| | | } else { |
| | | matCodeData[i]["supplier"] = supplier; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 获取可用入库站点 |
| | | function getInBound() { |
| | | $.ajax({ |
| | |
| | | |
| | | // 添加表格数据 |
| | | function addTableData(data) { |
| | | for (var i=0;i<data.length;i++){ |
| | | let pass = false; |
| | | for (var j=0;j<matCodeData.length;j++){ |
| | | if (data[i].matNo === matCodeData[j].matNo) { |
| | | pass = true; |
| | | break; |
| | | } |
| | | } |
| | | if (pass) { |
| | | data.splice(i--, 1); |
| | | } else { |
| | | data[i]["count"] = initCountVal; |
| | | } |
| | | } |
| | | // for (var i=0;i<data.length;i++){ |
| | | // let pass = false; |
| | | // for (var j=0;j<matCodeData.length;j++){ |
| | | // if (data[i].matNo === matCodeData[j].matNo) { |
| | | // pass = true; |
| | | // break; |
| | | // } |
| | | // } |
| | | // if (pass) { |
| | | // data.splice(i--, 1); |
| | | // } else { |
| | | // data[i]["count"] = initCountVal; |
| | | // } |
| | | // } |
| | | matCodeData.push.apply(matCodeData, data); |
| | | tableIns.reload({data: matCodeData}); |
| | | layer.close(matCodeLayerIdx); |
| | | } |
| | | } |