From fae2db5e86b4e15ee0336739925328e88d25021a Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期六, 06 五月 2023 16:39:29 +0800
Subject: [PATCH] BUG修改

---
 management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js |   42 ++++++++++++++++++++++++++----------------
 1 files changed, 26 insertions(+), 16 deletions(-)

diff --git a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js
index c820a68..c881b64 100644
--- a/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js
+++ b/management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js
@@ -151,22 +151,32 @@
  * 提交启用冻结
  */
 TAppUser.updateStatus = function () {
-        var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) {
-            Feng.success("修改成功!");
-            TAppUserInfoDlg.close();
-            parent.TAppUser.table.refresh();
-        }, function (data) {
-            Feng.error("修改失败!" + data.responseJSON.message + "!");
-        });
-        ajax.set("id",$("#id").val());
-        ajax.set("status",$("#status").val());
-        if($("#status").val() == 1){
-            ajax.set("remark",$("#stopRemark").val());
-        }
-        if($("#status").val() == 2){
-            ajax.set("remark",$("#startRemark").val());
-        }
-        ajax.start();
+    var status = $("#status").val();
+    if(status == 1 && ($("#stopRemark").val() == '' || $("#stopRemark").val() == null)){
+        Feng.info("请输入冻结理由!")
+        return;
+    }
+    if(status == 2 && ($("#startRemark").val() == '' || $("#startRemark").val() == null)){
+        Feng.info("请输入启用理由!")
+        return;
+    }
+
+    var ajax = new $ax(Feng.ctxPath + "/tAppUser/update-status", function (data) {
+        Feng.success("修改成功!");
+        TAppUserInfoDlg.close();
+        parent.TAppUser.table.refresh();
+    }, function (data) {
+        Feng.error("修改失败!" + data.responseJSON.message + "!");
+    });
+    ajax.set("id",$("#id").val());
+    ajax.set("status",$("#status").val());
+    if($("#status").val() == 1){
+        ajax.set("remark",$("#stopRemark").val());
+    }
+    if($("#status").val() == 2){
+        ajax.set("remark",$("#startRemark").val());
+    }
+    ajax.start();
 };
 
 /**

--
Gitblit v1.7.1