Commit 79a5b47e authored by liboyang's avatar liboyang

已选择数量

parent 5214116b
......@@ -2,7 +2,7 @@
提示
</div>
<div class="ui-dialog-content">
<div>本次转出总数:{{cardsTotal}}</div>
<div>本次转出总数:{{selectCount}}</div>
</div>
<div class="ui-dialog-confirm">
<button type="submit" class="btn btn-info" ng-click="confirmGoTo()">确认</button>
......
......@@ -168,19 +168,19 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
$rootScope.cardsTotal = 0;
$scope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
updateSelected(action, task);
$rootScope.cardsTotal=0;
$scope.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.cardsTotal = $scope.cardsTotal + sum ;
};
//全选操作
......@@ -206,6 +206,11 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
};
$scope.createTaskList = function(typeCode){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
if($scope.selected.length>0||$rootScope.selectedGroup.length>0){
var arr = [];
......@@ -233,8 +238,6 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
console.log($scope.searchCurrent)
$scope.searchCurrent();
$scope.selected=[];
$rootScope.selectedGroup=[];
$rootScope.cardsTotal = 0;
$rootScope.closeThis();
})
}else{
......
......@@ -159,6 +159,11 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
$scope.goes = function(){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $(".checkOneBox:checked");
if(checks.length>0){
......@@ -181,7 +186,7 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
MessageService.showAlert("下发完成")
$rootScope.cardsTotal = 0;
$scope.selected=[];
$rootScope.closeThis();
})
}else{
......@@ -199,6 +204,7 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
}]
})
}
});
......
......@@ -181,6 +181,11 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
}
$scope.goes = function(){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $("#checkOneBox:checked");
if(checks.length>0){
......@@ -205,8 +210,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
HttpService.updatePrintTaskListProcess(json,function(data){
$scope.searchTaskList();
MessageService.showAlert("转出完成")
$rootScope.cardsTotal=0;
$scope.restCount=0;
$scope.selected=[];
$rootScope.closeThis();
})
}else{
......@@ -219,7 +223,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
......@@ -285,21 +288,10 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
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) {
......@@ -309,16 +301,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
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) {
return $scope.selected.indexOf(task) >= 0;
......@@ -371,6 +353,11 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
}
$scope.goes = function(){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $(".checkOneBox:checked");
if(checks.length>0){
......@@ -393,7 +380,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
MessageService.showAlert("转出完成")
$rootScope.cardsTotal = 0;
$scope.selected=[];
$rootScope.closeThis();
})
}else{
......@@ -405,8 +392,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
controller: ['$scope',function ($scope) {
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
......@@ -471,21 +457,10 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
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) {
......@@ -495,17 +470,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
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) {
return $scope.selected.indexOf(task) >= 0;
......@@ -554,6 +518,11 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
}
$scope.goes = function(){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $(".checkOneBox:checked");
if(checks.length>0){
......@@ -576,7 +545,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
MessageService.showAlert("转出完成")
$rootScope.cardsTotal = 0;
$scope.selected=[];
$rootScope.closeThis();
})
}else{
......@@ -589,7 +558,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$scope.confirmGoTo = go;
$rootScope.closeThis = $scope.closeThisDialog;
}]
......@@ -655,21 +623,10 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
$rootScope.cardsTotal = 0;
$scope.updateSelection = function ($event, task) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
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) {
......@@ -679,16 +636,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
var contact = task[i];
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) {
return $scope.selected.indexOf(task) >= 0;
......@@ -737,6 +684,11 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
}
$scope.goes = function(){
$rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount);
}
console.log("for",$rootScope.selectCount)
var go = function () {
var checks = $(".checkOneBox:checked");
if(checks.length>0){
......@@ -759,7 +711,7 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
MessageService.showAlert("转出完成")
$rootScope.cardsTotal = 0;
$scope.selected=[];
$rootScope.closeThis();
})
}else{
......@@ -772,7 +724,6 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.cardsTotal=0;
$rootScope.closeThis=$scope.closeThisDialog;
$scope.confirmGoTo = go;
}]
......
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