Merge remote-tracking branch 'origin/main'

This commit is contained in:
闵宪瑞 2025-01-03 14:08:44 +08:00
commit 10c5e16375
4 changed files with 65 additions and 7 deletions

View File

@ -117,3 +117,14 @@ export function placeDeleteApi(data) {
params:data
})
}
/**
* ebactivity删除预约记录
* @param data
*/
export function activityRecordDeleteApi(data) {
return request({
url: `/admin/activity/records/delete`,
method: 'get',
params:data
})
}

View File

@ -368,6 +368,18 @@
<el-button type="text" size="small">同意预约</el-button>
</template>
</el-popconfirm>
<el-popconfirm
v-hasPermi="['admin:activity:update']"
@onConfirm="rejectRecord(scope.row)"
v-if="scope.row.registerStatus == 0"
title="确定要拒绝吗?"
>
<!-- //todo -->
<template #reference>
<el-button type="text" size="small">拒绝</el-button>
</template>
</el-popconfirm>
<el-button v-if="scope.row.registerStatus >=2" type="text" size="small" @click="deleteRecordHandle(scope.row)">删除</el-button>
<!-- <el-button type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">修改</el-button>-->
<!-- <el-button v-hasPermi="['admin:activity:update']" type="text" size="small"-->
<!-- @click="activityLog(scope.row.id)">预约记录-->
@ -398,7 +410,8 @@ import {
activityListApi,
activityLogListApi,
ebactivityUpdateApi,
userActivityPlaceListApi
userActivityPlaceListApi,
activityRecordDeleteApi
} from "@/api/activity";
import AddOrUpdate from "@/views/marketing/activity/activityList/activity-add-and-update";
@ -436,6 +449,15 @@ export default {
this.getDataList();
},
methods: {
deleteRecordHandle(row) {
this.$confirm('确定删除当前数据?').then(() => {
activityRecordDeleteApi({ id: row.id }).then(res => {
this.$message.success("删除成功");
this.activityLog(this.logParams.activityId);
});
}).catch(() => {
})
},
closeLog() {
this.logParams = {
activityId: "",
@ -455,6 +477,12 @@ export default {
this.activityLog(this.logParams.activityId);
});
},
rejectRecord(row) {
userActivityPlaceListApi({ id: row.id, registerStatus: 2 }).then(res => {
this.$message.success("拒绝成功!");
this.activityLog(this.logParams.activityId);
});
},
//
activityLog(id) {
this.logParams.activityId = id;

View File

@ -49,6 +49,21 @@
</div>
</template>
</el-table-column>
<el-table-column
prop="viceImage"
header-align="center"
align="center"
label="背景图">
<template slot-scope="scope">
<div class="demo-image__preview">
<el-image
style="width: 36px; height: 36px"
:src="scope.row.viceImage"
:preview-src-list="[scope.row.viceImage]"
/>
</div>
</template>
</el-table-column>
<el-table-column
prop="productPrice"

View File

@ -136,14 +136,14 @@
</el-form-item>
<el-form-item label="热门新品图" prop="hotImage">
<!-- <el-form-item label="热门新品图" prop="hotImage">
<el-switch v-model="dataForm.hotImage" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
<el-form-item label="认领状态" prop="status">
</el-form-item> -->
<!-- <el-form-item label="认领状态" prop="status">
<el-switch v-model="dataForm.status" :active-value="1" :inactive-value="0"></el-switch>
</el-form-item>
</el-form-item> -->
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="visible = false">取消</el-button>
@ -293,12 +293,16 @@ export default {
if (!this.dataForm.id){
plantCreateApi(this.dataForm).then(res => {
this.$message.success('添加成功')
this.$router.go(0);
setTimeout(() => {
this.$router.go(0);
}, 1000);
});
}else {
plantUpdateApi(this.dataForm).then(res => {
this.$message.success('更新成功')
this.$router.go(0);
setTimeout(() => {
this.$router.go(0);
}, 1000);
});
}