|
|
@@ -2484,6 +2484,12 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
$scope.editCmp = material.pcmpcode;
|
|
|
$scope.editBrand = material.pbranden;
|
|
|
$scope.replaceMaterialList = angular.copy(material.productReplaceList);
|
|
|
+ for (var i = 0; i < $scope.replaceMaterialList.length; i++) {
|
|
|
+ $scope.errorObj.push({
|
|
|
+ code: 0,
|
|
|
+ brand: 0
|
|
|
+ });
|
|
|
+ }
|
|
|
if ($scope.replaceMaterialList.length == 0) {
|
|
|
$scope.replaceMaterialList = [{detno : 1, productId : material.id}]
|
|
|
}
|
|
|
@@ -2558,12 +2564,14 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
}
|
|
|
$scope.setShowSimilarCodeList = function (flag, index) {
|
|
|
if (!$scope.replaceMaterialList[index].ptrCmpcode || !$scope.similarCode || !$scope.similarCode.length) {
|
|
|
- return;
|
|
|
+ $scope.replaceMaterialList[index].showSimilarCodeList = false;
|
|
|
+ return;
|
|
|
}
|
|
|
$scope.replaceMaterialList[index].showSimilarCodeList = flag;
|
|
|
}
|
|
|
$scope.setShowSimilarBrandList = function (flag, index) {
|
|
|
if (!$scope.replaceMaterialList[index].ptrBranden || !$scope.similarBrand || !$scope.similarBrand.length) {
|
|
|
+ $scope.replaceMaterialList[index].showSimilarBrandList = false;
|
|
|
return;
|
|
|
}
|
|
|
$scope.replaceMaterialList[index].showSimilarBrandList = flag;
|
|
|
@@ -2608,6 +2616,14 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
$scope.replaceMaterialList[index].ptrBranden = brand;
|
|
|
$scope.setShowSimilarBrandList(false, index);
|
|
|
}
|
|
|
+ // $scope.resetSimilar = function (index, type) {
|
|
|
+ // for (var i = 0; i < $scope.replaceMaterialList.length; i++) {
|
|
|
+ // if (index != i) {
|
|
|
+ // $scope.replaceMaterialList[i].showSimilarCodeList = false;
|
|
|
+ // $scope.replaceMaterialList[i].showSimilarBrandList = false;
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}]);
|
|
|
|
|
|
//类目选择模态框
|