自动化立体仓库 - WMS系统
zwl
2 天以前 605be0c8702fc7bfe4f7fcdd397c9f0d40722b69
src/main/webapp/static/js/mat/mat.js
@@ -2,6 +2,22 @@
var printMatCodeNos = [];
var admin;
function createNumberCell(title, field) {
    return {
        field: field,
        align: 'center',
        title: title,
        templet: function (d) {
            var raw = d[field];
            if (raw === null || raw === undefined) return '';
            if (typeof raw === 'string' && raw.trim() === '') return '';
            var num = Number(raw);
            if (!isFinite(num)) return '';
            return num.toFixed(2);
        }
    };
}
function getCol() {
    var cols = [
        {type: 'checkbox'}
@@ -11,7 +27,14 @@
        // ,{field: 'store_min', align: 'center',title: '库存下限'}
        // ,{field: 'store_max_date', align: 'center',title: '库龄上限(天)'}
    ];
    cols.push.apply(cols, matCols);
    var pageMatCols = matCols.filter(function (col) {
        return ['specs', 'model', 'brand'].indexOf(col.field) === -1;
    });
    cols.push.apply(cols, pageMatCols);
    cols.push(
        createNumberCell('库存预警数量上限', 'storeMax'),
        createNumberCell('库存预警数量下限', 'storeMin')
    );
    cols.push(
        {fixed: 'right', title: '操作', align: 'center', toolbar: '#operate', width: 150}
    )