|
|
@@ -56,7 +56,7 @@ const props = defineProps({
|
|
|
}
|
|
|
})
|
|
|
|
|
|
-const { formData, regionName, addOrUpdate, deleteAddress } = useAddressForm(props.selectedRow)
|
|
|
+const { formData, regionName, addOrUpdate, deleteAddress, system_1010 } = useAddressForm(props.selectedRow)
|
|
|
const formRef = shallowRef<FormInstance>()
|
|
|
const showModal = shallowRef(true)
|
|
|
const refresh = shallowRef(false) // 是否刷新父组件数据
|
|
|
@@ -71,10 +71,19 @@ const formRules: { [key in keyof Proto.UserReceiveInfoReq | 'Region']?: FieldRul
|
|
|
required: true,
|
|
|
message: t('mine.address.tips2'),
|
|
|
validator: (val) => {
|
|
|
- if (validateRules.phone.validate(val)) {
|
|
|
- return true
|
|
|
- }
|
|
|
- return validateRules.phone.message
|
|
|
+ /// 值为”0“ 时 只校验长度20位,不限字符
|
|
|
+ if (system_1010.value === '0') {
|
|
|
+ if (val.length <= 20) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return t('banksign.tips6')
|
|
|
+ } else {
|
|
|
+ /// 不存在或值为空或”1“时,根据国内手机号校验11位
|
|
|
+ if (validateRules.phone.validate(val)) {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return validateRules.phone.message
|
|
|
+ }
|
|
|
}
|
|
|
}],
|
|
|
Region: [{
|