| | |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | // LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | // issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | // List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103); |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103); |
| | | locDetl.getAnfme(), issued < locDetl.getAnfme()? issued : locDetl.getAnfme()); |
| | | //速腾只有全板,所以只能101全板出库 |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | |
| | | } |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | // 获取路径 |
| | | int ioType = taskDto.isAll() ? 101 : 103; |
| | | // int ioType = taskDto.isAll() ? 101 : 103; |
| | | //仅适用于速腾项目,没有捡料 |
| | | int ioType = 101; |
| | | StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), staNo.getDevNo()); |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | |
| | | package com.zy.common.model; |
| | | |
| | | import com.core.common.Cools; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | private String orderNo; |
| | | |
| | | //实际出库量 |
| | | private Double anfme; |
| | | |
| | | //所需出库量 |
| | | private Double needQty; |
| | | |
| | | private boolean lack = false; |
| | | |
| | |
| | | this.anfme = anfme; |
| | | } |
| | | |
| | | public LocDto(String locNo, String matnr, String maktx, String batch, String orderNo, Double anfme, Double needQty) { |
| | | this.locNo = locNo; |
| | | this.matnr = matnr; |
| | | this.maktx = maktx; |
| | | this.batch = batch; |
| | | this.orderNo = orderNo; |
| | | this.anfme = anfme; |
| | | this.needQty = needQty; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return this.matnr + "(" + this.maktx + ")"; |
| | | } |
| | |
| | | <!-- and (a.batch IS NULL OR a.batch = '')--> |
| | | <!-- </otherwise>--> |
| | | <!-- </choose>--> |
| | | <if test="batch != null and batch != ''"> |
| | | <if test="batch != null"> |
| | | and a.batch = #{batch} |
| | | </if> |
| | | <if test="orderNo != null and orderNo != ''"> |
| | |
| | | base: baseUrl + "/static/layui/lay/modules/" |
| | | }).extend({ |
| | | notice: 'notice/notice', |
| | | }).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX'], function(){ |
| | | }).use(['table','laydate', 'form', 'util', 'admin', 'notice', 'treeTable', 'xmSelect', 'tableMerge', 'tableX' , 'laytpl'], function(){ |
| | | var table = layui.table; |
| | | var $ = layui.jquery; |
| | | var layer = layui.layer; |
| | |
| | | var xmSelect = layui.xmSelect; |
| | | var tableMerge = layui.tableMerge; |
| | | var tableX = layui.tableX; |
| | | var laytpl = layui.laytpl; |
| | | |
| | | insTb2 = table.render({ |
| | | elem: '#orderDetlTable', |
| | |
| | | ,moveType: 1 //拖拽模式,0或者1 |
| | | ,content: $('#pakoutPreviewBox').html() |
| | | ,success: function(layero, index){ |
| | | console.log(res.data); |
| | | stoPreTabIdx = table.render({ |
| | | elem: '#stoPreTab', |
| | | data: res.data, |
| | |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | {field: 'anfme', title: '数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | { title: '需求数量', align: 'center' , width: 90, toolbar: '#checkNeedQty'}, |
| | | // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | { title: '实际数量', align: 'center', width: 90, toolbar: '#checkAnfme'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | {type: 'checkbox', merge: ['locNo']}, |
| | |
| | | </form> |
| | | </script> |
| | | |
| | | <!--根据需求出库量和实际出库量做对比,展示不同颜色--> |
| | | <script type="text/html" id="checkAnfme"> |
| | | {{# if(d.needQty < d.anfme){ }} |
| | | <span style="color: red; font-weight: bold;" >{{d.anfme}}</span> |
| | | {{# } }} |
| | | {{# if(d.needQty == d.anfme){ }} |
| | | <span style="font-weight: bold;" >{{d.anfme}}</span> |
| | | {{# } }} |
| | | |
| | | {{# if(d.needQty > d.anfme){ }} |
| | | <span style="color: red;font-weight: bold;" >{{d.anfme}}</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/html" id="checkNeedQty"> |
| | | {{# if(d.needQty < d.anfme){ }} |
| | | <span style="color: red; font-weight: bold;" >{{d.needQty}}</span> |
| | | {{# } }} |
| | | {{# if(d.needQty == d.anfme){ }} |
| | | <span style="font-weight: bold;" >{{d.needQty}}</span> |
| | | {{# } }} |
| | | {{# if(d.needQty > d.anfme){ }} |
| | | <span style="color: red;font-weight: bold;" >{{d.needQty}}</span> |
| | | {{# } }} |
| | | </script> |
| | | |
| | | <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> |
| | | <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script> |
| | | <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> |