Release/test #11

Merged
admin merged 43 commits from release/test into main 2026-09-28 15:59:28 +08:00
Showing only changes of commit 5cc1512a28 - Show all commits
@@ -306,7 +306,16 @@ async function copySelected() {
const offsetMs = new Date(record.etdAt).getTime() - new Date(record.cutoffAt).getTime()
const copiedCutoff = new Date(new Date(etdAt).getTime() - offsetMs)
const cutoffAt = `${formatDate(copiedCutoff)}T${String(copiedCutoff.getHours()).padStart(2, '0')}:${String(copiedCutoff.getMinutes()).padStart(2, '0')}:${String(copiedCutoff.getSeconds()).padStart(2, '0')}`
try { await copySailing(record.id, { etdAt, cutoffAt }); ElMessage.success('已复制为下一班'); await load() } catch (cause) { ElMessage.error(getApiErrorDetails(cause, '复制船期失败').message) }
try {
const result = await copySailing(record.id, { etdAt, cutoffAt })
const copied = result.sailing
const targetMonth = copied.etdAt.slice(0, 7)
month.value = targetMonth
selectedDate.value = copied.etdAt.slice(0, 10)
selectedSailing.value = copied
if (targetMonth === data.value?.month) await load()
ElMessage.success(`已定位到下一班:${copied.etdAt.slice(0, 16).replace('T', ' ')}`)
} catch (cause) { ElMessage.error(getApiErrorDetails(cause, '复制船期失败').message) }
}
async function openVolumeDetail() {
if (!selectedSailing.value) return