|
@@ -4,26 +4,28 @@ var periodID = [];
|
|
|
var periodname = [];
|
|
|
var userId = utils_get_param("userId");
|
|
|
|
|
|
-
|
|
|
-if(userId == null){
|
|
|
+function getUserId() {
|
|
|
var use = getCookie("doibyUser");
|
|
|
- if(use == null){
|
|
|
- // No Login
|
|
|
- location.href="sign-in1.html?from=entrance-1";
|
|
|
- }else{
|
|
|
- userId = use;
|
|
|
+ if (use == null) {
|
|
|
+ location.href = "sign-in1.html?from=entrance-1&msg=nologin";
|
|
|
+ if (userId == null) {
|
|
|
+ userId = use;
|
|
|
+ } else {
|
|
|
+ // 指定新的userId
|
|
|
+ //userId = use;
|
|
|
+ }
|
|
|
}
|
|
|
-}else{
|
|
|
- // 没问题
|
|
|
- // 是否存在
|
|
|
- var use = getCookie("doibyUser");
|
|
|
- if(use == null){
|
|
|
- // No Login
|
|
|
- location.href="sign-in1.html?from=entrance-2";
|
|
|
+ if(userId == null || userId === undefined){
|
|
|
+ location.href = "sign-in1.html?from=entrance-3&msg=userId-repeated-notdefined";
|
|
|
}else{
|
|
|
+ if(parseInt(userId) <= 0){
|
|
|
+ location.href = "sign-in1.html?from=entrance-4";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+getUserId();
|
|
|
+
|
|
|
function page_document_load() {
|
|
|
new_data_group("denglu",function(gp){
|
|
|
if(gp.counter === 2){
|
|
@@ -53,7 +55,7 @@ function first_success(obj, sta) {
|
|
|
flowname[j] = output.list[i].flowName + "(负责人)";
|
|
|
j++;
|
|
|
} else {
|
|
|
- flowID[j] = output.list[i].flowId;
|
|
|
+ flowID[j] = 0;
|
|
|
flowname[j] = output.list[i].flowName + "(无权限)";
|
|
|
j++;
|
|
|
k++;
|
|
@@ -121,6 +123,11 @@ function getSpotHtml(htmlbody, i) {
|
|
|
function moveToStart(btn) {
|
|
|
$(btn).attr("disabled", "disabled");
|
|
|
var proAreaCode = $("#pro_areaCode").val();
|
|
|
+ if(""+proAreaCode === "0"){
|
|
|
+ send_alert("请确认您拥有本产线的权限");
|
|
|
+ $(btn).attr("disabled","");
|
|
|
+ return;
|
|
|
+ }
|
|
|
var periodnum = $("#period_ID").val();
|
|
|
get_data("/fcWorkSchedule/startSchedule?flowId=" + proAreaCode + "&periodId=" + periodnum, startToSchedule);
|
|
|
}
|