diff --git a/src/api/inbox/inbox.ts b/src/api/inbox/inbox.ts
index bd5b9904..0b9bc0ab 100644
--- a/src/api/inbox/inbox.ts
+++ b/src/api/inbox/inbox.ts
@@ -215,6 +215,26 @@ export function inboxGroupUpdate(data: InboxGroupUpdateParams) {
} as any)
}
+/** 清空群类型配置参数 */
+export interface InboxGroupResetParams {
+ id: number // 群记录主键ID
+}
+
+/** 清空群类型配置(inbox.group.reset) */
+export function inboxGroupReset(data: InboxGroupResetParams) {
+ return request({
+ url: '/system',
+ method: 'post',
+ params: {
+ method: 'inbox.group.reset',
+ v,
+ timestamp: Date.now()
+ },
+ data,
+ isSystemApi: true
+ } as any)
+}
+
/** 按群拉取消息列表参数 */
export interface InboxGroupMessagesParams {
groupId: string // 群ID(必填)
diff --git a/src/views/inbox/group/index.vue b/src/views/inbox/group/index.vue
index 9da9dfbe..88da91af 100644
--- a/src/views/inbox/group/index.vue
+++ b/src/views/inbox/group/index.vue
@@ -93,6 +93,7 @@
{{ row.is_blocked ? '启用' : '禁用' }}
消息
+ 清空配置
@@ -237,6 +238,7 @@ import {
inboxGroupDisable,
inboxGroupUpdate,
inboxGroupMessages,
+ inboxGroupReset,
inboxBindCode,
} from '@/api/inbox/inbox'
import { loadStores, loadExpressInterfaces } from '@/api/index/index'
@@ -561,6 +563,22 @@ async function handleToggleDisable(row: any) {
} catch { /* 用户取消 */ }
}
+// ==================== 清空群类型配置 ====================
+
+async function handleResetGroupConfig(row: any) {
+ try {
+ await ElMessageBox.confirm(
+ `确定要清空群组「${row.group_name}」的群类型配置吗?群类型/子类型/货主/快递接口/系统快递编码将被清空,AI 自动回复将关闭,仅保留群创建时信息。`,
+ '清空配置确认',
+ { type: 'warning', confirmButtonText: '清空', confirmButtonClass: 'el-button--danger' }
+ )
+ const res: any = await inboxGroupReset({ id: row.id })
+ if (res && (res.code === 1 || res.code === 200 || res.code === 20000)) {
+ ElMessage.success(res.data?.message || res.message || '群类型配置已清空'); fetchData()
+ } else { ElMessage.error(res?.message || '清空失败') }
+ } catch { /* 用户取消 */ }
+}
+
// ==================== 群消息 ====================
const messagesDialogVisible = ref(false)