Commit f5d9d0cc authored by liboyang's avatar liboyang

已选择数量

parent 0c801cd6
...@@ -31,7 +31,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -31,7 +31,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchCurrent = function(){ $scope.searchCurrent = function(){
$rootScope.cardsTotal = 0; $scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
HttpService.getTaskListToCreate($('#datepicker').val(),function(data){ HttpService.getTaskListToCreate($('#datepicker').val(),function(data){
$scope.cycleSheetData = data; $scope.cycleSheetData = data;
...@@ -173,15 +173,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -173,15 +173,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
var checkbox = $event.target; var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove'); var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task); updateSelected(action, task);
$scope.cardsTotal = 0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
sum += parseInt($scope.selected[i].countyValidCount);
}
$scope.cardsTotal = $scope.cardsTotal + sum ;
}; };
//全选操作 //全选操作
$scope.selectAll = function (task,$event) { $scope.selectAll = function (task,$event) {
...@@ -191,12 +182,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -191,12 +182,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
var contact = task[i]; var contact = task[i];
updateSelected(action, contact); updateSelected(action, contact);
} }
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
sum += parseInt($scope.selected[i].countyValidCount);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
}; };
$scope.isSelected = function (task) { $scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0; return $scope.selected.indexOf(task) >= 0;
......
...@@ -27,7 +27,7 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p ...@@ -27,7 +27,7 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchTaskList = function(){ $scope.searchTaskList = function(){
$rootScope.cardsTotal = 0; $scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
HttpService.getTaskListByProcess(function(data){ HttpService.getTaskListByProcess(function(data){
$scope.cycleSheetData = data; $scope.cycleSheetData = data;
...@@ -72,18 +72,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p ...@@ -72,18 +72,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
var checkbox = $event.target; var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove'); var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task); updateSelected(action, task);
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
}; };
//全选操作 //全选操作
$scope.selectAll = function (task,$event) { $scope.selectAll = function (task,$event) {
...@@ -93,16 +81,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p ...@@ -93,16 +81,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
var contact = task[i]; var contact = task[i];
updateSelected(action, contact); updateSelected(action, contact);
} }
$rootScope.cardsTotal=0;
var sum = 0;
for (var i = 0; i < $scope.selected.length; i++) {
if($scope.selected[i].faileCount==0){
sum += parseInt($scope.selected[i].countyValidCount)-parseInt($scope.selected[i].specialCount);
}else{
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
}; };
$scope.isSelected = function (task) { $scope.isSelected = function (task) {
......
...@@ -47,6 +47,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -47,6 +47,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchTaskList = function(){ $scope.searchTaskList = function(){
$scope.selected = [];
$rootScope.cardsTotal=0; $rootScope.cardsTotal=0;
$scope.restCount=0; $scope.restCount=0;
$scope.isHistory=0; $scope.isHistory=0;
...@@ -248,6 +249,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -248,6 +249,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchTaskList = function(){ $scope.searchTaskList = function(){
$scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
HttpService.getPingTaskListByProcess(function(data){ HttpService.getPingTaskListByProcess(function(data){
$scope.cycleSheetData = data.typeList; $scope.cycleSheetData = data.typeList;
...@@ -418,6 +420,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -418,6 +420,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchTaskList = function(){ $scope.searchTaskList = function(){
$scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
HttpService.getFjTaskListByProcess(function(data){ HttpService.getFjTaskListByProcess(function(data){
$scope.cycleSheetData = data; $scope.cycleSheetData = data;
...@@ -584,6 +587,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -584,6 +587,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
$scope.isHistory=0; $scope.isHistory=0;
$scope.searchTaskList = function(){ $scope.searchTaskList = function(){
$scope.selected = [];
$scope.isHistory=0; $scope.isHistory=0;
HttpService.getFjTaskListByProcess(function(data){ HttpService.getFjTaskListByProcess(function(data){
$scope.cycleSheetData = data; $scope.cycleSheetData = data;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment