Przeglądaj źródła

替代物料验收反馈修改4

wangdy 8 lat temu
rodzic
commit
d4d96695ec

+ 7 - 0
src/main/webapp/resources/js/vendor/controllers/forstore/vendor_materialPersonCtrl.js

@@ -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 {