|
@@ -4451,23 +4451,29 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
AccountUser.findVendor({uu : user.userUU},function(data) {
|
|
AccountUser.findVendor({uu : user.userUU},function(data) {
|
|
|
$scope.enters = data;
|
|
$scope.enters = data;
|
|
|
$scope.loading = false;
|
|
$scope.loading = false;
|
|
|
- angular.forEach($scope.enters, function(item) {
|
|
|
|
|
- item:{
|
|
|
|
|
- $selected:true;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+// angular.forEach($scope.enters, function(item) {
|
|
|
|
|
+// if(item.distribute) {
|
|
|
|
|
+// item:{
|
|
|
|
|
+// $selected:false;
|
|
|
|
|
+// }
|
|
|
|
|
+// } else {
|
|
|
|
|
+// item:{
|
|
|
|
|
+// $selected:true;
|
|
|
|
|
+// }
|
|
|
|
|
+// }
|
|
|
|
|
+// });
|
|
|
})
|
|
})
|
|
|
// 点击勾选全部的复选框
|
|
// 点击勾选全部的复选框
|
|
|
$scope.checkAll = function() {
|
|
$scope.checkAll = function() {
|
|
|
angular.forEach($scope.enters, function(item) {
|
|
angular.forEach($scope.enters, function(item) {
|
|
|
- item.$selected = $scope.checkboxes.checked;
|
|
|
|
|
|
|
+ item.distribute = $scope.checkboxes.checked;
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
// 点击其中一个明细的复选框
|
|
// 点击其中一个明细的复选框
|
|
|
$scope.checkOne = function(vendor){
|
|
$scope.checkOne = function(vendor){
|
|
|
var result = true;
|
|
var result = true;
|
|
|
angular.forEach($scope.enters, function(item) {
|
|
angular.forEach($scope.enters, function(item) {
|
|
|
- if(item.$selected != true){
|
|
|
|
|
|
|
+ if(item.distribute != true){
|
|
|
result = false;
|
|
result = false;
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
@@ -4479,9 +4485,9 @@ app.controller('SaleSendCtrl', ['$scope', '$filter', 'SaleSend', 'ngTableParams'
|
|
|
if(save) {
|
|
if(save) {
|
|
|
if(user.userUU) {
|
|
if(user.userUU) {
|
|
|
angular.forEach($scope.enters, function(item, i) {
|
|
angular.forEach($scope.enters, function(item, i) {
|
|
|
- if(item.$selected) {
|
|
|
|
|
- chooseResult.push(item.id);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if(item.distribute) {
|
|
|
|
|
+ chooseResult.push(item);
|
|
|
|
|
+// }
|
|
|
});
|
|
});
|
|
|
if(chooseResult.length > 0) {
|
|
if(chooseResult.length > 0) {
|
|
|
$scope.loading = true;
|
|
$scope.loading = true;
|