补充controller,修改变量,主页bug修改
| | |
| | | InitData res = new initData(); |
| | | |
| | | try { |
| | | Account report = [SELECT Id,Name,Is_Active__c,Grade__c,Alias_Name2__c,Abbreviation__c,Attribute_Type__c |
| | | 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 |
| | | ,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.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.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; |
| | | |
| | |
| | | @AuraEnabled |
| | | public String accgrade; |
| | | @AuraEnabled |
| | | public String AliasName2; |
| | | public String aliasName2; |
| | | @AuraEnabled |
| | | public String Abbreviation; |
| | | public String abbreviation; |
| | | @AuraEnabled |
| | | public String AttributeType; |
| | | public String attributeType; |
| | | @AuraEnabled |
| | | public String PostalCode; |
| | | public String postalCode; |
| | | @AuraEnabled |
| | | public String SpecialityType; |
| | | public String specialityType; |
| | | @AuraEnabled |
| | | public String StateMaster; |
| | | public String stateMaster; |
| | | @AuraEnabled |
| | | public String Town; |
| | | public String town; |
| | | @AuraEnabled |
| | | public String CityMaster; |
| | | public String cityMaster; |
| | | @AuraEnabled |
| | | public String Address; |
| | | public String address; |
| | | @AuraEnabled |
| | | public String Street; |
| | | public String street; |
| | | @AuraEnabled |
| | | public String Field3companyname; |
| | | public String field3companyname; |
| | | @AuraEnabled |
| | | public String WhetherRiskPassing; |
| | | @AuraEnabled |
| | | public String RejectionReason; |
| | | public String rejectionReason; |
| | | @AuraEnabled |
| | | public String AssociatedHospital; |
| | | public String associatedHospital; |
| | | @AuraEnabled |
| | | public String Site; |
| | | public String site; |
| | | @AuraEnabled |
| | | public String shengId; |
| | | @AuraEnabled |
| | |
| | | RepairContactData result = new RepairContactData(); |
| | | try { |
| | | Account report = [select Department_Class_Label__c from Account where Id = :recordId]; |
| | | result.DepartmentClassLabel = report.Department_Class_Label__c; |
| | | result.departmentClassLabel = report.Department_Class_Label__c; |
| | | result.typeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContact').getRecordTypeId(); |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | |
| | | @AuraEnabled |
| | | public string typeId; |
| | | @AuraEnabled |
| | | public string DepartmentClassLabel; |
| | | public string departmentClassLabel; |
| | | } |
| | | } |
| | |
| | | @AuraEnabled |
| | | public static InitData init(){ |
| | | InitData res = new initData(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | 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; |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string Id; |
| | | public string id; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | public string profileId; |
| | | } |
| | | } |
| | |
| | | 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 ('草案中','已提交','批准中')]; |
| | | 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()); |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Name; |
| | | public String name; |
| | | @AuraEnabled |
| | | public Boolean FirstParagraph; |
| | | public Boolean firstParagraph; |
| | | @AuraEnabled |
| | | public Boolean MonthlyPayment; |
| | | public Boolean monthlyPayment; |
| | | @AuraEnabled |
| | | public List<Advance_Payment__c> records; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | public String recordTypeId; |
| | | } |
| | | } |
| | |
| | | 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; |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | public string profileId; |
| | | @AuraEnabled |
| | | public string RecordTypeId; |
| | | public string recordTypeId; |
| | | @AuraEnabled |
| | | public string DepartmentClassLabel; |
| | | public string departmentClassLabel; |
| | | @AuraEnabled |
| | | public string Name; |
| | | public string name; |
| | | @AuraEnabled |
| | | public string HospitalDepartmentClass; |
| | | public string hospitalDepartmentClass; |
| | | } |
| | | } |
| | |
| | | ENT_owner_ID__c, |
| | | Tender_information__c, |
| | | Is_upload_file__c, |
| | | Name, |
| | | 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; |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string GiMain; |
| | | public string giMain; |
| | | @AuraEnabled |
| | | public string BFowner; |
| | | public string bfowner; |
| | | @AuraEnabled |
| | | public string ETowner; |
| | | public string etowner; |
| | | @AuraEnabled |
| | | public string SPMain; |
| | | public string spmain; |
| | | @AuraEnabled |
| | | public string UROownerID; |
| | | public string uroownerID; |
| | | @AuraEnabled |
| | | public string GYNowner; |
| | | public string gynowner; |
| | | @AuraEnabled |
| | | public string ENTownerID; |
| | | public string entownerID; |
| | | @AuraEnabled |
| | | public string SoakupHPDeptTeam; |
| | | public string soakupHPDeptTeam; |
| | | @AuraEnabled |
| | | public string Tenderinformation; |
| | | public string tenderinformation; |
| | | @AuraEnabled |
| | | public Boolean Isuploadfile; |
| | | public Boolean isuploadfile; |
| | | @AuraEnabled |
| | | public string Name; |
| | | public string name; |
| | | @AuraEnabled |
| | | public string AttributeType; |
| | | public string attributeType; |
| | | } |
| | | } |
| | |
| | | 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 ('草案中','已提交','批准中')]; |
| | | 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()); |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public Boolean MonthlyPayment; |
| | | public Boolean monthlyPayment; |
| | | @AuraEnabled |
| | | public String DealerTypeSum; |
| | | public String dealerTypeSum; |
| | | @AuraEnabled |
| | | public String Name; |
| | | public String name; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | public String recordTypeId; |
| | | @AuraEnabled |
| | | public List<Advance_Payment__c> records; |
| | | } |
| | |
| | | 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; |
| | | result.recordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContract').getRecordTypeId(); |
| | | result.profileId = tempUser.ProfileId; |
| | | } catch (exception e) { |
| | | result.result = e.getMessage(); |
| | | } |
| | |
| | | @AuraEnabled |
| | | public string id; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | public String recordTypeId; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | public string profileId; |
| | | } |
| | | } |
| | |
| | | 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; |
| | | res.isActive = report.Is_Active__c; |
| | | res.profileId = userinfo.ProfileId; |
| | | res.jobCategory = userinfo.Job_Category__c; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public string IsActive; |
| | | public string isActive; |
| | | @AuraEnabled |
| | | public string ProfileId; |
| | | public string profileId; |
| | | @AuraEnabled |
| | | public string JobCategory; |
| | | public string jobCategory; |
| | | } |
| | | } |
| New file |
| | |
| | | public with sharing class SoakupTeamController { |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try { |
| | | Account report = [SELECT Id FROM Account WHERE Id = :recordId]; |
| | | res.confirmSoakupHPDeptTeam = System.Label.Confirm_SoakupHPDeptTeam; |
| | | res.id = report.Id; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String id; |
| | | @AuraEnabled |
| | | public String confirmSoakupHPDeptTeam; |
| | | } |
| | | } |
| 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> |
| | |
| | | |
| | | 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; |
| | | 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()); |
| | | } |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public Boolean Isuploadfile; |
| | | public Boolean isuploadfile; |
| | | @AuraEnabled |
| | | public String HospitalName; |
| | | public String hospitalName; |
| | | @AuraEnabled |
| | | public String AttributeType; |
| | | public String attributeType; |
| | | } |
| | | } |
| | |
| | | repair.Facility_Return_Receipt_Collection_reque__c = Datetime.now().date(); |
| | | |
| | | update repair; |
| | | return 'ok'; |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | res = e.getMessage(); |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | // 查找PAE判定记录 |
| | |
| | | public static InitData TypeId(){ |
| | | InitData res = new initData(); |
| | | try { |
| | | res.RecordTypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId(); |
| | | res.recordTypeId = Schema.SObjectType.task__c.getRecordTypeInfosByDeveloperName().get('OPD').getRecordTypeId(); |
| | | |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | |
| | | } |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | public String recordTypeId; |
| | | } |
| | | } |
| | |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if(result.AccSize.length > 0){ |
| | | if(result.accSize.length > 0){ |
| | | this.showToast('存在申请中的客户变更申请,无法再次提交变更申请。','error') |
| | | return |
| | | } |
| | |
| | | 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, |
| | | 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, |
| | | Town__c:result.town, |
| | | City_Master__c:result.shiId, |
| | | Street__c:result.Street, |
| | | Field3_companyname__c:result.Field3companyname, |
| | | Site__c:result.Site |
| | | Street__c:result.street, |
| | | Field3_companyname__c:result.field3companyname, |
| | | Site__c:result.site |
| | | }); |
| | | this[NavigationMixin.Navigate]({ |
| | | type: 'standard__objectPage', |
| | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | if(res != null){ |
| | | if (res.Id == '00510000002YSBIAA4' |
| | | || res.Id == '00510000004PMMcAAO' |
| | | if (res.id == '00510000002YSBIAA4' |
| | | || res.id == '00510000004PMMcAAO' |
| | | // || res.Id == '00510000006Vsuo' |
| | | || res.ProfileId == '00e10000000Y3o5AAC' |
| | | || res.ProfileId == '00e10000000tiSlAAI') { |
| | | || res.profileId == '00e10000000Y3o5AAC' |
| | | || res.profileId == '00e10000000tiSlAAI') { |
| | | window.open("/"+this.recordId+"/e?clone=1&retURL="+this.recordId); |
| | | } else { |
| | | this.showToast('没有复制经销商合同的权限','error'); |
| | |
| | | state: { |
| | | nooverride: '1', |
| | | defaultFieldValues: defaultValues, |
| | | recordTypeId: res.RecordTypeId |
| | | recordTypeId: res.recordTypeId |
| | | } |
| | | }); |
| | | }).catch(err => { |
| | |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if (result.FirstParagraph == 0) { |
| | | if (result.firstParagraph == 0) { |
| | | this.showToast("您已取消先款标识,无需重复操作",'error'); |
| | | return; |
| | | } else if (result.MonthlyPayment == true) { |
| | | } else if (result.monthlyPayment == true) { |
| | | this.showToast("您不能进行特批,请先取消月度债权先款标识",'error'); |
| | | return; |
| | | } else { |
| | | if (result.records.length > 0) { |
| | | if (result.records[0].Status__c == '草案中') { |
| | | if (result.records[0].status__c == '草案中') { |
| | | this.showToast('已提交草稿请尽快提交审批','error'); |
| | | } else { |
| | | this.showToast('无法创建!已有未最终批准的数据','error'); |
| | |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:result.RecordTypeId |
| | | recordTypeId:result.recordTypeId |
| | | } |
| | | }); |
| | | } |
| | |
| | | '00e10000000Y3o5AAC' |
| | | ] |
| | | if(res != null){ |
| | | if(whiteList.indexOf(res.ProfileId) == -1){ |
| | | if(whiteList.indexOf(res.profileId) == -1){ |
| | | this.showToast("你没有操作权限",'error'); |
| | | return; |
| | | } |
| | | var accountType = res.DepartmentClassLabel; |
| | | 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'){ |
| | | if(res.recordTypeId == '01210000000QemGAAS'){ |
| | | ReportId({TypeName:'DealerVisitDetailsHospital'}).then(request => { |
| | | window.open('/'+ request +'?pv='+res.Name) |
| | | window.open('/'+ request +'?pv='+res.name) |
| | | }) |
| | | } else { |
| | | ReportId({TypeName:'Agency_Activity'}).then(request => { |
| | | window.open('/'+ request +'?pv='+ res.HospitalDepartmentClass +'&pv='+sectionApi) |
| | | window.open('/'+ request +'?pv='+ res.hospitalDepartmentClass +'&pv='+sectionApi) |
| | | }) |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<========res') |
| | | if(res.GiMain == ''){ |
| | | if(res.giMain == ''){ |
| | | this.showToast('请填写GI主担当','error'); |
| | | }else if(res.BFowner == ''){ |
| | | }else if(res.bfowner == ''){ |
| | | this.showToast('请填写BF主担当','error'); |
| | | }else if(res.ETowner == ''){ |
| | | }else if(res.etowner == ''){ |
| | | this.showToast('请填写ET主担当','error'); |
| | | }else if(res.SPMain == ''){ |
| | | }else if(res.spmain == ''){ |
| | | this.showToast('请填写GS主担当','error'); |
| | | }else if(res.UROownerID == ''){ |
| | | }else if(res.uroownerID == ''){ |
| | | this.showToast('请填写URO主担当','error'); |
| | | }else if(res.GYNowner == ''){ |
| | | }else if(res.gynowner == ''){ |
| | | this.showToast('请填写GYN主担当','error'); |
| | | }else if(res.ENTownerID == ''){ |
| | | }else if(res.entownerID == ''){ |
| | | this.showToast('请填写ENT主担当','error'); |
| | | }else if (confirm(res.SoakupHPDeptTeam)) { |
| | | }else if (confirm(res.soakupHPDeptTeam)) { |
| | | updataAccount({recordId:this.recordId,HosipitalToDept:true}).catch(err => { |
| | | this.showToast(err.body.message,'error'); |
| | | }) |
| | |
| | | console.log('result==========',result); |
| | | this.IsLoading = false; |
| | | if(result!=null){ |
| | | if (result.DealerTypeSum == '特约经销商') { |
| | | if (result.MonthlyPayment == true) { |
| | | if (result.dealerTypeSum == '特约经销商') { |
| | | if (result.monthlyPayment == true) { |
| | | if (result.records.length > 0) { |
| | | if (result.records[0].Status__c == '草案中') { |
| | | if (result.records[0].status__c == '草案中') { |
| | | this.showToast('已提交草稿请尽快提交审批','error'); |
| | | } else { |
| | | this.showToast('无法创建!已有未最终批准的数据','error'); |
| | |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:result.RecordTypeId |
| | | recordTypeId:result.recordTypeId |
| | | } |
| | | }); |
| | | } |
| | |
| | | connectedCallback(){ |
| | | UserInfo_Owner().then(res => { |
| | | console.log('result===>',res) |
| | | if (res.id == '00510000002YSBIAA4' || res.ProfileId == '00e10000000Y3o5AAC') { |
| | | if (res.id == '00510000002YSBIAA4' || res.profileId == '00e10000000Y3o5AAC') { |
| | | this.showToast('会自动分配新建合同的客户编码,保留旧编码的时候请用复制合同。','success'); |
| | | const defaultFieldValues = encodeDefaultFieldValues({ |
| | | Agent_Ref__c:this.recordId, |
| | |
| | | }, |
| | | state:{ |
| | | defaultFieldValues:defaultFieldValues, |
| | | recordTypeId:res.RecordTypeId |
| | | recordTypeId:res.recordTypeId |
| | | } |
| | | }); |
| | | } else { |
| | |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log('result======>',res) |
| | | if(res != null){ |
| | | if (res.IsActive != '有効' && res.IsActive != '有效') { |
| | | if (res.isActive != '有効' && res.isActive != '有效') { |
| | | this.showToast("医院有效后才可以资质审批。",'error'); |
| | | return; |
| | | } |
| | | |
| | | var job = res.JobCategory; |
| | | var profileId = res.ProfileId; |
| | | var job = res.jobCategory; |
| | | var profileId = res.profileId; |
| | | |
| | | if (job != '支援' && job != '销售推广' && job != '销售服务' && profileId != '00e10000000Nab7') { |
| | | this.showToast("必须职种是支援,销售推广,销售服务和特约店窗口的用户才可以提交资质!",'error'); |
| | |
| | | btns[i].disabled = true; |
| | | btns[i].className = 'btnDisabled'; |
| | | } |
| | | alert('该修理之前已经发送过了'); |
| | | this.ShowToastEvent('该修理之前已经发送过了','error'); |
| | | } else { |
| | | this.SendRepairsToEtQ(); |
| | | } |
| | |
| | | // 发送ETQ |
| | | SendRepairsToEtQ() { |
| | | if (this.profileName != "2F7_OSH担当" && this.profileName != "2F7_OSH质量法规" && this.profileName != '系统管理员') { |
| | | alert("您没有发送修理到EtQ的权限。"); |
| | | this.ShowToastEvent("您没有发送修理到EtQ的权限。",'error'); |
| | | return; |
| | | } |
| | | var statu = ''; |
| | | if (this.PAEDetermineC == undefined) { |
| | | alert("OCSM QARA的PAE判定是空的时候,不可以发送到EtQ。"); |
| | | this.ShowToastEvent("OCSM QARA的PAE判定是空的时候,不可以发送到EtQ。",'error'); |
| | | return; |
| | | } |
| | | if (this.ETQUPLOADSTATUSC == "3") { |
| | |
| | | } |
| | | } |
| | | if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && this.userName != "雷 新建") { |
| | | alert("Close Complait的时候,不可以发送到EtQ"); |
| | | this.ShowToastEvent("Close Complait的时候,不可以发送到EtQ",'error'); |
| | | return; |
| | | } |
| | | if (this.PAEDetermineC != undefined && this.AEDetermineResultC != undefined && this.PAEDetermineACC == undefined) { |
| | |
| | | !(this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE")) { |
| | | statu = "R2"; |
| | | if (this.RepairInspectionDateC == undefined) { |
| | | alert("5.修理检测日是空的时候,不可以发送到EtQ。"); |
| | | this.ShowToastEvent("5.修理检测日是空的时候,不可以发送到EtQ。",'error'); |
| | | return; |
| | | } |
| | | if (this.ContainUseRSAC == 1) { |
| | | alert("Final universal code为空,或者包含UseRSA,请确认。"); |
| | | this.ShowToastEvent("Final universal code为空,或者包含UseRSA,请确认。",'error'); |
| | | return; |
| | | } |
| | | } |
| | |
| | | repairIds: repairids, |
| | | statu: statuArr[0] |
| | | }).then(result => { |
| | | alert(result); |
| | | this.ShowToastEvent(result,'error'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | location.reload(); |
| | | }) |
| | | |
| | |
| | | btns[i].className = 'btnDisabled'; |
| | | } |
| | | } catch (error) { |
| | | alert("发送修理到EtQ失败" + error.faultstring + ' code:' + error.faultcode); |
| | | this.ShowToastEvent("发送修理到EtQ失败" + error.faultstring + ' code:' + error.faultcode,'error'); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | if (confirm(res.ConfirmSoakupHPDeptTeam)) { |
| | | if (confirm(res.confirmSoakupHPDeptTeam)) { |
| | | execute({deptClassId: res.id}).then(rep => { |
| | | if (rep != 'OK') { |
| | | this.showToast(rep,'error'); |
| | |
| | | init({Id:this.recordId}).then(result=>{ |
| | | console.log('init result==========',result); |
| | | if(result!=null){ |
| | | if (result.Isuploadfile == '0') { |
| | | if (result.isuploadfile == '0') { |
| | | this.showToast('请上传客户变更申请信息附件','error'); |
| | | return; |
| | | } |
| | | var accname=result.HospitalName.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && result.AttributeType !='企业集团'){ |
| | | var accname=result.hospitalName.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && result.attributeType !='企业集团'){ |
| | | this.showToast('客户为公司或集团,医院性质不是企业集团,请核实医院性质,确认是否提交?','error'); |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | |
| | | connectedCallback(){ |
| | | init({recordId:this.recordId}).then(res => { |
| | | console.log(res,'<========res') |
| | | if(res.GiMain == ''){ |
| | | if(res.giMain == ''){ |
| | | this.showToast('请填写GI主担当','error'); |
| | | }else if(res.BFowner == ''){ |
| | | }else if(res.bfowner == ''){ |
| | | this.showToast('请填写BF主担当','error'); |
| | | }else if(res.ETowner == ''){ |
| | | }else if(res.etowner == ''){ |
| | | this.showToast('请填写ET主担当','error'); |
| | | }else if(res.SPMain == ''){ |
| | | }else if(res.spmain == ''){ |
| | | this.showToast('请填写GS主担当','error'); |
| | | }else if(res.UROownerID == ''){ |
| | | }else if(res.uroownerID == ''){ |
| | | this.showToast('请填写URO主担当','error'); |
| | | }else if(res.GYNowner == ''){ |
| | | }else if(res.gynowner == ''){ |
| | | this.showToast('请填写GYN主担当','error'); |
| | | }else if(res.ENTownerID == ''){ |
| | | }else if(res.entownerID == ''){ |
| | | this.showToast('请填写ENT主担当','error'); |
| | | } |
| | | if('{!Account.Tender_information__c}' !=''){ |
| | | |
| | | }else if (res.Isuploadfile == '0' || res.Isuploadfile == false) { |
| | | }else if (res.isuploadfile == '0' || res.isuploadfile == false) { |
| | | this.showToast('请上传医院信息附件','error'); |
| | | return; |
| | | } |
| | | var accname=res.Name.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && res.AttributeType !='企业集团'){ |
| | | var accname=res.name.substr(-2,2); |
| | | if((accname =='公司' || accname =='集团') && res.attributeType !='企业集团'){ |
| | | this.showToast('客户为公司或集团,医院性质不是企业集团,请核实医院性质,确认是否提交?','success'); |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | |
| | | <!--未接受任务--> |
| | | <apex:outputPanel rendered = "{!if( feedbackNumber > 0, 'true','false')}" style="font-weight: bold;font-family: \'Microsoft YaHei\';" > |
| | | <h3> |
| | | <apex:outputText value ="{!if( UnfinishedTaskNumber > 0, ',' , if( myTaskNumber > 0, ',' , if(feedbackNumber>0,',','')))}"/> |
| | | |
| | | <!-- <apex:outputText value ="{!if( UnfinishedTaskNumber > 0, ',' , if( myTaskNumber > 0, ',' , if(feedbackNumber>0,',','')))}"/> |
| | | --> |
| | | <apex:outputText style="font-family: Microsoft YaHei" value ="{!if(feedbackNumber > 0,'待反馈任务','')}"/> |
| | | <a href="javascript:return null;" onclick="window.open('/apex/taskFeedback','_blank')"><font size="4" color="red">({!feedbackNumber}个)</font></a> |
| | | <apex:outputText value ="{!if( feedbackNumber > 0 , ',' , '')}"/> |