Просмотр исходного кода

fix:修改补充资料查看回显

lazy 1 неделя назад
Родитель
Сommit
e63b0dbb90

+ 6 - 10
src/views/myStoreEnterprise/EnterpriseAddInfo.vue

@@ -35,16 +35,6 @@ export default {
     }
   },
   created() {
-    // this.getDetails()
-
-    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) {
@@ -59,8 +49,14 @@ export default {
     },
     async getDetails(queryId) {
       const res = await getEnterpriseDetail(queryId)
+      const { 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

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

@@ -34,14 +34,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) {
@@ -56,8 +48,14 @@ export default {
     },
     async getDetails(queryId) {
       const res = await getEnterpriseDetail(queryId)
+      const { 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

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

@@ -64,7 +64,7 @@ export default {
     },
     async getDetails(queryId) {
       const res = await getEnterpriseDetail(queryId)
-      const { typeName, code, name  } = this.$route.query
+      const { code, name  } = this.$route.query
 
       if (res.success) {
         this.baseInfo = {