自动化立体仓库 - WMS系统
lty
7 天以前 539a56279625242c497b4b4093f2defbb9d80334
src/main/webapp/static/js/mat/mat.js
@@ -1,19 +1,28 @@
var pageCurr;
var printMatCodeNos = [];
var admin;
// Local translation helper
function t(key, params) {
    if (typeof I18n !== 'undefined' && typeof I18n.t === 'function') {
        return I18n.t(key, params);
    }
    return key;
}
function getCol() {
    var cols = [
        {type: 'checkbox'}
        ,{field: 'tagId$', align: 'center',title: I18n.t('classification'), templet: '#tagTpl'}
        ,{field: 'store_max', align: 'center',title: I18n.t('stock_upper_limit')}
        ,{field: 'store_min', align: 'center',title: I18n.t('stock_lower_limit')}
        ,{field: 'store_max_date', align: 'center',title: I18n.t('stock_age_upper_limit_days')}
        ,{field: 'areaId$', align: 'center',title: I18n.t('area'), templet: '#areaTpl'}
        ,{field: 'tagId$', align: 'center',title: t('classification'), templet: '#tagTpl'}
        // ,{field: 'store_max', align: 'center',title: t('stock_upper_limit')}
        // ,{field: 'store_min', align: 'center',title: t('stock_lower_limit')}
        // ,{field: 'store_max_date', align: 'center',title: t('stock_age_upper_limit_days')}
        ,{field: 'areaId$', align: 'center',title: t('area'), templet: '#areaTpl'}
    ];
    cols.push.apply(cols, getMatCols());
    cols.push(
        {fixed: 'right', title: I18n.t('operation'), align: 'center', toolbar: '#operate', width:150}
        {fixed: 'right', title: t('operation'), align: 'center', toolbar: '#operate', width:150}
    )
    return cols;
}
@@ -263,6 +272,10 @@
                    success: function(layero, index){
                        layer.iframeAuto(index);
                        printMatCodeNos.push(data.matnr);
                        if (typeof I18n !== 'undefined' && I18n.updatePage) {
                            I18n.updatePage($(layero));
                            form.render();
                        }
                    },
                    end: function () {
                    }
@@ -291,6 +304,13 @@
                        $(layero).find('#matnr').val(res.data);
                    })
                }
                if (typeof I18n !== 'undefined') {
                    setTimeout(function() {
                        I18n.updatePage($(layero));
                    }, 50);
                }
                // 表单提交事件
                form.on('submit(editSubmit)', function (data) {
                    console.log(data)
@@ -310,7 +330,7 @@
                            layer.close(loadIndex);
                            if (res.code === 200){
                                layer.close(dIndex);
                                layer.msg(res.msg, {icon: 1});
                                layer.msg(t('response.operation_success'), {icon: 1});
                                $(".layui-laypage-btn")[0].click();
                            } else if (res.code === 403){
                                top.location.href = baseUrl+"/";