feat(utils): 添加数字格式化工具函数并应用至多个组件
添加 formatDecimal 函数用于格式化小数显示,去除末尾无效0和孤立小数点 在库存管理、采购、出入库等模块中应用该格式化函数,统一数字显示格式 调整仪表盘统计数据的精度显示为整数 优化采购截止日期的显示逻辑,增加状态判断和剩余天数计算
This commit is contained in:
@@ -22,9 +22,21 @@
|
||||
<raw :data="scope.row" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库数量" align="center" prop="inNum" />
|
||||
<el-table-column label="入库单价" align="center" prop="inPrice" />
|
||||
<el-table-column label="入库金额" align="center" prop="inAmount" />
|
||||
<el-table-column label="入库数量" align="center" prop="inNum">
|
||||
<template #default="scope">
|
||||
{{ formatDecimal(scope.row.inNum) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库单价" align="center" prop="inPrice">
|
||||
<template #default="scope">
|
||||
{{ formatDecimal(scope.row.inPrice) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库金额" align="center" prop="inAmount">
|
||||
<template #default="scope">
|
||||
{{ formatDecimal(scope.row.inAmount) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="入库时间" align="center" prop="inTime" width="180">
|
||||
<template #default="scope">
|
||||
<span>{{ formatterTime(scope.row.inTime) }}</span>
|
||||
@@ -88,6 +100,8 @@
|
||||
import { listPurchaseInDetail, getPurchaseInDetail, delPurchaseInDetail, addPurchaseInDetail, updatePurchaseInDetail } from "@/api/mat/purchaseInDetail";
|
||||
import useUserStore from '@/store/modules/user'
|
||||
import Raw from '@/components/Renderer/Raw.vue'
|
||||
import { formatDecimal } from '@/utils/gear'
|
||||
|
||||
|
||||
const props = defineProps({
|
||||
purchaseId: {
|
||||
|
||||
Reference in New Issue
Block a user