Commit 410f0e9e authored by liboyang's avatar liboyang

退证若无任务单,提示

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