技术支持工单
CI / verify (pull_request) Has been cancelled

This commit is contained in:
2026-07-26 07:31:49 +08:00
parent ac1e0a9f13
commit 959e0b66cb
15 changed files with 906 additions and 4 deletions
+12 -1
View File
@@ -12,6 +12,7 @@ export const HQ_PERMISSION_CATALOG = [
{ key: 'benefit', label: '好客权益', group: '业务' },
{ key: 'deliveries', label: '配送单', group: '业务' },
{ key: 'tickets', label: '工单中心', group: '业务' },
{ key: 'tech_support', label: '技术支持', group: '业务' },
{ key: 'invoices', label: '发票管理', group: '业务' },
{ key: 'resources', label: 'OSS 资源库', group: '业务' },
{ key: 'logs', label: '日志', group: '业务' },
@@ -85,6 +86,7 @@ export const HQ_ROLE_DEFAULT_PERMISSIONS: Record<string, HqPermissionKey[]> = {
'benefit',
'deliveries',
'tickets',
'tech_support',
'invoices',
'resources',
'logs',
@@ -97,9 +99,18 @@ export const HQ_ROLE_DEFAULT_PERMISSIONS: Record<string, HqPermissionKey[]> = {
'partners',
'finance',
'benefit',
'tech_support',
'invoices',
'logs',
'system_settings_winery_bank',
],
CUSTOMER_SERVICE: ['dashboard', 'users', 'orders', 'tickets', 'invoices', 'logs'],
CUSTOMER_SERVICE: [
'dashboard',
'users',
'orders',
'tickets',
'tech_support',
'invoices',
'logs',
],
};
+1
View File
@@ -9,6 +9,7 @@ export * from './redeem';
export * from './settlement';
export * from './ops';
export * from './ticket';
export * from './support-ticket';
export * from './invoice';
export * from './user-log';
@@ -0,0 +1,64 @@
/** HQ 技术支持工单类型 */
export type SupportTicketTypeDto = 'BUG' | 'SUGGESTION' | 'OTHER';
export const SUPPORT_TICKET_TYPES = ['BUG', 'SUGGESTION', 'OTHER'] as const;
export const SUPPORT_TICKET_TYPE_LABELS: Record<SupportTicketTypeDto, string> = {
BUG: 'BUG',
SUGGESTION: '建议',
OTHER: '其他',
};
/** 技术支持工单状态机 */
export type SupportTicketStatusDto =
| 'PENDING_REVIEW'
| 'REJECTED'
| 'DEVELOPING'
| 'TESTING'
| 'PASSED';
export const SUPPORT_TICKET_STATUSES = [
'PENDING_REVIEW',
'REJECTED',
'DEVELOPING',
'TESTING',
'PASSED',
] as const;
export const SUPPORT_TICKET_STATUS_LABELS: Record<SupportTicketStatusDto, string> = {
PENDING_REVIEW: '待评审',
REJECTED: '已驳回',
DEVELOPING: '开发',
TESTING: '测试',
PASSED: '通过',
};
export interface SupportTicketDto {
id: string;
ticketNo: string;
ticketType: SupportTicketTypeDto;
status: SupportTicketStatusDto;
title: string;
content?: string | null;
rejectReason?: string | null;
creatorId: string;
creatorName: string;
reviewerId?: string | null;
reviewerName?: string | null;
reviewedAt?: string | null;
remark?: string | null;
createdAt: string;
updatedAt: string;
completedAt?: string | null;
}
export interface CreateSupportTicketRequest {
ticketType: SupportTicketTypeDto;
title: string;
content?: string;
remark?: string;
}
export interface RejectSupportTicketRequest {
rejectReason: string;
}