自动化立体仓库 - WMS系统
王佳豪
2021-03-29 8d1a27af40f3ebe9343a11eaede198e93836fa79
出库增加备注修改功能
1个文件已添加
2个文件已修改
59 ■■■■■ 已修改文件
src/main/webapp/static/js/pakStore/pakStore.js 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pakStore/matMemo.html 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/pakStore/pakStore.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/static/js/pakStore/pakStore.js
@@ -6,7 +6,10 @@
        {fixed: 'left', field: 'count', title: '数量(必填)', align: 'center', edit:'text', width: 120,  style:'color: blue;font-weight: bold'}
    ];
    cols.push.apply(cols, matCols);
    cols.push({fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:80})
    cols.push(
        {field: 'memo', title:'备注', align: 'center'},
        {fixed: 'right', title:'操作', align: 'center', toolbar: '#operate', width:120}
        )
    return cols;
}
@@ -89,6 +92,7 @@
    // 监听行工具事件
    table.on('tool(chooseData)', function(obj){
        var data = obj.data;
        switch (obj.event) {
            case 'remove':
                for (var i = matCodeData.length - 1; i >= 0; i--) {
@@ -102,6 +106,35 @@
                        // 覆盖render方法的done
                    }});
                break;
            case 'memo':
               var memoLayer = layer.open({
                    type: 2,
                    title: '备注',
                    maxmin: true,
                    area: ['400px', '215px'],
                    shadeClose: false,
                    content: 'matMemo.html',
                    btn: ['保存', '取消'],
                    style: 'text-algin: center',
                    yes:  function(index, layero){
                        var memo = layer.getChildFrame('body', index).find("#memo")[0].value;
                        matCodeData.map(function (item) {
                            if (item.matNo === data.matNo) {
                                item.memo = memo;
                            }
                        });
                        // 重置表格数据
                        tableIns.reload({data: matCodeData,done:function (res) {
                            limit();
                            getInBound();
                            layer.close(memoLayer);
                        }});
                    },
                    success: function(layero, index){
                    }
                });
                break;
        }
    });
src/main/webapp/views/pakStore/matMemo.html
New file
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>备注</title>
    <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
    <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../static/js/handlebars/handlebars-v4.5.3.js"></script>
</head>
<body>
<div style="text-align: center; padding: 5px">
    <textarea rows="6" style="width: 95%; resize: none" id="memo" type="text"></textarea>
</div>
</body>
<script>
    function setMatMemo(val) {
        $("#memo").val(val);
    }
</script>
</html>
src/main/webapp/views/pakStore/pakStore.html
@@ -108,6 +108,7 @@
    <!-- 行 -->
    <script type="text/html" id="operate">
        <a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="memo">备注</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="remove">移除</a>
    </script>