积分竞拍,市场管理

This commit is contained in:
2023-03-17 16:47:30 +08:00
parent f560a8a431
commit 31bd50111e
9 changed files with 258 additions and 24 deletions

View File

@@ -236,6 +236,29 @@ function fileChange(index) {
function loadingEggChange() {
console.log(drawForm.value)
}
async function drawStateFunc(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.drawStateFunc({id:row.id,status:type})
if(res.code === 0) {
ElMessage({
type: 'success',
message: `修改成功`,
})
getDrawList()
}
}
},
})
}
</script>
<template>
<div>
@@ -332,6 +355,22 @@ function loadingEggChange() {
link
@click="delFunc(scope.row)"
>删除</el-button>
<el-button
icon="top"
size="small"
type="primary"
link
@click="drawStateFunc(scope.row,1)"
v-if="scope.row.status!=3"
>上架</el-button>
<el-button
icon="bottom"
size="small"
type="danger"
link
@click="drawStateFunc(scope.row,2)"
v-if="scope.row.status!=3"
>下架</el-button>
</template>
</el-table-column>
</el-table>
@@ -416,9 +455,9 @@ function loadingEggChange() {
<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="drawForm.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="禁用" />
</el-form-item>
<!-- <el-form-item label="启用状态" prop="status">-->
<!-- <el-switch v-model="drawForm.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="禁用" />-->
<!-- </el-form-item>-->
</el-form>
<template #footer>