Commit 65c57664 authored by liboyang's avatar liboyang

表单验证

parent 137735b0
......@@ -11,7 +11,7 @@
<div class="box-primary">
<form ng-submit="createInputs()" style="padding-left: 15px;">
<span style="font-size:20px;">废证数量:</span>
<input style="margin-top:20px;height: 30px;" type="text" ng-model="failedCount">
<input style="margin-top:20px;height: 30px;" type="number" ng-model="failedCount">
<input type="submit" class="btn btn-primary" value="确定">
<span style="font-size:14px;color: red;" ng-if="errMsglb">{{errMsglb}}</span>
</form>
......
......@@ -12,8 +12,12 @@ angular.module('AvatarCheck.addFailed', ['ngRoute', 'AvatarCheck.http'])
.controller('addFailedCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.createInputs = function(){
var count = $scope.failedCount;
if(count>10){
count=10;
}
$scope.arr = [];
for (var i=0;i<$scope.failedCount;i++){
for (var i=0;i<count;i++){
$scope.arr.push(i);
}
}
......
......@@ -14,7 +14,7 @@
<div class="box-primary">
<form ng-submit="createInputs()" style="padding-left: 15px;">
<span style="font-size:20px;">余证数量:</span>
<input style="margin-top:20px;height: 30px;" type="text" ng-model="restCount">
<input style="margin-top:20px;height: 30px;" type="number" ng-model="restCount">
<input type="submit" class="btn btn-primary" value="确定">
<span style="font-size:14px;color: red;" ng-if="errMsglb">{{errMsglb}}</span>
</form>
......
......@@ -12,8 +12,12 @@ angular.module('AvatarCheck.addRest', ['ngRoute', 'AvatarCheck.http'])
.controller('addRestCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.createInputs = function(){
var count = $scope.restCount;
if(count>10){
count=10;
}
$scope.arr = [];
for (var i=0;i<$scope.restCount;i++){
for (var i=0;i<count;i++){
$scope.arr.push(i);
}
}
......
......@@ -11,7 +11,7 @@
<div class="box-primary">
<form ng-submit="createInputs()" style="padding-left: 15px;">
<span style="font-size:20px;">证件数量:</span>
<input style="margin-top:20px;height: 30px;" type="text" ng-model="tagCount">
<input style="margin-top:20px;height: 30px;" type="number" ng-model="tagCount">
<input type="submit" class="btn btn-primary" value="确定">
<span style="font-size:14px;color: red;" ng-if="errMsglb">{{errMsglb}}</span>
</form>
......
......@@ -12,8 +12,12 @@ angular.module('AvatarCheck.addTag', ['ngRoute', 'AvatarCheck.http'])
.controller('addTagCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.createInputs = function(){
var count = $scope.tagCount;
if(count>10){
count=10;
}
$scope.arr = [];
for (var i=0;i<$scope.tagCount;i++){
for (var i=0;i<count;i++){
$scope.arr.push(i);
}
}
......
......@@ -43,7 +43,7 @@
<td></td>
</tr>
<tr ng-repeat="police in item.policeList">
<td><input type="checkbox" class="checkPolice{{item.countyCode}}"></td>
<td></td>
<td>{{$index+1}}</td>
<td>{{police.policeCode}}</td>
<td>{{police.policeName}}</td>
......
......@@ -55,16 +55,16 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
}
}
$scope.checkAllPolice = function($event,countyCode) {
var checkAllPolice = $event.target;
var checkPolice =$(".checkPolice"+countyCode);
for (var i=0;i<checkPolice.length;i++){
if(checkAllPolice.checked) {
checkPolice[i].checked = true;
}else {
checkPolice[i].checked = false;
}
}
}
// $scope.checkAllPolice = function($event,countyCode) {
// var checkAllPolice = $event.target;
// var checkPolice =$(".checkPolice"+countyCode);
// for (var i=0;i<checkPolice.length;i++){
// if(checkAllPolice.checked) {
// checkPolice[i].checked = true;
// }else {
// checkPolice[i].checked = false;
// }
// }
// }
});
\ No newline at end of file
......@@ -336,16 +336,16 @@ angular.module('AvatarCheck.task', ['ngRoute', 'AvatarCheck.http'])
$scope.goes = function(){
var checks = $(".checkOneBox:checked");
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)
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)
}
}
}
if(arr.length>0){
var json={
process:$rootScope.loginData.roleList[0].process,
name:$rootScope.loginData.name,
......
......@@ -82,11 +82,11 @@
<tbody>
<tr ng-repeat="item in xmlPackageData">
<td>{{$index+1}}</td>
<td>{{item.uploadDate | date:'yyyy-MM-dd HH:mm:ss'}}</td>
<td>{{item.date}}</td>
<td>{{item.packageCount}}</td>
<td>{{item.cardCount}}</td>
<td>{{item.commonCardCount}}</td>
<td>{{item.postCardCount}}</td>
<td>{{item.dateCount}}</td>
<td>{{item.commonCount}}</td>
<td>{{item.postCount}}</td>
<td>
<button class="btn btn-primary" ng-click="analysis(item.uploadDate,item.packageCount,item.fileId)">解析</button>
<button class="btn btn-danger" ng-click="deleteDataById(item.uploadDate,item.packageCount,item.fileId)">删除</button>
......
......@@ -73,15 +73,12 @@ angular.module('AvatarCheck.xmlAndSearch', ['ngRoute', 'AvatarCheck.http', 'tm.p
perPageOptions: [10, 20, 30, 40, 50]
};
$scope.getXmlPackage = function(){
HttpService.selectXmlPackageCount($("#datepicker").val(),function(data){
$scope.paginationConf.totalItems = data.respData.string;
console.log($scope.paginationConf.totalItems,"$scope.paginationConf.totalItems")
})
if($scope.paginationConf.currentPage==0){
$scope.paginationConf.currentPage=1;
}
HttpService.selectXmlPackage($("#datepicker").val(),$scope.paginationConf.currentPage,$scope.paginationConf.itemsPerPage,function(data){
$scope.xmlPackageData = data.respData;
$scope.paginationConf.totalItems=data.respData.count;
$scope.xmlPackageData = data.respData.mapList;
console.log($scope.xmlPackageData,"$scope.xmlPackageData")
})
}
......
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