From c66bdbcc742083bbd6d10b416e949421d6b5521b Mon Sep 17 00:00:00 2001 From: "UNISINSIGHT\\rdpnr_jiangpeng" Date: Thu, 26 Mar 2026 16:40:13 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BA=A7=E5=93=81=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8A=98=E6=89=A3=E5=80=BC=E6=B5=AE=E7=82=B9=E7=B2=BE?= =?UTF-8?q?=E5=BA=A6=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- oms_web/oms_vue/src/views/system/product/index.vue | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/oms_web/oms_vue/src/views/system/product/index.vue b/oms_web/oms_vue/src/views/system/product/index.vue index 048c2b5b..1c48053f 100644 --- a/oms_web/oms_vue/src/views/system/product/index.vue +++ b/oms_web/oms_vue/src/views/system/product/index.vue @@ -353,13 +353,15 @@ export default { if (this.form.guidanceDiscount === null || this.form.guidanceDiscount === undefined) { return ''; } - return (this.form.guidanceDiscount * 100).toString(); + const percentValue = this.normalizeDecimalNumber(this.form.guidanceDiscount * 100); + return percentValue.toString(); }, set(val) { if (val === '' || val === null) { this.form.guidanceDiscount = null; } else { - this.form.guidanceDiscount = parseFloat(val) / 100; + const discountValue = this.normalizeDecimalNumber(parseFloat(val) / 100); + this.form.guidanceDiscount = discountValue; } } } @@ -372,6 +374,9 @@ export default { this.getVendorList(); }, methods: { + normalizeDecimalNumber(value, digits = 12) { + return parseFloat(Number(value).toFixed(digits)); + }, /** 加载字典数据 */ getDicts() { return getDicts('product_type').then(response => {