|
|
@@ -1,7 +1,7 @@
|
|
1
|
1
|
angular.module('app.business').controller("grainDeliveryStorageNoticeSaveCtrl",
|
|
2
|
2
|
function($scope, $http, $filter, $stateParams, $state, $uibModal, $rootScope,agentDepotService,
|
|
3
|
3
|
deliveryStorageNoticeService, deliveryStorageNoticeAuditService, commonUtilService,
|
|
4
|
|
- storeWareDetailService, enumService, codeRuleService,planService, customerService, contractReceiveService, $location, APP_CONFIG) {
|
|
|
4
|
+ storeWareDetailService, enumService, codeRuleService,planService, customerService, contractReceiveService, userRoleService, $location, APP_CONFIG) {
|
|
5
|
5
|
|
|
6
|
6
|
$scope.deliveryStorageNotice = {};
|
|
7
|
7
|
$scope.billNumber = {};
|
|
|
@@ -51,27 +51,19 @@ angular.module('app.business').controller("grainDeliveryStorageNoticeSaveCtrl",
|
|
51
|
51
|
$scope.billNumber.status = "success";
|
|
52
|
52
|
$scope.deliveryStorageNotice.billNumber = data.codeValue;
|
|
53
|
53
|
|
|
54
|
|
- //当审批的人员信息没有设置完全时,则要增加提示
|
|
55
|
|
- planService.getjybjl($rootScope.userInfo.orgId).then(function(datas){
|
|
56
|
|
- if(datas==0){ //返回的是数量
|
|
|
54
|
+ //当审批的人员信息没有设置完全时,则要增加提示(检查当前库有没有经营部经理这儿角色)
|
|
|
55
|
+ userRoleService.getjsqx($rootScope.userInfo.orgId, '经营部经理').then(function(datas){
|
|
|
56
|
+ if(datas==0){ //返回的是数量,0就是没有
|
|
57
|
57
|
$scope.isNotEdit = true;
|
|
58
|
58
|
//确认框
|
|
59
|
|
- var showConfim=document.getElementById("confim");
|
|
60
|
|
- showConfim.style.display="block";
|
|
|
59
|
+ //var showConfim=document.getElementById("confim");
|
|
|
60
|
+ //showConfim.style.display="block";
|
|
|
61
|
+ alert("请增加经营部经理这一角色或者给人员赋予经营部经理的角色!");
|
|
|
62
|
+ $scope.retList();
|
|
61
|
63
|
}
|
|
62
|
64
|
},function(datas){
|
|
63
|
65
|
console.log(datas);
|
|
64
|
66
|
});
|
|
65
|
|
- $scope.define = function () { //确定
|
|
66
|
|
- var showConfim=document.getElementById("confim");
|
|
67
|
|
- showConfim.style.display="none";
|
|
68
|
|
- $scope.retList();
|
|
69
|
|
- }
|
|
70
|
|
- $scope.cancel = function () {//取消
|
|
71
|
|
- var showConfim=document.getElementById("confim");
|
|
72
|
|
- showConfim.style.display="none";
|
|
73
|
|
- $scope.retList();
|
|
74
|
|
- }
|
|
75
|
67
|
} else if (data.status == "error") {
|
|
76
|
68
|
$scope.billNumber.msg = data.msg;
|
|
77
|
69
|
$scope.billNumber.status = "error";
|