|
@@ -2054,8 +2054,17 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
checked : false
|
|
checked : false
|
|
|
};
|
|
};
|
|
|
$scope.loading = true;
|
|
$scope.loading = true;
|
|
|
|
|
+ $scope.distribute = [];
|
|
|
AccountUser.findUsers({uu:customer.myEnterprise.uu},null,function(data) {
|
|
AccountUser.findUsers({uu:customer.myEnterprise.uu},null,function(data) {
|
|
|
$scope.userinfos = data;
|
|
$scope.userinfos = data;
|
|
|
|
|
+ var distribute = [];
|
|
|
|
|
+ angular.forEach($scope.userinfos, function(user, index) {
|
|
|
|
|
+ if(user.distribute) {
|
|
|
|
|
+ distribute.push(index);
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ $scope.distribute = distribute;
|
|
|
|
|
+ $scope.havedone = angular.copy($scope.distribute);
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -2067,9 +2076,12 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
angular.forEach($scope.userinfos, function(item, index) {
|
|
angular.forEach($scope.userinfos, function(item, index) {
|
|
|
item.distribute = $scope.checkboxes.checked;
|
|
item.distribute = $scope.checkboxes.checked;
|
|
|
});
|
|
});
|
|
|
- $scope.isChanged = true;
|
|
|
|
|
|
|
+// $scope.isChanged = true;
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
|
|
+ $scope.isChanged = function() {
|
|
|
|
|
+ return angular.equals($scope.distribute, $scope.changes);
|
|
|
|
|
+ }
|
|
|
// 点击其中一个明细的复选框
|
|
// 点击其中一个明细的复选框
|
|
|
$scope.checkOne = function(vendor, isChanged, index){
|
|
$scope.checkOne = function(vendor, isChanged, index){
|
|
|
if(isChanged) {
|
|
if(isChanged) {
|
|
@@ -13403,7 +13415,7 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
$scope.tableParams.reload();
|
|
$scope.tableParams.reload();
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
- //复制采购单
|
|
|
|
|
|
|
+ // 复制采购单
|
|
|
$scope.copyorder = function(id) {
|
|
$scope.copyorder = function(id) {
|
|
|
DeputyOrder.copyOrder({id: id}, {}, function(data) {
|
|
DeputyOrder.copyOrder({id: id}, {}, function(data) {
|
|
|
if(data.id) {
|
|
if(data.id) {
|
|
@@ -13417,6 +13429,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', response.data);
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 删除代采订单
|
|
|
|
|
+ $scope.clear = function(id) {
|
|
|
|
|
+ DeputyOrder.clearOrder({id: id}, {}, function(data) {
|
|
|
|
|
+ if(data.success) {
|
|
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
|
|
+ $scope.tableParams.reload();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -14267,6 +14291,18 @@ define([ 'toaster', 'charts', 'ngTable', 'common/services', 'common/directives',
|
|
|
toaster.pop('error', '提示', response.data);
|
|
toaster.pop('error', '提示', response.data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ // 删除代采订单
|
|
|
|
|
+ $scope.clear = function(id) {
|
|
|
|
|
+ DeputyOrder.clearOrder({id: id}, {}, function(data) {
|
|
|
|
|
+ if(data.success) {
|
|
|
|
|
+ toaster.pop('success', '提示', data.success);
|
|
|
|
|
+ window.location.hash = "#/purc/deputy";
|
|
|
|
|
+ }
|
|
|
|
|
+ }, function(response) {
|
|
|
|
|
+ toaster.pop('error', '提示', response.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
}]);
|
|
}]);
|
|
|
|
|
|
|
|
/**
|
|
/**
|