Forráskód Böngészése

企业注册,企业注册审批逻辑

lifanagju_citu 1 éve
szülő
commit
d2d4e83add

+ 3 - 3
src/layout/personal/navBar.vue

@@ -143,9 +143,9 @@ const changeLoginType = async () => {
 // 查看用户是否有在申请中的数据
 const getApplyInfo = async () => {
   const data = await getUserRegisterEnterpriseApply()
-  const path = ref('')
-  if (data && Object.keys(data).length) path.value = '/enterprise/inReview' // 已经有数据说明已经申请过了
-  else path.value = '/enterprise/register'
+  const bool = data && Object.keys(data).length // 已经有数据说明已经申请过了
+  localStorage.setItem('userApplyInfo', JSON.stringify(data))
+  const path = bool ? '/enterprise/inReview' : '/enterprise/register'
   router.push({ path })
 }
 

+ 1 - 0
src/locales/en.js

@@ -11,6 +11,7 @@ export default {
     complete: 'Complete',
     saveMsg: 'Save successful',
     toHome: 'Go back to the homepage',
+    resubmit: 'Resubmit',
     submittedSuccessfully: 'Submitted successful',
     switchSuccessful: 'Switch successful',
     addMsg: 'New successfully added',

+ 1 - 0
src/locales/zh-CN.js

@@ -11,6 +11,7 @@ export default {
     complete: '完成',
     saveMsg: '保存成功',
     toHome: '回到首页',
+    resubmit: '重新提交',
     submittedSuccessfully: '提交成功',
     switchSuccessful: '切换成功',
     addMsg: '新增成功',

+ 41 - 7
src/views/enterprise/components/inReview.vue

@@ -2,14 +2,41 @@
   <div class="pt-5">
     <v-card class="default-width pa-5">
       <div style="width: 600px;margin: 80px auto;">
-        <div>您的申请正在审核中,审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收</div>
-        <div class="mt-5">
-          <span>提交时间:</span>
-          <span>{{ commitTime }}</span>
+
+        <!-- 提交企业注册以后跳转显示页面 -->
+        <div v-if="!info || !Object.keys(info).length">
+          <span>提交成功,审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收</span>
+        </div>
+
+        <!-- 等待审核 -->
+        <div v-else-if="status === '0'">
+          <span>您的申请正在审核中,审核时间在1~3个工作日内,申请结果会以短信方式通知到您的手机上,请注意查收</span>
+          <div class="mt-5">
+            <span>提交时间:{{ commitTime }}</span>
+          </div>
+        </div>
+
+        <!-- 审核不通过 -->
+        <div v-else-if="status === '2'">
+          <div class="mb-3" style="color: red;">审核不通过</div>
+          <div class="mb-3">原因:{{ reason }}</div>
+          <div v-if="remark">备注:{{ remark }}</div>
+          <div class="mt-5">
+            <span>更新时间:{{ updateTime }}</span>
+          </div>
+          <div class="mt-5">
+            <span>提交时间:{{ commitTime }}</span>
+          </div>
         </div>
+
+        <!-- 审核通过(审核通过不会进入此页面) -->
+        <div v-else-if="status === '1'">
+          <span>审核通过</span>
+        </div>
+        
         <div class="text-center">
-          <!-- <v-btn class="mt-10" color="warning" @click="router.push({ path: '/' })">{{ $t('common.toHome') }}</v-btn> -->
           <v-btn class="mt-16" color="warning" to="/">{{ $t('common.toHome') }}</v-btn>
+          <v-btn class="mt-16 ml-12" color="success" to="/enterprise/register">{{ $t('common.resubmit') }}</v-btn>
         </div>
       </div>
     </v-card>
@@ -18,10 +45,17 @@
 
 <script setup>
 import { ref } from 'vue';
-
+import { timesTampChange } from '@/utils/date'
 defineOptions({name: 'enterprise-enterpriseRegister-inReview'})
 
-const commitTime = ref(new Date())
+
+const info = JSON.parse(localStorage.getItem('userApplyInfo'))
+console.log('info', info)
+const commitTime = ref(info?.createTime ? timesTampChange(info.createTime) : null) // 创建时间
+const updateTime = ref(info?.createTime ? timesTampChange(info.updateTime) : null) // 更新时间
+const status = ref(info?.status) // 帐号状态(0正常 1停用 2 等待审核 3不通过) // 审核状态
+const reason = ref(info?.reason) // 审核原因
+const remark = ref(info?.remark) // 备注
 </script>
 <style lang="scss" scoped>
 </style>

+ 0 - 4
src/views/enterprise/components/register.vue

@@ -143,10 +143,6 @@ const handleCommit = async () => {
   await enterpriseRegisterApply({ ...baseInfo, businessLicenseUrl })
   Snackbar.success(t('common.submittedSuccessfully'))
   router.push({ path: '/enterprise/inReview' })
-  // 暂时自动跳转
-  setTimeout(() => {
-    router.push({ path: '/enterprise' })
-  }, 8000);
 }
 
 </script>