进销存-操作出库记录中的耗材出库记录现有库存字段精度显示小数位数过多

This commit is contained in:
gyq
2024-07-30 13:51:04 +08:00
parent 77f75bbbeb
commit d8b9d01aa7

View File

@@ -33,6 +33,7 @@
<script>
import dayjs from 'dayjs'
import { formatDecimal } from '@/utils/index.js'
import { tbProductStockOperateDetail } from '@/api/invoicing'
export default {
data() {
@@ -55,11 +56,10 @@ export default {
//返回现有库存数量
returnNowHasNumbr(row) {
const subType = this.tableData.detail.subType || 1
console.log(row)
if (!row.hasOwnProperty('number')) {
return ''
}
return row.stockNumber * 1 + row.number * subType + row.unitName
return formatDecimal(parseFloat(row.stockNumber * 1 + row.number * subType + row.unitName), 2, true)
},
show(row) {
this.dialogVisible = true