|
@@ -580,7 +580,7 @@
|
|
|
this.$set(this.form, 'quoteEmail', obj.email);
|
|
this.$set(this.form, 'quoteEmail', obj.email);
|
|
|
},
|
|
},
|
|
|
//选择客户回调
|
|
//选择客户回调
|
|
|
- async changeParent(obj) {
|
|
|
|
|
|
|
+ async changeParent(obj,type) {
|
|
|
const { base, other } = await contactDetail(obj.id);
|
|
const { base, other } = await contactDetail(obj.id);
|
|
|
this.form = Object.assign({}, this.form, {
|
|
this.form = Object.assign({}, this.form, {
|
|
|
contactId: base.id,
|
|
contactId: base.id,
|
|
@@ -595,7 +595,9 @@
|
|
|
|
|
|
|
|
this.getLinkInfo(obj.id);
|
|
this.getLinkInfo(obj.id);
|
|
|
this.getBusinessList(base.id);
|
|
this.getBusinessList(base.id);
|
|
|
-
|
|
|
|
|
|
|
+ if(type=='init'){
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
this.$nextTick(() => {
|
|
|
if(this.form.opportunityType==1){
|
|
if(this.form.opportunityType==1){
|
|
|
this.$refs.inventoryTable.putTableValue([])
|
|
this.$refs.inventoryTable.putTableValue([])
|
|
@@ -632,19 +634,19 @@
|
|
|
this.form.quoteAddress = this.enterprisePage[0].address;
|
|
this.form.quoteAddress = this.enterprisePage[0].address;
|
|
|
}
|
|
}
|
|
|
if (this.contactData.id) {
|
|
if (this.contactData.id) {
|
|
|
- this.changeParent({ id: this.contactData.id });
|
|
|
|
|
|
|
+ this.changeParent({ id: this.contactData.id },'init');
|
|
|
}
|
|
}
|
|
|
if (this.businessOpportunityData.id) {
|
|
if (this.businessOpportunityData.id) {
|
|
|
this.form.opportunityId = this.businessOpportunityData.id;
|
|
this.form.opportunityId = this.businessOpportunityData.id;
|
|
|
await this.opportunityChange(this.businessOpportunityData.id);
|
|
await this.opportunityChange(this.businessOpportunityData.id);
|
|
|
this.form.opportunityType = 1;
|
|
this.form.opportunityType = 1;
|
|
|
- this.changeParent({ id: this.businessOpportunityData.contactId });
|
|
|
|
|
|
|
+ this.changeParent({ id: this.businessOpportunityData.contactId },'init');
|
|
|
}
|
|
}
|
|
|
if (row.id) {
|
|
if (row.id) {
|
|
|
this.form.opportunityId = row.id;
|
|
this.form.opportunityId = row.id;
|
|
|
await this.opportunityChange(row.id);
|
|
await this.opportunityChange(row.id);
|
|
|
this.form.opportunityType = 1;
|
|
this.form.opportunityType = 1;
|
|
|
- this.changeParent({ id: row.contactId });
|
|
|
|
|
|
|
+ this.changeParent({ id: row.contactId },'init');
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
this.isUpdate = true;
|
|
this.isUpdate = true;
|