调整 M002 V3 任务列表筛选项

This commit is contained in:
andy
2026-07-12 10:20:22 +08:00
parent 6e47158d9e
commit 0358b34159
7 changed files with 79 additions and 18 deletions

View File

@@ -268,7 +268,6 @@ export default {
viewTask: 'View task',
viewOrder: 'View order',
viewConversation: 'View email conversation',
legacyMessageNotification: 'Message notification (legacy)',
sourceOnlyOrderLabel: 'Source message only',
hiddenTechnicalOrder: 'No visible order',
columns: {

View File

@@ -268,7 +268,6 @@ export default {
viewTask: 'ดูงาน',
viewOrder: 'ดูออเดอร์',
viewConversation: 'ดูเธรดอีเมล',
legacyMessageNotification: 'การแจ้งเตือนข้อความ (เดิม)',
sourceOnlyOrderLabel: 'ข้อความต้นทางแบบอ่านอย่างเดียว',
hiddenTechnicalOrder: 'ไม่มีออเดอร์ที่แสดงได้',
columns: {

View File

@@ -268,7 +268,6 @@ export default {
viewTask: '查看任务',
viewOrder: '查看订单',
viewConversation: '查看邮件会话',
legacyMessageNotification: '消息通知(历史 Message Notification',
sourceOnlyOrderLabel: '来源消息只读',
hiddenTechnicalOrder: '不关联可见订单',
columns: {

View File

@@ -93,12 +93,12 @@ function createTaskListResult(
}
}
function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' | 'S000' | 'S999' = 'S10') {
function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' = 'S10') {
return {
items: [
{
task_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '19990' : '19999',
order_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '29990' : '29999',
task_id: taskSubtype === 'S10' ? '19990' : '19999',
order_id: taskSubtype === 'S10' ? '29990' : '29999',
hotel_id: 'HOTEL-TEST',
display_order_key: null,
temporary_order_no: null,
@@ -114,8 +114,8 @@ function createSourceMessageOnlyTaskListResult(taskSubtype: 'S10' | 'S99' | 'S00
queue_participation: false,
can_process: false,
readonly_reason_code: 'QUEUE_EXCLUDED',
source_message_id: taskSubtype === 'S10' || taskSubtype === 'S000' ? '39990' : '39999',
source_subject: taskSubtype === 'S10' || taskSubtype === 'S000' ? 'FYI only' : 'Unclear email',
source_message_id: taskSubtype === 'S10' ? '39990' : '39999',
source_subject: taskSubtype === 'S10' ? 'FYI only' : 'Unclear email',
source_sender_summary: 'guest@example.test',
source_received_at: '2026-07-08T03:00:00Z',
external_conversation_id: 'thread-source-only',
@@ -485,12 +485,40 @@ describe('reservation P0 views', () => {
const wrapper = await mountWithPlugins(ReservationTaskListView)
await vi.dynamicImportSettled()
const taskTypeOptions = wrapper.find('select[name="task_type"]').findAll('option')
.map((option) => option.attributes('value'))
const taskSubtypeOptions = wrapper.find('select[name="task_subtype"]').findAll('option')
.map((option) => option.attributes('value'))
expect(taskTypeOptions).toEqual([
'',
'NEW_BOOKING',
'UPDATE_BOOKING',
'CANCEL_BOOKING',
'MANUAL_REVIEW',
'SOURCE_MESSAGE_ONLY',
])
expect(taskTypeOptions).not.toContain('INFORMATIONAL_MESSAGE')
expect(taskSubtypeOptions).toEqual([
'',
'NEW_BOOKING',
'UPDATE_BOOKING',
'CANCEL_BOOKING',
'RATE_CHANGE',
'UPDATE_STAY_DATES',
'UPDATE_ROOM_TYPE',
'UPDATE_FIX_CHARGE',
'NEW_GROUP_BLOCK',
'NEW_FIT_RESERVATION',
'MANUAL_REVIEW',
'S10',
'S99',
])
expect(taskSubtypeOptions).not.toContain('S000')
expect(taskSubtypeOptions).not.toContain('S999')
expect(wrapper.find('select[name="task_type"]').text()).toContain('来源消息只读')
expect(wrapper.find('select[name="task_type"]').text()).toContain('历史 Message Notification')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('纯信息类邮件S10')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('无法形成业务素材包S99')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('纯信息类邮件')
expect(wrapper.find('select[name="task_subtype"]').text()).toContain('无法形成业务素材包')
await wrapper.find('select[name="task_type"]').setValue('SOURCE_MESSAGE_ONLY')
await vi.dynamicImportSettled()
@@ -504,6 +532,22 @@ describe('reservation P0 views', () => {
page_num: 1,
}),
)
const lastTaskRequest = vi.mocked(service.fetchReservationTaskList).mock.calls[
vi.mocked(service.fetchReservationTaskList).mock.calls.length - 1
]?.[0] ?? {}
expect(Object.keys(lastTaskRequest).sort()).toEqual([
'keyword',
'order_status',
'page_num',
'page_size',
'queue_participation',
'task_status',
'task_subtype',
'task_type',
])
expect(lastTaskRequest).not.toHaveProperty('result_type')
expect(lastTaskRequest).not.toHaveProperty('route_code')
expect(lastTaskRequest).not.toHaveProperty('system_process_category')
})
it('renders source-message-only task rows without a visible order action', async () => {

View File

@@ -77,11 +77,34 @@ export interface ReservationOrderListResult {
page: ReservationPageResult
}
export type ReservationTaskListTaskTypeFilter =
| ''
| 'NEW_BOOKING'
| 'UPDATE_BOOKING'
| 'CANCEL_BOOKING'
| 'MANUAL_REVIEW'
| 'SOURCE_MESSAGE_ONLY'
export type ReservationTaskListTaskSubtypeFilter =
| ''
| 'NEW_BOOKING'
| 'UPDATE_BOOKING'
| 'CANCEL_BOOKING'
| 'RATE_CHANGE'
| 'UPDATE_STAY_DATES'
| 'UPDATE_ROOM_TYPE'
| 'UPDATE_FIX_CHARGE'
| 'NEW_GROUP_BLOCK'
| 'NEW_FIT_RESERVATION'
| 'MANUAL_REVIEW'
| 'S10'
| 'S99'
export interface ReservationTaskListFilters {
hotel_id?: string
order_id?: string
task_type?: string
task_subtype?: string
task_type?: ReservationTaskListTaskTypeFilter
task_subtype?: ReservationTaskListTaskSubtypeFilter
task_status?: string
order_status?: string
queue_participation?: boolean

View File

@@ -44,7 +44,6 @@
<option value="CANCEL_BOOKING">{{ t('cardType.CANCEL_BOOKING') }}</option>
<option value="MANUAL_REVIEW">{{ t('cardType.MANUAL_REVIEW') }}</option>
<option value="SOURCE_MESSAGE_ONLY">{{ t('cardType.SOURCE_MESSAGE_ONLY') }}</option>
<option value="INFORMATIONAL_MESSAGE">{{ t('taskList.legacyMessageNotification') }}</option>
</select>
</label>
<label>
@@ -67,8 +66,6 @@
<option value="MANUAL_REVIEW">{{ t('taskSubtype.MANUAL_REVIEW') }}</option>
<option value="S10">{{ t('taskSubtype.S10') }}</option>
<option value="S99">{{ t('taskSubtype.S99') }}</option>
<option value="S000">{{ t('taskSubtype.S000') }}</option>
<option value="S999">{{ t('taskSubtype.S999') }}</option>
</select>
</label>
<label>