|
|
@@ -474,12 +474,16 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
for(var i = 0; i < $scope.currenctMaterial.length; i++) {
|
|
|
if($scope.currenctMaterial[i].id == response.id) {
|
|
|
- $scope.currenctMaterial.splice(i, 1, response);
|
|
|
- if(response.batchCount > 0) {
|
|
|
- $scope.expandGoods($scope.currenctMaterial[i]);
|
|
|
- }else {
|
|
|
- $scope.currenctMaterial[i].exPandOper = false;
|
|
|
- }
|
|
|
+ $scope.currenctMaterial[i].batchCount--;
|
|
|
+ if ($scope.currenctMaterial[i].batchCount < 1) {
|
|
|
+ $scope.currenctMaterial[i].exPandOper = false;
|
|
|
+ }
|
|
|
+ for(var j = 0; j < $scope.currenctMaterial[i].goodsArr.length; j++) {
|
|
|
+ if ($scope.choosedIds[0] == $scope.currenctMaterial[i].goodsArr[j].id) {
|
|
|
+ $scope.currenctMaterial[i].goodsArr.splice(j, 1);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // $scope.currenctMaterial.splice(i, 1, response);
|
|
|
}
|
|
|
}
|
|
|
}
|