#
Junjie
2024-08-14 4e02590562894bf6614bc3066f6689f1b00ea2ce
zy-asrs-wms/src/main/webapp/static/js/report/workIn.js
@@ -1,9 +1,8 @@
var pageCurr;
function getCol() {
    var cols = [
        {field: 'ioTime$', align: 'center', title: '入库日期', width: 200},
        {field: 'io_time', align: 'center', title: '入库日期', width: 200}
        ,{field: 'loc_no', align: 'center',title: '库位号'}
        {field: 'ioTime$', align: 'center', title: '入库日期', width: 200}
        ,{field: 'locNo', align: 'center',title: '库位号'}
    ];
    cols.push.apply(cols, detlCols);
    return cols;
@@ -107,28 +106,15 @@
                        data: JSON.stringify(param),
                        contentType:'application/json;charset=UTF-8',
                        method: 'POST',
                        xhrFields: {
                            responseType: "blob" // 设置响应类型为二进制数据
                        },
                        success: function (res) {
                            // 创建一个临时的下载链接
                            const url = window.URL.createObjectURL(res);
                            // 创建一个隐藏的 <a> 元素并设置下载链接
                            const a = document.createElement("a");
                            a.style.display = "none";
                            a.href = url;
                            a.download = "export.xlsx"; // 指定下载的文件名
                            document.body.appendChild(a);
                            // 触发点击事件以开始下载
                            a.click();
                            // 清理临时资源
                            setTimeout(function () {
                                window.URL.revokeObjectURL(url);
                                document.body.removeChild(a);
                                layer.closeAll();
                            }, 100);
                            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)
                            }
                        },
                        fail: function (){
                            layer.msg('导出失败', {icon: 2})