Commit 410f0e9e authored by liboyang's avatar liboyang

退证若无任务单,提示

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