From 1fe8f9b4dbb507b8991b5966e7353ac918820f4d Mon Sep 17 00:00:00 2001 From: tqs <56479841@qq.com> Date: 星期五, 23 九月 2022 11:41:11 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/cstmr/cstmr.js | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/static/js/cstmr/cstmr.js b/src/main/webapp/static/js/cstmr/cstmr.js index f0c5137..dbd9232 100644 --- a/src/main/webapp/static/js/cstmr/cstmr.js +++ b/src/main/webapp/static/js/cstmr/cstmr.js @@ -64,9 +64,10 @@ break case 2: // 瀵煎叆 Excel - let arrFileHandle = await window.showOpenFilePicker() - let file = await arrFileHandle[0].getFile(); - upload(file); + $("#importExcel").trigger("click"); + // let arrFileHandle = await window.showOpenFilePicker() + // let file = await arrFileHandle[0].getFile(); + // upload(file); break case 3: // 瀵煎嚭 Excel @@ -385,10 +386,11 @@ } } -function upload(file){ - if(!file) { +function upload(obj){ + if(!obj.files) { return; } + var file = obj.files[0]; admin.confirm('纭鍚屾 [' + file.name +'] 鏂囦欢鍚楋紵', function (index) { layer.load(1, {shade: [0.1,'#fff']}); var url = baseUrl + "/cstmr/excel/import/auth"; -- Gitblit v1.9.1