王佳豪
2021-03-26 68ad4cf704c0a7c575936455d07e3e2f53fefbc4
1.0.5
1.小太阳需求改动
15个文件已修改
244 ■■■■ 已修改文件
src/main/java/com/zy/asrs/controller/LocNormalController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/MobileController.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/entity/CombBillQueryVo.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/mapper/LocNormalMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/LocNormalService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/LocNormalServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/resources/mapper/LocNormalMapper.xml 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/salesOrder/salsesOrder.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/combPro.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalIn.html 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalMove.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/locNormalOut.html 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/stockIn.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/stockOut.html 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/salesOrder/salesOrder.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/controller/LocNormalController.java
@@ -166,9 +166,9 @@
    @RequestMapping(value = "/locNormal/pda/out/query")
    @ManagerAuth(memo = "pda出库查询")
    @Transactional
    public R locNormalPdaOutQuery(String matnr, String warehouse) {
    public R locNormalPdaOutQuery(String matnr, String warehouse, String billNo) {
        List<LocNormal> list = new ArrayList<>();
        list  = locNormalService.pdaLocNormalQuery(matnr, warehouse);
        list  = locNormalService.pdaLocNormalQuery(matnr, warehouse, billNo);
        return R.ok(list);
    }
src/main/java/com/zy/asrs/controller/MobileController.java
@@ -69,7 +69,9 @@
    @RequestMapping("/locDetl")
    @ManagerAuth
    public R getLocDetl(@RequestParam(required = false)String locNo,
                        @RequestParam(required = false)String matNo){
                        @RequestParam(required = false)String matNo,
                        @RequestParam(required = false)String supplier
                        ){
        if (!Cools.isEmpty(locNo)) {
            LocMast locMast = locMastService.selectById(locNo);
            if (null == locMast || !"F".equals(locMast.getLocSts())) {
@@ -102,6 +104,20 @@
            });
            return R.ok().add(res);
        }
        if (!Cools.isEmpty(supplier)) {
            List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>()
                    .eq("supplier", supplier).orderBy("appe_time", false));
            List<MobileLocDetlVo> res = new ArrayList<>();
            locDetls.forEach(locDetl -> {
                MobileLocDetlVo vo = new MobileLocDetlVo();
                vo.setLocNo(locDetl.getLocNo());
                vo.setMatnr(locDetl.getMatnr());
                vo.setMaktx(locDetl.getMaktx());
                vo.setCount(locDetl.getAnfme());
                res.add(vo);
            });
            return R.ok().add(res);
        }
        return R.parse(BaseRes.PARAM);
    }
@@ -120,6 +136,10 @@
                vo.setMatName(waitPakin.getMaktx());
                vo.setCount(waitPakin.getAnfme());
                vo.setMnemonic(waitPakin.getMnemonic());
                vo.setSupplier(waitPakin.getSupplier());
                vo.setAltme(waitPakin.getAltme());
                vo.setType(waitPakin.getType());
                vo.setLgnum(waitPakin.getLgnum());
                vos.add(vo);
            }
        }
src/main/java/com/zy/asrs/entity/CombBillQueryVo.java
@@ -18,4 +18,11 @@
    private String mnemonic;
    private String supplier;
    private String lgnum;
    private String type;
    private String altme;
}
src/main/java/com/zy/asrs/mapper/LocNormalMapper.java
@@ -28,7 +28,7 @@
    public void pdaLocNormalIn(List<LocNormal> list);
    public List<LocNormal> pdaLocNormalQuery(@Param("matnr") String matnr, @Param("warehouse") String warehouse);
    public List<LocNormal> pdaLocNormalQuery(@Param("matnr") String matnr, @Param("warehouse") String warehouse, @Param("billNo") String billNo);
    public void pdaLocNormalOut1(@Param("id") Integer id,@Param("matnr") String matnr, @Param("modiUser") Long modiUser, @Param("modiTime") Date modiTime, @Param("warehouse") String warehouse);
