Commit 8c4dd12e authored by liboyang's avatar liboyang

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

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