增加操作类型
This commit is contained in:
@@ -12,6 +12,11 @@
|
|||||||
{{ formatRFC3339(scope.row.last_updated) }}
|
{{ formatRFC3339(scope.row.last_updated) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column prop="last_operation_source_type" label="上次操作类型">
|
||||||
|
<template #default="scope">
|
||||||
|
{{ StockLogSourceType[scope.row.last_operation_source_type] || '--' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120">
|
<el-table-column label="操作" width="120">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button size="small" type="primary" @click="handleAdjust(scope.row)">调整库存</el-button>
|
<el-button size="small" type="primary" @click="handleAdjust(scope.row)">调整库存</el-button>
|
||||||
@@ -34,7 +39,8 @@
|
|||||||
import { ref, onMounted, watch } from 'vue';
|
import { ref, onMounted, watch } from 'vue';
|
||||||
import { InventoryApi } from '../../api/inventory';
|
import { InventoryApi } from '../../api/inventory';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { formatRFC3339, formatWeight } from '../../utils/format'; // 导入 formatWeight
|
import { formatRFC3339, formatWeight } from '../../utils/format';
|
||||||
|
import { StockLogSourceType } from '../../enums'; // 导入 StockLogSourceType
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'StockListTable',
|
name: 'StockListTable',
|
||||||
@@ -122,8 +128,9 @@ export default {
|
|||||||
handleSizeChange,
|
handleSizeChange,
|
||||||
handleCurrentChange,
|
handleCurrentChange,
|
||||||
formatRFC3339,
|
formatRFC3339,
|
||||||
formatWeight, // 暴露给模板
|
formatWeight,
|
||||||
handleAdjust, // 暴露给模板
|
handleAdjust,
|
||||||
|
StockLogSourceType, // 暴露 StockLogSourceType 给模板
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user