fix lỗi đồng bộ dữ liệu không xóa các dữ liệu cũ
This commit is contained in:
@@ -297,18 +297,18 @@ function syncSchedule(device_id, device_ip, fullData) {
|
||||
},
|
||||
success: function (data) {
|
||||
var totalsStaff = data.staffs;
|
||||
totalPage = parseInt(totalsStaff / 200);
|
||||
if (totalsStaff % 200 > 0)
|
||||
totalPage = parseInt(totalsStaff / parseInt($("input[name='pageSize']").val()));
|
||||
if (totalsStaff % parseInt($("input[name='pageSize']").val()) > 0)
|
||||
totalPage++;
|
||||
secondIncrement = 1 / (totalPage + 1);
|
||||
if (data.res.ErrorCode == "-1") {
|
||||
appendLogs("[" + data.IP + "] Đồng bộ lịch trình tới thiết bị thất bại", "red", "remove");
|
||||
processProgress(1);
|
||||
index++;
|
||||
if (index < totals)
|
||||
syncSchedule(fullData.lists[index].id, fullData.lists[index].ip, fullData);
|
||||
else {
|
||||
index = 0;
|
||||
processProgress(1);
|
||||
}
|
||||
} else {
|
||||
appendLogs("[" + data.IP + "] Đồng bộ lịch trình tới thiết bị thành công", "green", "check");
|
||||
|
||||
Reference in New Issue
Block a user