优化
This commit is contained in:
@@ -32,7 +32,7 @@ describe('UnifiedOrdersView contract', () => {
|
||||
'feeReviewStatus', 'containerNo', 'cabinetNo', 'channelName', 'sailingDate', 'loaded', 'fullContainer',
|
||||
'measurementReviewStatus', 'fbaCode', 'createdRange',
|
||||
]) expect(source).toContain(`key: '${key}'`)
|
||||
for (const label of ['定位仓库', '交货仓', '费用审核状态', '是否已配载', '是否整柜', '测量数据审核状态', '商品 FBA 编码']) {
|
||||
for (const label of ['定位仓库', '交货仓', '费用审核状态', '是否已配载', '是否整柜', '测量数据审核状态', '商品 SKU 编码']) {
|
||||
expect(source).toContain(`label: '${label}'`)
|
||||
}
|
||||
expect(source).toContain('listAllPlatformWarehouses')
|
||||
@@ -57,6 +57,21 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).toContain('preference-key="unified-orders-query-v2"')
|
||||
})
|
||||
|
||||
it('keeps unified filters aligned with the formal query contract and does not expose hold filters', () => {
|
||||
const filterSource = source.slice(source.indexOf('const primaryQueryFields'), source.indexOf('const columns:'))
|
||||
for (const key of ['expectedArrivalDate', 'feeReviewStatus', 'measurementReviewStatus', 'fbaCode', 'loaded', 'fullContainer']) {
|
||||
expect(filterSource).toContain(`key: '${key}'`)
|
||||
}
|
||||
expect(filterSource).not.toContain("key: 'holdCargo'")
|
||||
expect(filterSource).not.toContain("key: 'holdReason'")
|
||||
expect(filterSource).toContain("key: 'fbaCode', type: 'input', width: 220, label: '商品 SKU 编码'")
|
||||
expect(filterSource).not.toContain("label: '商品 FBA 编码'")
|
||||
expect(source).toContain('expectedArrivalDate: activeFilters.expectedArrivalDate || undefined')
|
||||
expect(source).toContain('feeReviewStatus: activeFilters.feeReviewStatus || undefined')
|
||||
expect(source).toContain('measurementReviewStatus: activeFilters.measurementReviewStatus || undefined')
|
||||
expect(source).toContain('fbaCode: trimmed(activeFilters.fbaCode)')
|
||||
})
|
||||
|
||||
it('uses tabs as the only order-status filter and keeps advanced controls inside QueryToolbar', () => {
|
||||
expect(source).toContain('mainStatus: selectedStatus.value || undefined')
|
||||
expect(source).toContain('<template #actions>')
|
||||
@@ -92,6 +107,8 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(columnSource.indexOf("key: 'orderNo'")).toBeLessThan(columnSource.indexOf("key: 'inboundCode'"))
|
||||
expect(columnSource).toContain("{ key: 'mainStatus', prop: 'mainStatus', label: '订单主状态'")
|
||||
expect(columnSource).toContain("{ key: 'loadingStatus', prop: 'loadingStatus', label: '配载状态', minWidth: 130, slotName: 'field', defaultVisible: false }")
|
||||
expect(columnSource.match(/defaultVisible: false/g)).toHaveLength(8)
|
||||
expect(source).toContain('.table-card { overflow: hidden; }')
|
||||
expect(source).toContain('slotName: \'measurementReviewStatus\'')
|
||||
expect(source).toContain('unifiedOrderReviewStatusLabel(value, \'未录入\')')
|
||||
expect(source).toContain("{ key: 'customerRemark', prop: 'customerRemark', label: '客户备注'")
|
||||
|
||||
@@ -189,7 +189,7 @@ const advancedQueryFields = computed<QueryField[]>(() => [
|
||||
{ value: 'UNRECORDED', label: '未录入' }, { value: 'PENDING', label: '待审核' },
|
||||
{ value: 'APPROVED', label: '审核通过' }, { value: 'REJECTED', label: '审核驳回' },
|
||||
], props: { 'aria-label': '测量数据审核状态' } },
|
||||
{ key: 'fbaCode', type: 'input', width: 220, label: '商品 FBA 编码', placeholder: '请输入商品 FBA 编码', props: { 'aria-label': '商品 FBA 编码' } },
|
||||
{ key: 'fbaCode', type: 'input', width: 220, label: '商品 SKU 编码', placeholder: '请输入商品 SKU 编码', props: { 'aria-label': '商品 SKU 编码' } },
|
||||
{ key: 'createdRange', type: 'daterange', width: 300, label: '创建日期', placeholder: '创建日期范围', props: { 'aria-label': '创建日期范围' } },
|
||||
])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user