Commit 79a5b47e authored by liboyang's avatar liboyang

已选择数量

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