Commit 65c57664 authored by liboyang's avatar liboyang

表单验证

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