Commit dae2818b authored by yaya's avatar yaya

feat:添加重新上拍功能

parent 9a9fe6f6
...@@ -77,6 +77,18 @@ export function findAuctionList(data) { ...@@ -77,6 +77,18 @@ export function findAuctionList(data) {
data data
}) })
} }
/**
* 拍品重新上架
* @param data
* @returns {*}
*/
export function auctionReSale(data) {
return request({
url: '/specialPerformance/reSale',
method: 'post',
data
})
}
/** /**
* 专场列表 * 专场列表
* @param data * @param data
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
v-if="(scope.row.auctionState === 40 || scope.row.auctionState === 50)" v-if="(scope.row.auctionState === 40 || scope.row.auctionState === 50)"
type="danger" type="danger"
size="mini" size="mini"
@click="handleDelete(scope.row)">重新上架 @click="handleResale(scope.row)">重新上架
</el-button> </el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -106,7 +106,7 @@ ...@@ -106,7 +106,7 @@
<script> <script>
import Line2Hidden from '@/components/line2Hidden' import Line2Hidden from '@/components/line2Hidden'
import Pagination from '@/components/Pagination' import Pagination from '@/components/Pagination'
import { updateOnSale, deleteSaleItem, findAuctionList } from '@/api/business/sale' import { updateOnSale, findAuctionList, auctionReSale } from '@/api/business/sale'
import { MessageBox } from 'element-ui' import { MessageBox } from 'element-ui'
export default { export default {
...@@ -228,21 +228,29 @@ export default { ...@@ -228,21 +228,29 @@ export default {
this.$router.push({ path: '/sale/AuctionAdd', query: { id: item.id }}) this.$router.push({ path: '/sale/AuctionAdd', query: { id: item.id }})
}, },
/** /**
* 删除 * 重新上架
*/ */
handleDelete(item) { handleResale(row) {
this.$confirm('你确定删除吗?', '提示', { this.$confirm('确定将该拍品重新上架吗?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
const data = { const data = {
id: item.id itemId: row.id
} }
deleteSaleItem(data).then((res) => { auctionReSale(data).then((res) => {
this.list = this.list.filter((item) => {
if (item.id === row.id) {
item.auctionStateName = '待上架'
item.auctionState = 1
return item
}
return item
})
this.$notify.success({ this.$notify.success({
title: '成功', title: '成功',
message: '删除成功' message: '上架成功'
}) })
this.getList() this.getList()
}).catch(err => { }).catch(err => {
......
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