Merge branch 'dev' of http://git.buggoglobal.com/html/admin-web into release/test
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
assignPendingReviewSmartLoadingOrder,
|
||||
assignSmartLoadingGroup,
|
||||
assignSmartLoadingItem,
|
||||
assignSmartLoadingPallet,
|
||||
getSmartLoadingPlanByBooking,
|
||||
listContainers,
|
||||
listSmartLoadingCandidates,
|
||||
@@ -42,6 +43,7 @@ vi.mock('../api/platformContainerLoading', () => ({
|
||||
listSmartLoadingWorkbenchContainers: vi.fn(),
|
||||
createSmartLoadingPlan: vi.fn(),
|
||||
assignSmartLoadingItem: vi.fn(),
|
||||
assignSmartLoadingPallet: vi.fn(),
|
||||
assignPendingReviewSmartLoadingOrder: vi.fn(),
|
||||
assignSmartLoadingGroup: vi.fn(),
|
||||
recommendSmartLoading: vi.fn(),
|
||||
@@ -73,7 +75,7 @@ const plan = {
|
||||
canAssign: true, canEdit: true, blockedReason: null, finalCompletionStatus: 'NOT_STARTED' as const,
|
||||
pdaTaskId: null, pdaTaskStatus: null, pdaTaskVersion: null,
|
||||
coLoadGroups: [],
|
||||
items: [{ id: '101', loadingPlanId: '99', accountId: '1', inboundId: '2', inboundDetailId: '3', orderId: '4', orderNo: 'ORD-1', inboundCode: 'IN-1', customerName: '示例企业', destinationWarehouseId: '9', destinationWarehouseCode: 'LAX9', destinationWarehouseName: 'LAX9', skuCode: 'SKU-1', productNameZh: '服装', packageCount: 6, productQuantity: 6, grossWeightKg: 60, volumeCbm: 1.2, loadSequence: 1, version: 1, pickedPackageCount: 0, minPackageCount: 1, canAdjust: true, canRemove: true }],
|
||||
items: [{ id: '101', loadingPlanId: '99', accountId: '1', inboundId: '2', inboundDetailId: '3', orderId: '4', orderNo: 'ORD-1', inboundCode: 'IN-1', customerName: '示例企业', destinationWarehouseId: '9', destinationWarehouseCode: 'LAX9', destinationWarehouseName: 'LAX9', skuCode: 'SKU-1', productNameZh: '服装', unitType: 'PACKAGE' as const, palletId: null, palletNo: null, indivisible: false, packageCount: 6, productQuantity: 6, grossWeightKg: 60, volumeCbm: 1.2, loadSequence: 1, version: 1, pickedPackageCount: 0, minPackageCount: 1, canAdjust: true, canRemove: true }],
|
||||
}
|
||||
const candidate = {
|
||||
accountId: '1', inboundId: '5', orderId: '7', orderNo: 'ORD-2', inboundCode: 'IN-2',
|
||||
@@ -88,7 +90,7 @@ function candidatePage(records: unknown[], page = 1, size = 20, total = records.
|
||||
return {
|
||||
records: records.map((record) => {
|
||||
const candidate = record as { accountId?: string; customerId?: string; groupMembers?: unknown[] }
|
||||
return { customerId: candidate.customerId || candidate.accountId || '', groupMembers: [], ...candidate }
|
||||
return { customerId: candidate.customerId || candidate.accountId || '', groupMembers: [], unitType: 'PACKAGE', palletId: null, palletNo: null, indivisible: false, ...candidate }
|
||||
}),
|
||||
page, size, total, pages: total ? Math.ceil(total / size) : 0,
|
||||
} as Awaited<ReturnType<typeof listSmartLoadingCandidates>>
|
||||
@@ -116,7 +118,8 @@ describe('GlobalSmartLoadingView', () => {
|
||||
it('uses one-line shared text clamps for co-load and assigned-count summaries', () => {
|
||||
const source = readFileSync(resolve(process.cwd(), 'src/modules/container-loading/pages/GlobalSmartLoadingView.vue'), 'utf8')
|
||||
expect(source).toContain('<LineClampText :content="row.memberOrderSummaries.join(\';\')" />')
|
||||
expect(source).toContain('<LineClampText v-if="row.coLoadGroup" :content="`${row.packageCount} 箱(整组固定)`" />')
|
||||
expect(source).toContain('<LineClampText v-else-if="row.coLoadGroup" :content="`${row.packageCount} 箱(整组固定)`" />')
|
||||
expect(source).toContain("row.unitType === 'SEALED_PALLET'")
|
||||
expect(source).toContain('.candidate-group { display: grid; width: 100%; min-width: 0;')
|
||||
expect(source).toContain('.candidate-group :deep(.line-clamp-text) { width: 100%; }')
|
||||
expect(source).not.toContain('<span v-for="summary in row.memberOrderSummaries"')
|
||||
|
||||
Reference in New Issue
Block a user