Переглянути джерело

fix:修改企业补充资料回显

lazy 5 днів тому
батько
коміт
65ddda2590

+ 3 - 2
src/views/myStoreEnterprise/EnterpriseAddInfo.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="enterprise-supplement">
-    <basic-info ref="baseInfo" :base-info="baseInfo" class="base-info" />
+    <basic-info ref="baseInfoRef" :base-info="baseInfo" class="base-info" />
     <PersonInfo ref="legalPersonInfoRef" :regionList="regionList" :person-type="'legal'" :details-info="legalPersonInfo" class="legal-info" />
     <PersonInfo ref="controlPersonInfoRef" :regionList="regionList" :person-type="'control'" :details-info="controlPersonInfo" />
     <ContactInfo ref="contactInfoRef" :details-info="contactInfo" />
@@ -104,13 +104,14 @@ export default {
       const contactReqParams = {
         ...contactParams
       }
-
+      const baseInfoParams = await this.$refs.baseInfoRef.getPrams(type)
       const supParams = {
         Loading: true,
         companyId: this.$route.query.id,
         ...legalReqParams,
         ...controlReqParams,
         ...contactReqParams,
+        companyType: baseInfoParams.companyType,
         fileIds,
         flag: type === 'temp' ? 0 : 1
       }

+ 6 - 5
src/views/myStoreEnterprise/EnterpriseEdit.vue

@@ -1,9 +1,9 @@
 <template>
   <div class="enterprise-edit">
-    <basic-info ref="baseInfo" :base-info="baseInfo" />
-    <PersonInfo ref="legalPersonInfoRef" :regionList="regionList" :person-type="'legal'" :details-info="legalPersonInfo" />
-    <PersonInfo ref="controlPersonInfoRef" :regionList="regionList" :person-type="'control'" :details-info="controlPersonInfo" />
-    <ContactInfo ref="contactInfoRef" :details-info="contactInfo" />
+    <basic-info ref="baseInfoRef" :base-info="baseInfo" />
+    <PersonInfo ref="legalPersonInfoRef" :regionList="regionList" :person-type="'legal'" :details-info="legalPersonInfo" style="margin-top: 20px;" />
+    <PersonInfo ref="controlPersonInfoRef" :regionList="regionList" :person-type="'control'" :details-info="controlPersonInfo" style="margin-top: 20px;" />
+    <ContactInfo ref="contactInfoRef" :details-info="contactInfo" style="margin-top: 20px;" />
     <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>
@@ -101,13 +101,14 @@ export default {
       const contactReqParams = {
         ...contactParams
       }
-
+      const baseInfoParams = await this.$refs.baseInfoRef.getPrams(type)
       const supParams = {
         Loading: true,
         companyId: this.$route.query.id,
         ...legalReqParams,
         ...controlReqParams,
         ...contactReqParams,
+        companyType: baseInfoParams.companyType,
         fileIds,
         flag: type === 'temp' ? 0 : 1
       }

+ 7 - 8
src/views/myStoreEnterprise/EnterpriseView.vue

@@ -50,14 +50,6 @@ export default {
     }
   },
   created() {
-    const { typeName, code, name  } = this.$route.query
-
-    this.baseInfo = {
-      typeName: typeName || '',
-      socialCreditCode: code || '',
-      enterpriseName: name || ''
-    }
-
     this.queryReginList()
 
     if (this.$route.query.id && this.$route.query.companyZrId) {
@@ -72,8 +64,15 @@ export default {
     },
     async getDetails(queryId) {
       const res = await getEnterpriseDetail(queryId)
+      const { typeName, code, name  } = this.$route.query
 
       if (res.success) {
+        this.baseInfo = {
+          companyType: res.data.companyZrVo.companyType || '',
+          socialCreditCode: code || '',
+          enterpriseName: name || ''
+        }
+
         this.legalPersonInfo = res.data.companyZrVo
         this.controlPersonInfo =  res.data.companyZrVo
         this.contactInfo = res.data.companyZrVo