Commit 79dcf199 authored by liboyang's avatar liboyang

打印条数限制

parent 28b7f30b
...@@ -156,19 +156,19 @@ ...@@ -156,19 +156,19 @@
<table cellpadding="0" cellspacing="0" border="1" style="text-align: center;"> <table cellpadding="0" cellspacing="0" border="1" style="text-align: center;">
<thead> <thead>
<tr> <tr>
<th width="60"> <th width="60" style="text-align: center;">
序号 序号
</th> </th>
<th width="130"> <th width="130" style="text-align: center;">
身份证受理组号 身份证受理组号
</th> </th>
<th colspan="2"> <th colspan="2" style="text-align: center;">
身份证所属派出所名称 身份证所属派出所名称
</th> </th>
<th width="80"> <th width="80" style="text-align: center;">
数量 数量
</th> </th>
<th width="145"> <th width="145" style="text-align: center;">
备注 备注
</th> </th>
</tr> </tr>
......
...@@ -127,44 +127,51 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http']) ...@@ -127,44 +127,51 @@ angular.module('AvatarCheck.receitp', ['ngRoute', 'AvatarCheck.http'])
endDate:endDate, endDate:endDate,
list:[] list:[]
} }
var checks = $(".checkAllPolice:checked") var checks = $(".checkAllPolice:checked");
for (var i=0;i<checks.length;i++){ if(checks.length>37){
for(var j=0;j<JSON.parse(checks[i].value).length;j++){ $scope.chooseCount = checks.length;
json.list.push(JSON.parse(checks[i].value)[j].POLICE_CODE) MessageService.showAlert("一张纸上只能显示37条数据,本次已选择"+$scope.chooseCount+"条,请去掉"+37-$scope.chooseCount+"条数据再打印")
}else{
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)
console.log(json) HttpService.printReceitpData(json,function (data) {
HttpService.printReceitpData(json,function (data) { $scope.receitpDataToPrint = data;
$scope.receitpDataToPrint = data; $timeout(function () {
$timeout(function () { var LODOP = getLodop();
var LODOP = getLodop(); LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", ""); //初始化
//初始化 LODOP.PRINT_INIT("打印交接单");
LODOP.PRINT_INIT("打印交接单"); LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4");
LODOP.SET_PRINT_PAGESIZE(1, 0, 0, "A4"); LODOP.ADD_PRINT_TEXT(10, 0, "100%", 20, "北京市公安局证件制作管理中心交接岗位");
LODOP.ADD_PRINT_TEXT(10, 0, "100%", 20, "北京市公安局证件制作管理中心交接岗位"); LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Bold", 1); LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2); LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15); LODOP.ADD_PRINT_TEXT(35, 0, "100%", 20, "身份证交接单");
LODOP.ADD_PRINT_TEXT(35, 0, "100%", 20, "身份证交接单"); LODOP.SET_PRINT_STYLEA(0, "Bold", 1);
LODOP.SET_PRINT_STYLEA(0, "Bold", 1); LODOP.SET_PRINT_STYLEA(0, "Alignment", 2);
LODOP.SET_PRINT_STYLEA(0, "Alignment", 2); LODOP.SET_PRINT_STYLEA(0, "FontSize", 15);
LODOP.SET_PRINT_STYLEA(0, "FontSize", 15); LODOP.ADD_PRINT_TEXT(70, 30, "100%", 20, "交接日期:"+$scope.receitpDataToPrint.date);
LODOP.ADD_PRINT_TEXT(70, 30, "100%", 20, "交接日期:"+$scope.receitpDataToPrint.date); 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_TEXT(90, 30, "100%", 20, "送至:");
LODOP.ADD_PRINT_TEXT(90, 30, "100%", 20, "送至:"); 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").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.PREVIEW(); LODOP.PREVIEW();
// LODOP.PRINT(); // LODOP.PRINT();
})
}) })
}) }
} }
......
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