Commit 98e64dc5 authored by liboyang's avatar liboyang

增加自动复核页面

parent 4d0aca4a
<div class="ui-dialog-title">
提示
</div>
<div class="ui-dialog-content">
<div>{{msgText}}</div>
</div>
<div class="ui-dialog-confirm">
<button type="submit" class="btn btn-info" ng-click="emptyList()">清空列表</button>
<button type="submit" class="btn btn-danger" ng-click="closeThisDialog()">取消</button>
</div>
...@@ -24,7 +24,6 @@ ...@@ -24,7 +24,6 @@
组号详情 组号详情
</div> </div>
<div class="ui-dialog-content"> <div class="ui-dialog-content">
{{selected}}
<table class="table" style="border-color: black;"> <table class="table" style="border-color: black;">
<thead> <thead>
<tr> <tr>
...@@ -40,7 +39,8 @@ ...@@ -40,7 +39,8 @@
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="groups in policeList"> <tr ng-repeat="groups in policeList">
<td><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td> <td ng-if="groups.DEAL_FLAG==3"><input type="checkbox" ng-checked="isSelected(groups)" ng-click="updateSelection($event,groups)"></td>
<td ng-if="groups.DEAL_FLAG!=3"></td>
<td>{{groups.GROUP_NO}}</td> <td>{{groups.GROUP_NO}}</td>
<td>{{groups.VALID_COUNT}}</td> <td>{{groups.VALID_COUNT}}</td>
<td>{{groups.INVALID_COUNT}}</td> <td>{{groups.INVALID_COUNT}}</td>
......
...@@ -183,5 +183,6 @@ ...@@ -183,5 +183,6 @@
<script src="views/packageLog/packageLog.js"></script> <script src="views/packageLog/packageLog.js"></script>
<script src="views/tagPrint/tagPrint.js"></script> <script src="views/tagPrint/tagPrint.js"></script>
<script src="views/addTag/addTag.js"></script> <script src="views/addTag/addTag.js"></script>
<script src="views/autoCheck/autoCheck.js"></script>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -24,7 +24,8 @@ angular.module('AvatarCheck', [ ...@@ -24,7 +24,8 @@ angular.module('AvatarCheck', [
'AvatarCheck.packageLog', 'AvatarCheck.packageLog',
'AvatarCheck.tagPrint', 'AvatarCheck.tagPrint',
'tm.pagination', 'tm.pagination',
'AvatarCheck.addTag' 'AvatarCheck.addTag',
'AvatarCheck.autoCheck'
]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider',function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) { ]).config(['$locationProvider', '$routeProvider', 'localStorageServiceProvider', '$qProvider',function ($locationProvider, $routeProvider, localStorageServiceProvider, $qProvider) {
$locationProvider.hashPrefix('!'); $locationProvider.hashPrefix('!');
$routeProvider.otherwise({redirectTo: '/createTaskList'}); $routeProvider.otherwise({redirectTo: '/createTaskList'});
...@@ -147,6 +148,9 @@ angular.module('AvatarCheck', [ ...@@ -147,6 +148,9 @@ angular.module('AvatarCheck', [
if ($location.path() == "/addTag") { if ($location.path() == "/addTag") {
$rootScope.tab = '/addTag'; $rootScope.tab = '/addTag';
} }
if($location.path()=="/autoCheck"){
$rootScope.tab = '/autoCheck';
}
console.log($rootScope.tab) console.log($rootScope.tab)
...@@ -157,6 +161,9 @@ angular.module('AvatarCheck', [ ...@@ -157,6 +161,9 @@ angular.module('AvatarCheck', [
if(index=='/searchCardMsg'){ if(index=='/searchCardMsg'){
location.reload('#!/searchCardMsg'); location.reload('#!/searchCardMsg');
} }
// if(index=='/autoCheck'){
// location.reload('#!/autoCheck');
// }
$rootScope.tab = index; $rootScope.tab = index;
$rootScope.close = 0; $rootScope.close = 0;
console.log($rootScope.tab) console.log($rootScope.tab)
......
...@@ -334,7 +334,32 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -334,7 +334,32 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
searchReceitpListDataByIdCard:function(idCard,success){
console.log(idCard)
$http({
method: 'GET',
url: "../cardDetailedList/findAllCardDetailedList"+urlTimeStamp(),
params:{
idCard:idCard
}
}).then(function successCallback(response) {
success(response.data)
})
},
searchReceitpDataByIdCard:function(idCard,success){
console.log(idCard)
$http({
method: 'GET',
url: "../cardDetailedList/findCardDetailedList"+urlTimeStamp(),
params:{
idCard:idCard
}
}).then(function successCallback(response) {
success(response.data)
})
},
updateReceiptList:function(id,success) { updateReceiptList:function(id,success) {
console.log(id)
$http({ $http({
method: 'GET', method: 'GET',
url: "../ReceiptApi/updateReceiptList"+urlTimeStamp(), url: "../ReceiptApi/updateReceiptList"+urlTimeStamp(),
...@@ -646,7 +671,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -646,7 +671,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
method: 'GET', method: 'GET',
url: "../TaskList/queryByCountyAtAuxiliaryState3"+urlTimeStamp(), url: "../TaskList/queryByCountyAtAuxiliaryState3"+urlTimeStamp(),
params:{ params:{
process:$rootScope.loginData.roleList[0].process process:$rootScope.loginData.roleList[0].process,
workGroup:$rootScope.loginData.workGroup
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
......
<style>
form input{
border:0;
color:black;
font-weight: bold;
margin-left: 10px;
}
.postTable th, .postTable td {
text-align: center;
vertical-align: middle!important;
}
</style>
<section class="content row">
<div class="col-md-12 no-padding" style="margin-top:20px;">
<div class="box">
<div class="box-header with-border">
<strong>标签复核</strong>
</div>
<form class="box box-primary" style="padding: 7px;padding-top: 0;" name="myform">
<table class="table table-bordered" style="margin-bottom: 0;">
<tr>
<td width="10%" style="text-align: center;vertical-align: middle!important;">身份证号:</td>
<td colspan="2" width="35%">
<input type="text" class="form-control" placeholder="身份证号" name="idCard" ng-model="idCard"/>
</td>
<td style="text-align: left;">
<button class="btn btn-primary" ng-click="startReading()">开始读卡</button>
<button class="btn btn-primary" ng-click="endReading()">停止读卡</button>
</td>
</tr>
</table>
</form>
</div>
</div>
<div class="col-md-12 box no-padding">
<div class=" box-default">
<div class="box-header with-border">
<strong >详单信息</strong>
</div>
<div class="box-body col-md-12" ng-if="policeCardsList.length>0">
<table class="table table-bordered">
<thead>
<tr>
<th>No.</th>
<th>受理号</th>
<th>姓名</th>
<th>身份证号</th>
<th>打印标记</th>
<th>电写标记</th>
<th>电质检标记</th>
<th>状态</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="item in policeCardsList | orderBy:'acceptNo'" class="{{item.styleClass}}">
<td>{{$index+1}}</td>
<td>{{item.UPLOAD_NO}}</td>
<td>{{item.NAME}}</td>
<td>{{item.CARD_ID}}</td>
<td>
<span ng-if="item.downloadDate==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.downloadDate!=null"
style="size: 6px">{{item.downloadDate | date:'MM-dd hh:mm'}}</span>
</td>
<td>
<span ng-if="item.electricDate==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.electricDate!=null"
style="size: 6px">{{item.electricDate| date:'MM-dd hh:mm'}}</span>
</td>
<td>
<span ng-if="item.checkDate==null"
style="color: red"
class="glyphicon glyphicon-remove">
</span>
<span ng-if="item.checkDate!=null"
style="size: 6px">{{item.checkDate| date:'MM-dd hh:mm'}}</span>
</td>
<td rowspan="{{policeCardsList.length}}" ng-if="item.STATE==0&&$index==0"></td>
<td class="bg-green" rowspan="{{policeCardsList.length}}" ng-if="item.STATE==1&&$index==0"></td>
</tr>
</tbody>
</table>
<div class="box-footer">
<button class="btn btn-primary pull-right" style="margin-right: 20px;" ng-click="emptyList()">清空列表</button>
</div>
</div>
</div>
</div>
</section>
\ No newline at end of file
'use strict';
angular.module('AvatarCheck.autoCheck', ['ngRoute', 'AvatarCheck.http', 'tm.pagination'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider.when('/autoCheck', {
templateUrl: 'views/autoCheck/autoCheck.html' + urlTimeStamp(),
controller: 'autoCheckCtrl',
cache: false
});
}])
.controller('autoCheckCtrl', function ($scope, $rootScope, HttpService, $interval, MessageService,$timeout,ngDialog) {
$scope.acceptNo = 'ACCEPT_NO';
$scope.searchReceitpListByIdCard=function(idCard){
HttpService.searchReceitpListDataByIdCard(idCard,function(data){
$scope.policeCardsList = data;
for(var i=0;i<$scope.policeCardsList.length;i++){
if($scope.policeCardsList[i].CARD_ID==idCard){
$scope.policeCardsList[i].styleClass='bg-danger';
}else{
$scope.policeCardsList[i].styleClass='';
}
}
})
}
var emptyList = function () {
$scope.policeCardsList=undefined;
}
$scope.emptyList=emptyList;
$scope.searchReceitpByIdCard = function(idCard,name){
var count=0;
for (var i=0;i<$scope.policeCardsList.length;i++){
if($scope.policeCardsList[i].CARD_ID==idCard&&$scope.policeCardsList[i].styleClass==''){
$scope.policeCardsList[i].styleClass ='bg-danger';
$scope.checkSame($scope.policeCardsList[0].RECEIPT_ID)
}else{
count++;
}
}
if(count==$scope.policeCardsList.length){
ngDialog.open({
template: 'dialogs/emptyList.html' + urlTimeStamp(),
width: 600,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.msgText = name+"未包含在该详单中";
$scope.emptyList = emptyList;
}]
});
}
}
$scope.checkSame = function (id) {
HttpService.updateReceiptList(id,function(data) {
if(data){
for(var i=0;i<$scope.policeCardsList.length;i++){
$scope.policeCardsList[i].STATE=1;
}
$timeout(function () {
$scope.policeCardsList=undefined;
},3000)
}else {
ngDialog.open({
template: 'dialogs/emptyList.html' + urlTimeStamp(),
width: 600,
cache: false,
closeByDocument:false,
controller: ['$scope', function ($scope) {
$scope.msgText = "复核失败,请联系管理员";
$scope.emptyList = emptyList;
}]
});
}
})
}
var postData = {
idCard: ''
}
var open = function () {
var flag = 0;
if (document.getElementById("aaa").OpenComm(1001) == 1) {
flag = 1;
} else {
for (var i = 1; i < 3; i++) {
if (document.getElementById("aaa").OpenComm(i) == 1) {
flag = 1;
break;
}
if (flag != 1) {
MessageService.showAlert("打开端口失败");
}
}
}
};
var cardArr = [];
var subSomething = function () {
if (document.readyState == "complete") { //当页面加载状态为完全结束时进入
open();
$interval(function () {
if ($rootScope.close == 1 && $rootScope.tab == '/autoCheck') {
if (document.getElementById("aaa").Authen() == 1) {
var ret = document.getElementById("aaa").ReadCardPath("c:\\", 1);
if (ret == 1 || ret == 3) {
myform.idCard.value = document.getElementById("aaa").sIDNo;
postData.idCard = myform.idCard.value;
cardArr.push(postData.idCard)
console.log($scope.policeCardsList)
if(angular.isUndefined($scope.policeCardsList)){
$scope.searchReceitpListByIdCard(postData.idCard)
}else{
if($scope.policeCardsList==1){
$scope.checkSame($scope.policeCardsList[0].RECEIPT_ID)
}else{
if(cardArr[0]==cardArr[1]){
MessageService.showAlert("请选择另一张身份证进行读卡")
cardArr.pop();
}else{
$scope.searchReceitpByIdCard(postData.idCard,document.getElementById("aaa").sName)
cardArr=[];
}
}
}
}
}
} else {
document.getElementById("aaa").EndComm();
}
}, 500);
}
};
$scope.startReading = function () {
$rootScope.tab = '/autoCheck';
$rootScope.close = 1;
subSomething();
};
$scope.endReading = function () {
$rootScope.tab = '/autoCheck1';
$rootScope.close = 0;
};
});
...@@ -43,8 +43,11 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http']) ...@@ -43,8 +43,11 @@ angular.module('AvatarCheck.login', ['ngRoute', 'AvatarCheck.http'])
$rootScope.tab = '/taskListPrint'; $rootScope.tab = '/taskListPrint';
break; break;
case 3: case 3:
$location.path("/taskListPreLocating"); // $location.path("/taskListPreLocating");
$rootScope.tab = '/taskListPreLocating'; // $rootScope.tab = '/taskListPreLocating';
// break;
$location.path("/taskListEwriting");
$rootScope.tab = '/taskListEwriting';
break; break;
case 6: case 6:
$location.path("/taskListSorting"); $location.path("/taskListSorting");
......
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