diff --git a/js/demandPlan/child/delivery_batch_list.js b/js/demandPlan/child/delivery_batch_list.js index 3336e86..9b76d34 100644 --- a/js/demandPlan/child/delivery_batch_list.js +++ b/js/demandPlan/child/delivery_batch_list.js @@ -343,9 +343,6 @@ function viewFile(obj) { // 下载文件 function downLoadFile(obj) { console.log(obj); - let params = { - 'fileId': obj.id, - } - let url = dataUrl + "backstage/export/download"; - downLoadFileUtil(url, obj.fileName, JSON.stringify(params)); + let url = dataUrl + "backstage/export/download?fileId=" + obj.id; + downLoadFileUtil(url, obj.fileName, null); } \ No newline at end of file diff --git a/js/demandPlan/child/view_data_list.js b/js/demandPlan/child/view_data_list.js index 7a051fd..5b02243 100644 --- a/js/demandPlan/child/view_data_list.js +++ b/js/demandPlan/child/view_data_list.js @@ -194,6 +194,7 @@ function initTable() { // 设置字体加粗 function setFontBold(value) { + value = value ? value : '/'; return '' + value + ""; } diff --git a/js/public.js b/js/public.js index 68eef1d..adb0279 100644 --- a/js/public.js +++ b/js/public.js @@ -88,9 +88,8 @@ function exportExcelUtil(url, fileName,params) { function downLoadFileUtil(url, fileName,params) { let loadingMsg = layer.msg("文件导出中,请稍候...", { icon: 16, scrollbar: false, time: 0, }); let xhr = new XMLHttpRequest(); - xhr.open("POST", url, true); + xhr.open("GET", url, true); xhr.responseType = "blob"; // 转换流 - xhr.setRequestHeader('Content-Type','application/json;charset=UTF-8') xhr.setRequestHeader("authorization", sessionStorage.getItem("gz-token")); xhr.onload = function () { layer.close(loadingMsg); @@ -101,12 +100,12 @@ function downLoadFileUtil(url, fileName,params) { a.href = url; a.download = fileName; // 文件名 } else { - layer.msg("文件导出中异常,请稍后重试", { icon: 16, scrollbar: false, time: 2000 }); + layer.msg("文件导出异常,请稍后重试", { icon: 16, scrollbar: false, time: 2000 }); } a.click(); window.URL.revokeObjectURL(url); }; - xhr.send(params); + xhr.send(); } // 格式化日对象