|
@@ -10,48 +10,54 @@
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 100%;"></CtForm>
|
|
<CtForm ref="CtFormRef" :items="formItems" style="width: 100%;"></CtForm>
|
|
<!-- 上传照片 -->
|
|
<!-- 上传照片 -->
|
|
<div style="color: #999;">
|
|
<div style="color: #999;">
|
|
- <span class="mr-1" style="color: red;">*</span>
|
|
|
|
|
|
+ <span class="mr-1" style="color: #fe574a;">*</span>
|
|
<span>上传营业执照</span>
|
|
<span>上传营业执照</span>
|
|
- <span class="mx-3 defaultLink">查看示例</span>
|
|
|
|
|
|
+ <!-- <span class="mx-3 defaultLink">查看示例</span> -->
|
|
<span>支持jpg、jpeg、png格式,照片大小不得超过10M</span>
|
|
<span>支持jpg、jpeg、png格式,照片大小不得超过10M</span>
|
|
</div>
|
|
</div>
|
|
- <div class="file-input-box mt-3" @click="openFileInput">
|
|
|
|
- <div class="icon text-center">
|
|
|
|
- <span class="mdi mdi-plus" style="font-size: 20px;"></span>
|
|
|
|
- <div style="font-size: 12px; ">上传照片</div>
|
|
|
|
|
|
+ <div class="file-box">
|
|
|
|
+ <div class="file-item" v-if="licenseUrl">
|
|
|
|
+ <v-img width="100%" height="100%" :src="licenseUrl"></v-img>
|
|
|
|
+ <!-- <v-img width="100%" height="100%" src="http://menduner.citupro.com:6868/admin-api/infra/file/24/get/cd7f5e26a239fb0ab335585e04c709b065f52832fc31539b3a5423224fc6d16c.png"></v-img> -->
|
|
|
|
+ </div>
|
|
|
|
+ <div class="file-item file-input-box" :class="{'verifyAct': fileVerify}" @click="openFileInput">
|
|
|
|
+ <div class="icon text-center">
|
|
|
|
+ <span class="mdi mdi-plus" style="font-size: 20px;"></span>
|
|
|
|
+ <div style="font-size: 12px; ">上传照片</div>
|
|
|
|
+ </div>
|
|
|
|
+ <input
|
|
|
|
+ type="file"
|
|
|
|
+ ref="fileInput"
|
|
|
|
+ accept="image/png, image/jpg, image/jpeg"
|
|
|
|
+ style="display: none;"
|
|
|
|
+ @change="handleUploadFile"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
- <input
|
|
|
|
- type="file"
|
|
|
|
- ref="fileInput"
|
|
|
|
- accept="image/png, image/jpg, image/jpeg"
|
|
|
|
- style="display: none;"
|
|
|
|
- @change="handleUploadFile"
|
|
|
|
- />
|
|
|
|
</div>
|
|
</div>
|
|
<!-- 注意事项 -->
|
|
<!-- 注意事项 -->
|
|
<div class="note mt-5">
|
|
<div class="note mt-5">
|
|
- <h4>注意事项</h4>
|
|
|
|
- <div>1.企业名称为对外展示的企业名称,建议填写公司营业执照上的名称,请区分总公司和分公司</div>
|
|
|
|
- <div>
|
|
|
|
|
|
+ <h4>注意事项:</h4>
|
|
|
|
+ <span>企业名称为对外展示的企业名称,建议填写公司营业执照上的名称,请区分总公司和分公司</span>
|
|
|
|
+ <!-- <div>
|
|
<span>2.若公司已注册,请上传公司委托证明下载模版</span>
|
|
<span>2.若公司已注册,请上传公司委托证明下载模版</span>
|
|
<span class="mx-3 defaultLink">下载模版</span>
|
|
<span class="mx-3 defaultLink">下载模版</span>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="text-center">
|
|
<div class="text-center">
|
|
<!-- 提交 -->
|
|
<!-- 提交 -->
|
|
<v-btn
|
|
<v-btn
|
|
:loading="loginLoading"
|
|
:loading="loginLoading"
|
|
- color="primary" class="white--text mt-8" min-width="350"
|
|
|
|
- to="/enterprise/talentPool"
|
|
|
|
|
|
+ color="primary" class="white--text my-8" min-width="350"
|
|
|
|
+ @click="handleCommit"
|
|
>
|
|
>
|
|
{{ $t('common.complete') }}
|
|
{{ $t('common.complete') }}
|
|
</v-btn>
|
|
</v-btn>
|
|
</div>
|
|
</div>
|
|
- <!-- 底部 -->
|
|
|
|
- <div class="text-center mt-5">
|
|
|
|
- <v-btn color="primary" variant="text" to="/enterprise/joiningEnterprise">{{ $t('enterprise.joiningEnterprise') }}</v-btn>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <!-- 底部 个人不能绑定企业 要去后端管理员加 -->
|
|
|
|
+ <!-- <div class="text-center">
|
|
|
|
+ <v-btn color="primary" variant="text" @click="router.push({ path: '/enterprise/joiningEnterprise' })">{{ $t('enterprise.joiningEnterprise') }}</v-btn>
|
|
|
|
+ </div> -->
|
|
</v-card>
|
|
</v-card>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -61,9 +67,14 @@ import CtForm from '@/components/CtForm'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import Snackbar from '@/plugins/snackbar'
|
|
import { uploadFile } from '@/api/common'
|
|
import { uploadFile } from '@/api/common'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
import { useI18n } from '@/hooks/web/useI18n'
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
|
|
+import { enterpriseRegisterApply } from '@/api/personal/user'
|
|
import { ref } from 'vue';
|
|
import { ref } from 'vue';
|
|
defineOptions({name: 'enterprise-enterpriseRegister-register'})
|
|
defineOptions({name: 'enterprise-enterpriseRegister-register'})
|
|
const { t } = useI18n()
|
|
const { t } = useI18n()
|
|
|
|
+const CtFormRef = ref()
|
|
|
|
+const router = useRouter()
|
|
|
|
+const fileVerify = ref(false)
|
|
const loginLoading = ref(false)
|
|
const loginLoading = ref(false)
|
|
|
|
|
|
const formItems = ref({
|
|
const formItems = ref({
|
|
@@ -109,23 +120,36 @@ const openFileInput = () => {
|
|
fileInput.value.click()
|
|
fileInput.value.click()
|
|
clicked.value = false
|
|
clicked.value = false
|
|
}
|
|
}
|
|
-// 上传头像
|
|
|
|
|
|
+// 上传
|
|
|
|
+let licenseUrl = ref('')
|
|
const handleUploadFile = async (e) => {
|
|
const handleUploadFile = async (e) => {
|
|
const file = e.target.files[0]
|
|
const file = e.target.files[0]
|
|
const formData = new FormData()
|
|
const formData = new FormData()
|
|
formData.append('file', file)
|
|
formData.append('file', file)
|
|
const { data } = await uploadFile(formData)
|
|
const { data } = await uploadFile(formData)
|
|
if (!data) return
|
|
if (!data) return
|
|
- console.log('uploadFile->data', data)
|
|
|
|
|
|
+ licenseUrl.value = data
|
|
|
|
+ fileVerify.value = false
|
|
|
|
+ // console.log('uploadFile->data', data)
|
|
Snackbar.success(t('common.uploadSucMsg'))
|
|
Snackbar.success(t('common.uploadSucMsg'))
|
|
}
|
|
}
|
|
-// 提交
|
|
|
|
-const handleCommit = () => {
|
|
|
|
- // await saveResumeBasicInfo({ ...baseInfo.value, avatar: data })
|
|
|
|
- // await userStore.getUserBaseInfos(baseInfo.value.userId)
|
|
|
|
- // getBasicInfo()
|
|
|
|
|
|
+// 提交 企业注册
|
|
|
|
+const handleCommit = async () => {
|
|
|
|
+ // 广州辞图科技有限公司
|
|
|
|
+ const { valid } = await CtFormRef.value.formRef.validate()
|
|
|
|
+ const businessLicenseUrl = licenseUrl.value; if (!businessLicenseUrl) fileVerify.value = true
|
|
|
|
+ if (!valid || !businessLicenseUrl) return
|
|
|
|
+ const baseInfo = {}
|
|
|
|
+ formItems.value.options.forEach(e => { baseInfo[e.key] = e.value })
|
|
|
|
+ await enterpriseRegisterApply({ ...baseInfo, businessLicenseUrl })
|
|
|
|
+ Snackbar.success(t('common.submittedSuccessfully'))
|
|
|
|
+ router.push({ path: '/enterprise/inReview' })
|
|
|
|
+ // 暂时自动跳转
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ router.push({ path: '/enterprise' })
|
|
|
|
+ }, 8000);
|
|
}
|
|
}
|
|
-handleCommit()
|
|
|
|
|
|
+
|
|
</script>
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.CtFormClass {
|
|
.CtFormClass {
|
|
@@ -136,19 +160,36 @@ handleCommit()
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
line-height: 32px;
|
|
line-height: 32px;
|
|
}
|
|
}
|
|
-.file-input-box {
|
|
|
|
- position: relative;
|
|
|
|
- height: 80px;
|
|
|
|
- width: 100px;
|
|
|
|
- border: 1px solid rgb(188, 188, 188);
|
|
|
|
- border-radius: 5px;
|
|
|
|
- cursor: pointer;
|
|
|
|
- .icon {
|
|
|
|
- position: absolute;
|
|
|
|
- top: 45%;
|
|
|
|
- left: 50%;
|
|
|
|
- transform: translate(-50%, -50%);
|
|
|
|
- color: #999;
|
|
|
|
|
|
+.file-box {
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-wrap: wrap; /* 允许换行 */
|
|
|
|
+ width: 100%; /* 设置容器宽度 */
|
|
|
|
+ .file-item {
|
|
|
|
+ height: 80px;
|
|
|
|
+ width: 100px;
|
|
|
|
+ border-radius: 5px;
|
|
|
|
+ margin-right: 8px;
|
|
|
|
+ margin-top: 12px;
|
|
|
|
+ // border: 1px solid rgb(188, 188, 188);
|
|
|
|
+ border: 1px solid rgba(188, 188, 188, 0.5);
|
|
|
|
+ }
|
|
|
|
+ .file-input-box {
|
|
|
|
+ position: relative;
|
|
|
|
+ border: 1px solid rgb(188, 188, 188);
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ .icon {
|
|
|
|
+ position: absolute;
|
|
|
|
+ top: 45%;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
|
+ color: #999;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ // 验证是否为空
|
|
|
|
+ .verifyAct {
|
|
|
|
+ color: #fe574a;
|
|
|
|
+ border: 1px solid #fe574a;
|
|
|
|
+ .icon { color: #fe574a; }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|