From 28b7beece63b4733858318af221a677f568ea009 Mon Sep 17 00:00:00 2001 From: cosarty <1398675906@qq.com> Date: Fri, 13 Dec 2024 11:45:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A2=84=E7=BA=A6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/activity.js | 11 +++++++ .../marketing/activity/activityList/index.vue | 30 ++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/api/activity.js b/src/api/activity.js index 7d34a61..6d59033 100644 --- a/src/api/activity.js +++ b/src/api/activity.js @@ -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 + }) +} diff --git a/src/views/marketing/activity/activityList/index.vue b/src/views/marketing/activity/activityList/index.vue index 2d1232e..7fcecd4 100644 --- a/src/views/marketing/activity/activityList/index.vue +++ b/src/views/marketing/activity/activityList/index.vue @@ -368,6 +368,18 @@ 同意预约 + + + + + 删除 @@ -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; From 59a10c0c9e5759d006ab5b25c021c8d93cc2a8fb Mon Sep 17 00:00:00 2001 From: cosarty <1398675906@qq.com> Date: Fri, 13 Dec 2024 21:15:51 +0800 Subject: [PATCH 2/2] fix bug --- src/views/marketing/tree/item/index.vue | 15 +++++++++++++++ .../marketing/tree/item/plant-add-and-update.vue | 16 ++++++++++------ 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/src/views/marketing/tree/item/index.vue b/src/views/marketing/tree/item/index.vue index 6ea5bbb..4094aa5 100644 --- a/src/views/marketing/tree/item/index.vue +++ b/src/views/marketing/tree/item/index.vue @@ -49,6 +49,21 @@ + + + - + + 取消 @@ -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); }); }