|
|
@@ -370,24 +370,20 @@ define(['app/app'], function (app) {
|
|
|
|
|
|
$scope.onReplyPriceBlur = function (index) {
|
|
|
var price = $scope.inquiryItem.replies[index].price;
|
|
|
- var limitDownObj = $scope.getLimitDownPrice();
|
|
|
- if (!price || price <= 0) {
|
|
|
- $scope.inquiryItem.replies[index].price = '';
|
|
|
- toaster.pop('error', '输入值必须为正整数');
|
|
|
- $scope.validSayPrice.repliesPrice = false;
|
|
|
- } else if (limitDownObj.index !== index && limitDownObj.price > price) {
|
|
|
- toaster.pop('error', '输入值必须大于#该梯度的下限#');
|
|
|
+ // var limitDownObj = $scope.getLimitDownPrice();
|
|
|
+ if (!price) {
|
|
|
$scope.inquiryItem.replies[index].price = '';
|
|
|
+ toaster.pop('error', '价格不能为空');
|
|
|
$scope.validSayPrice.repliesPrice = false;
|
|
|
- } else if ((index - 1 >= 0 && $scope.inquiryItem.replies[index - 1].price && $scope.inquiryItem.replies[index - 1].price >= price) || (index + 1 < $scope.inquiryItem.replies.length && $scope.inquiryItem.replies[index + 1].price && $scope.inquiryItem.replies[index + 1].price <= price)) {
|
|
|
- toaster.pop('error', '输入值会导致梯度重叠,请重新修改');
|
|
|
+ } else if (price <= 0) {
|
|
|
$scope.inquiryItem.replies[index].price = '';
|
|
|
+ toaster.pop('error', '输入值必须为正整数');
|
|
|
$scope.validSayPrice.repliesPrice = false;
|
|
|
} else {
|
|
|
$scope.validSayPrice.repliesPrice = true;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+/*
|
|
|
$scope.getLimitDownPrice = function () {
|
|
|
for (var i = 0; i < $scope.inquiryItem.replies.length; i++) {
|
|
|
if ($scope.inquiryItem.replies[i].price) {
|
|
|
@@ -398,7 +394,7 @@ define(['app/app'], function (app) {
|
|
|
}
|
|
|
}
|
|
|
return {index: -1};
|
|
|
- }
|
|
|
+ }*/
|
|
|
|
|
|
$scope.checkValid = function () {
|
|
|
return $scope.validSayPrice.leadtime && $scope.validSayPrice.repliesLapQty && $scope.validSayPrice.repliesPrice;
|