Explorar o código

fix: 删除清空之前数据

zh %!s(int64=2) %!d(string=hai) anos
pai
achega
ecac177ccc
Modificáronse 1 ficheiros con 6 adicións e 3 borrados
  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 || ''
       })
     }
   }