xs 6 年之前
父節點
當前提交
5f02084b14

+ 19 - 1
src/main/webapp/webpage/modules/sg/project/addItemForm.js

@@ -23,7 +23,25 @@
             layer.msg("请输入项目名称",{icon:3});
             throw SyntaxError;
         }
-        $("#inputForm").submit();
+    layer.msg('加载中', {
+        icon: 16
+        ,shade: 0.01
+        ,offset:['35%','36%']
+    });
+    $.ajax({
+        type: "post",
+        url: "${ctx}/project/tem/verfiy",
+        // contentType: 'application/x-www-form-urlencoded;charset=utf-8',
+        data: {projectName:$("#inputwrite").val(),projectId:$("#newText1").val()},
+        dataType: "json",
+        success: function(data){
+            if(data.code=="1"){
+                $("#inputForm").submit();
+            }else{
+                layer.msg(data.msg, {icon: 5,offset:['33%','33%']});
+            }
+        }
+        });
     }
     $(document).ready(function() {
     // 选择文件触发事件

+ 1 - 1
src/main/webapp/webpage/modules/sg/project/management.js

@@ -142,7 +142,7 @@ layui.config({
                         inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
                         iframeWin.contentWindow.doSubmit();
 
-                        layer.close(index);//关闭对话框。
+                        // layer.close(index);//关闭对话框。
 
                     }
                     ,btn2: function(index, layero){

+ 6 - 2
src/main/webapp/webpage/modules/sg/projecttem/addItem.js

@@ -19,6 +19,11 @@ function doSubmit(obj){ // 添加项目提交方法
        layer.msg("请输入项目名称",{icon:3});
        throw SyntaxError;
    }
+    layer.msg('加载中', {
+        icon: 16
+        ,shade: 0.01
+        ,offset:['37%','36%']
+    });
    $.ajax({
       type: "post",
       url: "${ctx}/project/tem/verfiy",
@@ -29,8 +34,7 @@ function doSubmit(obj){ // 添加项目提交方法
           if(data.code=="1"){
              $("#inputForm").submit();
           }else{
-              alert(data.msg);
-             layer.alert(data.msg, {icon: 6});
+             layer.msg(data.msg, {icon: 5,offset:['33%','33%'});
           }
       }
    });

+ 1 - 1
src/main/webapp/webpage/modules/sg/projecttem/manageList.js

@@ -119,7 +119,7 @@
     inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
     iframeWin.contentWindow.doSubmit();
 
-    layer.close(index);//关闭对话框。
+    // layer.close(index);//关闭对话框。
 
 }
     ,btn2: function(index, layero){