|
@@ -136,3 +136,39 @@ function startToSchedule(obj) {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function checkIfExists(){
|
|
|
+ get_data("/fcWorkSchedule/remaining",on_receive_exist);
|
|
|
+}
|
|
|
+
|
|
|
+function getRemainHTML(obj) {
|
|
|
+ return `<a href='lazhang.html?scheduleId=${obj.scheduleId}&flowId=${obj.flowId}'> 正在进行的班次: ${obj.flowName} ${obj.fcDay} </a> `
|
|
|
+}
|
|
|
+
|
|
|
+function send_remain(a, b) {
|
|
|
+ $("#mpRemain").html(a);
|
|
|
+ $("#mpRemain").show();
|
|
|
+ return;
|
|
|
+}
|
|
|
+
|
|
|
+function on_receive_exist(objs, sta){
|
|
|
+ let obj = first_parse(this, objs);
|
|
|
+ console.log(obj);
|
|
|
+ if(obj != null && obj != undefined && obj.list != null && obj.list != undefined && obj.list.length > 0){
|
|
|
+ let i = 0;
|
|
|
+ let wholehtml = "";
|
|
|
+ for(i=0;i<obj.list.length;i++){
|
|
|
+ wholehtml += getRemainHTML(obj.list[i]);
|
|
|
+ }
|
|
|
+ wholehtml += "任一产线必须结束以前的班次才能开始新的班次!";
|
|
|
+ send_remain(wholehtml);
|
|
|
+ }else{
|
|
|
+ send_alert("查询失败");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+function logout(){
|
|
|
+ setCookieWithTimeout("doibyUser","",-10);
|
|
|
+ console.log(getCookie("doibyUser"));
|
|
|
+ location.href="sign-in1.html";
|
|
|
+}
|
|
|
+
|