Commit 707ddd93 authored by liboyang's avatar liboyang

打印交接单

parent 7cea6b4c
...@@ -147,7 +147,7 @@ ...@@ -147,7 +147,7 @@
</div> </div>
</div> </div>
</div> </div>
<div id="divPrint"> <div id="divPrint{{$index}}" ng-repeat="idx in result">
<div class="title" style="text-align: center;"> <div class="title" style="text-align: center;">
北京市公安局证件制作管理中心交接岗位<br /> 北京市公安局证件制作管理中心交接岗位<br />
身份证交接单</div> 身份证交接单</div>
...@@ -174,9 +174,9 @@ ...@@ -174,9 +174,9 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="item in receitpDataToPrint.list"> <tr ng-repeat="item in idx">
<td width="60"> <td width="60">
{{$index+1}} {{item.id}}
</td> </td>
<td width="130"> <td width="130">
{{item.QR_CODE}} {{item.QR_CODE}}
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
</tr> </tr>
</tbody> </tbody>
<tfoot> <tfoot>
<tr> <tr ng-if="$index==result.length-1">
<td colspan="2" class="center"> <td colspan="2" class="center">
合计 合计
</td> </td>
......
...@@ -128,19 +128,25 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -128,19 +128,25 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
list:[] list:[]
} }
var checks = $(".checkAllPolice:checked"); var checks = $(".checkAllPolice:checked");
if(checks.length>37){
$scope.chooseCount = checks.length; for (var i=0;i<checks.length;i++){
MessageService.showAlert("一张纸上只能显示37条数据,本次已选择"+$scope.chooseCount+"条,请去掉"+37-$scope.chooseCount+"条数据再打印") for(var j=0;j<JSON.parse(checks[i].value).length;j++){
}else{ json.list.push(JSON.parse(checks[i].value)[j].POLICE_CODE)
for (var i=0;i<checks.length;i++){ }
for(var j=0;j<JSON.parse(checks[i].value).length;j++){ }
json.list.push(JSON.parse(checks[i].value)[j].POLICE_CODE) console.log(json)
} HttpService.printReceitpData(json,function (data) {
$scope.receitpDataToPrint = data;
for (var i=0;i<$scope.receitpDataToPrint.list.length;i++){
$scope.receitpDataToPrint.list[i].id = i+1
} }
console.log(json) $scope.result = [];
HttpService.printReceitpData(json,function (data) { for(var i=0;i<$scope.receitpDataToPrint.list.length;i+=37){
$scope.receitpDataToPrint = data; $scope.result.push($scope.receitpDataToPrint.list.slice(i,i+37));
$timeout(function () { }
console.log($scope.result)
$timeout(function () {
for (var i=0;i<$scope.result.length;i++){
var LODOP = getLodop(); var LODOP = getLodop();
LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", ""); LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
//初始化 //初始化
...@@ -162,15 +168,15 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -162,15 +168,15 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
LODOP.SET_PRINT_STYLEA(0, "Bold", 1); LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 1); LODOP.SET_PRINT_STYLEA(0, "Alignment", 1);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 12); LODOP.SET_PRINT_STYLEA(0, "FontSize", 12);
LODOP.ADD_PRINT_TABLE(110, 3, 740, "100%", document.getElementById("divPrint").innerHTML); LODOP.ADD_PRINT_TABLE(110, 3, 740, "100%", document.getElementById("divPrint"+i).innerHTML);
LODOP.SET_PRINT_STYLEA(0, "HOrient", 2); LODOP.SET_PRINT_STYLEA(0, "HOrient", 2);
LODOP.SET_PRINT_STYLEA(0, "Vorient", 3); LODOP.SET_PRINT_STYLEA(0, "Vorient", 3);
LODOP.SET_PRINTER_INDEXA(-1); LODOP.SET_PRINTER_INDEXA(-1);
LODOP.PREVIEW(); // LODOP.PREVIEW();
// LODOP.PRINT(); LODOP.PRINT();
}) }
}) })
} })
} }
......
...@@ -5,8 +5,7 @@ ...@@ -5,8 +5,7 @@
<div class="col-md-12"> <div class="col-md-12">
<div class="box box-primary" > <div class="box box-primary" >
<div class="box-header"> <div class="box-header">
<strong ng-if="state==2">膜打印数据报表</strong> <strong>膜打印数据报表</strong>
<strong ng-if="state==3">工作组数据报表</strong>
<div class="box-tools pull-right"> <div class="box-tools pull-right">
<span>查询日期:</span><input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate1" id="datepicker1" readonly/> <span></span> <span>查询日期:</span><input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate1" id="datepicker1" readonly/> <span></span>
<input type="text" style="height: 30px;margin-right: 10px;border-radius: 4px;background-color: #eee;cursor: not-allowed;border: 1px solid #ccc;" ng-model="choseDate2" id="datepicker2" 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="choseDate2" id="datepicker2" readonly/>
...@@ -27,8 +26,7 @@ ...@@ -27,8 +26,7 @@
<table class="table table-hover postTable"> <table class="table table-hover postTable">
<thead> <thead>
<tr> <tr>
<th ng-if="state==2">打印日期</th> <th>打印日期</th>
<th ng-if="state==3">预定位日期</th>
<th>大批证</th> <th>大批证</th>
<th>邮寄证</th> <th>邮寄证</th>
<th>军人证</th> <th>军人证</th>
......
...@@ -10,7 +10,6 @@ angular.module('AvatarCheck.report', ['ngRoute', 'AvatarCheck.http']) ...@@ -10,7 +10,6 @@ angular.module('AvatarCheck.report', ['ngRoute', 'AvatarCheck.http'])
}]) }])
.controller('reportCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) { .controller('reportCtrl', function ($scope, $rootScope, $timeout, HttpService, ngDialog, MessageService, $filter) {
$scope.state = 3;
//Date picker //Date picker
$('#datepicker1').datetimepicker({ $('#datepicker1').datetimepicker({
minView: "month", //选择日期后,不会再跳转去选择时分秒 minView: "month", //选择日期后,不会再跳转去选择时分秒
...@@ -41,6 +40,7 @@ angular.module('AvatarCheck.report', ['ngRoute', 'AvatarCheck.http']) ...@@ -41,6 +40,7 @@ angular.module('AvatarCheck.report', ['ngRoute', 'AvatarCheck.http'])
} }
HttpService.getReport(date1,date2,function(data){ HttpService.getReport(date1,date2,function(data){
$scope.reportData=data; $scope.reportData=data;
console.log($scope.reportData)
}) })
} }
$scope.searchReport(); $scope.searchReport();
......
...@@ -103,6 +103,12 @@ ...@@ -103,6 +103,12 @@
<div class="pull-right" style="margin-left: 10px;"> <div class="pull-right" style="margin-left: 10px;">
<button class="btn btn-primary" ng-click="goes()">转出任务单</button> <button class="btn btn-primary" ng-click="goes()">转出任务单</button>
</div> </div>
<div class="pull-right">
<select class="form-control select2" id="group" style="border-radius:5px">
<option value="1">A组</option>
<option value="2">B组</option>
</select>
</div>
</div> </div>
</div> </div>
</div> </div>
......
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