|
@@ -47,7 +47,7 @@ import { getInvoiceTitlePage, createInvoiceTitle, updateInvoiceTitle, deleteInvo
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Confirm from '@/plugins/confirm'
|
|
import Confirm from '@/plugins/confirm'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
-import { checkPhone, checkUSCI } from '@/utils/validate'
|
|
|
|
|
|
+import { checkUSCI, checkBankNo, checkBankName } from '@/utils/validate'
|
|
|
|
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
const total = ref(0)
|
|
const total = ref(0)
|
|
@@ -96,6 +96,7 @@ const handleChangeCategory = (categoryType) => { // 0: 个人, 1: 企业
|
|
return optionsItem
|
|
return optionsItem
|
|
})
|
|
})
|
|
nextTick(() => {
|
|
nextTick(() => {
|
|
|
|
+ console.log(1, '23456', arr)
|
|
formItems.value.options = arr
|
|
formItems.value.options = arr
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -108,10 +109,7 @@ const handleChangeType = (isVerified) => {
|
|
if (e.key === 'title') e.disabled = isVerified
|
|
if (e.key === 'title') e.disabled = isVerified
|
|
if (e.rulesBaseLabel) {
|
|
if (e.rulesBaseLabel) {
|
|
e.label = isVerified ? `${e.rulesBaseLabel} *` : e.rulesBaseLabel
|
|
e.label = isVerified ? `${e.rulesBaseLabel} *` : e.rulesBaseLabel
|
|
- e.rules = isVerified ? [v => !!v || `请输入${e.rulesBaseLabel}`] : []
|
|
|
|
- if (e.key === 'title') {
|
|
|
|
- e.rules = [...e.rules, v => {if (v && checkPhone(v)) return true; return '企业注册电话'}]
|
|
|
|
- }
|
|
|
|
|
|
+ e.rules = isVerified ? [v => !!v || `请输入${e.rulesBaseLabel}`, ...e.rules] : []
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
@@ -169,7 +167,13 @@ const optionsBase = {
|
|
label: '基本开户银行',
|
|
label: '基本开户银行',
|
|
placeholder: '请填写开户许可证上的开户银行',
|
|
placeholder: '请填写开户许可证上的开户银行',
|
|
rulesBaseLabel: '基本开户银行',
|
|
rulesBaseLabel: '基本开户银行',
|
|
- outlined: true
|
|
|
|
|
|
+ outlined: true,
|
|
|
|
+ rules: [
|
|
|
|
+ value => {
|
|
|
|
+ if (value && checkBankName(value)) return true
|
|
|
|
+ return '请输入正确的开户银行'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
enterpriseBankNo: {
|
|
enterpriseBankNo: {
|
|
type: 'number',
|
|
type: 'number',
|
|
@@ -178,7 +182,13 @@ const optionsBase = {
|
|
label: '基本银行账号',
|
|
label: '基本银行账号',
|
|
placeholder: '请填写开户许可证上的银行账号',
|
|
placeholder: '请填写开户许可证上的银行账号',
|
|
rulesBaseLabel: '基本银行账号',
|
|
rulesBaseLabel: '基本银行账号',
|
|
- outlined: true
|
|
|
|
|
|
+ outlined: true,
|
|
|
|
+ rules: [
|
|
|
|
+ value => {
|
|
|
|
+ if (value && checkBankNo(value)) return true
|
|
|
|
+ return '请输入正确的银行账号'
|
|
|
|
+ }
|
|
|
|
+ ]
|
|
},
|
|
},
|
|
enterpriseAddress: {
|
|
enterpriseAddress: {
|
|
type: 'text',
|
|
type: 'text',
|
|
@@ -196,7 +206,13 @@ const optionsBase = {
|
|
label: '企业注册电话',
|
|
label: '企业注册电话',
|
|
placeholder: '请填写开户许可证上的企业注册电话',
|
|
placeholder: '请填写开户许可证上的企业注册电话',
|
|
rulesBaseLabel: '企业注册电话',
|
|
rulesBaseLabel: '企业注册电话',
|
|
- outlined: true
|
|
|
|
|
|
+ outlined: true,
|
|
|
|
+ // rules: [
|
|
|
|
+ // value => {
|
|
|
|
+ // if (value && checkPhone(value)) return true
|
|
|
|
+ // return '请填写正确的电话'
|
|
|
|
+ // }
|
|
|
|
+ // ]
|
|
},
|
|
},
|
|
certificationTip: {
|
|
certificationTip: {
|
|
slotName: 'certificationTip',
|
|
slotName: 'certificationTip',
|
|
@@ -239,8 +255,6 @@ const handleAdd = () => {
|
|
// 初始化表单
|
|
// 初始化表单
|
|
handleChangeCategory(0)
|
|
handleChangeCategory(0)
|
|
handleChangeType(0)
|
|
handleChangeType(0)
|
|
- // 赋值
|
|
|
|
- // setEntPersonBaseInfo()
|
|
|
|
show.value = true
|
|
show.value = true
|
|
editId.value = null
|
|
editId.value = null
|
|
}
|
|
}
|