Browse Source

fix: 删除清空之前数据

zh 2 years ago
parent
commit
ecac177ccc
1 changed files with 6 additions and 3 deletions
  1. 6 3
      src/views/commercialEngineering/components/base.vue

+ 6 - 3
src/views/commercialEngineering/components/base.vue

@@ -755,6 +755,9 @@ export default {
       } else {
         this.formData.customerName = ''
         this.formData.customerNumber = ''
+        this.formData.customerLinkName = ''
+        this.formData.customerLinkMobile = ''
+        this.formData.customerAddress = ''
       }
     },
     onSbumit() {},
@@ -799,9 +802,9 @@ export default {
     },
     getHistory(id) {
       getHistory({ customerId: id }).then(res => {
-        this.formData.customerLinkName = res.data.linkName
-        this.formData.customerLinkMobile = res.data.linkMobile
-        this.formData.customerAddress = res.data.address
+        this.formData.customerLinkName = res.data.linkName || ''
+        this.formData.customerLinkMobile = res.data.linkMobile || ''
+        this.formData.customerAddress = res.data.address || ''
       })
     }
   }