Commit e8a127f1 authored by 顾俭's avatar 顾俭

aship/aship#2 防伪码功能-打印:前端和接口地址配置

parent 36592699
...@@ -54,6 +54,10 @@ srm: ...@@ -54,6 +54,10 @@ srm:
supplierErpCheck: true supplierErpCheck: true
supplierErpSend: true supplierErpSend: true
genBarcode: SRM_genbarcode genBarcode: SRM_genbarcode
printBarcode: SRM_printbarcode
voidBarcode: SRM_voidbarcode
getBarcodeStatus: SRM_getbarcodestatus
fahuoConfirm: SRM_fahuoconfirm
email: email:
enable: true enable: true
recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com
......
...@@ -54,6 +54,10 @@ srm: ...@@ -54,6 +54,10 @@ srm:
supplierErpCheck: true supplierErpCheck: true
supplierErpSend: true supplierErpSend: true
genBarcode: SRM_genbarcode genBarcode: SRM_genbarcode
printBarcode: SRM_printbarcode
voidBarcode: SRM_voidbarcode
getBarcodeStatus: SRM_getbarcodestatus
fahuoConfirm: SRM_fahuoconfirm
email: email:
enable: true enable: true
recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com
......
package com.i1.erp.barcode.soap;
public class BarCodePrintClient {
}
...@@ -15,7 +15,7 @@ import static com.i1.srm.am.entity.Resource.*; ...@@ -15,7 +15,7 @@ import static com.i1.srm.am.entity.Resource.*;
public enum Function { public enum Function {
INDEX_NOTICE_FUNCTION(0, 0, "首页公告", Lists.newArrayList(QUERY, CREATE, VIEW_NOTICE_HISTORY)), INDEX_NOTICE_FUNCTION(0, 0, "首页公告", Lists.newArrayList(QUERY, CREATE, VIEW_NOTICE_HISTORY)),
//1采购协同管理 //1采购协同管理
PURCHASE_ORDER_FUNCTION(1, 11, "采购单管理", Lists.newArrayList(QUERY, VIEW, RETURN, EXPORT, GEN_BARCODE)), PURCHASE_ORDER_FUNCTION(1, 11, "采购单管理", Lists.newArrayList(QUERY, VIEW, RETURN, EXPORT, GEN_BARCODE, PRINT_BARCODE)),
PURCHASE_ORDER_CHANGE_FUNCTION(14, 12, "采购变更单管理", Lists.newArrayList(QUERY, VIEW, EXPORT, RETURN, CONFIRM, RETURN_ACCEPT, RETURN_REJECT, CONFIRM_ACCEPT, CONFIRM_REJECT)), PURCHASE_ORDER_CHANGE_FUNCTION(14, 12, "采购变更单管理", Lists.newArrayList(QUERY, VIEW, EXPORT, RETURN, CONFIRM, RETURN_ACCEPT, RETURN_REJECT, CONFIRM_ACCEPT, CONFIRM_REJECT)),
//2送货协同管理 //2送货协同管理
......
...@@ -63,7 +63,8 @@ public enum Resource { ...@@ -63,7 +63,8 @@ public enum Resource {
CHECK_RELEASE(53, "审核发布"), CHECK_RELEASE(53, "审核发布"),
ADDITIONAL_RECORDING(54, "补录税票"), ADDITIONAL_RECORDING(54, "补录税票"),
SEND_TO_ERP(55, "上传ERP"), SEND_TO_ERP(55, "上传ERP"),
GEN_BARCODE(56, "申请防伪码") GEN_BARCODE(56, "申请防伪码"),
PRINT_BARCODE(57, "打印防伪码")
; ;
private Integer id; private Integer id;
......
package com.i1.srm.purchaseOrder.web.dto;
public class PoBarcodePrintDto {
}
...@@ -104,7 +104,10 @@ srm: ...@@ -104,7 +104,10 @@ srm:
supplierErpCheck: false supplierErpCheck: false
supplierErpSend: false supplierErpSend: false
genBarcode: SRM_genbarcode genBarcode: SRM_genbarcode
printBarcode: SRM_printbarcode
voidBarcode: SRM_voidbarcode
getBarcodeStatus: SRM_getbarcodestatus
fahuoConfirm: SRM_fahuoconfirm
email: email:
enable: true enable: true
recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com
...@@ -205,6 +208,11 @@ srm: ...@@ -205,6 +208,11 @@ srm:
defaultPoChgReturnType: 1 defaultPoChgReturnType: 1
supplierErpCheck: false supplierErpCheck: false
supplierErpSend: false supplierErpSend: false
genBarcode: SRM_genbarcode
printBarcode: SRM_printbarcode
voidBarcode: SRM_voidbarcode
getBarcodeStatus: SRM_getbarcodestatus
fahuoConfirm: SRM_fahuoconfirm
email: email:
enable: true enable: true
recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com
......
...@@ -30,13 +30,14 @@ ...@@ -30,13 +30,14 @@
} }
); );
}, },
getUnReturnedOrders: function () { getUnReturnedOrders: function () {
return this.httpService.get('/purchaseOrderDetails/getSummary/getUnReturnedOrders'); return this.httpService.get('/purchaseOrderDetails/getSummary/getUnReturnedOrders');
}, },
getOverdueUnfinishedOrders: function () { getOverdueUnfinishedOrders: function () {
return this.httpService.get('/purchaseOrderDetails/getSummary/getOverdueUnfinishedOrders'); return this.httpService.get('/purchaseOrderDetails/getSummary/getOverdueUnfinishedOrders');
},
printBarcode: function (id) {
return this.httpService.get('/purchaseOrderDetails/' + id + "/printBarcode");
} }
}); });
}); });
......
...@@ -124,6 +124,10 @@ ...@@ -124,6 +124,10 @@
data-toggle="modal" data-target="#get-barcode-dlg" data-toggle="modal" data-target="#get-barcode-dlg"
ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'GEN_BARCODE' ">申请防伪码 ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'GEN_BARCODE' ">申请防伪码
</button> </button>
<button class="btn btn-default mrs" ng-if="queryCondition.poMst.supplier && queryCondition.poMst.supplier.useBarcode == 'Y'"
ng-click="printBarcodeClick()"
ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'PRINT_BARCODE' ">打印防伪码
</button>
<button class="btn btn-default mrs" ng-click="clickExport()" ng-disabled="gridOptions.data.length == 0" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'EXPORT' ">导出</button> <button class="btn btn-default mrs" ng-click="clickExport()" ng-disabled="gridOptions.data.length == 0" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'EXPORT' ">导出</button>
<ul uib-pagination total-items="pageOption.totalElements" ng-model="pageOption.page" items-per-page="pageOption.size" ng-change="getPurchaseOrderDetails()" <ul uib-pagination total-items="pageOption.totalElements" ng-model="pageOption.page" items-per-page="pageOption.size" ng-change="getPurchaseOrderDetails()"
class="pagination-sm pull-right mbn mtn" boundary-links="true" rotate="false" max-size="5" class="pagination-sm pull-right mbn mtn" boundary-links="true" rotate="false" max-size="5"
......
angular.module('IOne').controller('PurchaseOrderQueryController', function ($scope, $rootScope, $timeout, $log, $interval, $routeParams, angular.module('IOne').controller('PurchaseOrderQueryController', function ($scope, $rootScope, $timeout, $log, $interval, $routeParams, $window,
PoMstFileService, PoDtlFileService, BaseFactoryFileService, AuthService, PoMstFileService, PoDtlFileService, BaseFactoryFileService, AuthService,
BaseSupplierFileService, BaseProductFileService, UtilService, Constants) { BaseSupplierFileService, BaseProductFileService, UtilService, Constants) {
//variables //variables
...@@ -373,4 +373,28 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco ...@@ -373,4 +373,28 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
}); });
}); });
// 打印防伪码
// printBarcode
$scope.printBarcodeClick = function () {
// to call poDtl api, to call soap ws, to get print urls, to open windows
PoDtlFileService.printBarcode($scope.selectedPurchaseOrder.id).then(
function (response) {
if (response.data && response.data.code == '0') {
angular.forEach(response.data.printUrls, function (url) {
try {
$window.open(url);
} catch (e) {
console.error(e);
}
});
} else {
UtilService.showError("打印防伪码失败:<br>" + response.data.message);
}
}, function (response) {
UtilService.showError("打印防伪码失败:<br>" + response.data);
}
)
}
}); });
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