merge: integrate TEST changes with fleet photo updates
This commit is contained in:
@@ -111,6 +111,8 @@ describe('OrderDeclarationEditorDialog', () => {
|
||||
expect(listWarehouseLogisticsChannels).toHaveBeenCalledWith('700000000000000001')
|
||||
expect(wrapper.text()).toContain('国内收货仓和中转仓不可修改,如需变更请重新下单')
|
||||
expect(wrapper.text()).toContain('RK-001')
|
||||
expect(wrapper.get('.readonly-facts').text()).not.toContain('版本')
|
||||
expect(wrapper.findComponent({ name: 'ElDescriptions' }).props('column')).toBe(3)
|
||||
const volume = wrapper.findComponent({ name: 'ElInputNumber' })
|
||||
expect(volume.props()).toMatchObject({ min: 0.0001, precision: 4, controls: false, modelValue: 0.625 })
|
||||
volume.vm.$emit('update:modelValue', 0.875)
|
||||
|
||||
@@ -244,24 +244,23 @@ async function save() {
|
||||
|
||||
<section class="density-dialog-section" data-tone="source">
|
||||
<h3 class="density-dialog-section__title">原订单资料</h3>
|
||||
<el-descriptions :column="4" border class="readonly-facts density-descriptions">
|
||||
<el-descriptions :column="3" border class="readonly-facts density-descriptions">
|
||||
<el-descriptions-item label="入仓码">{{ detail.summary.inboundCode || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="国内收货仓">{{ detail.summary.receivingWarehouseName || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="目的仓/中转仓">{{ detail.summary.destinationWarehouseName || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="版本">{{ form.expectedVersion }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</section>
|
||||
|
||||
<section class="density-dialog-section" data-tone="work">
|
||||
<h3 class="density-dialog-section__title">订单申报资料</h3>
|
||||
<el-form label-position="left" label-width="110px" class="order-fields density-form">
|
||||
<el-form label-position="left" label-width="110px" class="order-fields density-form density-form--outlined">
|
||||
<div class="workbench-evidence"><table class="density-table density-table--editable order-declaration-fields" aria-label="订单申报资料">
|
||||
<colgroup><col style="width: 40%"><col style="width: 27%"><col style="width: 33%"></colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><el-form-item label="渠道名称" required><el-select v-model="form.channelCode" aria-label="渠道名称" filterable clearable :loading="channelsLoading" placeholder="请选择正式渠道" @change="selectChannel"><el-option v-for="channel in channels" :key="channel.channelCode" :label="`${channel.channelName} · ${channel.channelCode}`" :value="channel.channelCode" /></el-select></el-form-item></td>
|
||||
<td><el-form-item label="渠道编码"><span aria-label="渠道编码">{{ form.channelCode || '—' }}</span></el-form-item></td>
|
||||
<td><el-form-item label="预估体积(m³)"><el-input-number v-model="form.estimatedVolumeCbm" :min="0.0001" :precision="4" :controls="false" aria-label="预估体积(m³)" placeholder="请输入预估体积(选填)" /></el-form-item></td>
|
||||
<td><el-form-item label="预估体积(m³)"><el-input-number v-model="form.estimatedVolumeCbm" :min="0.0001" :precision="4" :controls="false" aria-label="预估体积(m³)" placeholder="选填" /></el-form-item></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><el-form-item label="预计到货时间"><el-date-picker v-model="form.expectedArrivalAt" type="datetime" value-format="YYYY-MM-DDTHH:mm:ss" format="YYYY-MM-DD HH:mm" aria-label="预计到货时间" clearable /></el-form-item></td>
|
||||
|
||||
@@ -5,9 +5,10 @@ import { downloadPlatformProductImage, getPlatformUnifiedOrder, listPlatformUnif
|
||||
import { downloadPlatformInboundHoldEvidence, getPlatformInboundHold, holdPlatformInbound, releasePlatformInbound, uploadPlatformInboundHoldEvidence } from '@/modules/inbounds'
|
||||
import UnifiedOrdersView from './UnifiedOrdersView.vue'
|
||||
|
||||
const { routeQuery, routerPush } = vi.hoisted(() => ({ routeQuery: { tenantId: '6001', from: '' }, routerPush: vi.fn() }))
|
||||
vi.mock('vue-router', () => ({
|
||||
useRoute: () => ({ params: { orderId: '5001' }, query: { tenantId: '6001' } }),
|
||||
useRouter: () => ({ push: vi.fn() }),
|
||||
useRoute: () => ({ params: { orderId: '5001' }, query: routeQuery }),
|
||||
useRouter: () => ({ push: routerPush }),
|
||||
}))
|
||||
const { canPermission } = vi.hoisted(() => ({ canPermission: vi.fn((..._permissions: string[]) => true) }))
|
||||
vi.mock('@/core/access/accessPreview', () => ({ useAccessPreviewStore: () => ({ can: canPermission }) }))
|
||||
@@ -75,6 +76,7 @@ function mountDetail() {
|
||||
describe('UnifiedOrdersView downstream fulfillment detail', () => {
|
||||
beforeEach(() => {
|
||||
vi.clearAllMocks()
|
||||
routeQuery.from = ''
|
||||
canPermission.mockImplementation(() => true)
|
||||
vi.mocked(getPlatformUnifiedOrder).mockResolvedValue(detail as never)
|
||||
vi.mocked(downloadPlatformProductImage).mockResolvedValue(new Blob(['image'], { type: 'image/png' }))
|
||||
@@ -107,6 +109,15 @@ describe('UnifiedOrdersView downstream fulfillment detail', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it.each(['last-mile-orders', ''])('returns to the originating list from detail: %s', async (from) => {
|
||||
routeQuery.from = from
|
||||
const wrapper = mountDetail()
|
||||
await flushPromises()
|
||||
await wrapper.findAll('button').find(button => button.text() === '返回列表')!.trigger('click')
|
||||
expect(routerPush).toHaveBeenCalledWith({ name: from ? 'overseas-last-mile-orders' : 'unified-orders' })
|
||||
wrapper.unmount()
|
||||
})
|
||||
|
||||
it('keeps unchanged actual and outer volumes on the same server snapshot with three decimal places', async () => {
|
||||
const wrapper = mountDetail()
|
||||
await flushPromises()
|
||||
|
||||
@@ -2224,11 +2224,12 @@ async function printSelectedCartonLabels() {
|
||||
}
|
||||
}
|
||||
|
||||
/** 关闭详情时返回实际业务来源列表。 */
|
||||
function closeDetail() {
|
||||
releaseCargoImagePreviews()
|
||||
detail.value = null
|
||||
detailError.value = null
|
||||
void router.push({ name: 'unified-orders' })
|
||||
void router.push({ name: route.query.from === 'last-mile-orders' ? 'overseas-last-mile-orders' : 'unified-orders' })
|
||||
}
|
||||
|
||||
function returnToMeasurementReviews() {
|
||||
|
||||
Reference in New Issue
Block a user