优化
This commit is contained in:
@@ -83,15 +83,17 @@ describe('UnifiedOrdersView contract', () => {
|
||||
|
||||
it('covers real list states and keeps operation column first and left-fixed', () => {
|
||||
expect(source).toContain("{ key: 'actions', label: '操作', width: 300, fixed: 'left'")
|
||||
expect(source).not.toContain("{ key: 'selection', type: 'selection'")
|
||||
expect(source).toContain("key: 'selection', type: 'selection'")
|
||||
expect(source).not.toContain('批量审核接口待接入')
|
||||
expect(source).not.toContain('@selection-change="handleSelectionChange"')
|
||||
expect(source).toContain('@selection-change="handleApprovalSelectionChange"')
|
||||
expect(source).toContain('batchApprovePlatformUnifiedOrders')
|
||||
expect(source).toContain('批量审核通过')
|
||||
expect(source).toContain('title="订单列表暂时无法加载"')
|
||||
expect(source).toContain('empty-text="暂无符合条件的订单"')
|
||||
expect(source).toContain(':loading="loading"')
|
||||
expect(source).toContain('v-model:page="page"')
|
||||
expect(source).toContain('v-model:page-size="pageSize"')
|
||||
const columnSource = source.slice(source.indexOf('const columns:'), source.indexOf('function emptyFilters'))
|
||||
const columnSource = source.slice(source.indexOf('const columns ='), source.indexOf('function emptyFilters'))
|
||||
const expectedColumnKeys = [
|
||||
'actions', 'inboundCode', 'mainStatus', 'customerName', 'receivingWarehouseName',
|
||||
'destinationWarehouseName', 'totalPackageCount', 'measurementReviewStatus', 'actualGrossWeightKg',
|
||||
@@ -218,9 +220,29 @@ describe('UnifiedOrdersView contract', () => {
|
||||
expect(source).not.toContain("value.replaceAll('_', ' ')")
|
||||
})
|
||||
|
||||
it('opens the measurement image preview at the clicked image index', () => {
|
||||
expect(source).toContain('v-for="(url, index) in measurementImageUrls"')
|
||||
expect(source).toContain(':initial-index="index"')
|
||||
it('binds dimension and weight evidence to their formal server records without mixing galleries', () => {
|
||||
expect(source).toContain('<el-table :data="measurementDetail?.items || []" row-key="id"')
|
||||
expect(source).toContain('label="尺寸图片"')
|
||||
expect(source).toContain(':file-id="row.intelligentImageFileId"')
|
||||
expect(source).toContain('openMeasurementEvidence(row.intelligentImageFileId')
|
||||
expect(source).toContain('v-for="weightResult in measurementDetail.weightResults"')
|
||||
expect(source).toContain(':file-id="weightResult.fileId"')
|
||||
expect(source).toContain('openMeasurementEvidence(weightResult.fileId')
|
||||
expect(source).toContain('measurementDetail?.actualGrossWeightKg')
|
||||
expect(source).toContain('weightResult.grossWeightKg')
|
||||
expect(source).toContain('weightResult.netWeightKg')
|
||||
expect(source).toContain("weightResult.palletType || '未记录类型'")
|
||||
expect(source).not.toContain('weightResult.palletCode')
|
||||
expect(source).not.toContain('measurementImageUrls')
|
||||
expect(source).not.toContain('const fileIds = [...measurementDetail.value.items')
|
||||
})
|
||||
|
||||
it('keeps authenticated evidence loading, original preview, permission and error states', () => {
|
||||
expect(source).toContain('<MeasurementEvidenceThumbnail')
|
||||
expect(source).toContain("downloadWeightImage(String(summary.tenantId), String(summary.inboundId), fileId)")
|
||||
expect(source).toContain('measurementPreviewError')
|
||||
expect(source).toContain('测量原图暂时无法读取')
|
||||
expect(source).toContain("can('platform:firstleg:inbound:measure:view')")
|
||||
})
|
||||
|
||||
it('shows parent-child markers only for related rows and keeps the aggregate in detail', () => {
|
||||
@@ -289,7 +311,7 @@ describe('UnifiedOrdersView contract', () => {
|
||||
it('matches the prototype table grid and distinguishes container identifiers', () => {
|
||||
expect(source).toContain('row-key="orderId" border stripe')
|
||||
expect(source).toContain('<el-table :data="detail.order.cargoes" border stripe')
|
||||
expect(source.match(/<el-table :data="measurementDetail\?\.items \|\| \[\]" border stripe/g)).toHaveLength(2)
|
||||
expect(source.match(/<el-table :data="measurementDetail\?\.items \|\| \[\]"[^>]*border stripe/g)).toHaveLength(2)
|
||||
expect(source).toContain('<el-table :data="detail.order.cargoes" border stripe empty-text="暂无客户下单数据"')
|
||||
expect(source).toContain('--el-table-border-color: #e5e7eb')
|
||||
expect(source).toContain('--el-table-row-hover-bg-color: #f3f7fb')
|
||||
|
||||
Reference in New Issue
Block a user