自动化立体仓库 - WMS系统
#
luxiaotao1123
2020-06-06 5dd0071775a7252ed22e4c6bfd1c3ee7daeb012a
src/main/webapp/static/js/matCode/matCode.js
@@ -169,8 +169,9 @@
                    });
                }
                break;
            // 导出
            case 'exportData':
                layer.confirm('确定导出Excel吗', function(){
                layer.confirm('确定导出Excel吗', {shadeClose: true,}, function(){
                    var titles=[];
                    var fields=[];
                    obj.config.cols[0].map(function (col) {
@@ -191,22 +192,23 @@
                        url: baseUrl+"/matCode/export/auth",
                        headers: {'token': localStorage.getItem('token')},
                        data: JSON.stringify(param),
                        dataType:'json',
                        // dataType:'json',
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        success: function (res) {
                            layer.closeAll();
                            if (res.code === 200) {
                                table.exportFile(titles,res.data,'xls');
                            } else if (res.code === 403) {
                                top.location.href = baseUrl;
                            } else {
                                layer.msg(res.msg)
                            }
                            // layer.closeAll();
                            // if (res.code === 200) {
                            //     table.exportFile(titles,res.data,'xls');
                            // } else if (res.code === 403) {
                            //     top.location.href = baseUrl;
                            // } else {
                            //     layer.msg(res.msg)
                            // }
                        }
                    });
                });
                break;
            // 导入
            case 'intoData':
                layer.open({
                    type: 1,
@@ -215,6 +217,11 @@
                    content: $('#importDataDiv'),
                    success: function(layero, index){
                        uploader.reload();
                    },
                    end: function () {
                        $('#uploadDesc').show();
                        $('#uploadDemoView').hide();
                        $('#fileMame').html("");
                    }
                });
                break;