From a7d6f5dd7d9c361e7507567c26413fb9727c3fc3 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Wed, 31 May 2023 11:30:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/order/components/confirmSubmit.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/views/order/components/confirmSubmit.vue b/src/views/order/components/confirmSubmit.vue index 671d0a4..f02d542 100644 --- a/src/views/order/components/confirmSubmit.vue +++ b/src/views/order/components/confirmSubmit.vue @@ -157,14 +157,15 @@ export default { }, changePreQuantity(row, val) { let segment = val.match(/.?\d{0,2}/g) - row.preQuantity = parseFloat(segment[0] + segment[1]) - if (isNaN(row.preQuantity)) { + let realPrice = parseFloat(segment[0] + segment[1]) + if (isNaN(realPrice)) { this.$message.error('数量输入错误,请重新输入') return } let { salePrice, floorPrice } = row - row.preAmount = this.fixedHandle(salePrice * row.preQuantity) - row.preCostAmount = this.fixedHandle(floorPrice * row.preQuantity) + row.preQuantity = realPrice + row.preAmount = this.fixedHandle(salePrice * realPrice) + row.preCostAmount = this.fixedHandle(floorPrice * realPrice) }, selectPolicy(index, val) { if (val) {