| New file |
| | |
| | | //author :kkbes |
| | | public with sharing class LexLeadRequestController { |
| | | |
| | | |
| | | @AuraEnabled |
| | | public static Lead init(String recordId){ |
| | | Lead res = new Lead(); |
| | | |
| | | try{ |
| | | res=[SELECT Id,Status,Tender_information__c FROM Lead WHERE Id = : recordId ]; |
| | | } |
| | | catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | |
| | | return res; |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | //author : kkbes forbutton NewIntention 经销商询价对象 |
| | | public with sharing class LexNewIntentionController { |
| | | |
| | | @AuraEnabled |
| | | public static Agency_Opportunity__c init(String recordId){ |
| | | Agency_Opportunity__c res = new Agency_Opportunity__c(); |
| | | try{ |
| | | res = [Select Id,Is_Transformed__c,Department_Class_Opp_Name__c, |
| | | Department_Name_Text__c,StageName__c,Close_Forecasted_Date__c, |
| | | Name,Purchase_Reason__c,Fund_Basis__c,Purchase_Type__c, |
| | | Sales_Method__c,Request__c,Request_Detail__c |
| | | FROM Agency_Opportunity__c |
| | | WHERE Id = : recordId]; |
| | | |
| | | } |
| | | catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | |
| | | } |
| | | |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> getAccountByLongName(String Name){ |
| | | try{ |
| | | List<Account> res = [Select id, name From Account WHERE Name = : Name]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> getAccountByShortName(String Name){ |
| | | try{ |
| | | List<Account> res = [Select id, name From Account WHERE Name = : Name]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return null; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | // author:kkbes for 产品检索 的修理报价预估按钮 |
| | | public with sharing class LexRepairQuoteController { |
| | | |
| | | |
| | | @AuraEnabled |
| | | public static Product2__c init(String recordId){ |
| | | try{ |
| | | Product2__c res = [SELECT id, Name FROM Product2__c WHERE Id = : recordId]; |
| | | return res; |
| | | } |
| | | catch (Exception e) { |
| | | |
| | | } |
| | | return null; |
| | | |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | <template> |
| | | |
| | | </template> |
| New file |
| | |
| | | // author : kkbes |
| | | |
| | | import { LightningElement, track, wire,api } from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | const event = new ShowToastEvent({ |
| | | title: '意向已结束', |
| | | message: |
| | | '意向已结束不能做报价委托', |
| | | }); |
| | | import init from '@salesforce/apex/LexLeadRequestController.init'; |
| | | |
| | | export default class lexLeadQuotationRequest extends LightningElement { |
| | | |
| | | |
| | | |
| | | @api recordId; |
| | | Lead; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | connectedCallback(){ |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.Lead = result; |
| | | console.log(this.Lead); |
| | | console.log(this.Lead.Status == '未跟进'); |
| | | this.QuotationRequest(); |
| | | } |
| | | }).catch(error => { |
| | | console.log("error"); |
| | | console.log(error); |
| | | }); |
| | | |
| | | } |
| | | |
| | | |
| | | async QuotationRequest(){ |
| | | if( this.Lead.Status == '未跟进'){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | window.open("/apex/NewQuoteIrai?leadid="+ this.Lead.Id +"&tenderid="+ this.Lead.Tender_information__c); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexLeadQuotationRequest"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |