| New file |
| | |
| | | public with sharing class AccountDelayApplyController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | |
| | | try { |
| | | Account report = [SELECT Id,Name,Is_Active__c,Grade__c,Alias_Name2__c,Abbreviation__c,Attribute_Type__c |
| | | ,Postal_Code__c,Speciality_Type__c,State_Master__c,Town__c,City_Master__c,Address__c,Street__c |
| | | ,Field3_companyname__c,WhetherRiskPassing__c,RejectionReason__c,AssociatedHospital__c,Site |
| | | FROM Account WHERE Id = :recordId]; |
| | | List<Account_Delay_Apply__c> AccQuery = [SELECT id FROM Account_Delay_Apply__c WHERE Is_Active__c = '申请中' and Hospital__c = :recordId]; |
| | | res.accId = report.Id; |
| | | res.accname = report.Name; |
| | | res.status = report.Is_Active__c; |
| | | res.accgrade = report.Grade__c; |
| | | res.AliasName2 = report.Alias_Name2__c; |
| | | res.Abbreviation = report.Abbreviation__c; |
| | | res.AttributeType = report.Attribute_Type__c; |
| | | res.PostalCode = report.Postal_Code__c; |
| | | res.SpecialityType = report.Speciality_Type__c; |
| | | res.StateMaster = report.State_Master__c; |
| | | res.Town = report.Town__c; |
| | | res.CityMaster = report.City_Master__c; |
| | | res.Address = report.Address__c; |
| | | res.Street = report.Street__c; |
| | | res.Field3companyname = report.Field3_companyname__c; |
| | | res.WhetherRiskPassing = report.WhetherRiskPassing__c; |
| | | res.RejectionReason = report.RejectionReason__c; |
| | | res.AssociatedHospital = report.AssociatedHospital__c; |
| | | res.Site = report.Site; |
| | | res.shengId = report.State_Master__c; |
| | | res.shiId = report.City_Master__c; |
| | | |
| | | res.AccSize = AccQuery; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String accId; |
| | | @AuraEnabled |
| | | public String accname; |
| | | @AuraEnabled |
| | | public String status; |
| | | @AuraEnabled |
| | | public String accgrade; |
| | | @AuraEnabled |
| | | public String AliasName2; |
| | | @AuraEnabled |
| | | public String Abbreviation; |
| | | @AuraEnabled |
| | | public String AttributeType; |
| | | @AuraEnabled |
| | | public String PostalCode; |
| | | @AuraEnabled |
| | | public String SpecialityType; |
| | | @AuraEnabled |
| | | public String StateMaster; |
| | | @AuraEnabled |
| | | public String Town; |
| | | @AuraEnabled |
| | | public String CityMaster; |
| | | @AuraEnabled |
| | | public String Address; |
| | | @AuraEnabled |
| | | public String Street; |
| | | @AuraEnabled |
| | | public String Field3companyname; |
| | | @AuraEnabled |
| | | public String WhetherRiskPassing; |
| | | @AuraEnabled |
| | | public String RejectionReason; |
| | | @AuraEnabled |
| | | public String AssociatedHospital; |
| | | @AuraEnabled |
| | | public String Site; |
| | | @AuraEnabled |
| | | public String shengId; |
| | | @AuraEnabled |
| | | public String shiId; |
| | | @AuraEnabled |
| | | public List<Account_Delay_Apply__c> AccSize; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class AgencyContractCloneController { |
| | | @AuraEnabled |
| | | public static InitData init(){ |
| | | InitData res = new initData(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |
| | | User userinfo = [SELECT Id,ProfileId FROM User WHERE Id = :myUserID LIMIT 1]; |
| | | res.Id = userinfo.Id; |
| | | res.ProfileId = userinfo.ProfileId; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string Id; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class CustomLink2AdvancePaymentController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId) { |
| | | InitData res = new initData(); |
| | | try { |
| | | Account report = [SELECT Id,Name,FirstParagraph__c,MonthlyPayment__c FROM Account WHERE Id = :recordId]; |
| | | res.RecordTypeId = Schema.SObjectType.Advance_Payment__c.getRecordTypeInfosByDeveloperName().get('FirstParagraphChange').getRecordTypeId(); |
| | | res.Name = report.Name; |
| | | res.FirstParagraph = report.FirstParagraph__c; |
| | | res.MonthlyPayment = report.MonthlyPayment__c; |
| | | List<Advance_Payment__c> records = [SELECT id,Status__c FROM Advance_Payment__c WHERE Account__c =:recordId and RecordType.Id = :res.RecordTypeId and Status__c in ('草案中','已提交','批准中')]; |
| | | res.records = records; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public Boolean FirstParagraph; |
| | | @AuraEnabled |
| | | public Boolean MonthlyPayment; |
| | | @AuraEnabled |
| | | public List<Advance_Payment__c> records; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class DealerVisitDetailsController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |
| | | User userinfo = [SELECT id,ProfileId FROM User WHERE Id = :myUserID LIMIT 1]; |
| | | Account report = [SELECT Id,RecordTypeId,Department_Class_Label__c,Name,Hospital_Department_Class__c FROM Account WHERE Id = :recordId]; |
| | | res.ProfileId = userinfo.ProfileId; |
| | | res.RecordTypeId = report.RecordTypeId; |
| | | res.DepartmentClassLabel = report.Department_Class_Label__c; |
| | | res.Name = report.Name; |
| | | res.HospitalDepartmentClass = report.Hospital_Department_Class__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | @AuraEnabled |
| | | public string RecordTypeId; |
| | | @AuraEnabled |
| | | public string DepartmentClassLabel; |
| | | @AuraEnabled |
| | | public string Name; |
| | | @AuraEnabled |
| | | public string HospitalDepartmentClass; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class HosipitalToDeptController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try { |
| | | Account report = [SELECT Id, |
| | | GI_Main__c, |
| | | BF_owner__c, |
| | | ET_owner__c, |
| | | SP_Main__c, |
| | | URO_owner_ID__c, |
| | | GYN_owner__c, |
| | | ENT_owner_ID__c, |
| | | Tender_information__c, |
| | | Is_upload_file__c, |
| | | Name, |
| | | Attribute_Type__c FROM Account WHERE Id = :recordId]; |
| | | res.GiMain = report.GI_Main__c; |
| | | res.BFowner = report.BF_owner__c; |
| | | res.ETowner = report.ET_owner__c; |
| | | res.SPMain = report.SP_Main__c; |
| | | res.UROownerID = report.URO_owner_ID__c; |
| | | res.GYNowner = report.GYN_owner__c; |
| | | res.ENTownerID = report.ENT_owner_ID__c; |
| | | res.SoakupHPDeptTeam = System.Label.Confirm_SoakupHPDeptTeam; |
| | | res.Tenderinformation = report.Tender_information__c; |
| | | res.Isuploadfile = report.Is_upload_file__c; |
| | | res.Name = report.Name; |
| | | res.AttributeType = report.Attribute_Type__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | @AuraEnabled |
| | | public static string updataAccount(String recordId,Boolean HosipitalToDept){ |
| | | Account a = new Account(); |
| | | try { |
| | | a.Id = recordId; |
| | | a.HosipitalToDept__c = HosipitalToDept; |
| | | update a; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return 'ok'; |
| | | } |
| | | @AuraEnabled |
| | | public static string submitApproval(String recordId){ |
| | | try { |
| | | Approval.ProcessSubmitRequest psr = new Approval.ProcessSubmitRequest(); |
| | | psr.setObjectId(recordId); |
| | | Approval.ProcessResult submitResult = Approval.process(psr); |
| | | return 'ok'; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string GiMain; |
| | | @AuraEnabled |
| | | public string BFowner; |
| | | @AuraEnabled |
| | | public string ETowner; |
| | | @AuraEnabled |
| | | public string SPMain; |
| | | @AuraEnabled |
| | | public string UROownerID; |
| | | @AuraEnabled |
| | | public string GYNowner; |
| | | @AuraEnabled |
| | | public string ENTownerID; |
| | | @AuraEnabled |
| | | public string SoakupHPDeptTeam; |
| | | @AuraEnabled |
| | | public string Tenderinformation; |
| | | @AuraEnabled |
| | | public Boolean Isuploadfile; |
| | | @AuraEnabled |
| | | public string Name; |
| | | @AuraEnabled |
| | | public string AttributeType; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class MonthlyClaimsChangeController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId) { |
| | | InitData res = new initData(); |
| | | |
| | | try { |
| | | Account report = [SELECT Id,DealerTypeSum__c,MonthlyPayment__c,Name FROM Account WHERE Id = :recordId]; |
| | | res.RecordTypeId = Schema.SObjectType.Advance_Payment__c.getRecordTypeInfosByDeveloperName().get('MonthlyPaymentChange').getRecordTypeId(); |
| | | res.MonthlyPayment = report.MonthlyPayment__c; |
| | | res.DealerTypeSum = report.DealerTypeSum__c; |
| | | res.Name = report.Name; |
| | | List<Advance_Payment__c> sql = [SELECT id,Status__c FROM Advance_Payment__c WHERE Account__c = :recordId and RecordTypeId = :res.RecordTypeId and Status__c in ('草案中','已提交','批准中')]; |
| | | res.records = sql; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public Boolean MonthlyPayment; |
| | | @AuraEnabled |
| | | public String DealerTypeSum; |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | @AuraEnabled |
| | | public List<Advance_Payment__c> records; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class NewAgencyContractController { |
| | | |
| | | @AuraEnabled |
| | | public static UserResult UserInfo_Owner() { |
| | | UserResult result = new UserResult(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |
| | | User tempUser = [select Id,ProfileId from user where id = : myUserID ]; |
| | | result.id = tempUser.Id; |
| | | result.RecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContract').getRecordTypeId(); |
| | | result.ProfileId = tempUser.ProfileId; |
| | | } catch (exception e) { |
| | | result.result = e.getMessage(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public class UserResult { |
| | | @AuraEnabled |
| | | public string result; |
| | | public UserResult( ) { |
| | | result = 'Success'; |
| | | } |
| | | @AuraEnabled |
| | | public string id; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class QuolifiedApplySPOController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |
| | | Account report = [SELECT Id,Is_Active__c FROM Account WHERE Id = :recordId]; |
| | | User userinfo = [SELECT id,ProfileId,Job_Category__c FROM User WHERE Id = :myUserID LIMIT 1]; |
| | | res.IsActive = report.Is_Active__c; |
| | | res.ProfileId = userinfo.ProfileId; |
| | | res.JobCategory = userinfo.Job_Category__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static String updata(String recordId){ |
| | | Account rac = new Account(); |
| | | try { |
| | | rac.Id = recordId; |
| | | rac.Quolified_Approve_Status__c = '已提交至SPO'; |
| | | rac.If_Qualifying__c = true; |
| | | rac.If_Need_Quolified__c = true; |
| | | update rac; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return 'ok'; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string IsActive; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | @AuraEnabled |
| | | public string JobCategory; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class SubmitAndRefreshController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId) { |
| | | InitData res = new initData(); |
| | | |
| | | try { |
| | | Account_Delay_Apply__c report = [SELECT Id,Is_upload_file__c,HospitalName__c,Attribute_Type__c FROM Account_Delay_Apply__c WHERE Id = :recordId]; |
| | | res.Isuploadfile = report.Is_upload_file__c; |
| | | res.HospitalName = report.HospitalName__c; |
| | | res.AttributeType = report.Attribute_Type__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public Boolean Isuploadfile; |
| | | @AuraEnabled |
| | | public String HospitalName; |
| | | @AuraEnabled |
| | | public String AttributeType; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class toBatchOwnerController { |
| | | @AuraEnabled |
| | | public static string ProfileId(){ |
| | | Profile p = [select Id from Profile where id =:System.Label.ProfileId_SystemAdmin]; |
| | | try { |
| | | |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return p.Id; |
| | | } |
| | | @AuraEnabled |
| | | public static InitData TypeId(){ |
| | | InitData res = new initData(); |
| | | try { |
| | | res.RecordTypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId(); |
| | | |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| New file |
| | |
| | | .AccountDelayApply{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="AccountDelayApply" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/AccountDelayApplyController.init'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | export default class LexAccountDelayApplyButton extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | label; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | console.log("进入页面111111"); |
| | | console.log("进入页面111111" + this.recordId); |
| | | init({recordId:this.recordId}).then(result=>{ |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if(result.AccSize.length > 0){ |
| | | this.showToast('存在申请中的客户变更申请,无法再次提交变更申请。','error') |
| | | return |
| | | } |
| | | if(result.status == '有効'){ |
| | | const data = encodeDefaultFieldValues({ |
| | | Hospital__c:this.recordId, |
| | | Grade__c:result.accgrade, |
| | | HospitalName__c:result.accname, |
| | | Alias_Name2__c:result.AliasName2, |
| | | Abbreviation_old__c:result.Abbreviation, |
| | | Abbreviation__c:result.AttributeType, |
| | | Postal_Code__c:result.PostalCode, |
| | | Speciality_Type__c:result.SpecialityType, |
| | | State_Master__c:result.shengId, |
| | | Town__c:result.Town, |
| | | City_Master__c:result.shiId, |
| | | Street__c:result.Street, |
| | | Field3_companyname__c:result.Field3companyname, |
| | | Site__c:result.Site |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account_Delay_Apply__c', |
| | | actionName: 'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:data |
| | | } |
| | | }); |
| | | |
| | | }else{ |
| | | this.showToast('该客户不在有效中,不可进行客户变更','error') |
| | | } |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(err=>{ |
| | | console.log("error:====",err); |
| | | console.log(err); |
| | | }).finally(()=>{}); |
| | | } |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: "", |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fpn="lexAccountDelayApply"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .AgencyContractClone{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="AgencyContractClone" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/AgencyContractCloneController.init'; |
| | | |
| | | export default class LexAgencyContractClone extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | if(res != null){ |
| | | if (res.Id == '00510000002YSBIAA4' |
| | | || res.Id == '00510000004PMMcAAO' |
| | | // || res.Id == '00510000006Vsuo' |
| | | || res.ProfileId == '00e10000000Y3o5AAC' |
| | | || res.ProfileId == '00e10000000tiSlAAI') { |
| | | window.open("/"+this.recordId+"/e?clone=1&retURL="+this.recordId); |
| | | } else { |
| | | this.showToast('没有复制经销商合同的权限','error'); |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | console.log('err=====>',err) |
| | | }) |
| | | } |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .AssignTaskButtonAccount{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="AssignTaskButtonAccount" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import recordTypeId from '@salesforce/apex/toBatchOwnerController.TypeId'; |
| | | |
| | | export default class LexAssignTaskButtonAccount extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | recordTypeId().then(res => { |
| | | const defaultValues = encodeDefaultFieldValues({ |
| | | account__c: this.recordId, |
| | | taskStatus__c: '01 分配', |
| | | taskDifferent__c: '上级分配任务' |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'task__c', |
| | | actionName: 'new' |
| | | }, |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: res.RecordTypeId |
| | | } |
| | | }); |
| | | }).catch(err => { |
| | | console.log('err======>',err) |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .CustomLink1{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="CustomLink1" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | export default class LexCustomLink1 extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Event', |
| | | actionName:'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:'accid='+this.recordId |
| | | } |
| | | }); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .CustomLink2AdvancePaymentIdentificationChange{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="CustomLink2AdvancePaymentIdentificationChange" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/CustomLink2AdvancePaymentController.init'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | |
| | | export default class LexCustomLink2AdvancePaymentIdentificationChange extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(result=>{ |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if (result.FirstParagraph == 0) { |
| | | this.showToast("您已取消先款标识,无需重复操作",'error'); |
| | | return; |
| | | } else if (result.MonthlyPayment == true) { |
| | | this.showToast("您不能进行特批,请先取消月度债权先款标识",'error'); |
| | | return; |
| | | } else { |
| | | if (result.records.length > 0) { |
| | | if (result.records[0].Status__c == '草案中') { |
| | | this.showToast('已提交草稿请尽快提交审批','error'); |
| | | } else { |
| | | this.showToast('无法创建!已有未最终批准的数据','error'); |
| | | }; |
| | | } else { |
| | | const defaultFieldValues = encodeDefaultFieldValues({ |
| | | Account__c:this.recordId |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Advance_Payment__c', |
| | | actionName:'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:result.RecordTypeId |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(err=>{ |
| | | console.log("error:====",err); |
| | | console.log(err); |
| | | }).finally(()=>{}); |
| | | } |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .DealerVisitDetails{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="DealerVisitDetails" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/DealerVisitDetailsController.init'; |
| | | import ReportId from '@salesforce/apex/AccountUrlRecordTypeIdController.ReportId'; |
| | | |
| | | export default class LexDealerVisitDetails extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<======res') |
| | | let whiteList = [ |
| | | '00e10000000xnpHAAQ', |
| | | '00e10000000hkasAAA', |
| | | '00e10000000xyK6AAI', |
| | | '00e10000000xnpRAAQ', |
| | | // '00e10000000NbCE', |
| | | '00e10000000Y3o5AAC' |
| | | ] |
| | | if(res != null){ |
| | | if(whiteList.indexOf(res.ProfileId) == -1){ |
| | | this.showToast("你没有操作权限",'error'); |
| | | return; |
| | | } |
| | | var accountType = res.DepartmentClassLabel; |
| | | var sectionMap = new Map(); |
| | | sectionMap['消化科'] = 'GI';sectionMap['ET'] = 'ET'; |
| | | sectionMap['呼吸科'] = 'BF';sectionMap['普外科'] = 'GS'; |
| | | sectionMap['泌尿科'] = 'URO';sectionMap['妇科'] = 'GYN'; |
| | | sectionMap['耳鼻喉科'] = 'ENT';sectionMap['其他'] = 'OTH'; |
| | | var sectionApi= sectionMap[accountType]; |
| | | if(res.RecordTypeId == '01210000000QemGAAS'){ |
| | | ReportId({TypeName:'DealerVisitDetailsHospital'}).then(request => { |
| | | window.open('/'+ request +'?pv='+res.Name) |
| | | }) |
| | | } else { |
| | | ReportId({TypeName:'Agency_Activity'}).then(request => { |
| | | window.open('/'+ request +'?pv='+ res.HospitalDepartmentClass +'&pv='+sectionApi) |
| | | }) |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .HosipitalToDept{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="HosipitalToDept" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/HosipitalToDeptController.init'; |
| | | import updataAccount from '@salesforce/apex/HosipitalToDeptController.updataAccount'; |
| | | import executeWebSide from '@salesforce/apex/HosipitalToDeptController.submitApproval'; |
| | | |
| | | export default class LexHosipitalToDept extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<========res') |
| | | if(res.GiMain == ''){ |
| | | this.showToast('请填写GI主担当','error'); |
| | | }else if(res.BFowner == ''){ |
| | | this.showToast('请填写BF主担当','error'); |
| | | }else if(res.ETowner == ''){ |
| | | this.showToast('请填写ET主担当','error'); |
| | | }else if(res.SPMain == ''){ |
| | | this.showToast('请填写GS主担当','error'); |
| | | }else if(res.UROownerID == ''){ |
| | | this.showToast('请填写URO主担当','error'); |
| | | }else if(res.GYNowner == ''){ |
| | | this.showToast('请填写GYN主担当','error'); |
| | | }else if(res.ENTownerID == ''){ |
| | | this.showToast('请填写ENT主担当','error'); |
| | | }else if (confirm(res.SoakupHPDeptTeam)) { |
| | | updataAccount({recordId:this.recordId,HosipitalToDept:true}).catch(err => { |
| | | this.showToast(err.body.message,'error'); |
| | | }) |
| | | executeWebSide({Hospitalid: this.recordId}).then(resp => { |
| | | if (resp != 'OK') { |
| | | this.showToast(resp,'error'); |
| | | } else { |
| | | updataAccount({recordId:this.recordId,HosipitalToDept:false}).catch(err => { |
| | | this.showToast(err.body.message,'error'); |
| | | }) |
| | | this.showToast('反映完成','success'); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err,'<======err') |
| | | if (err.faultcode == 'sf:INSUFFICIENT_ACCESS') { |
| | | this.showToast('没有执行权限','error'); |
| | | } else { |
| | | this.showToast(err,'success'); |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .MonthlyClaimsChange{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="MonthlyClaimsChange" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/MonthlyClaimsChangeController.init'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | export default class LexMonthlyClaimsChange extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(result=>{ |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if (result.DealerTypeSum == '特约经销商') { |
| | | if (result.MonthlyPayment == true) { |
| | | if (result.records.length > 0) { |
| | | if (result.records[0].Status__c == '草案中') { |
| | | this.showToast('已提交草稿请尽快提交审批','error'); |
| | | } else { |
| | | this.showToast('无法创建!已有未最终批准的数据','error'); |
| | | }; |
| | | } else { |
| | | const defaultFieldValues = encodeDefaultFieldValues({ |
| | | Account__c:this.recordId, |
| | | }); |
| | | console.log(defaultFieldValues) |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Advance_Payment__c', |
| | | actionName:'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:result.RecordTypeId |
| | | } |
| | | }); |
| | | } |
| | | } else { |
| | | this.showToast("您已取消月度标识,无需重复操作",'error'); |
| | | }; |
| | | } else { |
| | | this.showToast("请联系服务本部审核后变更标识",'error'); |
| | | return; |
| | | } |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(err=>{ |
| | | console.log("error:====",err); |
| | | console.log(err); |
| | | }) |
| | | } |
| | | |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: "", |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .NewAgencyContract{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="NewAgencyContract" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import UserInfo_Owner from '@salesforce/apex/NewAgencyContractController.UserInfo_Owner'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | |
| | | export default class LexNewAgencyContract extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | ProfileId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | UserInfo_Owner().then(res => { |
| | | console.log('result===>',res) |
| | | if (res.id == '00510000002YSBIAA4' || res.ProfileId == '00e10000000Y3o5AAC') { |
| | | this.showToast('会自动分配新建合同的客户编码,保留旧编码的时候请用复制合同。','success'); |
| | | const defaultFieldValues = encodeDefaultFieldValues({ |
| | | Agent_Ref__c:this.recordId, |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | | attributes: { |
| | | objectApiName: 'Account', |
| | | actionName:'new' |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:res.RecordTypeId |
| | | } |
| | | }); |
| | | } else { |
| | | this.showToast('没有新建的权限','error'); |
| | | } |
| | | }).catch(err => { |
| | | console.log('err:',err) |
| | | }) |
| | | |
| | | } |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .QuolifiedApplySPO{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="QuolifiedApplySPO" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | import init from '@salesforce/apex/QuolifiedApplySPOController.init'; |
| | | import updata from '@salesforce/apex/QuolifiedApplySPOController.updata'; |
| | | |
| | | export default class LexQuolifiedApplySPO extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log('result======>',res) |
| | | if(res != null){ |
| | | if (res.IsActive != '有効' && res.IsActive != '有效') { |
| | | this.showToast("医院有效后才可以资质审批。",'error'); |
| | | return; |
| | | } |
| | | |
| | | var job = res.JobCategory; |
| | | var profileId = res.ProfileId; |
| | | |
| | | if (job != '支援' && job != '销售推广' && job != '销售服务' && profileId != '00e10000000Nab7') { |
| | | this.showToast("必须职种是支援,销售推广,销售服务和特约店窗口的用户才可以提交资质!",'error'); |
| | | return; |
| | | } |
| | | |
| | | updata({recordId:this.recordId}).then(result => { |
| | | console.log('result========>',result) |
| | | if(result == 'ok'){ |
| | | this.showToast("医院信息已提交,请在SPO系统中完成资质申请。",'success'); |
| | | // window.location.reload(); 刷新页面后会重复调用本组件形成死循环 |
| | | window.open("https://olympus.sharepoint.cn/sites/GSPWF/SitePages/HomePage.aspx"); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err,'error'); |
| | | this.showToast(err.body.message,'error'); |
| | | }) |
| | | // if (messages.length > 0) { |
| | | // return; |
| | | // } |
| | | |
| | | } |
| | | }) |
| | | |
| | | } |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .SampleInventory{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="SampleInventory" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | |
| | | export default class LexSampleInventory extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__webPage', |
| | | attributes: { |
| | | url:'/apex/SampleInventory?accid='+this.recordId |
| | | } |
| | | }); |
| | | this.IsLoading = false |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .SoakupTeam{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="SoakupTeam" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import execute from '@salesforce/apex/SoakupHPDeptTeam.execute'; |
| | | import init from '@salesforce/apex/SoakupTeamController.init'; |
| | | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | export default class LexSoakupTeam extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | if (confirm(res.ConfirmSoakupHPDeptTeam)) { |
| | | execute({deptClassId: res.id}).then(rep => { |
| | | if (rep != 'OK') { |
| | | this.showToast(rep,'error'); |
| | | } else { |
| | | |
| | | this.showToast('反映完成','success'); |
| | | } |
| | | }).catch((e) => { |
| | | if (e.faultcode == 'sf:INSUFFICIENT_ACCESS') { |
| | | this.showToast('没有执行权限','error'); |
| | | } else { |
| | | this.showToast(e,'success'); |
| | | } |
| | | }); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err,'<==========err') |
| | | }) |
| | | |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .SubmitAndRefresh{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="SubmitAndRefresh" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | |
| | | import init from '@salesforce/apex/SubmitAndRefreshController.init'; |
| | | import submitApproval from '@salesforce/apex/AddSubmitApprovalProcessController.submitApproval'; |
| | | |
| | | export default class LexSampleInventory extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({Id:this.recordId}).then(result=>{ |
| | | console.log('init result==========',result); |
| | | if(result!=null){ |
| | | if (result.Isuploadfile == '0') { |
| | | this.showToast('请上传客户变更申请信息附件','error'); |
| | | return; |
| | | } |
| | | var accname=result.HospitalName.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && result.AttributeType !='企业集团'){ |
| | | this.showToast('客户为公司或集团,医院性质不是企业集团,请核实医院性质,确认是否提交?','error'); |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | submitApproval({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<======res') |
| | | }).catch(err => { |
| | | console.log(err,'<======err') |
| | | this.showToast(err,'error') |
| | | }) |
| | | } |
| | | }); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.IsLoading = false; |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .SubmitAndRefreshAccount{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="SubmitAndRefreshAccount" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/HosipitalToDeptController.init'; |
| | | import submitApproval from '@salesforce/apex/AddSubmitApprovalProcessController.submitApproval'; |
| | | |
| | | export default class LexSubmitAndRefreshAccount extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<========res') |
| | | if(res.GiMain == ''){ |
| | | this.showToast('请填写GI主担当','error'); |
| | | }else if(res.BFowner == ''){ |
| | | this.showToast('请填写BF主担当','error'); |
| | | }else if(res.ETowner == ''){ |
| | | this.showToast('请填写ET主担当','error'); |
| | | }else if(res.SPMain == ''){ |
| | | this.showToast('请填写GS主担当','error'); |
| | | }else if(res.UROownerID == ''){ |
| | | this.showToast('请填写URO主担当','error'); |
| | | }else if(res.GYNowner == ''){ |
| | | this.showToast('请填写GYN主担当','error'); |
| | | }else if(res.ENTownerID == ''){ |
| | | this.showToast('请填写ENT主担当','error'); |
| | | } |
| | | if('{!Account.Tender_information__c}' !=''){ |
| | | |
| | | }else if (res.Isuploadfile == '0' || res.Isuploadfile == false) { |
| | | this.showToast('请上传医院信息附件','error'); |
| | | return; |
| | | } |
| | | var accname=res.Name.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && res.AttributeType !='企业集团'){ |
| | | this.showToast('客户为公司或集团,医院性质不是企业集团,请核实医院性质,确认是否提交?','success'); |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | submitApproval({recordId:this.recordId}).then(rep => { |
| | | console.log(rep,'<========result') |
| | | }).catch(err => { |
| | | this.showToast(err,'error') |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | |
| | | } |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .surface{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="surface" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { NavigationMixin } from 'lightning/navigation'; |
| | | |
| | | export default class Lexsurface extends NavigationMixin(LightningElement) { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback(){ |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__webPage', |
| | | attributes: { |
| | | url:'/apex/Ordergoods?accid='+this.recordId |
| | | } |
| | | }); |
| | | this.IsLoading = false |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .toBatchUser{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .container .uiContainerManager{ |
| | | display : none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="toBatchUser" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { LightningElement,api, track, wire } from 'lwc'; |
| | | import {CurrentPageReference} from 'lightning/navigation'; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import toBatchOwner from '@salesforce/apex/AccountWebService.toBatchOwner'; |
| | | import ProfileId from '@salesforce/apex/toBatchOwnerController.ProfileId'; |
| | | |
| | | export default class LextoBatchUser extends LightningElement { |
| | | @api recordId; |
| | | IsLoading=true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference){ |
| | | console.log("进入页面"); |
| | | console.log(currentPageReference); |
| | | if(currentPageReference){ |
| | | const urvalue=currentPageReference.state.recordId; |
| | | if(urvalue){ |
| | | let str=`${urvalue}`; |
| | | console.log('str'); |
| | | console.log(str); |
| | | this.recordId=str; |
| | | } |
| | | } |
| | | } |
| | | connectedCallback(){ |
| | | ProfileId().then(res => { |
| | | if (res != "00e10000000Y3o5AAC") { |
| | | this.showToast("你没有操作权限",'error'); |
| | | return; |
| | | } |
| | | if (!confirm("无效客户的所有人将变为Batch User,请确认需要转移的信息是否都转移完毕。\n是否继续?")) { |
| | | return; |
| | | } |
| | | toBatchOwner({hpid:this.recordId}).then(result => { |
| | | if (result != 'OK') { |
| | | this.showToast(result,'error'); |
| | | return; |
| | | } |
| | | }).catch(err => { |
| | | console.log('err=>>>>>',err) |
| | | }) |
| | | this.showToast("无效客户的所有人已变为Batch User",'success'); |
| | | }) |
| | | } |
| | | showToast(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>57.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |