Commit 9a403919 authored by liboyang's avatar liboyang

标签打印页面自动读卡和点击交接单切换详单

parent 440ae4a9
...@@ -79,9 +79,9 @@ ...@@ -79,9 +79,9 @@
<!-- Logo --> <!-- Logo -->
<a href="index.html" class="logo" style="line-height: 50px;"> <a href="index.html" class="logo" style="line-height: 50px;">
<!-- mini logo for sidebar mini 50x50 pixels --> <!-- mini logo for sidebar mini 50x50 pixels -->
<span class="logo-mini"><span><img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;"></span></span>
<!-- logo for regular state and mobile devices --> <!-- logo for regular state and mobile devices -->
<span class="logo-lg"> <span class="logo-lg">
<img src="newTheme/dist/img/logo.jpg" style="width:25px;height:25px;">
北京制证辅助平台 北京制证辅助平台
</span> </span>
</a> </a>
......
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
<div class="box-header with-border"> <div class="box-header with-border">
<strong >打印标签</strong> <strong >打印标签</strong>
</div> </div>
<div class="box box-primary" style="padding: 7px;padding-top: 0;"> <form name="myform" class="box box-primary" style="padding: 7px;padding-top: 0;">
<table class="table table-bordered" style="margin-bottom: 0;"> <table class="table table-bordered" style="margin-bottom: 0;">
<tr> <tr>
<td style="text-align: center;vertical-align: middle!important;">身份证号:</td> <td style="text-align: center;vertical-align: middle!important;">身份证号:</td>
<td> <td>
<input type="text" class="form-control" placeholder="身份证号" ng-model="idCard"/> <input type="text" name="idCard" class="form-control" placeholder="身份证号" ng-model="idCard"/>
</td> </td>
<td style="text-align: center;vertical-align: middle!important;"> <td style="text-align: center;vertical-align: middle!important;">
有效期: 有效期:
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
<td style="text-align: center;vertical-align: middle!important;"></td> <td style="text-align: center;vertical-align: middle!important;"></td>
<td><input class="form-control" name="yxqend" type="text" ng-model="endDate" placeholder="截至日期"></td> <td><input class="form-control" name="yxqend" type="text" ng-model="endDate" placeholder="截至日期"></td>
<td style="text-align: left;"> <td style="text-align: left;">
<button class="btn btn-primary search" ng-click="searchTagPrintData()">查询</button> <button class="btn btn-primary" ng-click="startReading()">开始读卡</button>
<button class="btn btn-primary" ng-click="subSomething()">证件读取</button> <button class="btn btn-primary" ng-click="endReading()">停止读卡</button>
</td> </td>
</tr> </tr>
</table> </table>
</div> </form>
</div> </div>
</div> </div>
<div class="col-md-12 box no-padding"> <div class="col-md-12 box no-padding">
...@@ -55,7 +55,7 @@ ...@@ -55,7 +55,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-click="showDetail(item.ID,item.GAJG_MC,item.POLICE_CODE,item.FINISH_COUNT)" ng-repeat="item in tagPrintData"> <tr ng-click="showDetail(item)" ng-repeat="item in tagPrintData">
<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>
......
...@@ -48,18 +48,27 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -48,18 +48,27 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
console.log($scope.json) console.log($scope.json)
}) })
} }
$scope.showDetail = function(id,policeName,policeCode,count){ $scope.showDetail = function(item){
$scope.json.id=id; for(var i=0;i<$scope.tagPrintData.length;i++){
$scope.json.policeName = policeName; if($scope.tagPrintData[i].ID!=item.ID){
$scope.json.policeCode = policeCode; $scope.tagPrintData[i].show = false;
$scope.json.count = count; }
$scope.json.isShow=!$scope.json.isShow; }
getDetailListById(id); item.show = !item.show;
$scope.json.id=item.ID;
$scope.json.policeName = item.GAJG_MC;
$scope.json.policeCode = item.POLICE_CODE;
$scope.json.count = item.FINISH_COUNT;
$scope.json.isShow=item.show;
getDetailListById(item.ID);
} }
var getPoliceListDataNotChecked = function () { var getPoliceListDataNotChecked = function () {
HttpService.getPoliceListDataNotCheckedData(function(data){ HttpService.getPoliceListDataNotCheckedData(function(data){
$scope.tagPrintData = data; $scope.tagPrintData = data;
for(var i=0;i<$scope.tagPrintData.length;i++){
$scope.tagPrintData[i].show = false;
}
console.log($scope.tagPrintData) console.log($scope.tagPrintData)
}) })
} }
...@@ -85,8 +94,8 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -85,8 +94,8 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
var doQueryByIdCard = function(idcard,startDate,endDate){ var doQueryByIdCard = function(idcard,startDate,endDate){
console.log(idcard,startDate,endDate)
HttpService.selectTagPrintData(idcard,startDate,endDate,function(data){ HttpService.selectTagPrintData(idcard,startDate,endDate,function(data){
$(".search").removeAttr("disabled");
console.log(data) console.log(data)
if(data.state==1){ if(data.state==1){
$scope.json.isShow=true; $scope.json.isShow=true;
...@@ -113,47 +122,57 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -113,47 +122,57 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}) })
} }
$scope.searchTagPrintData = function(){ var open = function () {
$(".search").prop("disabled","true");
doQueryByIdCard($scope.idCard)
}
$scope.subSomething = function () {
$scope.show = false;
var flag = 0; var flag = 0;
if (document.getElementById("aaa").OpenComm(1001) == 1) { if (document.getElementById("aaa").OpenComm(1001) == 1) {
flag = 1; flag = 1;
//alert(i); } else {
}
else {
for (var i = 1; i < 3; i++) { for (var i = 1; i < 3; i++) {
if (document.getElementById("aaa").OpenComm(i) == 1) { if (document.getElementById("aaa").OpenComm(i) == 1) {
flag = 1; flag = 1;
//alert(i);
break; break;
} }
if (flag != 1) { if (flag != 1) {
alert("打开端口失败"); MessageService.showAlert("打开端口失败");
} }
} }
} }
};
if (flag == 1) { var subSomething = function () {
if (document.readyState == "complete") { //当页面加载状态为完全结束时进入
open();
$interval(function () {
if ($rootScope.close == 1 && $rootScope.tab == '/tagPrint') {
if (document.getElementById("aaa").Authen() == 1) { if (document.getElementById("aaa").Authen() == 1) {
var ret = document.getElementById("aaa").ReadCardPath("c:\\", 1); var ret = document.getElementById("aaa").ReadCardPath("c:\\", 1);
if (ret == 1 || ret == 3) { if (ret == 1 || ret == 3) {
postParam.idCard = document.getElementById("aaa").sIDNo; myform.idCard.value = document.getElementById("aaa").sIDNo;
postParam.startDate = document.getElementById("aaa").sStartDate;; myform.yxqstart.value = document.getElementById("aaa").sStartDate;
postParam.endDate = document.getElementById("aaa").sEndDate; myform.yxqend.value = document.getElementById("aaa").sEndDate;
doQueryByIdCard(postParam.idCard,postParam.startDate,postParam.endDate) postParam.idCard = myform.idCard.value;
postParam.startDate = myform.yxqstart.value;
postParam.endDate = myform.yxqend.value;
doQueryByIdCard(postParam.idCard,postParam.startDate,postParam.endDate);
} }
} }
else { } else {
alert("找卡错误,请重新放卡!"); document.getElementById("aaa").EndComm();
} }
}, 500);
} }
aaa.EndComm(); };
}
$scope.startReading = function () {
$rootScope.tab = '/tagPrint';
$rootScope.close = 1;
subSomething();
};
$scope.endReading = function () {
$rootScope.tab = '/tagPrint1';
$rootScope.close = 0;
};
// $scope.PreviewMytableRotate = function() { // $scope.PreviewMytableRotate = function() {
......
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