| | |
| | | //author : kk |
| | | //self review 更新失败返回的错误信息没有之前class的好。给出的都是意义不明的报错 |
| | | |
| | | import { LightningElement, track, wire , api } from 'lwc'; |
| | | |
| | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.Task = result; |
| | | this.ExistingInquiry().then(result=>{ |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }); |
| | | } |
| | | }).catch(error => { |
| | | console.log("error"); |
| | | console.log(error); |
| | | }); |
| | | |
| | | } |
| | |
| | | await getQuoteIrai({QuoteIraiId : this.Task.QuoteIraiId__c |
| | | }).then(res=>{ |
| | | this.NewTask=res; |
| | | }).catch(err=>{ |
| | | console.log("err:",err.message); |
| | | }); |
| | | |
| | | if(this.NewTask.Lead__c){ |
| | | // Lead作成并更 |
| | | await makeAndUpdateLead({ Lead_c : this.Opportunity.Lead__c, Id : this.NewTask.Id, |
| | | await makeAndUpdateLead({ Lead_c : this.Opportunity.Id, Id : this.NewTask.Lead__c, |
| | | QuoteIraiId__c : this.Task.QuoteIraiId__c |
| | | }).then(res=>{ |
| | | if(res !='success'){ |
| | |
| | | return; |
| | | } |
| | | // 判断报价委托 |
| | | if( this.Task.QuoteIraiId__c != '') { |
| | | if( this.Task.QuoteIraiId__c != '' && this.Task.QuoteIraiId__c!=undefined) { |
| | | // 报价委托作成 |
| | | await makeAndUpdateQuoteIrai({ QuoteIraiStatus : "已有询价", Id : this.Task.QuoteIraiId__c |
| | | }).then(res=>{ |
| | |
| | | |
| | | |
| | | |
| | | } |
| | | } |