From a76466b1305d22e6d045df4c9bd3acfb27c924ce Mon Sep 17 00:00:00 2001 From: liuye Date: Wed, 19 Apr 2023 15:48:57 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=AF=E5=88=86=E5=80=BC=E5=B8=A6=E5=B0=8F?= =?UTF-8?q?=E6=95=B0=E7=82=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/project/fd/AppPointsReview/detail.vue | 8 +++++++- src/project/fd/AppPointsReview/integralAdd.vue | 7 ++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/project/fd/AppPointsReview/detail.vue b/src/project/fd/AppPointsReview/detail.vue index 222f77ad..4d67d036 100644 --- a/src/project/fd/AppPointsReview/detail.vue +++ b/src/project/fd/AppPointsReview/detail.vue @@ -21,7 +21,8 @@
积分值
- + + {{info.applyIntegral}}
@@ -177,6 +178,11 @@ export default { submit() { if(this.flag) return + if (!/^([1-9]\d*|0)(\.\d{1,2})?$/g.test(this.info.applyIntegral)) { + this.info.applyIntegral = Number(this.info.applyIntegral).toFixed(2) + return this.$u.toast('积分值最多只保留两位小数点') + } + if (!this.info.content) { return this.$u.toast('请输入详细描述') } diff --git a/src/project/fd/AppPointsReview/integralAdd.vue b/src/project/fd/AppPointsReview/integralAdd.vue index 4fb287f6..9c4e7d89 100644 --- a/src/project/fd/AppPointsReview/integralAdd.vue +++ b/src/project/fd/AppPointsReview/integralAdd.vue @@ -25,7 +25,8 @@
*积分值
- + +
@@ -125,6 +126,10 @@ export default { if (!this.form.applyItemId) { return this.$u.toast('请选择事件类型') } + if (!/^([1-9]\d*|0)(\.\d{1,2})?$/g.test(this.form.applyIntegral)) { + this.form.applyIntegral = Number(this.form.applyIntegral).toFixed(2) + return this.$u.toast('积分值最多只保留两位小数点') + } if (!this.form.content) { return this.$u.toast('请输入详细描述')