From 8c16d95eadae7a7a9e388a37e565ec70e8c16569 Mon Sep 17 00:00:00 2001 From: YeMingfei666 <1619116647@qq.com> Date: Thu, 5 Dec 2024 09:05:40 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=B0=E9=87=8D=E5=95=86?= =?UTF-8?q?=E5=93=81=E6=8F=90=E4=BA=A4=E6=97=B6=E5=8F=AA=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E4=B8=A4=E4=BD=8D=E5=B0=8F=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Instead/components/popup-weight-goods.vue | 28 ++----------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/src/views/tool/Instead/components/popup-weight-goods.vue b/src/views/tool/Instead/components/popup-weight-goods.vue index a593f29..496abb9 100644 --- a/src/views/tool/Instead/components/popup-weight-goods.vue +++ b/src/views/tool/Instead/components/popup-weight-goods.vue @@ -62,23 +62,6 @@ export default { }, watch: { number(newval) { - // 处理小数点 - // if (newval == '.' || newval == '0.') { - // this.number = newval; - // } else { - if (newval * 1 > this.payMoney * 1) { - this.number = this.payMoney; - this.number = newval; - } - if (newval * 1 > this.payMoney * 1) { - this.tips = "已超出未结账金额"; - } else { - const shengyu = this.payMoney - this.number; - - this.tips = - shengyu > 0 ? "还需额外支付" + shengyu.toFixed(2) + "元" : ""; - } - // } }, }, computed:{ @@ -100,15 +83,10 @@ export default { this.focus = false; }, inputNumber(e) { - console.log("inputNumber"); - if (e * 1 > this.payMoney * 1) { - this.tips = "已超出未结账金额"; - } + console.log(e); + }, inputChange(e) { - if (e * 1 > this.payMoney * 1) { - this.tips = "已超出未结账金额"; - } console.log(e); }, clear(e) { @@ -120,7 +98,7 @@ export default { if(this.number*1<=0){ return this.$message("请输入重量"); } - this.$emit("confirm", this.item, this.number); + this.$emit("confirm", this.item, (this.number*1).toFixed(2)); this.close(); }, open(item) {