jason.lu hace 6 años
padre
commit
9dfbf6f00c
Se han modificado 1 ficheros con 11 adiciones y 8 borrados
  1. 11 8
      js/newData.js

+ 11 - 8
js/newData.js

@@ -329,9 +329,10 @@ var FlowRealTime = new (function () {
         RedRankTable.setData(FlowRealTime.workerDailyService.getList());
     };
 
-    this.Action = new (function () {
+    this.Action = new (function (parent) {
+        this.parent = parent;
         this.doStopSchedule = function () {
-            get_data("fcWorkSchedule/stopSchedule?userId=" + userId + "&scheduleId=" + scheduleId, UI.showStopSuccess);
+            get_data("fcWorkSchedule/stopSchedule?userId=" + userId + "&scheduleId=" + scheduleId, this.parent.UI.showStopSuccess, this.parent);
         };
         this.confirmStopSchedule = function () {
             var out = confirm("真的要下班吗?");
@@ -340,13 +341,14 @@ var FlowRealTime = new (function () {
             } else {
             }
         };
-    })();
+    })(this);
 
-    this.UI = new (function () {
+    this.UI = new (function (parent) {
+        this.p = parent;
         this.showClearPanel = function () {
             $("#clearModal").modal('show');
         };
-        this.showStopSuccess = function (obj, sta) {
+        this.showStopSuccess = function (obj, sta, scope) {
             send_alert("下班操作成功! <a href='denglu.html'> 点击这里返回控制主页 </a>");
         };
         this.bind = function () {
@@ -360,9 +362,10 @@ var FlowRealTime = new (function () {
                 FlowRealTime.Action.confirmStopSchedule();
             })
         }
-    })();
+    })(this);
 
-    var ClearDataControl = new (function () {
+    var ClearDataControl = new (function (parent) {
+        this.p = parent;
         this.finished = true;
         this.executed = false;
         this.directCount = -1;
@@ -446,7 +449,7 @@ var FlowRealTime = new (function () {
                 }
             }
         }
-    })();
+    })(this);
 
 })();