feat(utils): 添加数字格式化工具函数并应用至多个组件
添加 formatDecimal 函数用于格式化小数显示,去除末尾无效0和孤立小数点 在库存管理、采购、出入库等模块中应用该格式化函数,统一数字显示格式 调整仪表盘统计数据的精度显示为整数 优化采购截止日期的显示逻辑,增加状态判断和剩余天数计算
This commit is contained in:
@@ -18,8 +18,12 @@
|
||||
<el-table-column prop="spec" label="配料规格" min-width="100" align="center" />
|
||||
<el-table-column prop="model" label="配料型号" min-width="100" align="center" />
|
||||
<el-table-column prop="factory" label="生产厂家" min-width="120" align="center" />
|
||||
<el-table-column prop="currentStock" label="现存库存" min-width="80" align="center" />
|
||||
<el-table-column prop="unit" label="计量单位" width="80" align="center" />
|
||||
<el-table-column prop="currentStock" label="现存库存" min-width="80" align="center">
|
||||
<template #default="scope">
|
||||
{{ formatDecimal(scope.row.currentStock) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="unit" label="计量单位" width="80" align="center" :formatter="formatUnit" />
|
||||
</el-table>
|
||||
|
||||
<!-- 分页组件 -->
|
||||
@@ -39,6 +43,7 @@
|
||||
import { ref, computed, watch, onMounted } from 'vue';
|
||||
import { listMaterial, getMaterial } from '@/api/mat/material';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { formatDecimal } from '@/utils/gear'
|
||||
|
||||
// 双向绑定物料ID
|
||||
const materialId = defineModel({
|
||||
|
||||
Reference in New Issue
Block a user