Parcourir la source

Merge branch 'dev' of http://222.90.211.174:3000/suf/domestic--e-commerc-c into dev

sufan il y a 1 semaine
Parent
commit
9339f4cd70

+ 1 - 1
src/api/myAccount/myAccount.js

@@ -21,7 +21,7 @@ export function password(params) {
 // 邮箱绑定
 export function emailBind(params) {
   return request({
-    url: '/common/mail/codeTest',
+    url: '/customer/restMail',
     method: 'get',
     params
   })

+ 25 - 0
src/api/myStoreEnterprise.js

@@ -69,3 +69,28 @@ export function getEnterpriseDetail(params) {
     method: 'get'
   })
 }
+
+// 获取企业认证授权书信息
+export function getAuthBooksList(params) {
+  return request({
+    url: `/companyZr/stepTwoView/${params}`,
+    method: 'get'
+  })
+}
+
+// 刷新授权书状态
+export function refreshAuthStatus(params) {
+  return request({
+    url: `/companyZr/flushCreditSignStatus/${params}`,
+    method: 'get'
+  })
+}
+
+// 企业准入第二步骤
+export function enterpriseAccessStepTwo(data) {
+  return request({
+    url: '/companyZr/stepTwo',
+    method: 'post',
+    data
+  })
+}

+ 21 - 12
src/views/myStoreEnterprise/EnterpriseAddInfo.vue

@@ -7,7 +7,7 @@
     <div class="submit-btn">
       <el-button @click="() => { $router.push({ name: 'MyStoreEnterprise', query: { activeName: 'enterprise' } }) }">关闭</el-button>
       <el-button type="primary" @click="submitClick('temp')">暂存</el-button>
-      <el-button type="primary" @click="submitClick('submit')">提交</el-button>
+      <el-button type="primary" @click="submitClick('submit')">下一步</el-button>
     </div>
   </div>
 </template>
@@ -15,7 +15,7 @@
 <script>
 import { getRegion } from '@/api/dictionary'
 import { treeChildrenEmpty } from '@/utils'
