This commit is contained in:
2026-09-14 10:02:39 +08:00
parent 8bc86c8567
commit 89dc3bf671
11 changed files with 115 additions and 33 deletions
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { computed, onMounted, ref, watch } from 'vue'
import { computed, onActivated, onMounted, ref, watch } from 'vue'
import { useRouter } from 'vue-router'
import { Eye, Pencil } from '@lucide/vue'
import AdminPage from '@/shared/components/AdminPage.vue'
@@ -54,7 +54,9 @@ async function load() {
function search(model: QueryModel) { applied.value = { ...model }; if (page.value === 1) void load(); else page.value = 1 }
function open(row: OverseasPurchaseSummary, edit = false) { void router.push({ name: edit ? 'overseas-business-purchase-edit' : 'overseas-business-purchase-detail', params: { purchaseId: row.orderNo }, query: { customerId: row.customerId } }) }
async function loadCustomerOptions() { customersLoading.value = true; try { customerOptions.value = await listOverseasPurchaseCustomerOptions() } catch { customerOptions.value = [] } finally { customersLoading.value = false } }
let activatedOnce = false
watch([page, pageSize], () => { void load() }); onMounted(() => { void load(); void loadCustomerOptions() })
onActivated(() => { if (activatedOnce) void load(); else activatedOnce = true })
</script>
<template>