自动化立体仓库 - WMS系统
lty
1 天以前 daac5618fc2322620a82d25603c5b4d15465c5ef
src/main/webapp/views/wrkMast/wrkDetl.html
@@ -14,7 +14,7 @@
</head>
<body>
<div class="layui-inline"  style="width:31%;margin-top: 20px">
    <label class="layui-form-label">工 作 号:</label>
    <label class="layui-form-label"><span data-i18n="work_no">工 作 号</span>:</label>
    <div class="layui-input-inline">
        <input id="wrkNo" class="layui-input" type="text" disabled="disabled">
    </div>
@@ -22,16 +22,53 @@
<table class="layui-hide" id="wrkDetlByMast" lay-filter="wrkDetlByMast"></table>
</body>
<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script>
<script src="../../static/js/i18n/i18n-helper.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/locMast/locMast.js" charset="utf-8"></script>
<script type="text/javascript">
    var pageCur;
    function getCol() {
        var cols = [
            {field: 'wrkNo', align: 'center',title: I18n.t('work_no')}
            ,{field: 'ioTime$', align: 'center',title: I18n.t('work_time')}
        ];
        if (typeof getDetlCols === 'function') {
            cols.push.apply(cols, getDetlCols());
        } else {
            cols.push.apply(cols, detlCols);
        }
        return cols;
    }
    layui.use(['table','laydate', 'form'], function() {
        table = layui.table;
        var $ = layui.jquery;
        var form = layui.form;
        $(document).on('i18n:languageChanged', function() {
            table.reload('wrkDetlByMast', {
                cols: [getCol()],
                done: function(res, curr, count) {
                    if (res.code === 403) {
                        top.location.href = baseUrl+"/";
                    }
                    pageCur=curr;
                    form.on('checkbox(tableCheckbox)', function (data) {
                        var _index = $(data.elem).attr('table-index')||0;
                        if(data.elem.checked){
                            res.data[_index][data.value] = 'Y';
                        }else{
                            res.data[_index][data.value] = 'N';
                        }
                    });
                    if (typeof I18n !== 'undefined') {
                        I18n.updatePage();
                        I18n.updateLayuiPagination();
                    }
                }
            });
        });
        $('#wrkNo').val(parent.wrkNo);
        // 数据渲染
@@ -42,26 +79,14 @@
            where: {wrk_no: parent.wrkNo},
            page: true,
            limit: 16,
            limits: [16, 30, 50, 100, 200, 500],
            even: true,
            toolbar: '#toolbar',
            cellMinWidth: 50,
            cols: [[
                // {type: 'checkbox'}
                {field: 'wrkNo', align: 'center',title: '工作号'}
                ,{field: 'ioTime$', align: 'center',title: '工作时间'}
                ,{field: 'matnr', align: 'center',title: '物料'}
                ,{field: 'lgnum', align: 'center',title: '仓库号'}
                ,{field: 'tbnum', align: 'center',title: '转储请求编号'}
                ,{field: 'tbpos', align: 'center',title: '行项目'}
                ,{field: 'zmatid', align: 'center',title: '物料标签ID'}
                ,{field: 'maktx', align: 'center',title: '物料描述'}
                ,{field: 'werks', align: 'center',title: '工厂'}
                ,{field: 'anfme', align: 'center',title: '数量'}
                ,{field: 'altme', align: 'center',title: '单位'}
                ,{field: 'zpallet', align: 'center',title: '托盘条码'}
                ,{field: 'bname', align: 'center',title: '用户ID'}
                // ,{field: 'memo', align: 'center',title: '备注'}
            ]],
            cols: [getCol()],
                        text: {
                none: typeof I18n !== 'undefined' ? I18n.t('no_data') : '暂无相关数据'
            },
            request: {
                pageName: 'curr',
                pageSize: 'limit'
@@ -79,7 +104,7 @@
            },
            done: function(res, curr, count) {
                if (res.code === 403) {
                    top.location.href = "/";
                    top.location.href = baseUrl+"/";
                }
                pageCur=curr;
                form.on('checkbox(tableCheckbox)', function (data) {
@@ -90,9 +115,14 @@
                        res.data[_index][data.value] = 'N';
                    }
                });
                if (typeof I18n !== 'undefined') {
                    I18n.updatePage();
                    I18n.updateLayuiPagination();
                }
            }
        });
    });
</script>
</html>