Handy_Cao 1 ano atrás
pai
commit
1bab3bca6b

+ 4 - 1
src/business/user/address.ts

@@ -1,9 +1,10 @@
 import { shallowRef, reactive, computed } from 'vue'
 import { useDataTable } from '@/hooks/datatable'
-import { useLoginStore } from '@/stores'
+import { useLoginStore, useUserStore } from '@/stores'
 import { queryUserReceiveInfo, userReceiveInfo, delUserReceiveInfo, userReceiveIsDefault } from '@/services/api/user'
 import { getCertificateTypeList, getSCertificateTypeList } from '@/constants/certificate'
 
+const { getSystemParamValue } = useUserStore()
 const loginStore = useLoginStore()
 
 export function useAddress() {
@@ -35,6 +36,7 @@ export function useAddressForm(selectedRow?: Model.UserReceiveInfoRsp) {
     const loading = shallowRef(false)
     const certificateTypeList = getCertificateTypeList()
     const scertificateTypeList = getSCertificateTypeList()
+    const system_1010 = shallowRef(getSystemParamValue('1010') ?? '1')
 
     const formData = reactive<Proto.UserReceiveInfoReq>({
         ReceiveInfoId: 0,
@@ -118,5 +120,6 @@ export function useAddressForm(selectedRow?: Model.UserReceiveInfoRsp) {
         addOrUpdate,
         deleteAddress,
         updateAddressIsDefault,
+        system_1010
     }
 }

+ 2 - 1
src/packages/mobile/components/base/calendar/index.vue

@@ -15,11 +15,12 @@
 import { shallowRef, PropType, onMounted, computed } from 'vue'
 import { Calendar, CalendarType } from 'vant'
 import moment from 'moment'
+import { i18n } from "@/stores";
 
 const props = defineProps({
     title: {
         type: String,
-        default: '查询日期'
+        default: i18n.global.t('common.calendar')
     },
     type: {
         type: String as PropType<CalendarType>,

+ 1 - 1
src/packages/mobile/views/bank/sign/components/edit/Index.vue

@@ -164,7 +164,7 @@ const onSearchBankChange = (item: Model.BankBranChnumInfoRsp) => {
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
     OpenBankAccId: [{
-        message: '请选择银行信息',
+        message: t('banksign.tips11'),
         validator: () => {
             return !!formData.OpenBankAccId
         }

+ 14 - 5
src/packages/mobile/views/mine/address/components/edit/Index.vue

@@ -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: [{