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 {