feat(admin): edit domestic order declarations

This commit is contained in:
2026-09-02 10:24:07 +08:00
parent 132d0c22d7
commit bbb9c40c50
8 changed files with 432 additions and 5 deletions
@@ -98,7 +98,7 @@ describe('UnifiedOrdersView contract', () => {
'actions', 'inboundCode', 'mainStatus', 'customerName', 'receivingWarehouseName',
'destinationWarehouseName', 'channelName', 'totalPackageCount', 'totalPalletCount', 'requestedPickupAt', 'locationCodes', 'measurementReviewStatus', 'actualGrossWeightKg',
'actualVolumeCbm', 'totalNetWeightKg', 'chargeableWeightKg', 'chargeableVolumeCbm', 'expectedShipDate',
'expectedArrivalAt', 'feeReviewStatus', 'skuNos', 'totalQuantity', 'expressCompany', 'expressTrackingNo',
'expectedVolumeCbm', 'expectedArrivalAt', 'feeReviewStatus', 'skuNos', 'totalQuantity', 'expressCompany', 'expressTrackingNo',
'shipmentId', 'referenceId', 'containerNo', 'cabinetNo',
'effectiveSailingAt', 'effectivePortArrivalAt', 'customerRemark', 'latestInternalNote', 'createdAt', 'updatedAt',
]
@@ -119,6 +119,7 @@ describe('UnifiedOrdersView contract', () => {
expect(columnSource).toContain("key: 'requestedPickupAt', prop: 'requestedPickupAt', label: '预约提货时间'")
expect(columnSource.match(/defaultVisible: false/g)).toHaveLength(13)
expect(columnSource).toContain("key: 'expectedArrivalAt', prop: 'expectedArrivalAt', label: '预计到货时间', minWidth: 160, slotName: 'field' }")
expect(columnSource).toContain("key: 'expectedVolumeCbm', prop: 'expectedVolumeCbm', label: '预计体积(m³)', minWidth: 130, slotName: 'field' }")
expect(columnSource).toContain("key: 'effectiveSailingAt', prop: 'effectiveSailingAt', label: '开船时间', minWidth: 180, slotName: 'field' }")
expect(columnSource).toContain("key: 'effectivePortArrivalAt', prop: 'effectivePortArrivalAt', label: '到港时间', minWidth: 180, slotName: 'field' }")
expect(source).toContain('preference-key="unified-orders-table-v2"')
@@ -411,6 +412,15 @@ describe('UnifiedOrdersView contract', () => {
expect(routeSource).not.toContain('unified-order-workflow')
})
it('only exposes declaration editing on approved editable details and marks channel changes', () => {
expect(source).toContain("detail.value.summary.mainStatus === 'WAIT_MEASURE'")
expect(source).toContain("can('platform:order:declaration:edit')")
expect(source).toContain('编辑客户申报资料')
expect(source).toContain('<OrderDeclarationEditorDialog')
expect(source).toContain('曾变更渠道')
expect(source).toContain('@updated="handleDeclarationUpdated"')
})
it('supports the measurement-review deep link with an inbound-code lookup and recoverable return path', () => {
expect(routeSource).toContain("name: 'unified-order-detail-by-inbound-code'")
expect(routeSource.indexOf("path: 'orders/inbound/:inboundCode'")).toBeLessThan(routeSource.indexOf("path: 'orders/:orderId'"))