|
@@ -47,7 +47,7 @@ import { getInvoiceTitlePage, createInvoiceTitle, updateInvoiceTitle, deleteInvo
|
|
|
import Snackbar from '@/plugins/snackbar'
|
|
|
import Confirm from '@/plugins/confirm'
|
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
-import { checkUSCI, checkBankNo, checkBankName } from '@/utils/validate'
|
|
|
+import { checkUSCI, checkBankNo, checkBankName, checkAddress } from '@/utils/validate'
|
|
|
|
|
|
const { t } = useI18n()
|
|
|
const total = ref(0)
|
|
@@ -96,7 +96,6 @@ const handleChangeCategory = (categoryType) => { // 0: 个人, 1: 企业
|
|
|
return optionsItem
|
|
|
})
|
|
|
nextTick(() => {
|
|
|
- console.log(1, '23456', arr)
|
|
|
formItems.value.options = arr
|
|
|
})
|
|
|
}
|
|
@@ -170,7 +169,7 @@ const optionsBase = {
|
|
|
outlined: true,
|
|
|
rules: [
|
|
|
value => {
|
|
|
- if (value && checkBankName(value)) return true
|
|
|
+ if (!value || (value && checkBankName(value))) return true
|
|
|
return '请输入正确的开户银行'
|
|
|
}
|
|
|
]
|
|
@@ -185,7 +184,7 @@ const optionsBase = {
|
|
|
outlined: true,
|
|
|
rules: [
|
|
|
value => {
|
|
|
- if (value && checkBankNo(value)) return true
|
|
|
+ if (!value || (value && checkBankNo(value))) return true
|
|
|
return '请输入正确的银行账号'
|
|
|
}
|
|
|
]
|
|
@@ -197,7 +196,13 @@ const optionsBase = {
|
|
|
label: '企业注册地址',
|
|
|
placeholder: '请填写开户许可证上的企业注册地址',
|
|
|
rulesBaseLabel: '企业注册地址',
|
|
|
- outlined: true
|
|
|
+ outlined: true,
|
|
|
+ rules: [
|
|
|
+ value => {
|
|
|
+ if (!value || (value && checkAddress(value))) return true
|
|
|
+ return '请输入正确的注册地址'
|
|
|
+ }
|
|
|
+ ]
|
|
|
},
|
|
|
enterprisePhone: {
|
|
|
type: 'phoneNumber',
|
|
@@ -207,12 +212,6 @@ const optionsBase = {
|
|
|
placeholder: '请填写开户许可证上的企业注册电话',
|
|
|
rulesBaseLabel: '企业注册电话',
|
|
|
outlined: true,
|
|
|
- // rules: [
|
|
|
- // value => {
|
|
|
- // if (value && checkPhone(value)) return true
|
|
|
- // return '请填写正确的电话'
|
|
|
- // }
|
|
|
- // ]
|
|
|
},
|
|
|
certificationTip: {
|
|
|
slotName: 'certificationTip',
|
|
@@ -241,7 +240,7 @@ const business = ref({})
|
|
|
const getEnterpriseBusinessInfo = async () => {
|
|
|
const data = await getEnterpriseBusiness()
|
|
|
if (!data || !Object.keys(data).length) return
|
|
|
- console.log(1, 'business', data)
|
|
|
+ // console.log(1, 'business', data)
|
|
|
business.value = {
|
|
|
title: data.name,
|
|
|
code: data.code,
|