优化展示
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="last_operation_source_type" label="上次操作类型">
|
||||
<template #default="scope">
|
||||
{{ StockLogSourceType[scope.row.last_operation_source_type] || '--' }}
|
||||
{{ getStockLogSourceTypeLabel(scope.row.last_operation_source_type) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120">
|
||||
@@ -40,7 +40,7 @@ import { ref, onMounted, watch } from 'vue';
|
||||
import { InventoryApi } from '../../api/inventory';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import { formatRFC3339, formatWeight } from '../../utils/format';
|
||||
import { StockLogSourceType } from '../../enums'; // 导入 StockLogSourceType
|
||||
import { getStockLogSourceTypeLabel } from '../../enums'; // 导入 getStockLogSourceTypeLabel
|
||||
|
||||
export default {
|
||||
name: 'StockListTable',
|
||||
@@ -130,7 +130,7 @@ export default {
|
||||
formatRFC3339,
|
||||
formatWeight,
|
||||
handleAdjust,
|
||||
StockLogSourceType, // 暴露 StockLogSourceType 给模板
|
||||
getStockLogSourceTypeLabel, // 暴露辅助函数给模板
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user