From db7fa6a91b9534ac90e219b6f554c54c43c83a5a Mon Sep 17 00:00:00 2001
From: liujie <liujie>
Date: 星期三, 16 八月 2023 09:28:15 +0800
Subject: [PATCH] update

---
 management/guns-admin/src/main/webapp/static/modular/system/tAppUser/tAppUser.js |   46 ++++++++++++++++++++++++++++------------------
 1 files changed, 28 insertions(+), 18 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..56bf20c 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
@@ -124,7 +124,7 @@
     var index = layer.open({
         type: 2,
         title: '停用',
-        area: ['45%', '50%'], //宽高
+        area: ['800px', '420px'], //宽高
         fix: false, //不固定
         maxmin: true,
         content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id
@@ -139,7 +139,7 @@
     var index = layer.open({
         type: 2,
         title: '启用',
-        area: ['45%', '50%'], //宽高
+        area: ['800px', '420px'], //宽高
         fix: false, //不固定
         maxmin: true,
         content: Feng.ctxPath + '/tAppUser/tAppUser_start_and_stop?id='+id
@@ -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