Commit ffad0b2b authored by ad's avatar ad

Merge branch 'dev' of…

Merge branch 'dev' of http://121.22.111.250:8000/YX_IDENT_auxiliary/YX_IDENT_beijing_auxiliary into dev
parents fcd0e04c 9a403919
......@@ -851,12 +851,25 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data)
})
},
getReceitp:function(date,success){
getReceitp:function(startDate,endDate,success){
$http({
method: 'GET',
url: "../ReceiptApi/queryReceiptDateByCheckDate"+urlTimeStamp(),
params:{
date:date
startDate:startDate,
endDate:endDate
}
}).then(function successCallback(response) {
success(response.data)
})
},
getHistoryReceitp:function(startDate,endDate,success){
$http({
method: 'GET',
url: "../ReceiptApi/queryReceiptDateByReceiptDate"+urlTimeStamp(),
params:{
startDate:startDate,
endDate:endDate
}
}).then(function successCallback(response) {
success(response.data)
......
......@@ -7,15 +7,16 @@
<div class="box-header">
<strong>交接单</strong>
<div class="box-tools pull-right">
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker" readonly/>
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker1" readonly/>
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate" id="datepicker2" readonly/>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;margin-left: 10px;" ng-click="searchHistory()">查询历史</button>
<button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="doSearchReceitp()">查询</button>
</div>
<!-- /.box-tools -->
</div>
<!-- /.box-header -->
<div class="box-body">
<div ng-if="receitpData.length>0">
<div class="box-body" ng-if="isHistory==0">
<div ng-if="receitpData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" >
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
......@@ -75,11 +76,67 @@
</div>
</div>
</div>
<div ng-if="receitpData.length==0">
<div ng-if="receitpData.length==0">
<h4>暂无数据</h4>
</div>
</div>
<!-- /.mail-box-messages -->
</div>
<div class="box-body" ng-if="isHistory==1">
<div ng-if="receitpHistoryData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" >
<ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
ng-repeat="tab in receitpHistoryData track by $index">
<a ng-click="func($index,tab.typeCode)">
<ul style="margin: 0;padding: 0;">
<li style="font-size: 16px;">{{tab.typeName}}</li>
<li style="text-align: center;">{{tab.typeSum}}</li>
</ul>
</a>
</li>
</ul>
</div>
<div ng-repeat="type in receitpHistoryData track by $index" class="table-responsive mailbox-messages" ng-show="currentTab==$index">
<div class="mailbox-messages">
<table class="table table-hover postTable">
<thead>
<tr>
<th>NO.</th>
<th>派出所代码</th>
<th>派出所名称</th>
<th>证件数量</th>
<th>复核时间</th>
<th>复核人姓名</th>
</tr>
</thead>
<tbody ng-repeat="item in type.countyList">
<tr style="background-color: #eee">
<td></td>
<td>{{item.countyCode}}</td>
<td style="color: #3c8dbc">{{item.countyName}}</td>
<td>{{item.countyValidCount}}</td>
<td></td>
<td></td>
</tr>
<tr ng-repeat="police in item.policeList">
<td></td>
<td>{{police.ID}}</td>
<td>{{police.GAJG_DM}}</td>
<td>{{police.GAJG_MC}}</td>
<td>{{police.FINISH_COUNT}}</td>
<td>{{police.CHECK_DATE | date:'yyyy-MM-dd hh:mm:ss'}}</td>
<td>{{police.CHECK_NAME}}</td>
</tr>
</tbody>
</table>
<!-- /.table -->
</div>
<!-- /.table -->
<div ng-if="receitpHistoryData.length==0">
<h4>暂无数据</h4>
</div>
<!-- /.mail-box-messages -->
</div>
<!-- /.box-body -->
</div>
<!-- /. box -->
......@@ -89,4 +146,6 @@
<!-- /.row -->
</div>
</div>
</div>
</div>
......@@ -12,15 +12,22 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
.controller('receitpCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker
$('#datepicker').datetimepicker({
$('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-mm-dd',
format: 'yyyy-MM-dd HH:mm:ss',
todayBtn: 1,
autoclose: 1
});
$('#datepicker2').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN',
format: 'yyyy-MM-dd HH:mm:ss',
todayBtn: 1,
autoclose: 1
});
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd");
$scope.choseDate = $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
$scope.downloadGAinfo = function(){
var date = $("#datepicker").val();
......@@ -43,12 +50,18 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
$scope.currentTab = index;
}
$scope.isHistory = 0;
$scope.doSearchReceitp = function () {
var date=$('#datepicker').val();
if(date==''){
date= $filter("date")(new Date(), "yyyy-MM-dd");
$scope.isHistory = 0;
var startDate=$('#datepicker1').val();
var endDate=$('#datepicker2').val();
if(startDate==''){
startDate= $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
}
HttpService.getReceitp(date,function(data){
if(endDate==''){
endDate= $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
}
HttpService.getReceitp(startDate,endDate,function(data){
$scope.receitpData=data;
for(var i=0;i<$scope.receitpData.length;i++){
if(i==$scope.currentTab){
......@@ -62,6 +75,30 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
}
$scope.doSearchReceitp();
$scope.searchHistory = function () {
$scope.isHistory = 1;
var startDate=$('#datepicker1').val();
var endDate=$('#datepicker2').val();
if(startDate==''){
startDate= $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
}
if(endDate==''){
endDate= $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
}
HttpService.getHistoryReceitp(startDate,endDate,function(data){
$scope.receitpHistoryData=data;
for(var i=0;i<$scope.receitpData.length;i++){
if(i==$scope.currentTab){
$scope.receitpData[i].isActive=true;
}else{
$scope.receitpData[i].isActive=false;
}
}
console.log($scope.receitpData);
})
}
$scope.checkAll = function ($event){
var checkAll = $event.target;
var checkbox =$("input[type=checkbox]");
......
......@@ -11,23 +11,28 @@
<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 width="10%" style="text-align: center;vertical-align: middle!important;">身份证号:</td>
<td colspan="2" width="35%">
<input type="text" class="form-control" placeholder="身份证号" ng-model="idCard"/>
<td style="text-align: center;vertical-align: middle!important;">身份证号:</td>
<td>
<input type="text" name="idCard" class="form-control" placeholder="身份证号" ng-model="idCard"/>
</td>
<td colspan="1">
有效期: <input style="width:9%;" name="yxqstart" type="text" ng-model="startDate"><input style="width:9%;" name="yxqend" type="text" ng-model="endDate">
<td style="text-align: center;vertical-align: middle!important;">
有效期:
</td>
<td>
<input class="form-control" name="yxqstart" type="text" ng-model="startDate" placeholder="起始日期">
</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 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">
......@@ -50,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)
})
}
......@@ -79,12 +88,14 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
}
var postParam={
idCard:''
idCard:'',
startDate:'',
endDate:''
}
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;
......@@ -111,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() {
......@@ -207,7 +228,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
console.log($scope.json.policeData)
$timeout(function () {
var LODOP = getLodop();
LODOP = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM'));
LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
if (!LODOP) { alert("请先安装控件!"); return; }
LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
//初始化
......
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