更新计费预览与测量精度并精简作业界面

This commit is contained in:
2026-10-28 11:06:42 +08:00
parent e41e9e6d3f
commit 6f8dc920ca
21 changed files with 522 additions and 150 deletions
@@ -199,7 +199,7 @@ describe('dispatch workflow native layout', () => {
expect(dialog.get('[aria-label="本车审核依据"]').text()).toContain('联系电话')
expect(dialog.get('[aria-label="排车与预约"]').findAll('input')).toHaveLength(0)
const photos = dialog.findAllComponents(DispatchEvidenceFiles)
expect(photos.map(photo => photo.props('label'))).toEqual(['车辆图片', '司机照片', '驾驶证照片'])
expect(photos.map(photo => photo.props('label'))).toEqual(['车牌图片', '司机照片', '驾驶证照片'])
expect(photos.every(photo => photo.props('readonly'))).toBe(true)
expect(dialog.get('[aria-label="操作原因与意见"] h3').text()).toBe('审核意见')
expect(dialog.text()).not.toContain('请核对本车资源与本趟证据')
@@ -246,7 +246,7 @@ describe('dispatch workflow native layout', () => {
vi.mocked(api.updateDispatch).mockRejectedValueOnce(new Error('unknown edit')).mockImplementationOnce(async (_, body) => command('EDIT', body.idempotencyKey))
const { wrapper, dialog } = await render('EDIT', undefined, true)
const fields = dialog.findAllComponents(DispatchEvidenceFiles)
expect(fields.map(item => item.props('label'))).toEqual(['车辆图片', '司机照片', '驾驶证照片'])
expect(fields.map(item => item.props('label'))).toEqual(['车牌图片', '司机照片', '驾驶证照片'])
expect(fields[0]!.props('modelValue')).toEqual(['301'])
expect(dialog.get('.workflow-photo-grid').findAll('figure')).toHaveLength(3)
for (const [index, files] of fields.entries()) {
@@ -280,7 +280,7 @@ describe('dispatch workflow native layout', () => {
vi.mocked(api.getDispatch).mockResolvedValueOnce(value)
await wrapper.setProps({ modelValue: false }); await wrapper.setProps({ modelValue: true }); await flushPromises()
const fields = dialog.findAllComponents(DispatchEvidenceFiles)
expect(fields.map(item => item.props('label'))).toEqual(['车辆图片', '司机照片', '驾驶证照片'])
expect(fields.map(item => item.props('label'))).toEqual(['车牌图片', '司机照片', '驾驶证照片'])
expect(fields.every(item => item.props('readonly') && item.props('photoCard'))).toBe(true)
expect(fields[1]!.props('modelValue')).toEqual(['402', '403'])
expect(dialog.findAll('input[type="file"]')).toHaveLength(0)