Commit 410f0e9e authored by liboyang's avatar liboyang

退证若无任务单,提示

parent 740f98f8
...@@ -269,6 +269,9 @@ angular.module('AvatarCheck', [ ...@@ -269,6 +269,9 @@ angular.module('AvatarCheck', [
} }
$scope.giveBackCardAccu = function () { $scope.giveBackCardAccu = function () {
if($(".accu:checked").length>0){ if($(".accu:checked").length>0){
if(angular.isUndefined($scope.searchResult.workOrderData[0].TASK_ID)) {
MessageService.showAlert("无任务单记录,请创建任务单后再添加快证")
}else{
var idx = $(".accu:checked").val(); var idx = $(".accu:checked").val();
var check = idx.split("+"); var check = idx.split("+");
var json={}; var json={};
...@@ -281,24 +284,29 @@ angular.module('AvatarCheck', [ ...@@ -281,24 +284,29 @@ angular.module('AvatarCheck', [
MessageService.showAlert(data.msg) MessageService.showAlert(data.msg)
$scope.doSearch($scope.searchInput) $scope.doSearch($scope.searchInput)
}) })
}
}else{ }else{
MessageService.showAlert("请选择要退证的信息") MessageService.showAlert("请选择要退证的信息")
} }
} }
$scope.giveBackCardProd = function () { $scope.giveBackCardProd = function () {
if($(".prod:checked").length>0){ if($(".prod:checked").length>0){
if(angular.isUndefined($scope.searchResult.workOrderData[0].TASK_ID)) {
MessageService.showAlert("无任务单记录,请创建任务单后再添加快证")
}else {
var idx = $(".prod:checked").val(); var idx = $(".prod:checked").val();
var check = idx.split("+"); var check = idx.split("+");
var json={}; var json = {};
json.acceptNo=check[0]; json.acceptNo = check[0];
json.taskId=$scope.searchResult.workOrderData[0].TASK_ID; json.taskId = $scope.searchResult.workOrderData[0].TASK_ID;
json.name=$rootScope.loginData.name; json.name = $rootScope.loginData.name;
console.log(json) console.log(json)
HttpService.giveBackCard(json,function (data) { HttpService.giveBackCard(json, function (data) {
console.log(data) console.log(data)
MessageService.showAlert(data.msg) MessageService.showAlert(data.msg)
$scope.doSearch($scope.searchInput) $scope.doSearch($scope.searchInput)
}) })
}
}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