-import { enterpriseAccessStepOne, getEnterpriseDetail } from '@/api/myStoreEnterprise';
+import { enterpriseAccessStepOne, getEnterpriseDetail } from '@/api/myStoreEnterprise'
 
 
 export default {
@@ -69,7 +69,7 @@ export default {
     async submitClick(type) {
       const fileIds = []
       const legalParams = await this.$refs.legalPersonInfoRef.getParams(type)
-
+      console.log(legalParams)
       const legalReqParams = {
         legalPerson: legalParams.legalName || '', // 法人姓名
         legalPersonBirthday: legalParams.bornDate || '', // 法人出生日期
@@ -85,7 +85,7 @@ export default {
       fileIds.push(legalParams.cardFrontId, legalParams.cardBackId, legalParams.creditId)
 
       const controlParams = await this.$refs.controlPersonInfoRef.getParams(type)
-
+      console.log(controlParams)
       const controlReqParams = {
         realControlPerson: controlParams.legalName || '', // 实控人姓名
         realControlPersonBirthday: controlParams.bornDate || '', // 实控人出生日期
@@ -106,6 +106,7 @@ export default {
       }
 
       const supParams = {
+        Loading: true,
         companyId: this.$route.query.id,
         ...legalReqParams,
         ...controlReqParams,
@@ -118,17 +119,25 @@ export default {
         supParams.companyZrId = this.$route.query.companyZrId
       }
 
-      if (type === 'temp') {
-        const res = await enterpriseAccessStepOne(supParams)
+      const res = await enterpriseAccessStepOne(supParams)
 
-        if (res.success) {
-          this.$message.success('操作成功')
+      if (res.success) {
+        this.$message.success('操作成功')
+        if (type === 'temp') {
           this.$router.go(-1)
+        } else if (type === 'submit') {
+          if (res.data.redNo) {
+            this.$router.go(-1)
+          } else {
+            this.$router.push({
+              name: 'StoreEnterpriseAuth',
+              query: {
+                zrId: res.data.companyZrId,
+                taskId: res.data.taskId
+              }
+            })
+          }
         }
-      } else if (type === 'submit') {
-        this.$router.push({
-          name: 'StoreEnterpriseAuth'
-        })
       }
     }
   }

+ 31 - 22
src/views/myStoreEnterprise/EnterpriseAuth.vue

@@ -9,8 +9,7 @@
 </template>
 
 <script>
-// import { queryParent } from '@/utils';
-
+import { getAuthBooksList, enterpriseAccessStepTwo } from '@/api/myStoreEnterprise';
 
 export default {
   name: 'MyBusinessProjectAuth',
@@ -19,34 +18,44 @@ export default {
   },
   data() {
     return {
-      authBookInfo: [
-        {
-          contractType: 0,
-          contractName: '测试合同名称',
-          shortAuthUrl: 'http://www.baidu.com'
-        },
-        {
-          contractType: 1,
-          contractName: '测试合同名称1',
-          shortAuthUrl: 'http://www.baidu.com'
-        },
-        {
-          contractType: 2,
-          contractName: '测试合同名称2',
-          shortAuthUrl: 'http://www.baidu.com'
-        }
-      ]
+      authBookInfo: []
     }
   },
   created() {
-    // this.getDetails()
+    if (this.$route.query.zrId) {
+      this.getDetails(this.$route.query.zrId)
+    }
   },
   methods: {
-    getDetails() {
-      // const { id } = this.$route.query
+    async getDetails(id) {
+      const res = await getAuthBooksList(id)
+
+      if (res.success) {
+        this.authBookInfo = res.data
+      }
     },
     async submitClick(submitType) {
+      const params = {
+        Loading: true,
+        companyZrId: this.$route.query.zrId,
+        taskId:  this.$route.query.taskId,
+        flag: '通过'
+      }
 
+      const authBooksList = await this.$refs.authBookRef.getParams(submitType)
+
+      if (authBooksList.length === this.authBookInfo.length) {
+        const res = await enterpriseAccessStepTwo(params)
+
+        if (res.success) {
+          this.$message.success('操作成功')
+
+          this.$router.push({
+            name: 'MyStoreEnterprise',
+            query: { activeName: 'enterprise' }
+          })
+        }
+      }
     }
   }
 }

+ 94 - 28
src/views/myStoreEnterprise/EnterpriseReInvite.vue

@@ -1,60 +1,126 @@
 <template>
   <div class="enterprise-edit">
     <basic-info ref="baseInfo" :base-info="baseInfo" />
-    <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" />
-    <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" />
-    <AuthBook ref="authBookRef" :details-info="authBookInfo" />
+    <PersonInfo ref="legalPersonInfoRef" :person-type="'legal'" :details-info="legalPersonInfo" :regionList="regionList" />
+    <PersonInfo ref="controlPersonInfoRef" :person-type="'control'" :details-info="controlPersonInfo" :regionList="regionList" />
+    <ContactInfo ref="contactInfoRef" :details-info="contactInfo" />
     <div class="submit-btn">
       <el-button @click="() => { $router.push({ name: 'MyStoreEnterprise', query: { activeName: 'enterprise' } }) }">关闭</el-button>
       <el-button type="primary" @click="submitClick('temp')">暂存</el-button>
-      <el-button type="primary" @click="submitClick('submit')">提交</el-button>
+      <el-button type="primary" @click="submitClick('submit')">下一步</el-button>
     </div>
   </div>
 </template>
 
 <script>
-// import { queryParent } from '@/utils';
-
+import { getRegion } from '@/api/dictionary'
+import { treeChildrenEmpty } from '@/utils'
+import { enterpriseAccessStepOne } from '@/api/myStoreEnterprise'
 
 export default {
-  name: 'MyBusinessProjectEdit',
+  name: 'MyEnterpriseReInvite',
   components: {
     BasicInfo: () => import('./components/BasicInfo'),
     PersonInfo: () => import('./components/PersonInfo.vue'),
-    AuthBook: () => import('./components/AuthBook')
+    ContactInfo: () => import('./components/ContactInfo.vue')
   },
   data() {
     return {
       baseInfo: {},
       legalPersonInfo: {},
       controlPersonInfo: {},
-      authBookInfo: [
-        {
-          contractType: 0,
-          contractName: '测试合同名称',
-          shortAuthUrl: 'http://www.baidu.com'
-        },
-        {
-          contractType: 1,
-          contractName: '测试合同名称1',
-          shortAuthUrl: 'http://www.baidu.com'
-        },
-        {
-          contractType: 2,
-          contractName: '测试合同名称2',
-          shortAuthUrl: 'http://www.baidu.com'
-        }
-      ]
+      contactInfo: {},
+      regionList: []
     }
   },
   created() {
-    // this.getDetails()
+    const { typeName, code, name  } = this.$route.query
+
+    this.baseInfo = {
+      typeName: typeName || '',
+      socialCreditCode: code || '',
+      enterpriseName: name || ''
+    }
+
+    this.queryReginList()
   },
   methods: {
-    getDetails() {
-      // const { id } = this.$route.query
+    async queryReginList() {
+      getRegion({ flag: false }).then(({ data }) => {
+        this.regionList = treeChildrenEmpty(data)
+      })
     },
     async submitClick(type) {
+      const fileIds = []
+      const legalParams = await this.$refs.legalPersonInfoRef.getParams(type)
+
+      const legalReqParams = {
+        legalPerson: legalParams.legalName || '', // 法人姓名
+        legalPersonBirthday: legalParams.bornDate || '', // 法人出生日期
+        legalPersonPhone: legalParams.phoneNumber || '', // 法人手机号码
+        legalPersonCard: legalParams.personCard || '', // 法人身份证号
+        legalPersonEmail: legalParams.email || '', // 法人邮箱
+        legalPersonProvince: legalParams.cascaderAddress[0] || '', // 省code
+        legalPersonCity: legalParams.cascaderAddress[1] || '',  // 市code
+        legalPersonCounty: legalParams.cascaderAddress[2] || '', // 区code
+        legalPersonAddress: legalParams.contactAddress || '', // 法人身份证地址
+        legalPersonLiveAddress: legalParams.inputAddress || '' // 详细地址
+      }
+      fileIds.push(legalParams.cardFrontId, legalParams.cardBackId, legalParams.creditId)
+
+      const controlParams = await this.$refs.controlPersonInfoRef.getParams(type)
+
+      const controlReqParams = {
+        realControlPerson: controlParams.legalName || '', // 实控人姓名
+        realControlPersonBirthday: controlParams.bornDate || '', // 实控人出生日期
+        realControlPersonPhone: controlParams.phoneNumber || '', // 实控人手机号码
+        realControlPersonCard: controlParams.personCard || '', // 实控人身份证号
+        realControlPersonEmail: controlParams.email || '', // 法人邮箱
+        realControlPersonProvince: controlParams.cascaderAddress[0] || '', // 省code
+        realControlPersonCity: controlParams.cascaderAddress[1] || '',  // 市code
+        realControlPersonCounty: controlParams.cascaderAddress[2] || '', // 区code
+        realControlPersonAddress: controlParams.contactAddress || '', // 法人身份证地址
+        realControlPersonLiveAddress: controlParams.inputAddress || '' // 详细地址
+      }
+      fileIds.push(controlParams.cardFrontId, controlParams.cardBackId, controlParams.creditId)
+
+      const contactParams = await this.$refs.contactInfoRef.getParams(type)
+      const contactReqParams = {
+        ...contactParams
+      }
+
+      const supParams = {
+        companyId: this.$route.query.id,
+        ...legalReqParams,
+        ...controlReqParams,
+        ...contactReqParams,
+        fileIds,
+        flag: type === 'temp' ? 0 : 1
+      }
+
+      if (this.$route.query.companyZrId) {
+        supParams.companyZrId = this.$route.query.companyZrId
+      }
+
+      const res = await enterpriseAccessStepOne(supParams)
+
+      if (res.success) {
+        this.$message.success('操作成功')
+        if (type === 'temp') {
+          this.$router.go(-1)
+        } else if (type === 'submit') {
+          if (res.data.redNo) {
+            this.$router.go(-1)
+          } else {
+            this.$router.push({
+              name: 'StoreEnterpriseAuth',
+              query: {
+                taskId: res.data.taskId
+              }
+            })
+          }
+        }
+      }
     }
   }
 }

+ 1 - 2
src/views/myStoreEnterprise/EnterpriseView.vue

@@ -77,8 +77,7 @@ export default {
         this.legalPersonInfo = res.data.companyZrVo
         this.controlPersonInfo =  res.data.companyZrVo
         this.contactInfo = res.data.companyZrVo
-        // this.authBookInfo = res.data.companyZrCreditVOList || []
-        this.authBookInfo = []
+        this.authBookInfo = res.data.companyZrCreditVOList || []
       }
     },
     async submitClick(type) {

+ 33 - 27
src/views/myStoreEnterprise/components/AuthBook.vue

@@ -3,14 +3,14 @@
     <cy-info-title>
       授权书
       <template #right>
-        <el-button v-if="!disabled" type="text" @click="refreshAuthStatus">刷新授权状态</el-button>
+        <el-button v-if="!disabled" type="text" @click="handleRefresh">刷新授权状态</el-button>
       </template>
     </cy-info-title>
 
     <div v-for="(item, index) in deatailList" :key="index" class="sign-link-box">
-      <div class="main-title">{{ getContractTypeDesc(item.contractType) }}</div>
+      <div class="main-title">{{ getContractTypeDesc(item.type) }}</div>
       <div class="sign-item">
-        <div class="name">{{ item.contractName }}</div>
+        <div class="name">{{ item.name }}</div>
         <div class="title">
           <div>认证链接</div>
           <div>签署链接</div>
@@ -19,9 +19,9 @@
           <div class="two-link">
             <div>
               <div style="overflow: hidden;text-overflow: ellipsis; white-space: no-wrap;">
-                {{ item.shortAuthUrl }}
+                {{ item.authShortUrl }}
               </div>
-              <el-button v-clipboard:copy="item.shortAuthUrl" v-clipboard:success="copySuccess" type="text" icon="iconfont icon-a-Group779" />
+              <el-button v-if="!disabled" v-clipboard:copy="item.authShortUrl" v-clipboard:success="copySuccess" type="text" icon="iconfont icon-a-Group779" />
             </div>
             <div>
               <div>
@@ -32,10 +32,11 @@
           <div class="two-link">
             <div>
               <div style="overflow: hidden;text-overflow: ellipsis; white-space: no-wrap;">
-                {{ item.shortContractLink }}
+                {{ item.creditShortUrl }}
               </div>
               <el-button
-                v-clipboard:copy="item.shortContractLink"
+                v-if="!disabled"
+                v-clipboard:copy="item.creditShortUrl"
                 v-clipboard:success="copySuccess"
                 type="text"
                 icon="iconfont icon-a-Group779"
@@ -43,7 +44,7 @@
             </div>
             <div>
               <div>
-                签署状态: {{ getSignStatusDesc(item.signStatus) }}
+                签署状态: {{ getSignStatusDesc(item.creditSignStatus) }}
               </div>
             </div>
           </div>
@@ -74,6 +75,7 @@
 
 <script>
 import { cloneDeep } from '@/utils'
+import { refreshAuthStatus } from '@/api/myStoreEnterprise'
 
 export default {
   props: {
@@ -103,11 +105,11 @@ export default {
           console.log(val)
           this.deatailList = val
 
-          this.deatailList.forEach((el) => {
-            const faceTemp = []
-            faceTemp.push(el.faceFile)
-            el.faceFile = faceTemp
-          })
+          // this.deatailList.forEach((el) => {
+          //   const faceTemp = []
+          //   faceTemp.push(el.faceFile)
+          //   el.faceFile = faceTemp
+          // })
         }
       },
       immediate: true
@@ -115,8 +117,12 @@ export default {
   },
   methods: {
     // 刷新授信状态
-    refreshAuthStatus() {
-      this.$emit('refreshAuth', this.authBookId)
+    async handleRefresh() {
+      const res = await refreshAuthStatus(this.$route.query.zrId)
+
+      if (res.success) {
+        this.deatailList = res.data
+      }
     },
     copySuccess() {
       this.$message.success('复制成功')
@@ -124,8 +130,8 @@ export default {
     getContractTypeDesc(type) {
       const map = {
         0: '企业征信查询授权书',
-        1: '人征信查询授权书',
-        2: '个人综合信息查询授权书'
+        1: '人征信查询授权书',
+        2: '实控人征信查询授权书'
       }
       return map[type] || ''
     },
@@ -139,9 +145,9 @@ export default {
       }
     },
     getAuthStatusDesc(status) {
-      if (status === false) {
+      if (status === 0) {
         return '未认证'
-      } else if (status === true) {
+      } else if (status === 1) {
         return '已认证'
       } else {
         return ''
@@ -151,17 +157,17 @@ export default {
       return new Promise((resolve) => {
         const cloneDetailList = cloneDeep(this.deatailList)
         // 校验状态 -- 必须是已签署且已认证 才可以提交
-        if (this.deatailList.length) {
-          cloneDetailList.forEach((el, index) => {
-            if (el.faceFile.length > 0) {
-              el.faceFile = el.faceFile[0]
-            }
-          })
-        }
+        // if (this.deatailList.length) {
+        //   cloneDetailList.forEach((el, index) => {
+        //     if (el.faceFile.length > 0) {
+        //       el.faceFile = el.faceFile[0]
+        //     }
+        //   })
+        // }
         if (type === 'temp') {
           resolve(cloneDetailList)
         } else {
-          const list = cloneDetailList.filter(item => item.signStatus === true && item.authStatus === true)
+          const list = cloneDetailList.filter(item => item.authStatus === 1 && item.creditSignStatus === true)
           if (list.length === 0) {
             this.$message.error('必须是已签署且已认证的授权书')
             return

+ 42 - 14
src/views/myStoreEnterprise/components/Enterprise.vue

@@ -57,6 +57,8 @@ export default {
       },
       transCodeList: [],
       total: 0,
+      page: 1,
+      size: 10,
       loading: false,
       tableData: [],
       tableOptions: {
@@ -166,13 +168,21 @@ export default {
             return true
           }
           return false
+        } else if (category === 'supInformation') {
+          if (row.redNo === null && row.zrStatus === null && row.taskName === null) {
+            return true
+          } else if (row.redNo === null && row.zrStatus === null && row.taskName === '签署征信授权书') {
+            return true
+          }
+          return false
         } else if (category === 'edit') {
-          if (row.taskId !== null) {
+          if (row.taskName === '填写企业资料' && row.taskId !== null) {
             return true
           }
           return false
         } else if (category === 'reAdd') {
-          if (row.taskId !== null) {
+          // TODO: 是否超过30天状态
+          if (row.redNo === 1 && row.zrStatus === 0 && row.taskId === null) {
             return true
           }
           return false
@@ -213,31 +223,49 @@ export default {
     },
     handlerOperate(type, row, msg) {
       if (type === 'supInformation') {
+        if (row.taskName === '签署征信授权书') {
+          this.$router.push({
+            name: 'StoreEnterpriseAuth',
+            query: {
+              zrId: row.companyZrId,
+              taskId: row.taskId
+            }
+          })
+        } else {
+          this.$router.push({
+            name: 'StoreEnterpriseSupplement',
+            query: {
+              type: 'supInfo',
+              id: row.id,
+              typeName: row.type,
+              name: row.name,
+              code: row.code,
+              companyZrId: row.companyZrId
+            }
+          })
+        }
+      } else if (type === 'edit') {
         this.$router.push({
-          name: 'StoreEnterpriseSupplement',
+          name: 'StoreEnterpriseEdit',
           query: {
-            type: 'supInfo',
+            type: 'edit',
             id: row.id,
             typeName: row.type,
             name: row.name,
             code: row.code,
             companyZrId: row.companyZrId
-          },
-        })
-      } else if (type === 'edit') {
-        this.$router.push({
-          name: 'StoreEnterpriseEdit',
-          query: {
-            type: 'edit',
-            id: row.id
           }
         })
       } else if (type === 'reAdd') {
         this.$router.push({
           name: 'StoreEnterpriseReInvite',
           query: {
-            type: 'edit',
-            id: row.id
+            type: 'reAdd',
+            id: row.id,
+            typeName: row.type,
+            name: row.name,
+            code: row.code,
+            companyZrId: row.companyZrId
           }
         })
       } else if (type === 'see') {

+ 9 - 10
src/views/myStoreEnterprise/components/PersonInfo.vue

@@ -275,17 +275,16 @@ export default {
         const fileFrontList = this.$refs['idcardStorage_front'].getFileLists
         const fileBackList = this.$refs['idcardStorage_back'].getFileLists
         const creditList = this.$refs.creditFileRef.getFileLists
-
+        if (fileFrontList && fileFrontList.length) {
+          reqParams.cardFrontId = fileFrontList[0].id
+        }
+        if (fileBackList && fileBackList.length) {
+          reqParams.cardBackId = fileBackList[0].id
+        }
+        if (creditList && creditList.length) {
+          reqParams.creditId = creditList[0].id
+        }
         if (type === 'temp') {
-          if (fileFrontList && fileFrontList.length) {
-            reqParams.cardFrontId = fileFrontList[0].id
-          }
-          if (fileBackList && fileBackList.length) {
-            reqParams.cardBackId = fileBackList[0].id
-          }
-          if (creditList && creditList.length) {
-            reqParams.creditId = creditList[0].id
-          }
           resolve(reqParams)
         } else {
           if (fileFrontList && fileFrontList.length === 0) {

+ 1 - 1
src/views/myStoreEnterprise/components/Store.vue

@@ -188,7 +188,7 @@ export default {
     ...mapGetters(['constant']),
     tablePower() {
       return ({ item, row }) => {
-        const { rowPower, category } = item
+        const { category } = item
         if (category === 'unBindEnterprise') {
           if (row.code !== null) {
             return true

+ 2 - 10
src/views/personalCenter/components/PersonalInformation.vue

@@ -97,7 +97,7 @@
         label-width="150px"
         class="rule-form-orange"
       >
-        <el-form-item label="手机号码" style="width: 100%" class="form-required">
+        <!-- <el-form-item label="手机号码" style="width: 100%" class="form-required">
           <el-input v-model="ruleForm.emailMobile" placeholder="请输入手机号码" disabled>
             <template #append>
               <verification-code :code="ruleForm.emailMobile" type="phone" module="emailBind" placeholder="请输入手机号码" />
@@ -109,7 +109,7 @@
             v-model="ruleForm.emailPhoneCode"
             placeholder="请输入验证码"
           />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="邮箱地址" style="width: 100%" class="form-required">
           <el-input v-model="ruleForm.email" placeholder="请输入邮箱地址">
             <template #append>
@@ -307,14 +307,6 @@ export default {
       })
     },
     emailAdd() {
-      if (!this.ruleForm.emailMobile) {
-        this.$message.warning('请输入手机号码')
-        return
-      }
-      if (!this.ruleForm.emailPhoneCode) {
-        this.$message.warning('请输入验证码')
-        return
-      }
       if (!this.ruleForm.email) {
         this.$message.warning('请输入邮箱地址')
         return