Commit bdac2671 authored by liboyang's avatar liboyang

刷证显示详单

parent b7cf18c4
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
</div> </div>
<div class="box-body col-md-12"> <div class="box-body col-md-12">
<div class="col-md-5" style="padding:0" > <div class="col-md-5" style="padding:0" >
<table class="table table-bordered table-hover postTable" ng-if="tagPrintData.length>0"> <table class="table table-bordered postTable" ng-if="tagPrintData.length>0">
<thead> <thead>
<tr> <tr>
<th>NO.</th> <th>NO.</th>
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-click="showDetail(item)" ng-repeat="item in tagPrintData"> <tr ng-click="showDetail(item)" ng-repeat="item in tagPrintData" class="{{item.styleClass}}">
<td>{{$index+1}}</td> <td>{{$index+1}}</td>
<td>{{item.POLICE_CODE}}</td> <td>{{item.POLICE_CODE}}</td>
<td>{{item.GAJG_MC}}</td> <td>{{item.GAJG_MC}}</td>
......
...@@ -31,12 +31,18 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -31,12 +31,18 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
var getDetailListById = function (id) { var getDetailListById = function (id) {
for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.tagPrintData[i].show===false){
$scope.tagPrintData[i].styleClass = "";
}else{
$scope.tagPrintData[i].styleClass = "bg-info";
}
}
console.log(id) console.log(id)
HttpService.getPoliceCardsList(id,function(data) { HttpService.getPoliceCardsList(id,function(data) {
$scope.json.policeCardsList = data; $scope.json.policeCardsList = data;
console.log("---------",$scope.json.policeCardsList)
for (var i=0;i<$scope.json.policeCardsList.length;i++){ for (var i=0;i<$scope.json.policeCardsList.length;i++){
if($scope.json.policeCardsList[i].CARD_ID==$scope.idCard){ if($scope.json.policeCardsList[i].CARD_ID===postParam.idCard){
$scope.json.policeCardsList[i].styleClass = "bg-danger" $scope.json.policeCardsList[i].styleClass = "bg-danger"
} }
} }
...@@ -46,7 +52,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -46,7 +52,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
$scope.showDetail = function(item){ $scope.showDetail = function(item){
for(var i=0;i<$scope.tagPrintData.length;i++){ for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.tagPrintData[i].ID!=item.ID){ if($scope.tagPrintData[i].ID!==item.ID){
$scope.tagPrintData[i].show = false; $scope.tagPrintData[i].show = false;
} }
} }
...@@ -57,7 +63,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -57,7 +63,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json.count = item.FINISH_COUNT; $scope.json.count = item.FINISH_COUNT;
$scope.json.isShow=item.show; $scope.json.isShow=item.show;
getDetailListById(item.ID); getDetailListById(item.ID);
} };
var getPoliceListDataNotChecked = function () { var getPoliceListDataNotChecked = function () {
HttpService.getPoliceListDataNotCheckedData(function(data){ HttpService.getPoliceListDataNotCheckedData(function(data){
...@@ -67,7 +73,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -67,7 +73,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
console.log($scope.tagPrintData) console.log($scope.tagPrintData)
}) })
} };
getPoliceListDataNotChecked(); getPoliceListDataNotChecked();
$scope.checkSame = function (id) { $scope.checkSame = function (id) {
...@@ -75,41 +81,64 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -75,41 +81,64 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
if(data){ if(data){
getPoliceListDataNotChecked(); getPoliceListDataNotChecked();
$scope.json.isShow=false; $scope.json.isShow=false;
$scope.json.policeCardsList=[];
}else { }else {
MessageService.showAlert("复核失败") MessageService.showAlert("复核失败")
} }
}) })
} };
$scope.doQueryByIdCard = function(idcard,startDate,endDate){ var getCardDetailsByIdCardAndDate = function (idcard,startDate,endDate) {
console.log(idcard,startDate,endDate)
HttpService.selectTagPrintData(idcard,startDate,endDate,function(data){ HttpService.selectTagPrintData(idcard,startDate,endDate,function(data){
console.log(data) console.log(data);
if(data.state==1){ if(data.state===1){
$scope.json.isShow=true; $scope.json.isShow=true;
getPoliceListDataNotChecked(); getPoliceListDataNotChecked();
getDetailListById(data.id) getDetailListById(data.id)
}else if(data.state==2){ for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.tagPrintData[i].ID===data.id){
$scope.tagPrintData[i].styleClass="bg-info";
}
}
}else if(data.state===2){
if(data.checkName===$rootScope.loginData.name){ if(data.checkName===$rootScope.loginData.name){
$scope.json.isShow=true; $scope.json.isShow=true;
getDetailListById(data.id) getDetailListById(data.id)
for (var i=0;i<$scope.json.policeCardsList.length;i++){ for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.json.policeCardsList[i].CARD_ID==idcard&&$scope.json.policeCardsList[i].styleClass==''){ if($scope.tagPrintData[i].ID===data.id){
$scope.json.policeCardsList[i].styleClass = "bg-danger" $scope.tagPrintData[i].styleClass="bg-info";
} }
} }
}else{ }else{
$scope.json.isShow=false; $scope.json.isShow=false;
MessageService.showAlert($rootScope.loginData.name+" 已生成 "+data.policeName+" 的交接单") MessageService.showAlert($rootScope.loginData.name+" 已生成 "+data.policeName+" 的交接单")
} }
}else{ }else{
MessageService.showAlert("无该证件的制证记录") MessageService.showAlert("无该证件的制证记录");
$scope.json.isShow=false; $scope.json.isShow=false;
} }
}) })
} }
$scope.doQueryByIdCard = function(idcard,startDate,endDate){
console.log(idcard,startDate,endDate);
if($scope.json.policeCardsList.length>0&&$scope.json.isShow===true){
var count=0;
for (var i=0;i<$scope.json.policeCardsList.length;i++){
if($scope.json.policeCardsList[i].CARD_ID===idcard){
$scope.json.policeCardsList[i].styleClass="bg-danger";
} else{
count=count+1;
}
if(count===$scope.json.policeCardsList.length){
MessageService.showAlert("身份证号:"+idcard+" 在本组中不存在");
}
}
}else{
getCardDetailsByIdCardAndDate(idcard,startDate,endDate);
}
};
var open = function () { var open = function () {
var flag = 0; var flag = 0;
if (document.getElementById("aaa").OpenComm(1001) == 1) { if (document.getElementById("aaa").OpenComm(1001) == 1) {
......
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