Commit 8c4dd12e authored by liboyang's avatar liboyang

分拣转出任务单时,没选中任务单给提示

parent 427e18fb
...@@ -630,7 +630,9 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -630,7 +630,9 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
console.log($scope.cycleSheetData) console.log($scope.cycleSheetData)
}) })
} }
$scope.searchTaskList(); if($rootScope.loginData.login==true){
$scope.searchTaskList();
}
$scope.searchHistory = function(){ $scope.searchHistory = function(){
$scope.isHistory=1; $scope.isHistory=1;
...@@ -717,57 +719,57 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http']) ...@@ -717,57 +719,57 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
} }
$scope.goes = function(){ $scope.goes = function(){
$rootScope.selectCount = 0; var checks = $(".checkOneBox:checked");
for (var i = 0; i < $scope.selected.length; i++) { if(checks.length>0){
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount-$scope.selected[i].specialCount); var go = function () {
} $rootScope.closeBtn();
console.log("for",$rootScope.selectCount) $rootScope.selectCount = 0;
var go = function () { for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.closeBtn(); $rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount-$scope.selected[i].specialCount);
var checks = $(".checkOneBox:checked");
if(checks.length>0){
var arr = [];
var failedArr=[];
for (var i=0;i<checks.length;i++){
if(checks[i].value.length<11){
failedArr.push(checks[i].value)
}else{
arr.push(checks[i].value)
} }
} console.log("for",$rootScope.selectCount)
var json={ var arr = [];
process:$rootScope.loginData.roleList[0].process, var failedArr=[];
name:$rootScope.loginData.name, for (var i=0;i<checks.length;i++){
taskIdList:arr, if(checks[i].value.length<11){
failedList:failedArr failedArr.push(checks[i].value)
} }else{
console.log(json) arr.push(checks[i].value)
HttpService.updateTaskListProcess(json,function(data){ }
$scope.searchTaskList(); }
$scope.selected=[]; var json={
$rootScope.ableBtn(); process:$rootScope.loginData.roleList[0].process,
$rootScope.closeThis(); name:$rootScope.loginData.name,
}) taskIdList:arr,
}else{ failedList:failedArr
MessageService.showAlert("请选择转出的任务单"); }
console.log(json)
HttpService.updateTaskListProcess(json,function(data){
$scope.searchTaskList();
$scope.selected=[];
$rootScope.ableBtn();
$rootScope.closeThis();
})
} }
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.closeThis=$scope.closeThisDialog;
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$scope.confirmGoTo = go;
}]
})
}else{
MessageService.showAlert("请选择转出的任务单");
} }
ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(),
width: 800,
cache: false,
closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) {
$rootScope.closeThis=$scope.closeThisDialog;
$rootScope.ableBtn = function(){
$(".create").prop("disabled","false");
}
$rootScope.closeBtn = function(){
$(".create").prop("disabled","true");
}
$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