Commit 879cf19b authored by liboyang's avatar liboyang

创建任务单

parent 0c4daab6
...@@ -193,7 +193,10 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -193,7 +193,10 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
$scope.createTaskList = function(typeCode){ $scope.createTaskList = function(typeCode){
$rootScope.selectCount = 0; $rootScope.selectCount = 0;
for (var i = 0; i < $scope.selected.length; i++) { for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount); $rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount)
}
for(var j=0;j<$rootScope.selectedGroup.length;j++){
$rootScope.selectCount = $rootScope.selectCount+parseInt($rootScope.selectedGroup[j].VALID_COUNT);
} }
console.log("for",$rootScope.selectCount) console.log("for",$rootScope.selectCount)
var go = function () { var go = function () {
...@@ -206,24 +209,26 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm ...@@ -206,24 +209,26 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
} }
groupList.push(arr) groupList.push(arr)
} }
var arrGroup = [];
for (var i=0;i<$scope.selectedGroup.length;i++){ for (var i=0;i<$scope.selectedGroup.length;i++){
groupList.push($scope.selectedGroup[i].GROUP_NO) arrGroup.push($scope.selectedGroup[i].GROUP_NO)
} }
groupList.push(arrGroup);
var map = { var map = {
date:$('#datepicker').val(), date:$('#datepicker').val(),
name:$rootScope.loginData.name, name:$rootScope.loginData.name,
groupList:groupList groupList:groupList
} }
console.log(map) console.log(map)
HttpService.createTask(map,function(data){ // HttpService.createTask(map,function(data){
console.log(data) // console.log(data)
MessageService.showAlert(data.msg) // MessageService.showAlert(data.msg)
console.log($scope.searchCurrent) // console.log($scope.searchCurrent)
$scope.searchCurrent(); // $scope.searchCurrent();
$scope.selected=[]; // $scope.selected=[];
$rootScope.closeThis(); // $rootScope.selectCount=[];
}) // $rootScope.closeThis();
// })
}else{ }else{
MessageService.showAlert("请选择创建任务单的组") 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