自动化立体仓库 - WMS系统
pang.jiabao
2025-04-29 25e2f9601aed6d23923f3200ef248036b7787e7c
src/main/webapp/static/js/locDetl/locDetl.js
@@ -46,12 +46,13 @@
    return cols;
}
layui.use(['table','laydate', 'form'], function(){
layui.use(['table','laydate', 'form','upload','layer'], function(){
    var table = layui.table;
    var $ = layui.jquery;
    var layer = layui.layer;
    var layDate = layui.laydate;
    var form = layui.form;
    var upload = layui.upload;
    // 数据渲染
    tableIns = table.render({
@@ -97,6 +98,28 @@
        }
    });
    upload.render({
        elem: '#uploadExcel', // 绑定元素
        url: baseUrl+'/productCalibration', // 上传接口,替换为你的后端接口
        headers:{'token': localStorage.getItem('token')},
        accept: 'file', // 允许上传的文件类型
        exts: 'xls|xlsx', // 允许上传的文件后缀
        done: function(res){
            // 上传完毕回调
            if(res.code === 200){
                layer.msg(res.msg);
                console.log('文件数据:', res.data);
            } else {
                layer.msg(res.msg || '上传失败');
            }
        },
        error: function(){
            // 请求异常回调
            layer.msg('上传失败,请重试');
        }
    });
    // 监听排序事件
    table.on('sort(locDetl)', function (obj) {
        var searchData = {};