src/main/java/com/zy/asrs/service/LocNormalService.java
@@ -21,7 +21,7 @@
  public void pdaLocNormalIn(List<LocNormal> list);
  public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse);
  public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse, String billNo);
  public void pdaLocNormalOut(List<LocNormal> list);
src/main/java/com/zy/asrs/service/impl/LocNormalServiceImpl.java
@@ -46,8 +46,8 @@
    }
    @Override
    public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse) {
       return baseMapper.pdaLocNormalQuery(matnr, warehouse);
    public List<LocNormal> pdaLocNormalQuery(String matnr, String warehouse, String billNo) {
       return baseMapper.pdaLocNormalQuery(matnr, warehouse, billNo);
    }
    @Override
src/main/resources/mapper/LocNormalMapper.xml
@@ -60,17 +60,30 @@
    <insert id="pdaLocNormalIn">
        BEGIN
        <foreach collection="list" item="item" index="index">
            INSERT INTO asr_loc_normal (matnr, maktx, anfme, warehouse, state, appe_user, appe_time)
            INSERT INTO asr_loc_normal (matnr, maktx, anfme, mnemonic, supplier, warehouse, state, lgnum, type, altme,
            appe_user, appe_time)
            VALUES (#{item.matnr,jdbcType=VARCHAR}, #{item.maktx,jdbcType=VARCHAR}, #{item.anfme,jdbcType=DECIMAL},
            #{item.warehouse,jdbcType=VARCHAR}, '1', #{item.appeUser,jdbcType=DECIMAL},
            #{item.appeTime,jdbcType=TIMESTAMP})
            #{item.mnemonic, jdbcType=VARCHAR}, #{item.supplier, jdbcType=VARCHAR},
            #{item.warehouse,jdbcType=VARCHAR}, '1',
            #{item.lgnum, jdbcType=VARCHAR}, #{item.type, jdbcType=VARCHAR},
            #{item.altme, jdbcType=VARCHAR},
            #{item.appeUser,jdbcType=DECIMAL},#{item.appeTime,jdbcType=TIMESTAMP})
        </foreach>
        END;
    </insert>
    <select id="pdaLocNormalQuery" resultMap="BaseResultMap">
        select id, matnr,maktx, warehouse,anfme from asr_loc_normal
        where warehouse = #{warehouse,jdbcType=VARCHAR} and matnr =#{matnr,jdbcType=VARCHAR}
        where 1 = 1
        <if test="warehouse != null and warehouse != ''">
            and warehouse = #{warehouse,jdbcType=VARCHAR}
        </if>
        <if test="matnr != null and matnr != ''">
            and matnr =#{matnr,jdbcType=VARCHAR}
        </if>
        <if test="billNo != null and billNo != ''">
            and supplier = #{billNo, jdbcType=VARCHAR}
        </if>
        and state = '1' COLLATE Chinese_PRC_CS_AS
    </select>
src/main/webapp/static/js/salesOrder/salsesOrder.js
@@ -3,11 +3,18 @@
function getCol() {
    var cols = [];
    cols.push(
        {field: 'orderNo', align: 'center', title: '订单编号'}
        , {field: 'col1', align: 'center', title: '订单名称'}
        , {field: 'col2', align: 'center', title: '订单详情'}
        , {field: 'col3', align: 'center', title: '订单客户'}
        , {field: 'col4', align: 'center', title: '订单状态'}
        {field: 'orderCode', align: 'center', title: '订单编号'}
        , {field: 'orderDate', align: 'center', title: '订单日期'}
        , {field: 'invCode', align: 'center', title: '物料编码'}
        , {field: 'invName', align: 'center', title: '物料名称'}
        , {field: 'invStd', align: 'center', title: '规格型号'}
        , {field: 'invUnit', align: 'center', title: '单位'}
        , {field: 'orderQty', align: 'center', title: '订单数量'}
        , {field: 'izMrp', align: 'center', title: '是否mrp计算', hide: true}
        , {field: 'productQty', align: 'center', title: '生产任务单数量'}
        , {field: 'izReceive', align: 'center', title: '是否收料', hide: true}
        , {field: 'inQty', align: 'center', title: '产成品入库数量'}
        , {field: 'outQty', align: 'center', title: '发货数量'}
        , {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width: 80}
    );
    return cols;
@@ -28,11 +35,18 @@
        // url: baseUrl+'/matCode/list/auth',
        data: [
            {
                "orderNo": 20210315000001,
                "col1": "西班牙xx 210315号",
                "col2": "兰博基尼童车 5000台",
                "col3": "西班牙xx儿童玩具公司",
                "col4": "生产中",
                "orderCode": 20210315000001,
                "orderDate": "2021-03-26 13:40",
                "invCode": "CPXXX00123",
                "invName": "兰博基尼授权儿童车",
                "invStd": "21×25",
                "invUnit": "辆",
                "orderQty": 300,
                "izMrp": "否",
                "productQty": 150,
                "izReceive": "是",
                "inQty": 50,
                "outQty": 0,
            }
        ],
        page: true,
src/main/webapp/views/pda/combPro.html
@@ -56,12 +56,12 @@
<!-- 头部 -->
<header>
    <div class="layui-input-inline" style="margin-top: 5px">
        <label class="layui-form-label">&nbsp;&nbsp;&nbsp;单号</label>
        <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 70%; height: 40px; margin-right: 0;">
        <label class="layui-form-label" style="margin-left: 16px">单号</label>
        <input class="layui-input" id="billNo" oninput="find(this)" placeholder="扫码 / 输入" autocomplete="off" style="width: 175px; height: 40px; margin-right: 0;">
    </div>
    <div class="layui-input-inline">
        <label class="layui-form-label">托盘码</label>
        <input class="layui-input" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off">
        <input class="layui-input" style="width: 175px;" type="number" id="code" onkeyup="findCode(this)" oninput="if(value.length>8)value=value.slice(0,8)" placeholder="扫码 / 输入" autocomplete="off">
    </div>
</header>
src/main/webapp/views/pda/locNormalIn.html
@@ -21,8 +21,16 @@
<header class="layui-form">
    <div>
        <div class="layui-input-inline">
            <label class="layui-form-label">单号</label>
            <div class="layui-input-inline" style="width: 175px">
                <input id="billNo" class="layui-input" autocomplete="off" oninput="find(this)">
            </div>
        </div>
    </div>
    <div>
        <div class="layui-input-inline">
            <label class="layui-form-label">库区</label>
            <div class="layui-input-inline" style="margin-left: 5px;width: 180px">
            <div class="layui-input-inline" style="width: 175px">
                <select id="uuid">
                    <option value="">请选择</option>
                </select>
@@ -62,6 +70,8 @@
        var $ = layui.jquery;
        var layer = layui.layer;
        var form = layui.form;
        document.getElementById("billNo").focus();
        tableIns = table.render({
            elem: '#chooseData',
@@ -168,6 +178,11 @@
                maktx: item.matName,
                anfme: item.count,
                warehouse: barcode,
                mnemonic: item.mnemonic,
                supplier: item.supplier,
                lgnum: item.lgnum,
                type: item.type,
                altme: item.altme,
            });
        });
@@ -183,7 +198,7 @@
            async: false,
            success: function (res) {
                if (res.code === 200) {
                    reset();
                    reset(true);
                    tips("组托成功")
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
@@ -192,8 +207,45 @@
                }
            },
        });
    }
    /**
     * 根据通知单号查询物料详情
     */
    function find(el) {
        var billNo = el.value;
        if (isEmpty(billNo)) {
            return;
        }
        // 赋值前清空表格
        matData = [];
        tableIns.reload({data: matData});
        $.ajax({
            url: baseUrl + "/mobile/bill/query/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {
                billNo: billNo
            },
            method: 'POST',
            success: function (res) {
                if (res.code === 200) {
                    if (res.data != null) {
                        console.log('单号数据', res.data);
                        var data = res.data;
                        if (data.length > 0) {
                            for (var i = 0; i < data.length; i++) {
                                addTableData(data[i]);
                            }
                        }
                    }
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
                } else {
                    tips(res.msg, true)
                }
            }
        });
    }
    /**
@@ -230,6 +282,9 @@
        matData = [];
        tableIns.reload({data: matData});
        layer.closeAll();
        $("#billNo").val("");
        $("#uuid").val("");
        layui.form.render('select');
    }
</script>
</html>
src/main/webapp/views/pda/locNormalMove.html
@@ -214,9 +214,10 @@
    }
    function reset() {
//        $('#warehouse1').val("");
//        $('#warehouse2').val("");
        $('#warehouse1').val("");
        $('#warehouse2').val("");
        $('#matnr').val("");
        layui.form.render('select');
        tableIns.reload({data: []});
        layer.closeAll();
    }
src/main/webapp/views/pda/locNormalOut.html
@@ -48,13 +48,21 @@
<header class="layui-form">
    <div class="layui-input-inline">
        <label class="layui-form-label" style="margin-left: 32px">单号</label>
        <div class="layui-input-inline">
            <input id="billNo" class="layui-input" autocomplete="off" oninput="findCode(this, 'billNo')"
                   style="width: 175px">
        </div>
    </div>
    <div class="layui-input-inline">
        <label class="layui-form-label">物料编码</label>
        <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入" style="width: 65%"
        <input class="layui-input" id="matnr" onkeyup="findCode(this, 'matnr')" placeholder="扫码 / 输入"
               style="width: 175px"
               autocomplete="off">
    </div>
    <div class="layui-input-inline">
        <label class="layui-form-label" style="margin-left: 28px">库区</label>
        <div class="layui-input-inline" style="margin-left: 5px;width: 180px">
        <label class="layui-form-label" style="margin-left: 28px;">库区</label>
        <div class="layui-input-inline" style="margin-left: 5px;width: 175px">
            <select id="uuid" lay-filter="uuid">
                <option value="">请选择</option>
            </select>
@@ -87,7 +95,8 @@
    </div>
    <div class="form-item">
        <span>名称</span>
        <textarea rows="2" style="width: 70%; resize: none" id="maktx2" type="text" disabled="disabled" readonly="readonly"></textarea>
        <textarea rows="2" style="width: 70%; resize: none" id="maktx2" type="text" disabled="disabled"
                  readonly="readonly"></textarea>
    </div>
    <input id="index" type="text" disabled="disabled" style="display: none;">
    <div class="form-item" style="margin-top: 5px; margin-bottom: 8px">
@@ -110,7 +119,7 @@
    // 表格数据
    var normalOutList = [];
    window.onload = function () {
        document.getElementById("matnr").focus();
        document.getElementById("billNo").focus();
    }
    /**
@@ -216,11 +225,12 @@
    var warehouseBar;
    var matnrBar;
    var billNo;
    /* 扫码、输入库区和物料编码 */
    function findCode(el, type) {
        warehouseBar = $('#uuid').val();
        ;
        billNo = $("#billNo").val();
        switch (type) {
            case 'uuid':
//                exist('uuid', 'locArea');
@@ -233,12 +243,12 @@
        }
        // 判断库区或者物料编码都不为空
        if (!warehouseBar || !matnrBar) {
            return;
        }
//        if (!warehouseBar || !matnrBar) {
//            return;
//        }
        $.ajax({
            url: baseUrl + "/locNormal/pda/out/query?matnr=" + matnrBar + "&warehouse=" + warehouseBar,
            url: baseUrl + "/locNormal/pda/out/query?matnr=" + (matnrBar ? matnrBar : "") + "&warehouse=" + (warehouseBar ? warehouseBar : "") + "&billNo=" + (billNo ? billNo : ""),
            headers: {'token': localStorage.getItem('token')},
//            contentType: 'application/json;charset=UTF-8',
            method: 'GET',
@@ -348,7 +358,7 @@
                if (res.code === 200) {
                    layer.msg("出库成功");
                    $("#matnr").val(null);
//                    $("#uuid").val(null);
                    $("#billNo").val(null);
                    warehouseBar = null;
                    matnrBar = null;
                    normalOutList = [];
@@ -367,6 +377,8 @@
    function reset() {
        $("#uuid").val(null);
        $("#matnr").val(null);
        $("#billNo").val(null);
        layui.form.render('select');
        normalOutList = [];
        tableIns.reload({data: normalOutList});
        layer.closeAll();
src/main/webapp/views/pda/stockIn.html
@@ -91,7 +91,7 @@
    <table class="layui-table" id="chooseData" lay-filter="chooseData"></table>
</main>
<!-- 尾部 -->
<footer>
<footer style="margin-top: -5px">
    <div class="layui-btn-container" style="text-align: center; margin-bottom: 8px">
        <button type="button" id="retrun-btn" class="layui-btn layui-btn-primary " onclick="back()" >返回</button>
    </div>
src/main/webapp/views/pda/stockOut.html
@@ -24,6 +24,12 @@
<!-- 头部 -->
<header class="layui-form">
    <div class="layui-input-inline">
        <label class="layui-form-label">单号</label>
        <div class="layui-input-block">
            <input class="layui-input" type="text" id="billNo" onkeyup="findByBillNo(this)" autocomplete="off">
        </div>
    </div>
    <div class="layui-input-inline">
        <label class="layui-form-label">物料</label>
        <div class="layui-input-block">
            <input class="layui-input" type="text" id="matNo" onkeyup="findByMatNo(this)" autocomplete="off">
@@ -62,7 +68,7 @@
<script>
    window.onload = function(){
        document.getElementById("matNo").focus();
        document.getElementById("billNo").focus();
        getOutBound();
    }
@@ -87,13 +93,25 @@
        $("#locNo").val("");
        find(null, el.value);
    }
    function find(locNo, matNo) {
    /**
     * 根据通知单号查找库存明细
     * */
    function findByBillNo(el) {
        if (isEmpty(el.value)) {
            return;
        }
        find(null, null, el.value);
    }
    function find(locNo, matNo, billNo) {
        $.ajax({
            url: baseUrl + "/mobile/locDetl",
            headers: {'token': localStorage.getItem('token')},
            data: {
                locNo: locNo,
                matNo: matNo
                matNo: matNo,
                supplier: billNo,
            },
            method: 'POST',
            success: function (res) {
src/main/webapp/views/salesOrder/salesOrder.html
@@ -41,7 +41,7 @@
    <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="orderNo" placeholder="订单号" autocomplete="off">
                <input class="layui-input" type="text" name="orderCode" placeholder="订单号" autocomplete="off">
            </div>
        </div>
@@ -52,14 +52,14 @@
            </div>
        </div>
        <div class="layui-inline" style="width: 150px">
            <select id="orderState" name="orderState">
                <option value="">订单状态</option>
                <option value="1">初始</option>
                <option value="2">执行中</option>
                <option value="3">结束</option>
            </select>
        </div>
        <!--<div class="layui-inline" style="width: 150px">-->
            <!--<select id="orderState" name="orderState">-->
                <!--<option value="">订单状态</option>-->
                <!--<option value="1">初始</option>-->
                <!--<option value="2">执行中</option>-->
                <!--<option value="3">结束</option>-->
            <!--</select>-->
        <!--</div>-->
        <div id="data-search-btn" class="layui-btn-container layui-form-item">