Bladeren bron

修改单个物料导入input blur和click问题

shenjj 7 jaren geleden
bovenliggende
commit
0adafbab49

+ 7 - 3
src/main/webapp/resources/js/vendor/controllers/forstore/single_entry.js

@@ -119,9 +119,6 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       $scope.objError.kind = false
     }
 
-    $scope.RegulSpecBlur = function() {
-      $scope.objError.spec = false
-    }
     /**
      * 物料编辑品牌输入框失去焦点
      *
@@ -275,6 +272,7 @@ define(['app/app', 'jquery-uploadify'], function(app) {
       } else {
         $scope.Regul.reserve = num
       }
+      $scope.objError.reserve = false
     }
 
     $scope.setOnePrice = function(num) {
@@ -526,6 +524,12 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         return;
       }
 
+      if ($scope.Regul.reserve <=0) {
+        toaster.pop('warning','提示', '库存数量必须大于等于1')
+        $scope.objError.reserve = true
+        return;
+      }
+
       if (!$scope.Regul.minBuyQty || $scope.Regul.minBuyQty === 0) {
         toaster.pop('warning','提示', '最小起订量必须是大于0的数字')
         $scope.objError.minBuyQty = true

+ 1 - 1
src/main/webapp/resources/view/vendor/forstore/single_entry.html

@@ -236,7 +236,7 @@
                    placeholder="请输入规格参数"
                    ng-model="Regul.spec"
                    ng-class="objError.spec ? 'danger' : '' "
-                   ng-blur="RegulSpecBlur()"
+
                    class="form-control inputText" maxlength="50"/>
           </div>
         </div>