#
luxiaotao1123
2021-04-07 4a868400b87fa0d1ebfb83a530d786fd7b2f6459
#
4个文件已修改
65 ■■■■ 已修改文件
src/main/java/zy/cloud/wms/manager/controller/MatController.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/comb.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/matQuery.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pda/selectMat.html 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/zy/cloud/wms/manager/controller/MatController.java
@@ -35,9 +35,7 @@
    @RequestMapping(value = "/mat/list/pda/auth")
    @ManagerAuth
    public R pdaList(@RequestParam(defaultValue = "1")Integer curr,
                     @RequestParam(defaultValue = "10")Integer limit,
                     @RequestParam(required = true)Long tagId){
    public R pdaList(@RequestParam(required = true)Long tagId){
        EntityWrapper<Mat> wrapper = new EntityWrapper<>();
        wrapper.eq("tag_id", tagId);
        wrapper.orderBy("create_time", false);
@@ -45,6 +43,18 @@
        return R.ok().add(mats);
    }
    @RequestMapping(value = "/mat/search/pda/auth")
    @ManagerAuth
    public R pdaSearch(@RequestParam(required = false)String condition){
        EntityWrapper<Mat> wrapper = new EntityWrapper<>();
        if (!Cools.isEmpty(condition)) {
            wrapper.like("matnr", condition).or().like("maktx", condition);
        }
        wrapper.orderBy("create_time", false);
        List<Mat> mats = matService.selectList(wrapper);
        return R.ok().add(mats);
    }
    @RequestMapping(value = "/mat/{id}/auth")
    @ManagerAuth
    public R get(@PathVariable("id") String id) {
src/main/webapp/views/pda/comb.html
@@ -167,6 +167,7 @@
                $('#mat-btn').focus();
            }
        });
        // layer.full(matCodeLayerIdx)
    }
    // 添加表格数据
src/main/webapp/views/pda/matQuery.html
@@ -51,6 +51,7 @@
        #selectBtn {
            vertical-align: middle;
            padding: 3px 5px;
            height: 32px;
        }
        #confirm {
@@ -145,7 +146,7 @@
                        $('#specs').val(res.data.specs);
                        $('#unit').val(res.data.unit);
                        countDom.val(initMatCount);
                        $('#count').focus().select();
                        // $('#count').focus().select();
                    }
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
src/main/webapp/views/pda/selectMat.html
@@ -19,7 +19,16 @@
            height: 100%;
            background-color: #f1f1f1;
            padding: 5px;
            position: relative;
            /*overflow: hidden;*/
        }
        /*header {*/
        /*    position: absolute;*/
        /*}*/
        /*main {*/
        /*    padding-top: 30px;*/
        /*}*/
        /* 头部搜索栏 */
        .search-box {
@@ -31,7 +40,7 @@
            border-radius: 20px;
            height: 30px;
            box-shadow: 0 0 3px rgba(0,0,0,.3);
            width: 75%;
            width: 73%;
            padding-left: 15px;
            vertical-align: middle;
        }
@@ -92,8 +101,8 @@
<header>
    <div class="search-box">
        <input type="text" placeholder="请输入商品编码/名称">
        <button>
        <input id="search-msg" type="text" placeholder="请输入商品编码/名称">
        <button onclick="search()">
            <i class="layui-icon">&#xe615;</i>
        </button>
    </div>
@@ -108,6 +117,36 @@
        showTag();
    })
    // 搜索
    function search(){
        var condition = $('#search-msg').val();
        $.ajax({
            url: baseUrl + "/mat/search/pda/auth",
            headers: {'token': localStorage.getItem('token')},
            data: {
                condition: condition
            },
            method: 'POST',
            success: function (res) {
                if (res.code === 200) {
                    if (res.data != null && res.data.length > 0) {
                        var tplDom = $("#matTpl");
                        var tpl = tplDom.html();
                        var template = Handlebars.compile(tpl);
                        var html = template(res);
                        $('#main-contain').html(html);
                    } else {
                        $('#main-contain').html('<div style="text-align: center; margin-top: 15px"><span style="font-size: large">暂无商品</span></div>');
                    }
                } else if (res.code === 403) {
                    top.location.href = baseUrl + "/pda";
                } else {
                    parent.layer.msg(res.msg, {icon: 2});
                }
            }
        })
    }
    // 归类点击
    $(document).on('click','.box-tag-item', function () {
        var tagId = $(this).children('input').get(0).value;