Sfoglia il codice sorgente

筹建中酒店注册企业

lifanagju_citu 8 mesi fa
parent
commit
67e56c3b97

+ 1 - 1
src/views/recruit/enterprise/register/inReview.vue

@@ -1,6 +1,6 @@
 <!-- 注册企业进度 -->
 <template>
-  <div class="pt-5">
+  <div class="my-5">
     <div :class="isMobile? 'mobileBox' : 'default-width'">
       <v-btn class="my-2" color="primary" variant="text" size="large" @click="router.push('/recruitHome')">{{ `<< 回到首页` }}</v-btn>
     </div>

+ 57 - 9
src/views/recruit/enterprise/register/register.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="pt-5">
+  <div class="my-5">
     <div :class="isMobile? 'mobileBox' : 'default-width'">
       <v-btn class="my-2" color="primary" variant="text" size="large" @click="router.push('/recruitHome')">{{ `<< 回到首页` }}</v-btn>
     </div>
@@ -10,10 +10,21 @@
       </div>
       <!-- 表单 -->
       <div class="CtFormClass" :style="{width: isMobile ? '' : '600px'}">
-        <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;"></CtForm>
+        <CtForm ref="CtFormRef" :items="formItems" style="width: 100%;">
+          <template #prepare>
+            <v-checkbox
+              v-model="isPrepare"
+              label="筹建中"
+              color="primary"
+              class="ml-1"
+              style="width: 150px; max-height: 38px;"
+              @change="isPrepareChange"
+            ></v-checkbox>
+          </template>
+        </CtForm>
         <!-- 上传照片 -->
         <div style="color: var(--color-999);">
-          <span class="mr-1" style="color: var(--v-error-base);">*</span>
+          <span v-if="!isPrepare" class="mr-1" style="color: var(--v-error-base);">*</span>
           <span>上传营业执照</span>
           <!-- <span class="mx-3 defaultLink">查看示例</span> -->
           <span>支持jpg、jpeg、png格式,图片大小不得超过10M</span>
@@ -21,8 +32,7 @@
         <div class="file-box">
           <Img class="mt-3" :value="licenseUrl" tips="上传图片" @imgClick="showPreview = !showPreview" :showCursor="true" @success="val => licenseUrl = val" @delete="licenseUrl = ''"></Img>
         </div>
-        <!-- 注意事项 -->
-        <div class="note mt-15">
+        <div class="note mt-10">
           <h4>注意事项:</h4>
           <span>企业名称为对外展示的企业名称,建议填写公司营业执照上的名称,请区分总公司和分公司</span>
           <!-- <div>
@@ -74,6 +84,16 @@ onMounted(() => {
   isMobile.value = /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(userAgent)
 })
 
+// 是否筹建中
+const isPrepare = ref(false)
+const isPrepareChange = () => {
+  const code = formItems.value.options.find(e => e.key === 'code')
+  if (code) {
+    code.label = isPrepare.value ? '企业统一社会信用代码' : '企业统一社会信用代码 *'
+    code.rules = isPrepare.value ? [] : [v => !!v || '请输入企业统一社会信用代码']
+  }
+}
+
 const formItems = ref({
   options: [
     {
@@ -85,6 +105,7 @@ const formItems = ref({
       rules: [v => !!v || '请输入企业名称']
     },
     {
+      slotName: 'prepare',
       type: 'text',
       key: 'code',
       value: '',
@@ -92,11 +113,20 @@ const formItems = ref({
       label: '企业统一社会信用代码 *',
       rules: [v => !!v || '请输入企业统一社会信用代码']
     },
+    {
+      type: 'text',
+      key: 'contactName',
+      value: '',
+      label: '联系人姓名 *',
+      rules: [v => !!v || '请输入联系人姓名']
+    },
     {
       type: 'phoneNumber',
       key: 'phone',
       value: '',
       label: '联系电话 *',
+      // flexStyle: 'mr-3',
+      // col: 6,
       rules: [v => !!v || '请输入联系电话']
     },
     {
@@ -104,8 +134,19 @@ const formItems = ref({
       key: 'email',
       value: '',
       label: '联系邮箱 *',
+      // col: 6,
       rules: [v => !!v || '请输入联系邮箱']
     },
+    {
+      type: 'textarea',
+      key: 'description',
+      value: '',
+      clearable: true,
+      resize: true,
+      counter: 500,
+      rows: 2,
+      label: '备注/说明 *',
+    },
   ]
 })
 
@@ -117,10 +158,13 @@ const handleCommit = async () => {
   const { valid } = await CtFormRef.value.formRef.validate()
   if (!valid) return
   const businessLicenseUrl = licenseUrl.value;
-  if (!businessLicenseUrl) return Snackbar.warning('请上传营业执照图片')
-  const baseInfo = {}
-  formItems.value.options.forEach(e => { baseInfo[e.key] = e.value })
-  await enterpriseRegisterApply({ ...baseInfo, businessLicenseUrl })
+  if (!isPrepare.value && !businessLicenseUrl) return Snackbar.warning('请上传营业执照图片')
+  const params = {
+    businessLicenseUrl,
+    prepare: isPrepare.value,
+  }
+  formItems.value.options.forEach(e => { params[e.key] = e.value })
+  await enterpriseRegisterApply(params)
   Snackbar.success(t('common.submittedSuccessfully'))
   router.push({ path: '/recruit/enterprise/register/inReview' })
 }
@@ -174,6 +218,10 @@ if (info && Object.keys(info).length) {
     .icon { color: var(--v-error-base); }
   }
 }
+.PrepareBox {
+  margin-top: 74px;
+  margin-left: 32px;
+}
 .mobileBox {
   width: 100vw;
   .resume-header {