|
@@ -43,9 +43,7 @@ function initCheck() {
|
|
|
format: "yyyy-mm-dd"
|
|
format: "yyyy-mm-dd"
|
|
|
});
|
|
});
|
|
|
if ($.checkTask) {
|
|
if ($.checkTask) {
|
|
|
- getUserCheckCount(function(userList){
|
|
|
|
|
- $("#checked_count").html(userList.length);
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ getUserCheckCount();
|
|
|
initCheckAppealBtns();
|
|
initCheckAppealBtns();
|
|
|
setFeSelect("#fsList", $.checkTask.checked_dept);
|
|
setFeSelect("#fsList", $.checkTask.checked_dept);
|
|
|
// setFeeUserSelect("#check_checked_person_select", $.checkTask.checked_person);
|
|
// setFeeUserSelect("#check_checked_person_select", $.checkTask.checked_person);
|
|
@@ -182,16 +180,32 @@ function fullscreen() {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function getUserCheckCount(callback) {
|
|
|
|
|
|
|
+function getUserCheckCount() {
|
|
|
var param = {
|
|
var param = {
|
|
|
"id":$.checkTask.id,
|
|
"id":$.checkTask.id,
|
|
|
"checked_person":$.checkTask.checked_person
|
|
"checked_person":$.checkTask.checked_person
|
|
|
};
|
|
};
|
|
|
post_common_service("/task/getUserCount/", param, function (userList) {
|
|
post_common_service("/task/getUserCount/", param, function (userList) {
|
|
|
- callback(userList);//$("#checked_count").html(userList.length);
|
|
|
|
|
|
|
+ $("#checked_count").html(userList.length);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+function checkUserCount() {
|
|
|
|
|
+ var param = {
|
|
|
|
|
+ "id":$.checkTask.id,
|
|
|
|
|
+ "checked_person":$.checkTask.checked_person,
|
|
|
|
|
+ "class_type":$.checkTask.class_type
|
|
|
|
|
+ };
|
|
|
|
|
+ post_common_service("/task/getUserCount/", param, function(data){
|
|
|
|
|
+ if(data>=2){
|
|
|
|
|
+ layer.msg("本周期稽查次数已满,不能再被稽查!", {
|
|
|
|
|
+ time: 2000//20s后自动关闭
|
|
|
|
|
+ });
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+ return true;
|
|
|
|
|
+ });
|
|
|
|
|
+}
|
|
|
function showCheckDetailCount(){
|
|
function showCheckDetailCount(){
|
|
|
|
|
|
|
|
}
|
|
}
|
|
@@ -467,25 +481,39 @@ function showChangeUser() {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function changePerson(id) {
|
|
function changePerson(id) {
|
|
|
- // $('#checked_person').html(id);
|
|
|
|
|
|
|
+ var flag=true;
|
|
|
var param = {
|
|
var param = {
|
|
|
- "id": $.checkTask.id,
|
|
|
|
|
- "checked_person": id,
|
|
|
|
|
- }
|
|
|
|
|
- post_common_service("task/update/", param, function (task_data) {
|
|
|
|
|
- //重置当前任务
|
|
|
|
|
- $.checkTask = task_data;
|
|
|
|
|
- //获取用户信息
|
|
|
|
|
- get_common_service('user/getUserById/' + id, null, function (data) {
|
|
|
|
|
- changePersonContent(data);
|
|
|
|
|
- })
|
|
|
|
|
- //更新用户次数表
|
|
|
|
|
- no_return_common_service('task/updateUserCount/', param, function (data) {
|
|
|
|
|
- // changePersonContent(data);
|
|
|
|
|
- })
|
|
|
|
|
- layer.close(changePersonLayer);
|
|
|
|
|
- }, function (error) {
|
|
|
|
|
- alert(error);
|
|
|
|
|
|
|
+ "id":$.checkTask.id,
|
|
|
|
|
+ "checked_person":id,
|
|
|
|
|
+ "class_type":$.checkTask.class_type
|
|
|
|
|
+ };
|
|
|
|
|
+ post_common_service("/task/getUserCount/", param, function(data){
|
|
|
|
|
+ if(data && data.length>=2){
|
|
|
|
|
+ layer.msg("本周期稽查次数已满,不能再被稽查!", {
|
|
|
|
|
+ time: 2000//20s后自动关闭
|
|
|
|
|
+ });
|
|
|
|
|
+ }else{
|
|
|
|
|
+ // $('#checked_person').html(id);
|
|
|
|
|
+ var param1 = {
|
|
|
|
|
+ "id": $.checkTask.id,
|
|
|
|
|
+ "checked_person": id,
|
|
|
|
|
+ }
|
|
|
|
|
+ post_common_service("task/update/", param1, function (task_data) {
|
|
|
|
|
+ //重置当前任务
|
|
|
|
|
+ $.checkTask = task_data;
|
|
|
|
|
+ //获取用户信息
|
|
|
|
|
+ get_common_service('user/getUserById/' + id, null, function (data) {
|
|
|
|
|
+ changePersonContent(data);
|
|
|
|
|
+ })
|
|
|
|
|
+ //更新用户次数表
|
|
|
|
|
+ no_return_common_service('task/updateUserCount/', param, function (data) {
|
|
|
|
|
+ // changePersonContent(data);
|
|
|
|
|
+ })
|
|
|
|
|
+ layer.close(changePersonLayer);
|
|
|
|
|
+ }, function (error) {
|
|
|
|
|
+ alert(error);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
|