自动化立体仓库 - WMS系统
zwl
4 天以前 632bde0f32999a2b319b706e23d90bc1b5dd8cc2
src/main/webapp/static/js/common.js
@@ -1,4 +1,4 @@
var baseUrl = "/jshdasrs";
var baseUrl = "/lggslasrs";
// 详情窗口-高度
var detailHeight = '80%';
@@ -234,6 +234,7 @@
    ,{field: 'anfme', align: 'center',title: '数量', hide: false}
    ,{field: 'zpallet', align: 'center',title: '托盘条码', hide: false}
    ,{field: 'boxType1', align: 'center',title: '货主', hide: false}
    ,{field: 'boxType3', align: 'center',title: '采购单号', hide: false}
    // ,{field: 'model', align: 'center',title: '代码', hide: true}
    // ,{field: 'color', align: 'center',title: '颜色', hide: true}
@@ -281,6 +282,40 @@
        if(pair[0] == variable){return pair[1];}
    }
    return(false);
}
function showPhotoViewer(layer, urls) {
    if (!urls || urls.length === 0) {
        layer.msg('暂无照片');
        return;
    }
    var html = '<div style="padding:16px;display:flex;flex-wrap:wrap;gap:12px;max-height:70vh;overflow:auto;background:#f7f7f7;">';
    for (var i = 0; i < urls.length; i++) {
        var url = escapePhotoHtml(urls[i]);
        html += '<a href="' + url + '" target="_blank" style="display:block;width:360px;max-width:100%;background:#fff;border:1px solid #e6e6e6;padding:8px;">'
            + '<img src="' + url + '" style="display:block;width:100%;height:auto;max-height:360px;object-fit:contain;" alt="photo">'
            + '</a>';
    }
    html += '</div>';
    layer.open({
        type: 1,
        title: '查看照片',
        area: ['900px', '75%'],
        maxmin: true,
        shadeClose: true,
        content: html
    });
}
function escapePhotoHtml(value) {
    if (value === undefined || value === null) {
        return '';
    }
    return String(value)
        .replace(/&/g, '&amp;')
        .replace(/"/g, '&quot;')
        .replace(/</g, '&lt;')
        .replace(/>/g, '&gt;');
}
/**
@@ -335,4 +370,4 @@
        '<rect x="50" y="0"  width="15" height="4" rx="1"/><rect x="55" y="4"  width="5"  height="32" rx="1.5"/><rect x="50" y="36" width="15" height="4" rx="1"/>' +
        '</g>' +
        '</svg>';
}
}