From 6dda1e8feb03422a701d7b70fda5132b5426481d Mon Sep 17 00:00:00 2001 From: hwj Date: Thu, 12 Mar 2026 14:31:24 +0800 Subject: [PATCH] =?UTF-8?q?style=EF=BC=9A=E5=AE=A2=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86-=E4=BD=93=E9=AA=8C=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/cus/management/ManagementForm.vue | 24 +++++++++++--- src/views/cus/management/index.vue | 35 +++++++++++---------- 2 files changed, 38 insertions(+), 21 deletions(-) diff --git a/src/views/cus/management/ManagementForm.vue b/src/views/cus/management/ManagementForm.vue index d13bd9f..7d97e26 100644 --- a/src/views/cus/management/ManagementForm.vue +++ b/src/views/cus/management/ManagementForm.vue @@ -10,13 +10,13 @@ 基本信息 - - + + - - + + @@ -49,6 +49,7 @@ + @@ -138,6 +146,8 @@ const dialogVisible = ref(false) // 弹窗的是否展示 const dialogTitle = ref('') // 弹窗的标题 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用 const formType = ref('') // 表单的类型:create - 新增;update - 修改 + +const countrySelectReady = ref(false) type FormModel = Partial & { areaIds?: number[] } @@ -296,7 +306,13 @@ const open = async (type: string, id?: number) => { dialogTitle.value = t('action.' + type) formType.value = type syncingForm.value = true + countrySelectReady.value = false resetForm() + void nextTick(() => { + requestAnimationFrame(() => { + countrySelectReady.value = true + }) + }) if (!formData.value.countryCode && formData.value.countryName) { formData.value.countryCode = countryNameToCode.value.get(formData.value.countryName) } diff --git a/src/views/cus/management/index.vue b/src/views/cus/management/index.vue index eca0be3..10b136c 100644 --- a/src/views/cus/management/index.vue +++ b/src/views/cus/management/index.vue @@ -8,10 +8,19 @@ :inline="true" label-width="68px" > - + + + + { loading.value = true try { - const keyword = queryParams.keyword?.trim() - const baseParams = { + const data = await ManagementApi.getManagementPage({ pageNo: queryParams.pageNo, pageSize: queryParams.pageSize, - status: queryParams.status - } - let data = await ManagementApi.getManagementPage({ - ...baseParams, - customerCode: keyword || undefined + status: queryParams.status, + customerCode: queryParams.customerCode?.trim() || undefined, + customerName: queryParams.customerName?.trim() || undefined }) - if (keyword && (!data?.list?.length || data.total === 0)) { - data = await ManagementApi.getManagementPage({ - ...baseParams, - customerName: keyword - }) - } list.value = data?.list || [] total.value = data?.total || 0 } finally {