Commit 4b9a0bb4 authored by liboyang's avatar liboyang

交接单查询

parent 5dd67ead
...@@ -849,12 +849,25 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -849,12 +849,25 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
getReceitp:function(date,success){ getReceitp:function(startDate,endDate,success){
$http({ $http({
method: 'GET', method: 'GET',
url: "../ReceiptApi/queryReceiptDateByCheckDate"+urlTimeStamp(), url: "../ReceiptApi/queryReceiptDateByCheckDate"+urlTimeStamp(),
params:{ 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) { }).then(function successCallback(response) {
success(response.data) success(response.data)
......
...@@ -7,15 +7,16 @@ ...@@ -7,15 +7,16 @@
<div class="box-header"> <div class="box-header">
<strong>交接单</strong> <strong>交接单</strong>
<div class="box-tools pull-right"> <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;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> <button type="button" class="btn btn-primary pull-right" style="height: 30px;line-height: 17px;" ng-click="doSearchReceitp()">查询</button>
</div> </div>
<!-- /.box-tools --> <!-- /.box-tools -->
</div> </div>
<!-- /.box-header --> <!-- /.box-header -->
<div class="box-body"> <div class="box-body" ng-if="isHistory==0">
<div ng-if="receitpData.length>0"> <div ng-if="receitpData.length>0">
<div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" > <div class="nav-tabs-custom clearfix" style="margin-bottom: 0;" >
<ul class="nav nav-tabs"> <ul class="nav nav-tabs">
<li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]" <li ng-class="{true: 'active', false: 'inactive'}[tab.isActive]"
...@@ -75,11 +76,67 @@ ...@@ -75,11 +76,67 @@
</div> </div>
</div> </div>
</div> </div>
<div ng-if="receitpData.length==0"> <div ng-if="receitpData.length==0">
<h4>暂无数据</h4> <h4>暂无数据</h4>
</div> </div>
<!-- /.mail-box-messages --> <!-- /.mail-box-messages -->
</div> </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 --> <!-- /.box-body -->
</div> </div>
<!-- /. box --> <!-- /. box -->
...@@ -89,4 +146,6 @@ ...@@ -89,4 +146,6 @@
<!-- /.row --> <!-- /.row -->
</div> </div>
</div> </div>
</div>
</div>
...@@ -12,15 +12,22 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -12,15 +12,22 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
.controller('receitpCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) { .controller('receitpCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
//Date picker //Date picker
$('#datepicker').datetimepicker({ $('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒 minView: "month", //选择日期后,不会再跳转去选择时分秒
language: 'zh-CN', 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, todayBtn: 1,
autoclose: 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(){ $scope.downloadGAinfo = function(){
var date = $("#datepicker").val(); var date = $("#datepicker").val();
...@@ -43,12 +50,18 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -43,12 +50,18 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
$scope.currentTab = index; $scope.currentTab = index;
} }
$scope.isHistory = 0;
$scope.doSearchReceitp = function () { $scope.doSearchReceitp = function () {
var date=$('#datepicker').val(); $scope.isHistory = 0;
if(date==''){ var startDate=$('#datepicker1').val();
date= $filter("date")(new Date(), "yyyy-MM-dd"); 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; $scope.receitpData=data;
for(var i=0;i<$scope.receitpData.length;i++){ for(var i=0;i<$scope.receitpData.length;i++){
if(i==$scope.currentTab){ if(i==$scope.currentTab){
...@@ -62,6 +75,30 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -62,6 +75,30 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
} }
$scope.doSearchReceitp(); $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){ $scope.checkAll = function ($event){
var checkAll = $event.target; var checkAll = $event.target;
var checkbox =$("input[type=checkbox]"); var checkbox =$("input[type=checkbox]");
......
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