|
@@ -107,7 +107,7 @@ const showPreview = ref(false)
|
|
const current = ref(0)
|
|
const current = ref(0)
|
|
const business = ref({})
|
|
const business = ref({})
|
|
let licenseUrl = ref('')
|
|
let licenseUrl = ref('')
|
|
-const email = localStorage.getItem('loginAccount') || ''
|
|
|
|
|
|
+// const email = localStorage.getItem('loginAccount') && checkEmail(localStorage.getItem('loginAccount')) ? localStorage.getItem('loginAccount') : ''
|
|
|
|
|
|
// 组件挂载后添加事件监听器
|
|
// 组件挂载后添加事件监听器
|
|
const isMobile = ref(false)
|
|
const isMobile = ref(false)
|
|
@@ -123,58 +123,6 @@ const showContactList = ref(false)
|
|
const contactInfo = { contactName: '', phone: '', email: '', password: '', passwordConfirm:'' }
|
|
const contactInfo = { contactName: '', phone: '', email: '', password: '', passwordConfirm:'' }
|
|
let contactList = [{ ...contactInfo }]
|
|
let contactList = [{ ...contactInfo }]
|
|
const contactCopy = ref([])
|
|
const contactCopy = ref([])
|
|
-const contactSubmit = () => {
|
|
|
|
- let falseValueIndex = null
|
|
|
|
- let falseKey = null
|
|
|
|
- contactCopy.value.forEach((e, index) => {
|
|
|
|
- if (falseValueIndex !== null) return
|
|
|
|
- if (e && Object.keys(e).length) {
|
|
|
|
- Object.keys(e).forEach(key => {
|
|
|
|
- if (falseValueIndex !== null) return
|
|
|
|
- if (!e[key]) {
|
|
|
|
- falseValueIndex = index
|
|
|
|
- falseKey = key
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- if (e.password && e.passwordConfirm && e.password !== e.passwordConfirm)
|
|
|
|
- falseValueIndex = index
|
|
|
|
- falseKey = 'compareFalse'
|
|
|
|
- })
|
|
|
|
- const textList = {
|
|
|
|
- contactName: '姓名',
|
|
|
|
- phone: '联系电话',
|
|
|
|
- email: '企业邮箱',
|
|
|
|
- password: '登录密码',
|
|
|
|
- passwordConfirm: '登录密码',
|
|
|
|
- }
|
|
|
|
- if (falseValueIndex || falseValueIndex === 0) {
|
|
|
|
- //
|
|
|
|
- let text = ''
|
|
|
|
- if (falseKey === 'compareFalse') {
|
|
|
|
- text = falseValueIndex ? `【联系人${falseValueIndex}】两次输入的密码不一致` : `【管理员】两次输入的密码不一致`
|
|
|
|
- } else {
|
|
|
|
- text = falseValueIndex ? `请完善联系人${falseValueIndex}的【${textList[falseKey]}】` : `请完善管理员的【${textList[falseKey]}】`
|
|
|
|
- }
|
|
|
|
- Confirm(t('common.confirmTitle'), text, { hideCancelBtn: true })
|
|
|
|
- return
|
|
|
|
- }
|
|
|
|
- contactList = [...contactCopy.value]
|
|
|
|
- showContactList.value = false
|
|
|
|
- saveRegisterInfo()
|
|
|
|
-}
|
|
|
|
-const handleAddContact = () => {
|
|
|
|
- contactCopy.value = [...contactList]
|
|
|
|
- showContactList.value = true
|
|
|
|
-}
|
|
|
|
-const addMore = () => {
|
|
|
|
- contactCopy.value.push({...contactInfo})
|
|
|
|
-}
|
|
|
|
-const delContact = (index) => {
|
|
|
|
- Confirm('系统提示', `是否确认删除${index ? `联系人${index}` : '管理员'}?`).then(async () => {
|
|
|
|
- contactCopy.value.splice(index, 1)
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
|
|
|
|
// 注册信息保存
|
|
// 注册信息保存
|
|
const enterpriseRegisterInfo = ref(localStorage.getItem('enterpriseRegisterInfo') ? JSON.parse(localStorage.getItem('enterpriseRegisterInfo')) : {})
|
|
const enterpriseRegisterInfo = ref(localStorage.getItem('enterpriseRegisterInfo') ? JSON.parse(localStorage.getItem('enterpriseRegisterInfo')) : {})
|
|
@@ -334,7 +282,6 @@ const handleCommit = async () => {
|
|
// 不通过的企业注册申请 重新发起
|
|
// 不通过的企业注册申请 重新发起
|
|
const failureReason = ref('')
|
|
const failureReason = ref('')
|
|
const info = JSON.parse(localStorage.getItem('userApplyInfo'))
|
|
const info = JSON.parse(localStorage.getItem('userApplyInfo'))
|
|
-console.log(1, '23456', info)
|
|
|
|
// 审核不通过的数据回显
|
|
// 审核不通过的数据回显
|
|
if (info && Object.keys(info).length && info.status === '2') {
|
|
if (info && Object.keys(info).length && info.status === '2') {
|
|
failureReason.value = info?.reason || ''
|
|
failureReason.value = info?.reason || ''
|
|
@@ -364,6 +311,60 @@ if (info && Object.keys(info).length && info.status === '2') {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+// 多个联系人提交保存
|
|
|
|
+const contactSubmit = () => {
|
|
|
|
+ let falseValueIndex = null
|
|
|
|
+ let falseKey = null
|
|
|
|
+ contactCopy.value.forEach((e, index) => {
|
|
|
|
+ if (falseValueIndex !== null) return
|
|
|
|
+ if (e && Object.keys(e).length) {
|
|
|
|
+ Object.keys(e).forEach(key => {
|
|
|
|
+ if (falseValueIndex !== null) return
|
|
|
|
+ if (!e[key]) {
|
|
|
|
+ falseValueIndex = index
|
|
|
|
+ falseKey = key
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ if (e.password && e.passwordConfirm && e.password !== e.passwordConfirm)
|
|
|
|
+ falseValueIndex = index
|
|
|
|
+ falseKey = 'compareFalse'
|
|
|
|
+ })
|
|
|
|
+ const textList = {
|
|
|
|
+ contactName: '姓名',
|
|
|
|
+ phone: '联系电话',
|
|
|
|
+ email: '企业邮箱',
|
|
|
|
+ password: '登录密码',
|
|
|
|
+ passwordConfirm: '登录密码',
|
|
|
|
+ }
|
|
|
|
+ if (falseValueIndex || falseValueIndex === 0) {
|
|
|
|
+ //
|
|
|
|
+ let text = ''
|
|
|
|
+ if (falseKey === 'compareFalse') {
|
|
|
|
+ text = falseValueIndex ? `【联系人${falseValueIndex}】两次输入的密码不一致` : `【管理员】两次输入的密码不一致`
|
|
|
|
+ } else {
|
|
|
|
+ text = falseValueIndex ? `请完善联系人${falseValueIndex}的【${textList[falseKey]}】` : `请完善管理员的【${textList[falseKey]}】`
|
|
|
|
+ }
|
|
|
|
+ Confirm(t('common.confirmTitle'), text, { hideCancelBtn: true })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ contactList = [...contactCopy.value]
|
|
|
|
+ showContactList.value = false
|
|
|
|
+ saveRegisterInfo()
|
|
|
|
+}
|
|
|
|
+const handleAddContact = () => {
|
|
|
|
+ contactCopy.value = [...contactList]
|
|
|
|
+ showContactList.value = true
|
|
|
|
+}
|
|
|
|
+const addMore = () => {
|
|
|
|
+ contactCopy.value.push({...contactInfo})
|
|
|
|
+}
|
|
|
|
+const delContact = (index) => {
|
|
|
|
+ Confirm('系统提示', `是否确认删除${index ? `联系人${index}` : '管理员'}?`).then(async () => {
|
|
|
|
+ contactCopy.value.splice(index, 1)
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
+
|
|
const contactNameObj = {
|
|
const contactNameObj = {
|
|
type: 'text',
|
|
type: 'text',
|
|
key: 'contactName',
|
|
key: 'contactName',
|
|
@@ -382,7 +383,8 @@ const phoneObj = {
|
|
const emailObj = {
|
|
const emailObj = {
|
|
type: 'text',
|
|
type: 'text',
|
|
key: 'email',
|
|
key: 'email',
|
|
- value: email ? email : '',
|
|
|
|
|
|
+ value: '',
|
|
|
|
+ // value: email ? email : '',
|
|
label: '企业邮箱 *(此邮箱将用于日后“登录邮箱”)',
|
|
label: '企业邮箱 *(此邮箱将用于日后“登录邮箱”)',
|
|
// label: '企业邮箱 * (此邮箱将作为企业登录的账号)',
|
|
// label: '企业邮箱 * (此邮箱将作为企业登录的账号)',
|
|
rules: [
|
|
rules: [
|
|
@@ -434,6 +436,7 @@ const passwordConfirmObj = {
|
|
},
|
|
},
|
|
],
|
|
],
|
|
}
|
|
}
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|