fix: repair region assist selects

This commit is contained in:
hy 2026-04-20 13:31:47 +08:00
parent ce5d10be47
commit ca35226a1c

View File

@ -40,7 +40,6 @@ import {
RadioGroup,
Row,
Select,
SelectOption,
Space,
Table,
TabPane,
@ -320,6 +319,16 @@ const withdrawalWaysSelectOptions = BANK_CARD_TYPES.map((item) => ({
label: item.name,
value: item.value,
}));
const assistTypeOptions = REGION_ASSIST_TYPES.map((item) => ({
label: item.name,
value: item.value,
}));
const assistRegionOptions = computed(() =>
regionOptions.value.map((item) => ({
label: item.regionName || item.regionCode || item.id,
value: item.id,
})),
);
watch(
sysOriginOptions,
@ -696,35 +705,19 @@ loadCountryOptions();
<Select
v-model:value="assistQuery.regionId"
allow-clear
option-label-prop="children"
:options="assistRegionOptions"
placeholder="请选择区域"
style="width: 180px"
>
<SelectOption
v-for="item in regionOptions"
:key="item.id"
:value="item.id"
>
{{ item.regionName }}
</SelectOption>
</Select>
/>
</InlineFilterField>
<InlineFilterField label="业务类型" :label-width="84">
<Select
v-model:value="assistQuery.type"
allow-clear
option-label-prop="children"
:options="assistTypeOptions"
placeholder="业务类型"
style="width: 280px"
>
<SelectOption
v-for="item in REGION_ASSIST_TYPES"
:key="item.value"
:value="item.value"
>
{{ item.name }}
</SelectOption>
</Select>
/>
</InlineFilterField>
<Button type="primary" @click="loadAssistList">搜索</Button>
<Button @click="openAssistCreate">新增</Button>
@ -911,34 +904,20 @@ loadCountryOptions();
>
<Form :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }" layout="horizontal">
<FormItem label="业务类型">
<Select option-label-prop="children"
<Select
v-model:value="assistForm.type"
:options="assistTypeOptions"
:disabled="savingAssist || Boolean(assistForm.id)"
placeholder="请选择业务类型"
>
<SelectOption
v-for="item in REGION_ASSIST_TYPES"
:key="item.value"
:value="item.value"
>
{{ item.name }}
</SelectOption>
</Select>
/>
</FormItem>
<FormItem label="区域">
<Select option-label-prop="children"
<Select
v-model:value="assistForm.regionId"
:options="assistRegionOptions"
:disabled="savingAssist || Boolean(assistForm.id)"
placeholder="请选择区域"
>
<SelectOption
v-for="item in regionOptions"
:key="item.id"
:value="item.id"
>
{{ item.regionName }}
</SelectOption>
</Select>
/>
</FormItem>
<template v-if="assistForm.type === 'DIAMOND_EXCHANGE_GOLD'">
<FormItem label="值">