Commit effdda8f authored by ad's avatar ad

修改页面词语描述,添加耗材数量校验

parent 42b1cf44
......@@ -39,7 +39,7 @@
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td>数量:</td>
<td><input type="number" class="form-control" ng-model="totalCount" placeholder="数量"></td>
<td><input type="number" ng-model="totalCount" placeholder="数量"></td>
<td>卡体类型:</td>
<td>
<select class="form-control select2" id="cardBodyType">
......
......@@ -29,6 +29,7 @@ angular.module("AvatarCheck.insertCardBody",['ngRoute', 'AvatarCheck.http'])
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.insertCardBody = function () {
var totalCount = $scope.totalCount;
var note = $scope.note;
var cardType = $scope.cardType;
......@@ -38,15 +39,22 @@ angular.module("AvatarCheck.insertCardBody",['ngRoute', 'AvatarCheck.http'])
cardType="1";
}
console.log(totalCount,note,cardType,cardBodyType,name);
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name,0,function (data) {
$scope.totalCount="";
$scope.note=""
if(data==false){
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("添加成功,请等待审核")
}
})
if(totalCount>=1){
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name,0,function (data) {
$scope.totalCount="";
$scope.note=""
if(data==false){
MessageService.showAlert("添加失败")
}else{
MessageService.showAlert("添加成功,请等待审核")
}
})
}else {
MessageService.showAlert("输入耗材数量格式不正确")
}
}
$scope.selectCardBodyManagement=function(){
......
......@@ -32,8 +32,8 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
if(angular.isUndefined(cardType)){
cardType="1";
}
console.log(totalCount,note,cardType,cardBodyType,name);
if (totalCount>0){
console.log(totalCount,note,cardType,cardBodyType,name,"---",totalCount>=1,"---");
if (totalCount>=1){
HttpService.insertCardBody(cardType,totalCount,note,cardBodyType,name,1,function (data) {
$scope.totalCount="";
$scope.note=""
......@@ -44,7 +44,7 @@ angular.module('AvatarCheck.materialManagement', ['ngRoute', 'AvatarCheck.http']
}
})
}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