优化
This commit is contained in:
@@ -177,6 +177,7 @@ it.each([false, true])('confirms the %s photo stage with its own evidence and cu
|
||||
const wrapper = mount(TransportExecutionPanel, { ...options, props: { dispatchNo: 'PC1', pickupApproved: true } }); await flushPromises()
|
||||
expect(wrapper.text()).toContain(arriving ? '派送中' : '装货中')
|
||||
expect(wrapper.findAll('button').some(button => button.text() === '确认发车')).toBe(false)
|
||||
expect(wrapper.findAll('button').some(button => ['维护车辆信息', '取消排车'].includes(button.text()))).toBe(false)
|
||||
await wrapper.findAll('button').find(button => button.text() === (arriving ? '上传到仓照片' : '上传装货照片'))!.trigger('click'); await flushPromises()
|
||||
if (!arriving) {
|
||||
const quantity = wrapper.get('input[role="spinbutton"]')
|
||||
|
||||
@@ -38,7 +38,9 @@ const pickupStage = computed(() => trip.value?.status === 'COMPLETED' ? '取货
|
||||
const pending = ref<{ suffix: string; body: object; kind?: 'cancel' } | null>(null)
|
||||
const trip = computed(() => detail.value?.execution.trip)
|
||||
const editable = computed(() => !props.readonly && access.can(permission.EDIT))
|
||||
const canChangeResources = computed(() => trip.value?.status === 'PLANNED' && props.pickupStage !== 'LOADING' && !detail.value?.pickups.some(row => row.status !== 'ASSIGNED'))
|
||||
const canChangeResources = computed(() => trip.value?.status === 'PLANNED' && props.pickupStage !== 'LOADING'
|
||||
&& !(detail.value?.taskType === 'PICKUP' && (props.pickupApproved || props.pickupReviewState === 'APPROVED' || (props.pickupStage && props.pickupStage !== 'BEFORE_LOADING')))
|
||||
&& !detail.value?.pickups.some(row => row.status !== 'ASSIGNED'))
|
||||
const resourceFormOpen = computed(() => canChangeResources.value && editable.value && (editingResources.value || !trip.value?.vehicleId || !trip.value?.driverId))
|
||||
const locked = computed(() => busy.value || !!pending.value || licenseLoading.value || Object.values(photoBusy).some(Boolean))
|
||||
const completionAction = computed(() => {
|
||||
|
||||
Reference in New Issue
Block a user