Commit 9a403919 authored by liboyang's avatar liboyang

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

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