|
@@ -271,7 +271,8 @@ export default {
|
|
|
if (this.constantWaterPrice == 1) {
|
|
if (this.constantWaterPrice == 1) {
|
|
|
for (let i = 0; i < this.baseForm.waterPriceSteps.length; i++) {
|
|
for (let i = 0; i < this.baseForm.waterPriceSteps.length; i++) {
|
|
|
const waterPriceItem = this.baseForm.waterPriceSteps[i]
|
|
const waterPriceItem = this.baseForm.waterPriceSteps[i]
|
|
|
- if (waterPriceItem?.pricestepUsagemin != '' && waterPriceItem?.pricestepUsagemax != '' && +waterPriceItem?.pricestepUsagemax < +waterPriceItem?.pricestepUsagemin) {
|
|
|
|
|
|
|
+ const waterMax = waterPriceItem?.pricestepUsagemax == null ? 9999999 : +waterPriceItem?.pricestepUsagemax
|
|
|
|
|
+ if (waterPriceItem?.pricestepUsagemin != '' && waterPriceItem?.pricestepUsagemax != '' && waterMax < +waterPriceItem?.pricestepUsagemin) {
|
|
|
Message({
|
|
Message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: `水价第${i+1}阶梯的最大量不能小于最小量`
|
|
message: `水价第${i+1}阶梯的最大量不能小于最小量`
|
|
@@ -291,7 +292,8 @@ export default {
|
|
|
if (this.ladderLikeWaterPrice == 1) {
|
|
if (this.ladderLikeWaterPrice == 1) {
|
|
|
for (let i = 0; i < this.baseForm.elecPriceSteps.length; i++) {
|
|
for (let i = 0; i < this.baseForm.elecPriceSteps.length; i++) {
|
|
|
const elePriceItem = this.baseForm.elecPriceSteps[i]
|
|
const elePriceItem = this.baseForm.elecPriceSteps[i]
|
|
|
- if (elePriceItem?.pricestepUsagemin != '' && elePriceItem?.pricestepUsagemax != '' && +elePriceItem?.pricestepUsagemax < +elePriceItem?.pricestepUsagemin) {
|
|
|
|
|
|
|
+ const eleMax = elePriceItem?.pricestepUsagemax == null ? 9999999 : +elePriceItem?.pricestepUsagemax
|
|
|
|
|
+ if (elePriceItem?.pricestepUsagemin != '' && elePriceItem?.pricestepUsagemax != '' && eleMax < +elePriceItem?.pricestepUsagemin) {
|
|
|
Message({
|
|
Message({
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
message: `电价第${i + 1}阶梯的最大量不能小于最小量`
|
|
message: `电价第${i + 1}阶梯的最大量不能小于最小量`
|