|
|
@@ -119,7 +119,7 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column label="入库单价">
|
|
|
<template #default="{ row }">
|
|
|
- <!-- 五位小数 -->
|
|
|
+ <!-- 八位小数 -->
|
|
|
<el-input v-if="mode !== 'view'" v-model="row.inUnitPrice" @input="(val) => handleInUnitPriceInput(val, row)" />
|
|
|
<el-text v-else>{{ row.inUnitPrice }}</el-text>
|
|
|
</template>
|
|
|
@@ -281,12 +281,12 @@ const handleMaterialChange = (value, row) => {
|
|
|
}
|
|
|
|
|
|
const handleInUnitPriceInput = (val, row) => {
|
|
|
- // 限制最多五位小数
|
|
|
+ // 限制最多八位小数
|
|
|
if (val !== '' && val !== null && val !== undefined) {
|
|
|
const str = String(val)
|
|
|
const dotIndex = str.indexOf('.')
|
|
|
- if (dotIndex !== -1 && str.length - dotIndex - 1 > 5) {
|
|
|
- row.inUnitPrice = str.slice(0, dotIndex + 6)
|
|
|
+ if (dotIndex !== -1 && str.length - dotIndex - 1 > 8) {
|
|
|
+ row.inUnitPrice = str.slice(0, dotIndex + 9)
|
|
|
}
|
|
|
}
|
|
|
calcAmount(row)
|