积分竞拍,市场管理
This commit is contained in:
@@ -105,6 +105,7 @@ function getStateName(row) {
|
||||
// 检查是否过期
|
||||
if(row.end_time < (Date.parse(new Date()))) { // 已过期
|
||||
name = '已结束';
|
||||
row.status = 3
|
||||
}
|
||||
else{
|
||||
name = '报名中';
|
||||
@@ -232,6 +233,29 @@ function fileChange(index) {
|
||||
console.log(index)
|
||||
file_type_index = index
|
||||
}
|
||||
async function auctionStateFunc(row,type) { //竞拍上架 下架
|
||||
let title = '确定要上架该竞拍吗?'
|
||||
if(type === 2) {
|
||||
title = '确定要下架该竞拍吗?'
|
||||
}
|
||||
ElMessageBox.alert(title, {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
callback:async (action) => {
|
||||
console.log(action)
|
||||
if(action === 'confirm') {
|
||||
const res = await api.auctionStateFunc({id:row.id,status:type})
|
||||
if(res.code === 0) {
|
||||
ElMessage({
|
||||
type: 'success',
|
||||
message: `修改成功`,
|
||||
})
|
||||
getAuctionList()
|
||||
}
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
@@ -291,12 +315,12 @@ function fileChange(index) {
|
||||
<el-table-column align="center" label="满员人数" prop="full_member" />
|
||||
<el-table-column align="center" label="发布日期" min-width="150" >
|
||||
<template #default="scope">
|
||||
{{custom.timestampToDate(scope.row.begin_time)}}
|
||||
{{custom.timestampToDate2(scope.row.begin_time)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="截止日期" min-width="150" >
|
||||
<template #default="scope">
|
||||
{{custom.timestampToDate(scope.row.end_time)}}
|
||||
{{custom.timestampToDate2(scope.row.end_time)}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="已参与人数" min-width="150" prop="in_member" />
|
||||
@@ -322,6 +346,22 @@ function fileChange(index) {
|
||||
link
|
||||
@click="delFunc(scope.row)"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
icon="top"
|
||||
size="small"
|
||||
type="primary"
|
||||
link
|
||||
@click="auctionStateFunc(scope.row,1)"
|
||||
v-if="scope.row.status!=3"
|
||||
>上架</el-button>
|
||||
<el-button
|
||||
icon="bottom"
|
||||
size="small"
|
||||
type="danger"
|
||||
link
|
||||
@click="auctionStateFunc(scope.row,2)"
|
||||
v-if="scope.row.status!=3"
|
||||
>下架</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@@ -403,9 +443,9 @@ function fileChange(index) {
|
||||
<el-icon v-else class="avatar-uploader-icon"><Plus /></el-icon>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="启用状态" prop="status">
|
||||
<el-switch v-model="auctionForm.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="禁用" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="启用状态" prop="status">-->
|
||||
<!-- <el-switch v-model="auctionForm.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="禁用" />-->
|
||||
<!-- </el-form-item>-->
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
|
||||
Reference in New Issue
Block a user