浏览代码

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

laiguoran 4 年之前
父节点
当前提交
432e5de518
共有 1 个文件被更改,包括 3 次插入0 次删除
  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('添加中,请稍后...');
     })
 });