|
|
@@ -2501,6 +2501,13 @@ define([ 'app/app', 'jquery-uploadify' ], function(app) {
|
|
|
$scope.setReplies = function (type, index) {
|
|
|
if (type === 'add' && $scope.replaceMaterialList.length < 10) {
|
|
|
for (var index = 0 ;index < $scope.replaceMaterialList.length ; index ++) {
|
|
|
+ $scope.errorObj[index] = {code : 0, brand : 0};
|
|
|
+ if (!$scope.replaceMaterialList[index].ptrCmpcode) {
|
|
|
+ $scope.errorObj[index].code = 1;
|
|
|
+ }
|
|
|
+ if (!$scope.replaceMaterialList[index].ptrBranden) {
|
|
|
+ $scope.errorObj[index].brand = 1;
|
|
|
+ }
|
|
|
if ($scope.replaceMaterialList[index].ptrBranden && $scope.replaceMaterialList[index].ptrCmpcode) {
|
|
|
$scope.canAdd = true;
|
|
|
} else {
|