Commit bdac2671 authored by liboyang's avatar liboyang

刷证显示详单

parent b7cf18c4
......@@ -43,7 +43,7 @@
</div>
<div class="box-body col-md-12">
<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>
<tr>
<th>NO.</th>
......@@ -56,7 +56,7 @@
</tr>
</thead>
<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>{{item.POLICE_CODE}}</td>
<td>{{item.GAJG_MC}}</td>
......
......@@ -31,12 +31,18 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
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)
HttpService.getPoliceCardsList(id,function(data) {
$scope.json.policeCardsList = data;
console.log("---------",$scope.json.policeCardsList)
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"
}
}
......@@ -46,7 +52,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
$scope.showDetail = function(item){
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;
}
}
......@@ -57,7 +63,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json.count = item.FINISH_COUNT;
$scope.json.isShow=item.show;
getDetailListById(item.ID);
}
};
var getPoliceListDataNotChecked = function () {
HttpService.getPoliceListDataNotCheckedData(function(data){
......@@ -67,7 +73,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
console.log($scope.tagPrintData)
})
}
};
getPoliceListDataNotChecked();
$scope.checkSame = function (id) {
......@@ -75,41 +81,64 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
if(data){
getPoliceListDataNotChecked();
$scope.json.isShow=false;
$scope.json.policeCardsList=[];
}else {
MessageService.showAlert("复核失败")
}
})
}
};
$scope.doQueryByIdCard = function(idcard,startDate,endDate){
console.log(idcard,startDate,endDate)
var getCardDetailsByIdCardAndDate = function (idcard,startDate,endDate) {
HttpService.selectTagPrintData(idcard,startDate,endDate,function(data){
console.log(data)
if(data.state==1){
console.log(data);
if(data.state===1){
$scope.json.isShow=true;
getPoliceListDataNotChecked();
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){
$scope.json.isShow=true;
getDetailListById(data.id)
for (var i=0;i<$scope.json.policeCardsList.length;i++){
if($scope.json.policeCardsList[i].CARD_ID==idcard&&$scope.json.policeCardsList[i].styleClass==''){
$scope.json.policeCardsList[i].styleClass = "bg-danger"
for(var i=0;i<$scope.tagPrintData.length;i++){
if($scope.tagPrintData[i].ID===data.id){
$scope.tagPrintData[i].styleClass="bg-info";
}
}
}else{
$scope.json.isShow=false;
MessageService.showAlert($rootScope.loginData.name+" 已生成 "+data.policeName+" 的交接单")
}
}else{
MessageService.showAlert("无该证件的制证记录")
MessageService.showAlert("无该证件的制证记录");
$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 flag = 0;
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