shenjj 7 years ago
parent
commit
86d3d0fef5

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

@@ -533,13 +533,13 @@ define(['app/app', 'jquery-uploadify'], function(app) {
         return;
         return;
       }
       }
 
 
-      if ($scope.Regul.minPackQty !== '' && /\D/.test($scope.Regul.minPackQty)) {
+      if ($scope.Regul.minPackQty && /\D/.test($scope.Regul.minPackQty)) {
         toaster.pop('warning','提示', '最小包装数输入不正确')
         toaster.pop('warning','提示', '最小包装数输入不正确')
         $scope.objError.minPackQty = true
         $scope.objError.minPackQty = true
         return;
         return;
       }
       }
 
 
-      if ($scope.Regul.OnePrice !== '' && !/^\d+(\.\d+)?$/.test($scope.Regul.OnePrice)) {
+      if ($scope.Regul.OnePrice && !/^\d+(\.\d+)?$/.test($scope.Regul.OnePrice.trim())) {
         toaster.pop('warning','提示', '成本单价输入不正确')
         toaster.pop('warning','提示', '成本单价输入不正确')
         $scope.objError.OnePrice = true
         $scope.objError.OnePrice = true
         return;
         return;