|
@@ -12,23 +12,26 @@
|
|
|
<template #input>
|
|
<template #input>
|
|
|
<app-select v-model="formData.cardtype"
|
|
<app-select v-model="formData.cardtype"
|
|
|
:placeholder="$t('user.authentication.pleaseselectthecardtype')"
|
|
:placeholder="$t('user.authentication.pleaseselectthecardtype')"
|
|
|
- :options="getCerTypePersonList()" />
|
|
|
|
|
|
|
+ :options="cerTypePersonList" />
|
|
|
</template>
|
|
</template>
|
|
|
</Field>
|
|
</Field>
|
|
|
<Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
|
|
<Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
|
|
|
:placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
|
|
:placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
|
|
|
- <Field v-if="formData.mobilephone != ''" name="mobilephone" v-model="formData.mobilephone" :label="$t('user.register.mobile')" readonly />
|
|
|
|
|
- <Field v-else v-model="formData.mobilephone" type="digit" name="mobilephone" :placeholder="$t('user.register.tips1')" :rules="formRules.mobilephone">
|
|
|
|
|
|
|
+ <Field v-if="formData.mobilephone != ''" name="mobilephone" v-model="formData.mobilephone"
|
|
|
|
|
+ :label="$t('user.register.mobile')" readonly />
|
|
|
|
|
+ <Field v-else v-model="formData.mobilephone" type="digit" name="mobilephone"
|
|
|
|
|
+ :placeholder="$t('user.register.tips1')" :rules="formRules.mobilephone">
|
|
|
<template #label>
|
|
<template #label>
|
|
|
<span>{{ $t('user.register.mobile') }}</span>
|
|
<span>{{ $t('user.register.mobile') }}</span>
|
|
|
<span style="margin-left: 10px;" @click="show = true">{{ countryCode }}</span>
|
|
<span style="margin-left: 10px;" @click="show = true">{{ countryCode }}</span>
|
|
|
<Popup v-model:show="show" position="bottom" teleport="body" round>
|
|
<Popup v-model:show="show" position="bottom" teleport="body" round>
|
|
|
<Picker :columns="datalist" @cancel="onCancel" @confirm="onConfirm"
|
|
<Picker :columns="datalist" @cancel="onCancel" @confirm="onConfirm"
|
|
|
- :confirm-button-text="$t('operation.confirm')" :cancel-button-text="$t('operation.cancel')">
|
|
|
|
|
|
|
+ :confirm-button-text="$t('operation.confirm')"
|
|
|
|
|
+ :cancel-button-text="$t('operation.cancel')">
|
|
|
<template #option="{ text, index }">
|
|
<template #option="{ text, index }">
|
|
|
- <slot name="option" :row="datalist[index]" :index="index">
|
|
|
|
|
- {{ text }}
|
|
|
|
|
- </slot>
|
|
|
|
|
|
|
+ <slot name="option" :row="datalist[index]" :index="index">
|
|
|
|
|
+ {{ text }}
|
|
|
|
|
+ </slot>
|
|
|
</template>
|
|
</template>
|
|
|
</Picker>
|
|
</Picker>
|
|
|
</Popup>
|
|
</Popup>
|
|
@@ -64,7 +67,7 @@
|
|
|
:label="$t('user.authentication.modifyremark')" />
|
|
:label="$t('user.authentication.modifyremark')" />
|
|
|
</CellGroup>
|
|
</CellGroup>
|
|
|
</Form>
|
|
</Form>
|
|
|
- <img v-if="oem != 'tss'" src="../../../assets/images/certification.png" />
|
|
|
|
|
|
|
+ <!-- <img v-if="oem != 'tss'" src="../../../assets/images/certification.png" /> -->
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="g-form__footer inset">
|
|
<div class="g-form__footer inset">
|
|
|
<Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit')
|
|
<Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit')
|
|
@@ -98,13 +101,14 @@ const { router } = useNavigation()
|
|
|
const { global: { t } } = i18n
|
|
const { global: { t } } = i18n
|
|
|
|
|
|
|
|
const userStore = useUserStore()
|
|
const userStore = useUserStore()
|
|
|
|
|
+const cerTypePersonList = getCerTypePersonList() // 证件类型列表
|
|
|
|
|
|
|
|
// 是否弹出选择器
|
|
// 是否弹出选择器
|
|
|
-const show = shallowRef(false)
|
|
|
|
|
|
|
+const show = shallowRef(false)
|
|
|
const datalist = computed(() => {
|
|
const datalist = computed(() => {
|
|
|
- return getCountryCodeList().map(e => {
|
|
|
|
|
- return { text: e.value, value: e.value }
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ return getCountryCodeList().map(e => {
|
|
|
|
|
+ return { text: e.value, value: e.value }
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
const countryCode = ref(datalist.value[0]?.value.toString() ?? '')
|
|
const countryCode = ref(datalist.value[0]?.value.toString() ?? '')
|
|
|
|
|
|
|
@@ -117,12 +121,12 @@ const oem = service.getConfig('oem')
|
|
|
const { banklist } = useQueryCusBankSignBank()
|
|
const { banklist } = useQueryCusBankSignBank()
|
|
|
|
|
|
|
|
const onCancel = () => {
|
|
const onCancel = () => {
|
|
|
- show.value = false
|
|
|
|
|
|
|
+ show.value = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const onConfirm = ({ selectedValues: [value] }: PickerConfirmEventParams) => {
|
|
const onConfirm = ({ selectedValues: [value] }: PickerConfirmEventParams) => {
|
|
|
- show.value = false
|
|
|
|
|
- countryCode.value = value.toString()
|
|
|
|
|
|
|
+ show.value = false
|
|
|
|
|
+ countryCode.value = value.toString()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 获取网上开户配置
|
|
// 获取网上开户配置
|
|
@@ -160,17 +164,16 @@ const formRules: { [key: string]: FieldRule[] } = {
|
|
|
required: true,
|
|
required: true,
|
|
|
message: t("user.authentication.pleaseenterthecardnum"),
|
|
message: t("user.authentication.pleaseenterthecardnum"),
|
|
|
validator: (val) => {
|
|
validator: (val) => {
|
|
|
- if (formData.cardtype != 0) {
|
|
|
|
|
- return true
|
|
|
|
|
- } else {
|
|
|
|
|
- if (validateRules.cardno.validate(val)) {
|
|
|
|
|
- if (getIdCardAge(val)) {
|
|
|
|
|
- return t("user.authentication.openfailure")
|
|
|
|
|
- }
|
|
|
|
|
- return true
|
|
|
|
|
- }
|
|
|
|
|
- return validateRules.cardno.message
|
|
|
|
|
|
|
+ // if (getIdCardAge(val)) {
|
|
|
|
|
+ // return t("user.authentication.openfailure")
|
|
|
|
|
+ // }
|
|
|
|
|
+
|
|
|
|
|
+ // 待优化
|
|
|
|
|
+ const enumItem = cerTypePersonList.find((e) => e.enumitemname === formData.cardtype)
|
|
|
|
|
+ if (enumItem) {
|
|
|
|
|
+ return new RegExp(enumItem.param1).test(val) || t('regex.cardno')
|
|
|
}
|
|
}
|
|
|
|
|
+ return t('regex.cardno')
|
|
|
}
|
|
}
|
|
|
}],
|
|
}],
|
|
|
cardbackphotourl: [{
|
|
cardbackphotourl: [{
|