Procházet zdrojové kódy

每次关闭弹窗时要清空选择的文件,否则影响下次操作

chenshilong před 3 roky
rodič
revize
ca3640ba47

+ 7 - 0
web/building_saas/main/js/views/project_glj_view.js

@@ -1913,6 +1913,13 @@ $(function () {
     $("#showAlert").show();
   }
 
+  // 每次关闭弹窗时要清空选择的文件,否则影响下次操作
+  $("#importPriceForm").on("hide.bs.modal", function () {
+    var file = $("#customPriceFile")[0];
+    file.value = "";
+    $(".custom-file-label").text("");
+  });
+
   //选择导入的excel文件
   $("#customPriceFile").change(function () {
     let file = $(this)[0];