|
|
@@ -24,8 +24,8 @@ define(['app/app'], function(app) {
|
|
|
})
|
|
|
}
|
|
|
loadData();
|
|
|
- var initIndex = function () {
|
|
|
- angular.forEach($scope.bomData.seekPurchaseByBatchs, function (item, index) {
|
|
|
+ var initIndex = function (list) {
|
|
|
+ angular.forEach(list, function (item, index) {
|
|
|
item.$index = index;
|
|
|
});
|
|
|
}
|
|
|
@@ -241,9 +241,9 @@ define(['app/app'], function(app) {
|
|
|
isInBrandList: false,
|
|
|
amount: 0
|
|
|
});
|
|
|
- initIndex();
|
|
|
- $scope.tmpEditBom = angular.copy($scope.bomData);
|
|
|
+ initIndex($scope.bomData.seekPurchaseByBatchs);
|
|
|
$scope.setAllCheck(true);
|
|
|
+ $scope.tmpEditBom = angular.copy($scope.bomData);
|
|
|
};
|
|
|
|
|
|
// 打开日期选择框
|
|
|
@@ -501,5 +501,12 @@ define(['app/app'], function(app) {
|
|
|
item.brand = brand;
|
|
|
$scope.setShowSimilarList(item, 'showSimilarBrandList', false);
|
|
|
}
|
|
|
+ $scope.deleteDetail = function ($index) {
|
|
|
+ $scope.bomData.seekPurchaseByBatchs.splice($index, 1);
|
|
|
+ $scope.tmpEditBom.seekPurchaseByBatchs.splice($index, 1);
|
|
|
+ initIndex($scope.bomData.seekPurchaseByBatchs);
|
|
|
+ initIndex($scope.tmpEditBom.seekPurchaseByBatchs);
|
|
|
+ }
|
|
|
+
|
|
|
}]);
|
|
|
});
|