|
@@ -66,16 +66,19 @@
|
|
<div style="min-height: 50vh;">
|
|
<div style="min-height: 50vh;">
|
|
<div>
|
|
<div>
|
|
<div v-for="(item, index) in contactCopy" :key="index" class="contactItemCard">
|
|
<div v-for="(item, index) in contactCopy" :key="index" class="contactItemCard">
|
|
- <div class="mb-3 pl-3" style="font-size: 13px; color: 00897B; border-left: 5px solid #00897B;">{{ index ? '联系人' + index : '管理员' }}</div>
|
|
|
|
|
|
+ <div class="d-flex justify-space-between pb-2">
|
|
|
|
+ <div class="mb-3 pl-3" style="font-size: 13px; color: 00897B; border-left: 5px solid #00897B;">{{ index ? '联系人' + index : '管理员' }}</div>
|
|
|
|
+ <v-btn v-if="index" color="error" density="compact" variant="text" @click="delContact(index)">删除</v-btn>
|
|
|
|
+ <div v-else style="font-size: 12px; color: #999">不可删除</div>
|
|
|
|
+ </div>
|
|
<TextUI v-model="item.contactName" :item="{...contactNameObj}"></TextUI>
|
|
<TextUI v-model="item.contactName" :item="{...contactNameObj}"></TextUI>
|
|
<TextUI v-model="item.phone" :item="{...phoneObj}"></TextUI>
|
|
<TextUI v-model="item.phone" :item="{...phoneObj}"></TextUI>
|
|
<TextUI v-model="item.email" :item="{...emailObj}"></TextUI>
|
|
<TextUI v-model="item.email" :item="{...emailObj}"></TextUI>
|
|
- <TextUI v-model="item.password" :item="{...passwordObj}" @blur="passwordChange(item)"></TextUI>
|
|
|
|
- <TextUI v-model="item.passwordConfirm" :item="{...passwordConfirmObj}" @blur="passwordChange(item)"></TextUI>
|
|
|
|
- <v-btn v-if="index" style="width: 100%; text-align: center;" variant="text" color="error" @click="delContact(index)">删除</v-btn>
|
|
|
|
|
|
+ <TextUI v-model="item.password" :item="{...passwordObj}"></TextUI>
|
|
|
|
+ <TextUI v-model="item.passwordConfirm" :item="{...passwordConfirmObj}"></TextUI>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <v-btn class="mb-5 mt-3" style="width: 100%; text-align: center;" variant="text" color="primary" prepend-icon="mdi-plus-box" @click="addMore">继续添加</v-btn>
|
|
|
|
|
|
+ <v-btn class="mb-5 mt-3" style="width: 100%; text-align: center;" color="primary" prepend-icon="mdi-plus-box" @click="addMore">继续添加</v-btn>
|
|
</div>
|
|
</div>
|
|
</CtDialog>
|
|
</CtDialog>
|
|
</div>
|
|
</div>
|
|
@@ -116,19 +119,6 @@ onMounted(() => {
|
|
import { useRoute } from 'vue-router'; const route = useRoute()
|
|
import { useRoute } from 'vue-router'; const route = useRoute()
|
|
const pageType = route?.query?.type || '' // type: noLoginToRegister:->登录页注册企业
|
|
const pageType = route?.query?.type || '' // type: noLoginToRegister:->登录页注册企业
|
|
|
|
|
|
-// const handleSecondConfirm = (value, item) => {
|
|
|
|
-// debugger
|
|
|
|
-// // const obj = formItems.value.options.find(e => e.key === 'passwordConfirm')
|
|
|
|
-// item.type = item.type === 'password' ? 'text' : 'password'
|
|
|
|
-// item.appendInnerIcon = item.type === 'password' ? 'mdi-eye-off-outline' : 'mdi-eye-outline'
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
-// const handlePassword = (value, item) => {
|
|
|
|
-// // const obj = formItems.value.options.find(e => e.key === 'password')
|
|
|
|
-// item.type = item.type === 'password' ? 'text' : 'password'
|
|
|
|
-// item.appendInnerIcon = item.type === 'password' ? 'mdi-eye-off-outline' : 'mdi-eye-outline'
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
const showContactList = ref(false)
|
|
const showContactList = ref(false)
|
|
const contactInfo = { contactName: '', phone: '', email: '', password: '', passwordConfirm:'' }
|
|
const contactInfo = { contactName: '', phone: '', email: '', password: '', passwordConfirm:'' }
|
|
let contactList = [{ ...contactInfo }]
|
|
let contactList = [{ ...contactInfo }]
|
|
@@ -147,6 +137,9 @@ const contactSubmit = () => {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if (e.password && e.passwordConfirm && e.password !== e.passwordConfirm)
|
|
|
|
+ falseValueIndex = index
|
|
|
|
+ falseKey = 'compareFalse'
|
|
})
|
|
})
|
|
const textList = {
|
|
const textList = {
|
|
contactName: '姓名',
|
|
contactName: '姓名',
|
|
@@ -156,7 +149,13 @@ const contactSubmit = () => {
|
|
passwordConfirm: '登录密码',
|
|
passwordConfirm: '登录密码',
|
|
}
|
|
}
|
|
if (falseValueIndex || falseValueIndex === 0) {
|
|
if (falseValueIndex || falseValueIndex === 0) {
|
|
- const text = falseValueIndex ? `请完善联系人${falseValueIndex}的【${textList[falseKey]}】` : `请完善管理员的【${textList[falseKey]}】`
|
|
|
|
|
|
+ //
|
|
|
|
+ let text = ''
|
|
|
|
+ if (falseKey === 'compareFalse') {
|
|
|
|
+ text = falseValueIndex ? `【联系人${falseValueIndex}】两次输入的密码不一致` : `【管理员】两次输入的密码不一致`
|
|
|
|
+ } else {
|
|
|
|
+ text = falseValueIndex ? `请完善联系人${falseValueIndex}的【${textList[falseKey]}】` : `请完善管理员的【${textList[falseKey]}】`
|
|
|
|
+ }
|
|
Confirm(t('common.confirmTitle'), text, { hideCancelBtn: true })
|
|
Confirm(t('common.confirmTitle'), text, { hideCancelBtn: true })
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -172,15 +171,10 @@ const addMore = () => {
|
|
contactCopy.value.push({...contactInfo})
|
|
contactCopy.value.push({...contactInfo})
|
|
}
|
|
}
|
|
const delContact = (index) => {
|
|
const delContact = (index) => {
|
|
- Confirm('系统提示', '是否确认删除?').then(async () => {
|
|
|
|
|
|
+ Confirm('系统提示', `是否确认删除${index ? `联系人${index}` : '管理员'}?`).then(async () => {
|
|
contactCopy.value.splice(index, 1)
|
|
contactCopy.value.splice(index, 1)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-const passwordChange = (item) => {
|
|
|
|
- if (item.password && item.passwordConfirm && item.password !== item.passwordConfirm) {
|
|
|
|
- Snackbar.warning('两次输入的密码不一致')
|
|
|
|
- }
|
|
|
|
-}
|
|
|
|
|
|
|
|
// 注册信息保存
|
|
// 注册信息保存
|
|
const enterpriseRegisterInfo = ref(localStorage.getItem('enterpriseRegisterInfo') ? JSON.parse(localStorage.getItem('enterpriseRegisterInfo')) : {})
|
|
const enterpriseRegisterInfo = ref(localStorage.getItem('enterpriseRegisterInfo') ? JSON.parse(localStorage.getItem('enterpriseRegisterInfo')) : {})
|
|
@@ -340,14 +334,20 @@ 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 || ''
|
|
licenseUrl.value = info?.businessLicenseUrl
|
|
licenseUrl.value = info?.businessLicenseUrl
|
|
|
|
+ contactList = info?.contacts.map(e => {
|
|
|
|
+ e.passwordConfirm = e.password
|
|
|
|
+ return e
|
|
|
|
+ }) || [{ ...contactInfo }]
|
|
// prepareValue.value = info?.prepare || false
|
|
// prepareValue.value = info?.prepare || false
|
|
formItems.value.options.forEach(e => {
|
|
formItems.value.options.forEach(e => {
|
|
- if (e.key === 'passwordConfirm') e.value = info.password
|
|
|
|
- else e.value = info[e.key]
|
|
|
|
|
|
+ // if (e.key === 'passwordConfirm') e.value = info.password
|
|
|
|
+ // else e.value = info[e.key]
|
|
|
|
+ e.value = info[e.key]
|
|
})
|
|
})
|
|
isPrepareChange()
|
|
isPrepareChange()
|
|
} else {
|
|
} else {
|