优化
This commit is contained in:
@@ -165,6 +165,15 @@ describe('InboundTaskList measurement scope', () => {
|
|||||||
expect(source).toContain("if (!value) return '—'")
|
expect(source).toContain("if (!value) return '—'")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
it('shows the expected arrival as a date in both measurement and review lists', () => {
|
||||||
|
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
|
||||||
|
|
||||||
|
expect(source).toContain("date.toLocaleDateString('zh-CN')")
|
||||||
|
expect(source).toContain('{{ formatDateOnly((row as InboundOrderSummary).expectedArrivalAt) }}')
|
||||||
|
expect(source).toContain('{{ formatDate((row as InboundOrderSummary).measureCompletedAt) }}')
|
||||||
|
expect(source).not.toContain('{{ formatDate((row as InboundOrderSummary).expectedArrivalAt) }}')
|
||||||
|
})
|
||||||
|
|
||||||
it('renders first-leg business types with the shared Chinese labels', () => {
|
it('renders first-leg business types with the shared Chinese labels', () => {
|
||||||
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
|
const source = readFileSync(resolve('src/modules/inbounds/components/InboundTaskList.vue'), 'utf8')
|
||||||
|
|
||||||
|
|||||||
@@ -119,6 +119,12 @@ function formatDate(value: string | null | undefined) {
|
|||||||
return Number.isNaN(date.getTime()) ? value : date.toLocaleString('zh-CN', { hour12: false })
|
return Number.isNaN(date.getTime()) ? value : date.toLocaleString('zh-CN', { hour12: false })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function formatDateOnly(value: string | null | undefined) {
|
||||||
|
if (!value) return '—'
|
||||||
|
const date = new Date(value)
|
||||||
|
return Number.isNaN(date.getTime()) ? value : date.toLocaleDateString('zh-CN')
|
||||||
|
}
|
||||||
|
|
||||||
function dateParam(value: string | undefined, end = false) {
|
function dateParam(value: string | undefined, end = false) {
|
||||||
return value ? `${value}T${end ? '23:59:59' : '00:00:00'}` : undefined
|
return value ? `${value}T${end ? '23:59:59' : '00:00:00'}` : undefined
|
||||||
}
|
}
|
||||||
@@ -381,7 +387,7 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1; optionsRequestSeria
|
|||||||
<template #inboundCode="{ row }"><div class="inbound-code-cell"><strong>{{ text((row as InboundOrderSummary).inboundCode) }}</strong></div></template>
|
<template #inboundCode="{ row }"><div class="inbound-code-cell"><strong>{{ text((row as InboundOrderSummary).inboundCode) }}</strong></div></template>
|
||||||
<template #processStatus="{ row }"><el-tag effect="light">{{ inboundStatusLabel((row as InboundOrderSummary).processStatus, inboundProcessStatusLabels) }}</el-tag></template>
|
<template #processStatus="{ row }"><el-tag effect="light">{{ inboundStatusLabel((row as InboundOrderSummary).processStatus, inboundProcessStatusLabels) }}</el-tag></template>
|
||||||
<template #measureReviewStatus="{ row }">{{ inboundStatusLabel((row as InboundOrderSummary).measureReviewStatus, inboundReviewStatusLabels) }}</template>
|
<template #measureReviewStatus="{ row }">{{ inboundStatusLabel((row as InboundOrderSummary).measureReviewStatus, inboundReviewStatusLabels) }}</template>
|
||||||
<template #expectedArrivalAt="{ row }">{{ formatDate((row as InboundOrderSummary).expectedArrivalAt) }}</template>
|
<template #expectedArrivalAt="{ row }">{{ formatDateOnly((row as InboundOrderSummary).expectedArrivalAt) }}</template>
|
||||||
<template #customerName="{ row }"><LineClampText :content="(row as InboundOrderSummary).customerName" /></template>
|
<template #customerName="{ row }"><LineClampText :content="(row as InboundOrderSummary).customerName" /></template>
|
||||||
<template #warehouseName="{ row }">{{ text((row as InboundOrderSummary).warehouseName) }}</template>
|
<template #warehouseName="{ row }">{{ text((row as InboundOrderSummary).warehouseName) }}</template>
|
||||||
<template #deliveryWarehouseName="{ row }">{{ text((row as InboundOrderSummary).deliveryWarehouseName) }}</template>
|
<template #deliveryWarehouseName="{ row }">{{ text((row as InboundOrderSummary).deliveryWarehouseName) }}</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user