From b8daa7e818bd62d54a7c385823a047fd5c6249cc Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 17 May 2019 15:15:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AF=BC=E5=85=A5=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=B4=A6=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/managements_controller.rb | 2 +- app/views/managements/import_student_accounts.js.erb | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/managements_controller.rb b/app/controllers/managements_controller.rb index 775b1947..b4e5b0b4 100644 --- a/app/controllers/managements_controller.rb +++ b/app/controllers/managements_controller.rb @@ -2929,7 +2929,7 @@ end attachment.save path = attachment.disk_directory name = attachment.disk_filename - if name.split(".").last == "xls" || name.split(".").last == "xlsx" + if name.split(".").last == "xlsx" # lists = readXlsData("files/baolong.xlsx") lists = readXlsData("files/#{path}/#{name}") school_id = nil diff --git a/app/views/managements/import_student_accounts.js.erb b/app/views/managements/import_student_accounts.js.erb index 7008649f..dde4caa6 100644 --- a/app/views/managements/import_student_accounts.js.erb +++ b/app/views/managements/import_student_accounts.js.erb @@ -1,3 +1,5 @@ <% if @status == 1 %> notice_box("导入成功"); +<% else %> +notice_box("导入失败,只支持xlsx文件"); <% end %> \ No newline at end of file