|
@@ -53,7 +53,7 @@ define(['app/app'], function (app) {
|
|
|
* */
|
|
* */
|
|
|
$scope.onUnitPriceBlur = function () {
|
|
$scope.onUnitPriceBlur = function () {
|
|
|
if (angular.isNumber($scope.offer.unitPrice)) {
|
|
if (angular.isNumber($scope.offer.unitPrice)) {
|
|
|
- if ($scope.offer.unitPrice < 0) {
|
|
|
|
|
|
|
+ if ($scope.offer.unitPrice <= 0) {
|
|
|
toaster.pop('warning', '提示', '单价必须是大于0的数字');
|
|
toaster.pop('warning', '提示', '单价必须是大于0的数字');
|
|
|
$scope.validOffer.unitPrice = false;
|
|
$scope.validOffer.unitPrice = false;
|
|
|
} else {
|
|
} else {
|
|
@@ -82,6 +82,7 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$scope.onMinDayInput = function () {
|
|
$scope.onMinDayInput = function () {
|
|
|
|
|
+ // $scope.offer.minDay = Number($scope.offer.minDay.toString());
|
|
|
if ($scope.offer.minDay < 1 || $scope.offer.minDay > 31 || $scope.offer.minDay.toString().indexOf('.') !== -1) {
|
|
if ($scope.offer.minDay < 1 || $scope.offer.minDay > 31 || $scope.offer.minDay.toString().indexOf('.') !== -1) {
|
|
|
$scope.validOffer.minDay = false;
|
|
$scope.validOffer.minDay = false;
|
|
|
toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
@@ -100,6 +101,7 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
$scope.onMaxDayInput = function () {
|
|
$scope.onMaxDayInput = function () {
|
|
|
|
|
+ // $scope.offer.maxDay = Number($scope.offer.maxDay.toString());
|
|
|
if ($scope.offer.maxDay < 1 || $scope.offer.maxDay > 31 || $scope.offer.maxDay.toString().indexOf('.') !== -1) {
|
|
if ($scope.offer.maxDay < 1 || $scope.offer.maxDay > 31 || $scope.offer.maxDay.toString().indexOf('.') !== -1) {
|
|
|
$scope.validOffer.maxDay = false;
|
|
$scope.validOffer.maxDay = false;
|
|
|
toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
toaster.pop('warning', '提示', '交期只能填写1-31之间的整数值');
|
|
@@ -155,7 +157,7 @@ define(['app/app'], function (app) {
|
|
|
});
|
|
});
|
|
|
} else {
|
|
} else {
|
|
|
if (!$scope.validOffer.unitPrice) {
|
|
if (!$scope.validOffer.unitPrice) {
|
|
|
- if (!$scope.offer.unitPrice) {
|
|
|
|
|
|
|
+ if (!$scope.offer.unitPrice || $scope.offer.unitPrice == 0) {
|
|
|
toaster.pop('warning', '提示', '单价不能为空');
|
|
toaster.pop('warning', '提示', '单价不能为空');
|
|
|
} else {
|
|
} else {
|
|
|
toaster.pop('warning', '提示', '单价必须是大于0的数字');
|
|
toaster.pop('warning', '提示', '单价必须是大于0的数字');
|