Commit 5e09595b authored by liboyang's avatar liboyang

修改页面

parent 453156f7
......@@ -28,7 +28,7 @@
<table class="table" style="border-color: black;">
<thead>
<tr>
<th><input type="checkbox" ng-click="selectAll(policeList,$event)" ng-checked="isSelectedAll()"></th>
<!--<th><input type="checkbox" ng-click="selectAll(policeList,$event)" ng-checked="isSelectedAll()"></th>-->
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
......@@ -40,7 +40,7 @@
</thead>
<tbody>
<tr ng-repeat="groups in policeList">
<td><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td>
<!--<td><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td>-->
<td>{{groups.GROUP_NO}}</td>
<td>{{groups.VALID_COUNT}}</td>
<td>{{groups.INVALID_COUNT}}</td>
......
......@@ -53,6 +53,7 @@
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal+groupCardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -71,7 +72,7 @@
</thead>
<tbody ng-repeat="task in type.countyList| orderBy:countyCode:desc">
<tr>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.valid}}" name="{{task.countyValidCount}}" ng-click="updateSelection($event,task)"></td>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.valid}}" ng-click="updateSelection($event,task)"></td>
<td class="mailbox-star"><b>{{task.saveDate | date:'yyyy-MM-dd'}}</b></td>
<td class="mailbox-name"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupList.length}}</td>
......@@ -84,7 +85,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h4>已选择数量:{{cardsTotal+groupCardsTotal}}</h4>
<button class="btn btn-primary" ng-click="createTaskList(type.typeCode)">创建任务单</button>
</div>
</div>
......
......@@ -27,6 +27,7 @@
</ul>
</a>
</li>
<li class="pull-right" style="padding-right: 20px;"><h5>已选择数量:{{cardsTotal}}</h5></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -47,7 +48,7 @@
</thead>
<tbody ng-repeat="task in type.countyList| orderBy:countyCode:desc">
<tr>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" name="{{task.countyValidCount}}" ng-click="updateSelection($event,task)"></td>
<td><input type="checkbox" class="checkOneBox" ng-checked="isSelected(task)" value="{{task.taskId}}" ng-click="updateSelection($event,task)"></td>
<td class="mailbox-star"><b>{{task.taskId}}</b></td>
<td class="mailbox-name"><a>{{task.countyName}}</a></td>
<td class="mailbox-subject">{{task.groupList.length}}</td>
......@@ -88,7 +89,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已下发任务量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">下发任务单</button>
</div>
</div>
......
......@@ -65,22 +65,22 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
var temp = 0;
$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;
var checks = document.getElementsByClassName("checkOneBox");
for (var i=0;i<checks.length;i++){
if (checks[i].checked) {
sum += parseInt(checks[i].value);
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 - temp;
temp = sum;
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
//全选操作
......@@ -91,21 +91,17 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
var contact = task[i];
updateSelected(action, contact);
}
if(checkbox.checked){
$rootScope.cardsTotal=0;
var sum = 0;
var checks = document.getElementsByClassName("checkOneBox");
for (var i = 0; i < checks.length; i++) {
sum += parseInt(checks[i].value);
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum - temp;
temp = sum;
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{
$rootScope.cardsTotal =0;
temp = 0;
continue;
}
}
$rootScope.cardsTotal = $rootScope.cardsTotal + sum;
};
$scope.isSelected = function (task) {
return $scope.selected.indexOf(task) >= 0;
......
......@@ -278,12 +278,21 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
if (action === 'remove' && $scope.selected.indexOf(task) !== -1) $scope.selected.splice($scope.selected.indexOf(task), 1);
};
//更新某一列数据的选择
var temp = 0;
$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) {
......@@ -293,6 +302,16 @@ 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;
......@@ -445,6 +464,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
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) {
......@@ -454,6 +483,17 @@ 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;
......@@ -600,6 +640,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
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) {
......@@ -609,6 +659,16 @@ 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;
......
......@@ -27,9 +27,7 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h5>今日已转出数量:{{distributedCount}}</h5>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -100,7 +98,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -27,9 +27,7 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h4>任务总数:{{total}}</h4>
</li>
<li class="pull-right" style="padding-right: 20px;"><h4>已选择数量:{{cardsTotal}}</h4></li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -94,7 +92,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -27,8 +27,8 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 30px;">
<h4>任务总数:{{total}}</h4>
<li style="float: right; padding-right: 20px;">
<h4>任务总数:{{cardsTotal}}</h4>
</li>
</ul>
</div>
......@@ -94,7 +94,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
......@@ -25,6 +25,9 @@
</ul>
</a>
</li>
<li style="float: right; padding-right: 20px;">
<h4>任务总数:{{cardsTotal}}</h4>
</li>
</ul>
</div>
<div ng-repeat="type in cycleSheetData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
......@@ -99,7 +102,6 @@
</table>
<!-- /.table -->
<div class="box-footer" style="text-align: right;">
<h5>今日已转出数量:{{distributedCount}}</h5>
<button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div>
</div>
......
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