From e31c6cc16e5c0cdda60c50a0163890054da40b4e Mon Sep 17 00:00:00 2001 From: duan Date: Fri, 9 Sep 2022 08:50:48 +0800 Subject: [PATCH] =?UTF-8?q?feat(src/views/reagent/weighing/index.vue):=20?= =?UTF-8?q?=E9=87=8D=E9=87=8F=E4=BF=9D=E7=95=99=E5=B0=8F=E6=95=B0=E5=90=8E?= =?UTF-8?q?2=E4=BD=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/reagent/weighing/index.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/reagent/weighing/index.vue b/src/views/reagent/weighing/index.vue index 7104569..645ff0a 100644 --- a/src/views/reagent/weighing/index.vue +++ b/src/views/reagent/weighing/index.vue @@ -15,7 +15,7 @@
精度:0.01g±0.03g
- {{ checkInputWeigh() ? parseFloat(inputWeigh) : weight }} + {{ checkInputWeigh() ? parseFloat(inputWeigh).toFixed(2) : weight }} 克(g)
@@ -123,13 +123,13 @@ export default { res => { let weigh = null if (res.data) { - weigh = parseFloat(res.data) + weigh = parseFloat(res.data).toFixed(2) // 余量称重 if (this.radio === '1') { this.weight = weigh } else { // 用量称重 - this.weight = parseFloat(this.infoData.remain) - weigh + this.weight = parseFloat(this.infoData.remain).toFixed(2) - weigh } } } @@ -166,7 +166,7 @@ export default { const w = this.checkInputWeigh() const data = { 'medicament_id': this.infoData.medicament_id, - 'remain': w ? parseFloat(this.inputWeigh) : this.weight + 'remain': w ? parseFloat(this.inputWeigh).toFixed(2) : this.weight } update_drug_remain(stringify(data)).then( res => {