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) {