Commit 542e7fde by lijiabin

【需求 25171】feat: 限时竞拍新增"复制"快捷新增功能

操作列新增"复制"按钮,点击后把该行数据(去掉 id、竞拍状态)填充到"新增"
弹框里,方便基于已有竞拍快速新建类似的一条,同时弹出提示告知用户数据已
复制过去,避免直接弹窗让人摸不着头脑。
parent 0e5824f6
...@@ -94,9 +94,10 @@ ...@@ -94,9 +94,10 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="180" fixed="right"> <el-table-column label="操作" width="240" fixed="right">
<template #default="{ row }"> <template #default="{ row }">
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button> <el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
<el-button type="primary" link @click="handleCopy(row)">复制</el-button>
<el-button type="primary" link @click="handleAuctionRecord(row)">竞拍记录</el-button> <el-button type="primary" link @click="handleAuctionRecord(row)">竞拍记录</el-button>
<el-button type="danger" link @click="handleDelete(row)">删除</el-button> <el-button type="danger" link @click="handleDelete(row)">删除</el-button>
</template> </template>
...@@ -339,6 +340,18 @@ const handleEdit = (row: BackendAddOrUpdateAuctionItemDto) => { ...@@ -339,6 +340,18 @@ const handleEdit = (row: BackendAddOrUpdateAuctionItemDto) => {
dialogVisible.value = true dialogVisible.value = true
} }
// 复制:相当于快捷新增,把这一行的数据填充到"新增"弹框里,不带 id/竞拍状态(这两个只有编辑已有数据时才有意义)
const handleCopy = (row: BackendAddOrUpdateAuctionItemDto) => {
resetForm()
form.value = {
...row,
id: undefined,
status: undefined,
}
dialogVisible.value = true
push.info('已将该竞拍的信息复制到新增弹框,请检查后再提交')
}
// 删除 // 删除
const handleDelete = async (row: BackendAuctionListItemDto) => { const handleDelete = async (row: BackendAuctionListItemDto) => {
const confirmDelete = row.currentPrice > 0 const confirmDelete = row.currentPrice > 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment