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 @@
- {{ 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 => {