Enford 5 лет назад
Родитель
Сommit
242f67cee7

+ 30 - 30
src/main/webapp/webpage/modules/sg/managementcenter/projectPlanArrage/act/netWorkManageAct.js

@@ -298,36 +298,20 @@ function newWorkSubmit() {
             var iframeWin = layero.find('iframe')[0]; //得到弹出的窗口对象,执行窗口内iframe页的方法:iframeWin.method();
             var flag = iframeWin.contentWindow.save();
             if (flag){
-                jp.prompt("审核通过", function (message) {
-                    jp.post("${ctx}/sg/managementCenter/projectPlanArrage/newWorkRunProInsId",
-                        {
-                            "flag": "yes",
-                            "comment": window.encodeURI(message)
-                        },
-                        function (data) {
-                            if(data.success){
-                                jp.success(data.msg);
-                                top.layer.close(index);
-                                jp.go("${ctx}/act/task/todo")
-                            }else {
-                                jp.error(data.msg);
-                            }
+                $.get("${ctx}/sg/managementCenter/projectPlanArrage/judgeAddTimeNet", function(data){
+                    if(data.success){
+                        // jp.success("安排计划成功");
+                        planSuccess();
+                        top.layer.close(index);
+                    }else if (data.msg == "1"){
+                        jp.error("您还要项目具体安排时间未填!");
+                    }else{
+                        jp.confirm('您安排的同一开关的项目时间不相同,是否继续?', function(){
+                            planSuccess();
+                            top.layer.close(index);
                         })
-                });
-                // $.get("${ctx}/sg/managementCenter/projectPlanArrage/judgeAddTime", function(data){
-                //     if(data.success){
-                //         jp.success("安排计划成功");
-                //         withTheProcess();
-                //         top.layer.close(index);
-                //     }else{
-                //         // jp.confirm('您安排的计划时间与其他项目经理安排时间不一致,是否继续执行?', function(){
-                //         //     withTheProcess();
-                //         // })
-                //         jp.error(data.msg);
-                //         top.layer.close(index);
-                //     }
-                // })
-                // refresh();
+                    }
+                })
             }
         },
         btn2: function(index){
@@ -354,5 +338,21 @@ function newWorkSubmit() {
     //         })
     // });
 }
-
+function planSuccess() {
+    jp.prompt("审核通过", function (message) {
+        jp.post("${ctx}/sg/managementCenter/projectPlanArrage/newWorkRunProInsId",
+            {
+                "flag": "yes",
+                "comment": window.encodeURI(message)
+            },
+            function (data) {
+                if(data.success){
+                    jp.success(data.msg);
+                    jp.go("${ctx}/act/task/todo")
+                }else {
+                    jp.error(data.msg);
+                }
+            })
+    });
+}
 </script>