Преглед изворни кода

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	js/lazhang-data.js
Guichuan Yu пре 6 година
родитељ
комит
b4eb5d308f
2 измењених фајлова са 8 додато и 4 уклоњено
  1. 4 4
      js/basic.js
  2. 4 0
      js/common.js

+ 4 - 4
js/basic.js

@@ -260,12 +260,12 @@ function send_alert(a, b){
 function getUserName(uid){
     var uname = null;
     Users.list.forEach(function(val, aid, arr){
-       if(val.worker.userId == uid){
-           uname = val.worker.userName;
+       if(val.worker.staffNo == uid){
+           uname = val.worker.staffName;
        }
     });
     if(uname == null) {
-        get_data("fcWorker/list?userId=" + uid, on_username_retn);
+        get_data("oaStaff/list?staffNo=" + uid, on_username_retn);
         return "[用户:"+uid+"]";
     }else{
         return uname;
@@ -273,7 +273,7 @@ function getUserName(uid){
 }
 
 function on_username_retn(obj, sta) {
-    var uid = this.url.substring(this.url.indexOf("userId=") + 7);
+    var uid = this.url.substring(this.url.indexOf("staffNo=") + 7);
     let ruid = parseInt(uid);
     var out = first_parse(this, obj);
     if(out.list.length > 0){

+ 4 - 0
js/common.js

@@ -96,6 +96,10 @@ function update_all_history(){
     hisstack[0] = todayotherstack + schedulestack;
     hisrate[0] = get_factor(hispass[0], hisfail[0]);
 
+    if(typeof hisrate[0] == "undefined" || isNaN(hisrate[0])){
+
+    }
+
     for(i=2;i<=3;i++){
         hispass[i] = orighispass[i] + hispass[0];
         hisfail[i] = orighisfail[i] + hisfail[0];