Selaa lähdekoodia

增加前端控制防止重复点击

laiguoran 3 vuotta sitten
vanhempi
commit
432e5de518
1 muutettua tiedostoa jossa 3 lisäystä ja 0 poistoa
  1. 3 0
      app/public/js/measure_material.js

+ 3 - 0
app/public/js/measure_material.js

@@ -237,9 +237,12 @@ $(function () {
 
     // 提交表单判断
     $('#addMaterial').click(function () {
+        $(this).attr('disabled', true);
         if ($('#s_order').val() == '') {
             toastr.error('请选择计量期');
+            $(this).removeAttr('disabled');
             return false;
         }
+        $(this).text('添加中,请稍后...');
     })
 });