Commit 82a6f607 authored by 顾俭's avatar 顾俭

aship/aship#1 防伪码功能:供应商启用防伪码功能字段

parent c929d613
...@@ -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)), PURCHASE_ORDER_FUNCTION(1, 11, "采购单管理", Lists.newArrayList(QUERY, VIEW, RETURN, EXPORT, GET_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送货协同管理
......
...@@ -62,7 +62,8 @@ public enum Resource { ...@@ -62,7 +62,8 @@ public enum Resource {
PUNISH(52, "处罚"), PUNISH(52, "处罚"),
CHECK_RELEASE(53, "审核发布"), CHECK_RELEASE(53, "审核发布"),
ADDITIONAL_RECORDING(54, "补录税票"), ADDITIONAL_RECORDING(54, "补录税票"),
SEND_TO_ERP(55, "上传ERP") SEND_TO_ERP(55, "上传ERP"),
GET_BARCODE(56, "申请防伪码")
; ;
private Integer id; private Integer id;
......
...@@ -206,7 +206,7 @@ srm: ...@@ -206,7 +206,7 @@ srm:
recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com recipients: gujian@benchmarkchina.com,raven@benchmarkchina.com
logging: logging:
level: level:
org.hibernate.SQL: DEBUG org.hibernate.SQL: INFO
org.hibernate.type.descriptor.sql.BasicBinder: DEBUG org.hibernate.type.descriptor.sql.BasicBinder: DEBUG
org.hibernate.type.descriptor.sql.BasicExtractor: DEBUG org.hibernate.type.descriptor.sql.BasicExtractor: DEBUG
file: log/srm.log file: log/srm.log
\ No newline at end of file
...@@ -69,7 +69,7 @@ angular.module('IOne').controller('HomeNoticeController', function ($scope, $roo ...@@ -69,7 +69,7 @@ angular.module('IOne').controller('HomeNoticeController', function ($scope, $roo
}; };
$scope.isMyself = function (notice) { $scope.isMyself = function (notice) {
return (notice && notice.releasor == $rootScope.userInfo.username) || $rootScope.userInfo.username == 'admin'; return (notice && $rootScope.userInfo) && (notice.releasor == $rootScope.userInfo.username || $rootScope.userInfo.username == 'admin');
}; };
$scope.isAclAllowed = function () { $scope.isAclAllowed = function () {
......
...@@ -121,6 +121,10 @@ ...@@ -121,6 +121,10 @@
<button class="btn btn-default mrs" ng-click="view()" ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'VIEW' ">查看</button> <button class="btn btn-default mrs" ng-click="view()" ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'VIEW' ">查看</button>
<button class="btn btn-default mrs" ng-click="openReturnPage()" ng-disabled="!canDoReturn()" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'RETURN' ">回执</button> <button class="btn btn-default mrs" ng-click="openReturnPage()" ng-disabled="!canDoReturn()" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'RETURN' ">回执</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>
<button class="btn btn-default mrs" data-toggle="modal" data-target="#get-barcode-dlg"
ng-disabled="!currentPurchaseOrderMaster" acl-check func=" 'PURCHASE_ORDER_FUNCTION' " resource=" 'GET_BARCODE' ">申请防伪码
</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"
previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;"> previous-text="&lsaquo;" next-text="&rsaquo;" first-text="&laquo;" last-text="&raquo;">
...@@ -131,4 +135,33 @@ ...@@ -131,4 +135,33 @@
</div> </div>
<div ui-grid="gridOptions" ui-grid-selection ui-grid-resize-columns class="grid"></div> <div ui-grid="gridOptions" ui-grid-selection ui-grid-resize-columns class="grid"></div>
</div>
\ No newline at end of file <!--申请防伪码开窗-->
<div class="modal fade" id="get-barcode-dlg" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">防伪码申请
<!--<h5>请填写申请数量</h5>-->
</h4>
</div>
<div class="modal-body">
<h5><strong>采购单{{selectedPurchaseOrder.poMst.purchaseOrderUid}},请填写需要申请项次的申请数量:</strong></h5>
<!--ui-grid-selection-->
<div ui-grid="barcodeGridOptions" ui-grid-resize-columns
ui-grid-edit ui-grid-row-edit ui-grid-cellNav class="grid" style="height: 300px">
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="button" ng-click="getBarcode()">确认</button>
<button class="btn btn-primary" type="button" data-dismiss="modal">取消</button>
</div>
</div>
</div>
</div>
</div>
...@@ -273,4 +273,55 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco ...@@ -273,4 +273,55 @@ angular.module('IOne').controller('PurchaseOrderQueryController', function ($sco
} }
}; };
// 申请防伪码
$scope.barcodeGridOptions = {
enableRowSelection: false,
enableSelectAll: true,
multiSelect: false,
selectionRowHeaderWidth: 35,
enableSorting: true,
enableColumnResizing: true,
columnDefs: [
{name: '项次', field: 'poDtlRow', width: 50},
{name: '物料编号', field: 'product.productUid', width: 100},
{name: '物料名称', field: 'product.name', width: 130},
{name: '物料规格', field: 'product.standard', width: 180},
{name: '申请数量', field: 'barcodeAmount', width: 80, enableCellEdit: true, type: 'number', cellClass: 'editable-field'},
{name: '订单数量', field: 'orderAmount', width: 80},
{name: '回执数量', field: 'supplierReturnedAmount', width: 80},
{name: '已交数量', field: 'deliveredAmount', width: 80},
{name: '已关联数量', field: 'relationAmount', width: 80}
],
data: []
};
$scope.getBarcode = function () {
var barcodeInput = [];
angular.forEach($scope.barcodeGridOptions.data, function (item) {
if (item.barcodeAmount && item.barcodeAmount > 0) {
barcodeInput.push({
poDtlRow: item.poDtlRow,
productUid: item.product.productUid,
barcodeAmount: item.barcodeAmount
})
}
});
console.info(barcodeInput);
//调用服务 /$scope.selectedPurchaseOrder.poMst.id/getBarcode
$('#get-barcode-dlg').modal('hide')
};
// load po dtl data
$('#get-barcode-dlg').on('show.bs.modal', function (e) {
$scope.barcodeGridOptions.data = [];
PoDtlFileService.getAllByExample({
poMst: {id: $scope.selectedPurchaseOrder.poMst.id}
}).then(function (response) {
$scope.barcodeGridOptions.data = response.data;
angular.forEach($scope.barcodeGridOptions.data, function (item) {
item.barcodeAmount = 0;
});
});
});
}); });
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