|
|
@@ -36,7 +36,7 @@
|
|
|
<el-form-item :label="t('member.institution.tradecfg.add.goodsid')" prop="goodsid">
|
|
|
<el-select v-model="formData.goodsid" @change="onGoodsChange">
|
|
|
<template v-for="(item, index) in goodsData?.goods" :key="index">
|
|
|
- <el-option :label="item.goodsname" :value="item.goodsid" />
|
|
|
+ <el-option :label="item[getLocalizedKey()] || item.goodscode || item.goodsid" :value="item.goodsid" />
|
|
|
</template>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -98,6 +98,7 @@
|
|
|
import { ref, reactive, computed } from 'vue'
|
|
|
import { ElMessage, FormInstance, FormRules } from 'element-plus'
|
|
|
import { handleNoneValue } from '@/filters'
|
|
|
+import { Language } from '@/constants/language'
|
|
|
import { useEnum } from '@/hooks/enum'
|
|
|
import { useRequest } from '@/hooks/request'
|
|
|
import { loadSelectOption, tradeConfigAdd } from '@/services/api/member'
|
|
|
@@ -106,6 +107,22 @@ import AppDrawer from '@pc/components/base/drawer/index.vue'
|
|
|
import AppTable from '@pc/components/base/table/index.vue'
|
|
|
import AppSelectMember from '@pc/components/modules/select-member/index.vue'
|
|
|
|
|
|
+// 获取本地化属性键
|
|
|
+const getLocalizedKey: () => keyof Investor.InvestorPersonRsp['goods'][number] = () => {
|
|
|
+ switch (i18n.global.locale) {
|
|
|
+ case Language.Simplified:
|
|
|
+ return 'goodsname'
|
|
|
+ case Language.Thai:
|
|
|
+ return 'goodsnameth'
|
|
|
+ case Language.Traditional:
|
|
|
+ return 'goodsnametw'
|
|
|
+ case Language.Vietnamese:
|
|
|
+ return 'goodsnamevi'
|
|
|
+ default:
|
|
|
+ return 'goodsnameen'
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
const customerType = useEnum('customerType')
|
|
|
const scfRiskMode = useEnum('SCFRiskMode')
|
|
|
const feetypeEnum = useEnum('feetype')
|