Commit aa05568e authored by liboyang's avatar liboyang

下载制证包

parent 0a8c5f2a
......@@ -24,10 +24,11 @@
组号详情
</div>
<div class="ui-dialog-content">
{{selected}}
<table class="table" style="border-color: black;">
<thead>
<tr>
<th ng-if="show"><input type="checkbox"></th>
<th><input type="checkbox" ng-click="selectAll(policeList,$event)" ng-checked="isSelectedAll()"></th>
<th>组号</th>
<th>合格数量</th>
<th>不合格数量</th>
......@@ -39,7 +40,7 @@
</thead>
<tbody>
<tr ng-repeat="groups in policeList">
<td ng-if="show"><input type="checkbox"></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>
......@@ -49,11 +50,7 @@
<td>{{groups.SUBMIT_DATE | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{groups.SUBMIT_CODE}}</td>
<td>{{groups.IMPORT_TIME | date:'yyyy-MM-dd'}}</td>
</tr>
</tbody>
</table>
<div style="padding-left: 27%;">
<tm-pagination conf="paginationConf" class="ul"></tm-pagination>
</div>
</div>
\ No newline at end of file
......@@ -78,7 +78,7 @@
<td class="mailbox-subject">{{task.groupNum}}</td>
<td class="mailbox-attachment">{{task.countyValidCount}}</td>
<td class="mailbox-date">{{task.countyInvalidCount}}</td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.countyCode,type.typeCode)">组号列表</a></td>
<td class="mailbox-date"><a ng-click="getPoliceList(task.groupList)">组号列表</a></td>
</tr>
</tbody>
</table>
......
......@@ -70,30 +70,73 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.currentTab = index;
}
$scope.getPoliceList = function(countyCode,typeCode){
// $scope.getPoliceList = function(countyCode,typeCode){
// ngDialog.open({
// template: 'dialogs/policeList.html' + urlTimeStamp(),
// width: 800,
// cache: false,
// closeByDocument:false,
// controller: ['$scope', 'HttpService',function ($scope,HttpService) {
// $scope.show = true;
// console.log($('#datepicker').val(),countyCode,typeCode);
// $scope.paginationConf = {
// currentPage: 1,
// itemsPerPage: 10,
// perPageOptions: [10, 20, 30, 40, 50]
// };
// var getGroupInfoList = function () {
// HttpService.getGroupListData($('#datepicker').val(),countyCode,typeCode,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
// $scope.paginationConf.totalItems = data.count;
// $scope.policeList =data.groupList;
// console.log(data)
// })
// }
// // 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
// $scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', getGroupInfoList);
//
// }]
// });
// }
$rootScope.selectedGroup = [];
$scope.getPoliceList = function(groupList){
ngDialog.open({
template: 'dialogs/policeList.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope,HttpService) {
$scope.show = true;
console.log($('#datepicker').val(),countyCode,typeCode);
$scope.paginationConf = {
currentPage: 1,
itemsPerPage: 10,
perPageOptions: [10, 20, 30, 40, 50]
controller: ['$scope', 'HttpService',function ($scope) {
$scope.policeList=groupList;
//创建变量用来保存选中结果
var updateSelected = function (action, task) {
if (action === 'add' &&$rootScope.selectedGroup.indexOf(task) === -1) {
$rootScope.selectedGroup.push(task);
}
if (action === 'remove' && $rootScope.selectedGroup.indexOf(task) !== -1) $rootScope.selectedGroup.splice($rootScope.selectedGroup.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);
};
//全选操作
$scope.selectAll = function (task,$event) {
var checkbox = $event.target;
var action = (checkbox.checked ? 'add' : 'remove');
for (var i = 0; i < task.length; i++) {
var contact = task[i];
updateSelected(action, contact);
}
};
$scope.isSelected = function (task) {
return $rootScope.selectedGroup.indexOf(task) >= 0;
};
$scope.isSelectedAll = function () {
return $rootScope.selectedGroup.length ===groupList.length > 0;
};
var getGroupInfoList = function () {
HttpService.getGroupListData($('#datepicker').val(),countyCode,typeCode,$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.paginationConf.totalItems = data.count;
$scope.policeList =data.groupList;
console.log(data)
})
}
// 通过$watch currentPage和itemperPage 当他们一变化的时候,重新获取数据条目
$scope.$watch('paginationConf.currentPage +paginationConf.itemsPerPage', getGroupInfoList);
}]
});
}
......@@ -172,7 +215,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
date:$('#datepicker').val(),
name:$rootScope.loginData.name,
countyList:arr,
groupList:groupList
groupList:$rootScope.selectedGroup
}
console.log(map)
HttpService.createTask(map,function(data){
......@@ -181,6 +224,7 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
console.log($scope.searchCurrent)
$scope.searchCurrent();
$scope.selected=[];
$rootScope.selectedGroup=[];
})
}else{
MessageService.showAlert("请选择创建任务单的组")
......
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