fix(admin): simplify gray release warehouse workflows

This commit is contained in:
2026-10-26 15:51:07 +08:00
parent 9de72cbc5c
commit cc02f4d907
12 changed files with 181 additions and 154 deletions
@@ -68,7 +68,7 @@ describe('original container schedule', () => {
wrapper.unmount()
})
it('missing original ownership blocks initialization and late read cannot populate another container', async () => {
const first = setup({ ...container, currentPortScheduleId: '', oceanBookingId: '' }); await first.vm.begin(); expect(getPortSchedule).not.toHaveBeenCalled(); expect(first.wrapper.text()).toContain('不能维护船期'); first.wrapper.unmount()
const first = setup({ ...container, currentPortScheduleId: '', oceanBookingId: '' }); await first.vm.begin(); expect(getPortSchedule).not.toHaveBeenCalled(); expect(first.wrapper.text()).not.toContain('不能维护船期'); expect(first.wrapper.find('button').attributes('disabled')).toBeDefined(); first.wrapper.unmount()
let resolve!: (value: ReturnType<typeof result>) => void
vi.mocked(getPortSchedule).mockReturnValue(new Promise(done => { resolve = done }))
const { wrapper, vm } = setup(); const pending = vm.begin()
@@ -105,8 +105,8 @@ onBeforeUnmount(() => { generation++ })
<template>
<div class="schedule-actions admin-workbench">
<el-button v-if="canRead" :disabled="!!prerequisite" @click="begin">船期维护与历史</el-button>
<span v-if="prerequisite">{{ prerequisite }}</span>
<span v-else-if="!canRead">当前账号无船期读取权限。</span>
<span v-if="prerequisite && container.oceanBookingId && container.customerId">{{ prerequisite }}</span>
<span v-if="!prerequisite && !canRead">当前账号无船期读取权限。</span>
</div>
<AppDialog v-model="open" class="admin-density-dialog admin-workbench is-dialog" :title="dialogTitle" fullscreenable :width="container.currentPortScheduleId ? '1000px' : '1120px'" :show-confirm="canWrite" :confirm-disabled="loading || !!prerequisite || (!!container.currentPortScheduleId && !schedule)" :confirm-loading="busy" confirm-text="保存船期" @confirm="save">
<div v-loading="loading" class="density-dialog-sections">