Commit 879cf19b authored by liboyang's avatar liboyang

创建任务单

parent 0c4daab6
......@@ -193,7 +193,10 @@ 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);
$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)
var go = function () {
......@@ -206,24 +209,26 @@ angular.module('AvatarCheck.createTaskList', ['ngRoute', 'AvatarCheck.http', 'tm
}
groupList.push(arr)
}
var arrGroup = [];
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 = {
date:$('#datepicker').val(),
name:$rootScope.loginData.name,
groupList:groupList
}
console.log(map)
HttpService.createTask(map,function(data){
console.log(data)
MessageService.showAlert(data.msg)
console.log($scope.searchCurrent)
$scope.searchCurrent();
$scope.selected=[];
$rootScope.closeThis();
})
// HttpService.createTask(map,function(data){
// console.log(data)
// MessageService.showAlert(data.msg)
// console.log($scope.searchCurrent)
// $scope.searchCurrent();
// $scope.selected=[];
// $rootScope.selectCount=[];
// $rootScope.closeThis();
// })
}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