Commit 3bc258ce authored by liboyang's avatar liboyang

标签打印

parent c79a84e8
<div class="ui-dialog-title">
提示
</div>
<div class="ui-dialog-content">
<div>A组已转出:{{dataCount[0].ASUM}}</div>
<div>B组已转出:{{dataCount[0].BSUM}}</div>
<div>本次已选择总数:<span ng-if="group==1">A组:</span><span ng-if="group==2">B组:</span>{{selectCount}}</div>
</div>
<div class="ui-dialog-confirm">
<button type="submit" class="btn btn-info create" ng-click="confirmGoTo()">确认</button>
<button type="submit" class="btn btn-danger" ng-click="closeThisDialog()">取消</button>
</div>
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
</footer> </footer>
</div> </div>
<div ng-if="loginData.login == false" class="wrapper" style="background-image:url(newTheme/dist/img/download.jpg);background-repeat:repeat;height:100%;"> <div ng-if="loginData.login == false" class="wrapper" style="background-image:url(newTheme/dist/img/download.jpg);background-repeat:repeat;height:100%;">
<div style="min-height: 500px;" ng-view></div> <div style="min-height: 1000px;" ng-view></div>
</div> </div>
<!-- iCheck --> <!-- iCheck -->
......
...@@ -220,6 +220,9 @@ angular.module('AvatarCheck', [ ...@@ -220,6 +220,9 @@ angular.module('AvatarCheck', [
$scope.addQuickCardAccu = function(){ $scope.addQuickCardAccu = function(){
if($(".accu:checked").length>0){ if($(".accu:checked").length>0){
if(angular.isUndefined($scope.searchResult.workOrderData[0].CARD_TYPE_ID)){
MessageService.showAlert("无制证类型记录,请创建任务单后再添加快证")
}else{
var idx = $(".accu:checked").val(); var idx = $(".accu:checked").val();
var check = idx.split("+"); var check = idx.split("+");
var json={}; var json={};
...@@ -232,6 +235,7 @@ angular.module('AvatarCheck', [ ...@@ -232,6 +235,7 @@ angular.module('AvatarCheck', [
MessageService.showAlert(data.msg) MessageService.showAlert(data.msg)
$scope.doSearch($scope.searchInput) $scope.doSearch($scope.searchInput)
}) })
}
}else{ }else{
MessageService.showAlert("请选择要添加的信息") MessageService.showAlert("请选择要添加的信息")
} }
...@@ -240,6 +244,9 @@ angular.module('AvatarCheck', [ ...@@ -240,6 +244,9 @@ angular.module('AvatarCheck', [
$scope.addQuickCardProd = function(){ $scope.addQuickCardProd = function(){
console.log($scope.searchResult.workOrderData[0].CARD_TYPE_ID) console.log($scope.searchResult.workOrderData[0].CARD_TYPE_ID)
if($(".prod:checked").length>0){ if($(".prod:checked").length>0){
if(angular.isUndefined($scope.searchResult.workOrderData[0].CARD_TYPE_ID)){
MessageService.showAlert("无制证类型记录,请创建任务单后再添加快证")
}else{
var idx = $(".prod:checked").val(); var idx = $(".prod:checked").val();
var check = idx.split("+"); var check = idx.split("+");
console.log(idx,check) console.log(idx,check)
...@@ -253,6 +260,8 @@ angular.module('AvatarCheck', [ ...@@ -253,6 +260,8 @@ angular.module('AvatarCheck', [
MessageService.showAlert(data.msg) MessageService.showAlert(data.msg)
$scope.doSearch($scope.searchInput) $scope.doSearch($scope.searchInput)
}) })
}
}else{ }else{
MessageService.showAlert("请选择要添加快证的信息") MessageService.showAlert("请选择要添加快证的信息")
} }
......
...@@ -509,7 +509,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -509,7 +509,8 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
method: 'GET', method: 'GET',
url: "../ReceiptApi/createReceiptList"+urlTimeStamp(), url: "../ReceiptApi/createReceiptList"+urlTimeStamp(),
params:{ params:{
id:idCard id:idCard,
name:$rootScope.loginData.name
} }
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
...@@ -752,6 +753,14 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -752,6 +753,14 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
success(response.data) success(response.data)
}) })
}, },
getHasDistributeCountByGroupWork:function(success){
$http({
method: 'GET',
url: "../TaskList/getPrintOutCount"+urlTimeStamp()
}).then(function successCallback(response) {
success(response.data)
})
},
updatePrintTaskListProcess:function(json,success){ updatePrintTaskListProcess:function(json,success){
var body = JSON.stringify(json); var body = JSON.stringify(json);
$http({ $http({
...@@ -802,7 +811,10 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -802,7 +811,10 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
getPoliceListDataNotCheckedData:function(success) { getPoliceListDataNotCheckedData:function(success) {
$http({ $http({
method: 'GET', method: 'GET',
url: "../ReceiptApi/selectRecriptData"+urlTimeStamp() url: "../ReceiptApi/selectRecriptData"+urlTimeStamp(),
params:{
name:$rootScope.loginData.name
}
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
}) })
...@@ -948,6 +960,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule']) ...@@ -948,6 +960,17 @@ angular.module('AvatarCheck.http', ['ngDialog', 'LocalStorageModule'])
}).then(function successCallback(response) { }).then(function successCallback(response) {
success(response.data) success(response.data)
}) })
},
getPoliceName:function(policeCode,success) {
$http({
method: 'GET',
url: "../ReceiptApi/queryPoliceName"+urlTimeStamp(),
params:{
policeCode:policeCode
}
}).then(function successCallback(response) {
success(response.data)
})
} }
} }
}); });
\ No newline at end of file
...@@ -163,8 +163,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p ...@@ -163,8 +163,6 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
for (var i = 0; i < $scope.selected.length; i++) { for (var i = 0; i < $scope.selected.length; i++) {
$rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount-$scope.selected[i].specialCount); $rootScope.selectCount =$rootScope.selectCount + parseInt($scope.selected[i].countyValidCount-$scope.selected[i].specialCount);
} }
$scope.restCount = $rootScope.selectCount%8;
console.log("for",$rootScope.selectCount)
var go = function () { var go = function () {
$rootScope.closeBtn(); $rootScope.closeBtn();
var checks = $(".checkOneBox:checked"); var checks = $(".checkOneBox:checked");
...@@ -193,12 +191,19 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p ...@@ -193,12 +191,19 @@ angular.module('AvatarCheck.dispatchTask', ['ngRoute', 'AvatarCheck.http', 'tm.p
}) })
} }
if($scope.selected.length>0){ if($scope.selected.length>0){
var group = $("#group").val();
console.log(group)
ngDialog.open({ ngDialog.open({
template: 'dialogs/gotoDistribute.html' + urlTimeStamp(), template: 'dialogs/gotoDistributeBySjhy.html' + urlTimeStamp(),
width: 800, width: 800,
cache: false, cache: false,
closeByDocument:false, closeByDocument:false,
controller: ['$scope', 'HttpService',function ($scope) { controller: ['$scope', 'HttpService',function ($scope) {
$scope.group = group;
HttpService.getHasDistributeCountByGroupWork(function(data) {
$scope.dataCount = data;
console.log($scope.dataCount)
})
$rootScope.closeThis=$scope.closeThisDialog; $rootScope.closeThis=$scope.closeThisDialog;
$rootScope.ableBtn = function(){ $rootScope.ableBtn = function(){
$(".create").prop("disabled","false"); $(".create").prop("disabled","false");
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="col-md-12 no-padding" style="margin-top:20px;"> <div class="col-md-12 no-padding" style="margin-top:20px;">
<div class="box"> <div class="box">
<div class="box-header with-border"> <div class="box-header with-border">
<strong >封条标签</strong> <strong >打印标签</strong>
</div> </div>
<div class="box box-primary" style="padding: 7px;padding-top: 0;"> <div class="box box-primary" style="padding: 7px;padding-top: 0;">
<table class="table table-bordered" style="margin-bottom: 0;"> <table class="table table-bordered" style="margin-bottom: 0;">
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-click="showDetail(item.ID)" ng-repeat="item in tagPrintData"> <tr ng-click="showDetail(item.ID,item.GAJG_MC,item.POLICE_CODE,item.FINISH_COUNT)" ng-repeat="item in tagPrintData">
<td>{{$index+1}}</td> <td>{{$index+1}}</td>
<td>{{item.POLICE_CODE}}</td> <td>{{item.POLICE_CODE}}</td>
<td>{{item.GAJG_MC}}</td> <td>{{item.GAJG_MC}}</td>
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
暂无数据 暂无数据
</h4> </h4>
</div> </div>
<div class="col-md-7" ng-if="json.policeCardsList.length>0"> <div class="col-md-7" ng-show="json.isShow">
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr>
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr ng-repeat="item in json.policeCardsList | orderBy:'acceptNo'"> <tr ng-repeat="item in json.policeCardsList | orderBy:'acceptNo'" class="{{item.styleClass}}">
<td>{{$index+1}}</td> <td>{{$index+1}}</td>
<td>{{item.ACCEPT_NO}}</td> <td>{{item.ACCEPT_NO}}</td>
<td>{{item.NAME}}</td> <td>{{item.NAME}}</td>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
</table> </table>
<div class="box-footer clearfix" style="border: 0;"> <div class="box-footer clearfix" style="border: 0;">
<button class="btn btn-success pull-right" style="margin-right: 20px;" ng-click="checkSame(json.id)">复核一致</button> <button class="btn btn-success pull-right" style="margin-right: 20px;" ng-click="checkSame(json.id)">复核一致</button>
<button class="btn btn-info pull-right" style="margin-right: 20px;" ng-click="PreviewMytableRotate()">打印封条</button> <button class="btn btn-info pull-right" style="margin-right: 20px;" ng-click="PreviewMytableRotate()">打印标签</button>
</div> </div>
</div> </div>
</div> </div>
...@@ -130,8 +130,8 @@ ...@@ -130,8 +130,8 @@
<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed> <embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
</object> </object>
</p> </p>
<div style="font-family:'黑体';height:7mm;position: absolute;top:5mm;left:5mm;">密云分局</div> <div style="font-family:'黑体';height:7mm;position: absolute;top:5mm;left:4mm;">{{json.policeData}}</div>
<div style="font-family:'黑体';height:7mm;position: absolute;top:12mm;left:3mm;">河南寨派出所</div> <div style="font-family:'黑体';height:7mm;position: absolute;top:12mm;left:3mm;">{{json.policeName}}</div>
<div style="font-family:'黑体';height:7mm;position: absolute;top:20mm;left:5mm;">数量:1</div> <div style="font-family:'黑体';height:7mm;position: absolute;top:20mm;left:5mm;">数量:{{json.count}}</div>
</div> </div>
</div> </div>
\ No newline at end of file
...@@ -27,15 +27,33 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -27,15 +27,33 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.json={ $scope.json={
id:'', id:'',
policeCardsList:[] policeName:'',
count:'',
policeCardsList:[],
isShow:false,
policeData:''
} }
$scope.showDetail = function(id){
$scope.json.id=id; var getDetailListById = function (id) {
HttpService.getPoliceCardsList(id,function(data) { HttpService.getPoliceCardsList(id,function(data) {
$scope.json.policeCardsList = data; $scope.json.policeCardsList = data;
for (var i=0;i<$scope.json.policeCardsList.length;i++){
if($scope.json.policeCardsList[i].CARD_ID==$scope.idCard){
$scope.json.policeCardsList[i].styleClass = "bg-danger"
}
}
$scope.json.id = id;
console.log($scope.json) 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);
}
var getPoliceListDataNotChecked = function () { var getPoliceListDataNotChecked = function () {
HttpService.getPoliceListDataNotCheckedData(function(data){ HttpService.getPoliceListDataNotCheckedData(function(data){
...@@ -45,18 +63,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -45,18 +63,7 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
getPoliceListDataNotChecked(); getPoliceListDataNotChecked();
$scope.searchTagPrintData = function(){
HttpService.selectTagPrintData($scope.idCard,function(data){
console.log(data)
if(data){
getPoliceListDataNotChecked();
}else{
MessageService.showAlert("生成交接单失败")
getPoliceListDataNotChecked();
}
})
}
$scope.checkSame = function (id) { $scope.checkSame = function (id) {
HttpService.updateReceiptList(id,function(data) { HttpService.updateReceiptList(id,function(data) {
...@@ -74,18 +81,29 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -74,18 +81,29 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
} }
var doQueryByIdCard = function(idcard){ var doQueryByIdCard = function(idcard){
console.log(idcard)
HttpService.selectTagPrintData(idcard,function(data){ HttpService.selectTagPrintData(idcard,function(data){
console.log(data) console.log(data)
if(data){ if(data.state==1){
$scope.json.isShow=true;
getPoliceListDataNotChecked(); getPoliceListDataNotChecked();
getDetailListById(data.id)
}else if(data.state==2){
$scope.json.isShow=true;
// getDetailListById(data.id)
for (var i=0;i<$scope.json.policeCardsList.length;i++){
if($scope.json.policeCardsList[i].CARD_ID==idcard&&$scope.json.policeCardsList[i].styleClass==''){
$scope.json.policeCardsList[i].styleClass = "bg-danger"
}
}
}else{ }else{
MessageService.showAlert("生成交接单失败") MessageService.showAlert("无该证件的制证记录")
getPoliceListDataNotChecked(); $scope.json.isShow=false;
} }
}) })
} }
$scope.searchTagPrintData = function(){
doQueryByIdCard($scope.idCard)
}
$scope.subSomething = function () { $scope.subSomething = function () {
$scope.show = false; $scope.show = false;
var flag = 0; var flag = 0;
...@@ -124,6 +142,10 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -124,6 +142,10 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
$scope.PreviewMytableRotate = function(){ $scope.PreviewMytableRotate = function(){
HttpService.getPoliceName($scope.json.policeCode,function(data) {
$scope.json.policeData = data[0].POLICE_NAME;
console.log($scope.json.policeData)
$timeout(function () {
var LODOP = getLodop(); var LODOP = getLodop();
LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", ""); LODOP.SET_LICENSES("", "15F0BE661E7F32F37491843CB2510905", "C94CEE276DB2187AE6B65D56B3FC2848", "");
LODOP.SET_PRINT_STYLE("FontName", "黑体"); LODOP.SET_PRINT_STYLE("FontName", "黑体");
...@@ -131,11 +153,15 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin ...@@ -131,11 +153,15 @@ angular.module('AvatarCheck.tagPrint', ['ngRoute', 'AvatarCheck.http', 'tm.pagin
LODOP.SET_PRINT_PAGESIZE(1, "70mm", "40mm", ""); LODOP.SET_PRINT_PAGESIZE(1, "70mm", "40mm", "");
LODOP = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM')); LODOP = getLodop(document.getElementById('LODOP1'), document.getElementById('LODOP_EM'));
LODOP.SET_PRINT_STYLE("FontName", "黑体"); LODOP.SET_PRINT_STYLE("FontName", "黑体");
LODOP.ADD_PRINT_BARCODE(7, 20, 242, 60, "128A", "E1006155001"); LODOP.ADD_PRINT_BARCODE(7, 20, 242, 60, "128A", $scope.json.policeCardsList[0].ACCEPT_NO.substring(0,8));
LODOP.ADD_PRINT_HTM(60, 80, 300, 300, document.getElementById("div1").innerHTML); LODOP.ADD_PRINT_HTM(60, 80, 300, 300, document.getElementById("div1").innerHTML);
LODOP.SET_PRINT_STYLEA(0, "AngleOfPageInside", 0); LODOP.SET_PRINT_STYLEA(0, "AngleOfPageInside", 0);
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