在资产管理、SKU管理和分类管理中新增操作日志查看功能,支持查看各实体的操作历史记录,同时新增操作日志API接口定义包含查询参数和日志信息类型
This commit is contained in:
@@ -78,10 +78,11 @@
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center">
|
||||
<el-table-column label="操作" width="220" align="center">
|
||||
<template #default="scope">
|
||||
<el-button size="small" text type="primary" @click="onEditSku(scope.row)">编辑</el-button>
|
||||
<el-button v-if="!scope.row.unlimitedStock" size="small" text type="success" @click="onGenerateStock(scope.row)">生成库存</el-button>
|
||||
<el-button size="small" text type="info" @click="onViewLog(scope.row)">日志</el-button>
|
||||
<el-button size="small" text type="danger" @click="onDeleteSku(scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -209,6 +210,7 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-dialog>
|
||||
<OperationLogDialog ref="operationLogRef" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -217,6 +219,7 @@ import { ElMessage, type FormInstance, type FormRules } from 'element-plus';
|
||||
import { ElMessageBox } from 'element-plus';
|
||||
import { listAssetSkus, createAssetSku, updateAssetSku, deleteAssetSku, getAssetSku, getAsset, uploadAssetImage, getSpecsUnitOptions, getStockFormFields, stockOperation } from '/@/api/assets/asset';
|
||||
import { createFormDiff } from '/@/utils/diffUtils';
|
||||
import OperationLogDialog from '../../component/operationLogDialog.vue';
|
||||
import type { UploadRequestOptions, UploadUserFile } from 'element-plus';
|
||||
|
||||
interface SpecValueItem {
|
||||
@@ -249,6 +252,7 @@ const editLoading = ref(false);
|
||||
const skuFormVisible = ref(false);
|
||||
const isEditSku = ref(false);
|
||||
const editSkuId = ref('');
|
||||
const operationLogRef = ref();
|
||||
|
||||
// 库存弹窗相关
|
||||
const stockFormVisible = ref(false);
|
||||
@@ -529,6 +533,11 @@ const onEditSku = async (row: any) => {
|
||||
}
|
||||
};
|
||||
|
||||
// 查看日志
|
||||
const onViewLog = (row: any) => {
|
||||
operationLogRef.value?.openDialog(row.id);
|
||||
};
|
||||
|
||||
// 删除 SKU
|
||||
const onDeleteSku = (row: any) => {
|
||||
ElMessageBox.confirm(`确定要删除SKU "${row.skuName}" 吗?`, '提示', {
|
||||
|
||||
Reference in New Issue
Block a user