Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Account report = [SELECT Name,Department_Class_ID_18__c,Department_Class__c,Hospital_ID__c,Hospital__c,Id FROM Account WHERE Id =: recordId LIMIT 1]; |
| | | Account report = [SELECT Department_Class__r.Id,Hospital__r.Id,Name,Department_Class__c,Hospital__c,Id FROM Account WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.HospitalC = report.Hospital__c; |
| | | res.HospitalIdC = report.Hospital_ID__c; |
| | | res.HospitalId = report.Hospital__r.Id; |
| | | res.DepartmentClassC = report.Department_Class__c; |
| | | res.DepartmentClassIdC = report.Department_Class_ID_18__c; |
| | | res.DepartmentClassId = report.Department_Class__r.Id; |
| | | res.Name = report.Name; |
| | | |
| | | res.userID = UserInfo.getUserId(); |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | |
| | | return res; |
| | | } |
| | | |
| | | // 查找UserName |
| | | @AuraEnabled |
| | | public static List<User> initUserName(String userId){ |
| | | List<User> res = new List<User>(); |
| | | try{ |
| | | res = [SELECT Id,name,RepairSalesPoint_Province_China__c,Employee_No__c FROM User WHERE Id=: userId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountByAccountId(String AccountId){ |
| | | try { |
| | | List<Account> accounts = [SELECT ParentId,Parent.RecordTypeId,Parent.RecordType_DeveloperName__c ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID=:AccountId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String HospitalC; |
| | | @AuraEnabled |
| | | public String HospitalIdC; |
| | | public String HospitalId; |
| | | @AuraEnabled |
| | | public String DepartmentClassC; |
| | | @AuraEnabled |
| | | public String DepartmentClassIdC; |
| | | public String DepartmentClassId; |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public String userID; |
| | | } |
| | | } |
| | |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | | </ApexClass> |
| New file |
| | |
| | | public with sharing class buttonAssetCtl { |
| | | public buttonAssetCtl() { |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Asset report = [SELECT Id,NoPartRiskDate_F__c,Product_ID__c,AccountId,HP_Id__c,Hospital__c,Hospital__r.Id,Department_Class__c,Department_Class__r.Id,Name FROM Asset WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.Name = report.Name; |
| | | res.NoPartRiskDateFC = report.NoPartRiskDate_F__c; |
| | | res.ProductIDC = report.Product_ID__c; |
| | | res.AccountId = report.AccountId; |
| | | res.HPIdC = report.HP_Id__c; |
| | | res.HospitalC = report.Hospital__c; |
| | | res.DepartmentClassC = report.Department_Class__c; |
| | | res.HospitalId = report.Hospital__r.Id; |
| | | res.DepartmentClassId = report.Department_Class__r.Id; |
| | | |
| | | res.userID = UserInfo.getUserId(); |
| | | |
| | | res.day = Date.today(); |
| | | res.day1 = Date.today().addDays(-10); |
| | | res.day2 = Date.today().addDays(+365); |
| | | res.notCreateRepairFromAssetButton= System.Label.notCreateRepairFromAssetButton; |
| | | res.notCreateRepairFromAssetButton02= System.Label.notCreateRepairFromAssetButton02; |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | // 查找UserName |
| | | @AuraEnabled |
| | | public static List<User> initUserName(String userId){ |
| | | List<User> res = new List<User>(); |
| | | try{ |
| | | res = [SELECT Id,name,RepairSalesPoint_Province_China__c,Employee_No__c FROM User WHERE Id=: userId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | //查询Account修理画面“修理品返送地”问题调查-后续 |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountBySegmentId(String segmentId){ |
| | | try { |
| | | List<Account> accounts = [SELECT id,ParentId,Parent.RecordTypeId, Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE Id=:segmentId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //查询Product2 |
| | | @AuraEnabled |
| | | public static List<Product2> selecctProduct2ById(String Id){ |
| | | try { |
| | | List<Product2> accounts = [SELECT id,Name,Can_Repair__c from Product2 where ID=:Id]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //查询QIS_Report__c |
| | | @AuraEnabled |
| | | public static List<QIS_Report__c> selecctQISReportByFomatToday(String AssetId,Date fomatToday){ |
| | | try { |
| | | List<QIS_Report__c> accounts = [SELECT id,Name,QIS_Submit_day__c from QIS_Report__c where nonyushohin__c=:AssetId and QIS_Submit_day__c != null and QIS_Submit_day__c >=:fomatToday]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //查询Repair__c |
| | | @AuraEnabled |
| | | public static List<Repair__c> selecctRepairByFomatToday(String AssetId, Date fomatToday){ |
| | | try { |
| | | List<Repair__c> accounts = [SELECT Name from Repair__c where Delivered_Product__c =:AssetId and Status2__c!='00.删除' and Status2__c!='00.取消' and FSE_ApplyForRepair_Day__c >=: fomatToday order by FSE_ApplyForRepair_Day__c desc limit 1]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | //查询Repair__c |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountByAccountId(String AccountId){ |
| | | try { |
| | | List<Account> accounts = [SELECT id,Parent.RecordTypeId, Parent.RecordType_DeveloperName__c ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID=: AccountId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String userID; |
| | | @AuraEnabled |
| | | public Date day; |
| | | @AuraEnabled |
| | | public Date day2; |
| | | @AuraEnabled |
| | | public Date day1; |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public Date NoPartRiskDateFC; |
| | | @AuraEnabled |
| | | public String ProductIDC; |
| | | @AuraEnabled |
| | | public String AccountId; |
| | | @AuraEnabled |
| | | public String HPIdC; |
| | | @AuraEnabled |
| | | public String HospitalC; |
| | | @AuraEnabled |
| | | public String DepartmentClassC; |
| | | @AuraEnabled |
| | | public String HospitalId; |
| | | @AuraEnabled |
| | | public String DepartmentClassId; |
| | | @AuraEnabled |
| | | public String notCreateRepairFromAssetButton; |
| | | @AuraEnabled |
| | | public String notCreateRepairFromAssetButton02; |
| | | |
| | | } |
| | | } |
| 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 buttonCampaignCtl { |
| | | public buttonCampaignCtl() { |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Campaign report = [SELECT Id,Status FROM Campaign WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.Status = report.Status; |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String Status; |
| | | } |
| | | } |
| 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 buttonCaseCtl { |
| | | public buttonCaseCtl() { |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Case report = [SELECT Id FROM Case WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | } |
| | | } |
| 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> |
| | |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | | </ApexClass> |
| | |
| | | <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>56.0</apiVersion> |
| | | <status>Active</status> |
| | | </ApexClass> |
| | | </ApexClass> |
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | On_Call__c report = [SELECT Id FROM On_Call__c WHERE Id =: recordId LIMIT 1]; |
| | | On_Call__c report = [SELECT Id,Name,Oncall_Equipment__r.Id,segment__r.Id,segment__c,HP__c,HospitalId__c,Salesdepartment_HP_ID__c,Salesdepartment_HP__c,Oncall_Equipment__c,Trable_occur_daY_collect_c__c FROM On_Call__c WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.Name = report.Name; |
| | | res.SegmentC = report.segment__c; |
| | | res.SegmentId = report.segment__r.Id; |
| | | res.HPC = report.HP__c; |
| | | res.HospitalIdC = report.HospitalId__c; |
| | | res.SalesdepartmentHPIDC = report.Salesdepartment_HP_ID__c; |
| | | res.SalesdepartmentHPC = report.Salesdepartment_HP__c; |
| | | res.OncallEquipmentC = report.Oncall_Equipment__c; |
| | | res.OncallEquipmentId = report.Oncall_Equipment__r.Id; |
| | | res.TrableOccurdaYCollectC = report.Trable_occur_daY_collect_c__c; |
| | | |
| | | res.userID = UserInfo.getUserId(); |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountBySegmentId(String segmentId){ |
| | | try { |
| | | List<Account> accounts = [SELECT ParentId,Parent.RecordTypeId,Parent.RecordType_DeveloperName__c ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c FROM Account WHERE Id=: segmentId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountBySegmentId02(String segmentId){ |
| | | try { |
| | | List<Account> accounts = [SELECT id,ParentId,Parent.RecordTypeId,Parent.RecordType_DeveloperName__c, Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE Id=: segmentId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | // 查找UserName |
| | | @AuraEnabled |
| | | public static List<User> initUserName(String userId){ |
| | | List<User> res = new List<User>(); |
| | | try{ |
| | | res = [SELECT Id,name,RepairSalesPoint_Province_China__c,Employee_No__c FROM User WHERE Id=: userId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public String SegmentC; |
| | | @AuraEnabled |
| | | public String HPC; |
| | | @AuraEnabled |
| | | public String HospitalIdC; |
| | | @AuraEnabled |
| | | public String SalesdepartmentHPIDC; |
| | | @AuraEnabled |
| | | public String SalesdepartmentHPC; |
| | | @AuraEnabled |
| | | public String OncallEquipmentC; |
| | | @AuraEnabled |
| | | public Date TrableOccurdaYCollectC; |
| | | @AuraEnabled |
| | | public String userID; |
| | | @AuraEnabled |
| | | public String SegmentId; |
| | | @AuraEnabled |
| | | public String OncallEquipmentId; |
| | | } |
| | | } |
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | QIS_Report__c report = [SELECT is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1]; |
| | | QIS_Report__c report = [SELECT Source_OnCall__r.Id,nonyushohin__r.Id,Hospital_Department__r.Id,Hospital__r.Id,source_for_repair__c,Trable_occur_daY_collect__c,nonyushohin__c,Hospital_Department__c,Department_Class__c,Department_Class__r.Id,Source_OnCall__c,HP_ID__c,Special_follow__c,next_action__c,Hospital__c,is_CNBuy__c,isPAE_Profile__c,isAE_Profile__c,Name,QIS_Status__c,PAE_DetermineAC__c,AE_DetermineResult__c,ETQ_UPLOAD_STATUS__c,QIS_final_judgement__c,OCM_judgement__c,PAE_Determine__c,Id FROM QIS_Report__c WHERE Id =: recordId LIMIT 1]; |
| | | res.Hospital = report.Hospital__c; |
| | | res.HospitalId = report.Hospital__r.Id; |
| | | res.nextAction = report.next_action__c; |
| | | res.SpecialFollow = report.Special_follow__c; |
| | | res.HPID = report.HP_ID__c; |
| | | res.SourceOnCallId = report.Source_OnCall__r.Id; |
| | | res.SourceOnCall = report.Source_OnCall__c; |
| | | res.DepartmentClassId = report.Department_Class__r.Id; |
| | | res.DepartmentClass = report.Department_Class__c; |
| | | res.HospitalDepartment = report.Hospital_Department__c; |
| | | res.HospitalDepartmentId = report.Hospital_Department__r.Id; |
| | | res.nonyushohin = report.nonyushohin__c; |
| | | res.nonyushohinId = report.nonyushohin__r.Id; |
| | | res.TrableOccurDaYCollect = report.Trable_occur_daY_collect__c; |
| | | res.sourceForRepair = report.source_for_repair__c; |
| | | |
| | | |
| | | res.PAEDetermineC = report.PAE_Determine__c; |
| | | res.PAEDetermineACC = report.PAE_DetermineAC__c; |
| | | res.OCMJudgementC = report.OCM_judgement__c; |
| | |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static List<Account> selecctAccountByAccountId(String HospitalDepartmentId){ |
| | | try { |
| | | List<Account> accounts = [SELECT ParentId,Parent.RecordTypeId, Parent.RecordType_DeveloperName__c ,Parent.Parent.FSE_GI_Main_Leader__c, Parent.Parent.FSE_GI_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__r.Name,Parent.Parent.FSE_SP_Main_Leader__c,Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c,Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c FROM Account WHERE ID=: HospitalDepartmentId]; |
| | | return accounts; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | // 查找UserName |
| | | @AuraEnabled |
| | | public static List<User> initUserName(String userId){ |
| | | List<User> res = new List<User>(); |
| | | try{ |
| | | res = [SELECT Id,name,RepairSalesPoint_Province_China__c FROM User WHERE Id=: userId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String SourceOnCallId; |
| | | @AuraEnabled |
| | | public String nonyushohinId; |
| | | @AuraEnabled |
| | | public String Hospital; |
| | | @AuraEnabled |
| | | public String HospitalId; |
| | | @AuraEnabled |
| | | public String nextAction; |
| | | @AuraEnabled |
| | | public Boolean SpecialFollow; |
| | | @AuraEnabled |
| | | public String HPID; |
| | | @AuraEnabled |
| | | public String SourceOnCall; |
| | | @AuraEnabled |
| | | public String DepartmentClassId; |
| | | @AuraEnabled |
| | | public String DepartmentClass; |
| | | @AuraEnabled |
| | | public String HospitalDepartment; |
| | | @AuraEnabled |
| | | public String nonyushohin; |
| | | @AuraEnabled |
| | | public Date TrableOccurDaYCollect; |
| | | @AuraEnabled |
| | | public String sourceForRepair; |
| | | @AuraEnabled |
| | | public String HospitalDepartmentId; |
| | | |
| | | @AuraEnabled |
| | | public String isAEProfileC; |
| | | @AuraEnabled |
| | | public String isCNBuyC; |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | //申请修理 |
| | |
| | | var status = this.StatusC; |
| | | if (status != '待处理') { |
| | | this.ShowToastEvent("报修子单的状态不是 待处理 无法申请修理", "error") |
| | | // alert('报修子单的状态不是 待处理 无法申请修理'); |
| | | return; |
| | | } |
| | | var url = '/apex/ChoiceAsset?Id=' + this.Id + '&Type=Repair'; |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 复制 |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 复制 |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonCampaignCtl.init'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCreateAssessmentReport extends LightningElement { |
| | | @api recordId; |
| | |
| | | if (status == '公开中') { |
| | | window.open("/apex/AssessmentReport?camid=" + this.Id, "_top"); |
| | | } else { |
| | | this.ShowToastEvent("只有批准后才能创建报告!", "error") |
| | | alert("只有批准后才能创建报告!"); |
| | | } |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonCampaignCtl.init'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCreateInstructReport extends LightningElement { |
| | | @api recordId; |
| | |
| | | CreateInstructReport() { |
| | | var status = this.Status; |
| | | if (status == '公开中') { |
| | | window.open("/apex/InstructReport?camid="+this.Id, "_top"); |
| | | window.open("/apex/InstructReport?camid=" + this.Id, "_top"); |
| | | } else { |
| | | this.ShowToastEvent("只有批准后才能创建报告!", "error") |
| | | alert("只有批准后才能创建报告!") |
| | | } |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.HospitalC = result.HospitalC; |
| | | this.HospitalIdC = result.HospitalIdC; |
| | | this.DepartmentClassC = result.DepartmentClassC; |
| | | this.DepartmentClassIdC = result.DepartmentClassIdC; |
| | | this.HospitalC = result.HospitalC == undefined ? "" : result.HospitalC;; |
| | | this.HospitalIdC = result.HospitalIdC == undefined ? "" : result.HospitalIdC;; |
| | | this.DepartmentClassC = result.DepartmentClassC == undefined ? "" : result.DepartmentClassC;; |
| | | this.DepartmentClassIdC = result.DepartmentClassIdC == undefined ? "" : result.DepartmentClassIdC;; |
| | | this.Name = result.Name; |
| | | |
| | | this.CreateNewServiceContract(); |
| | |
| | | |
| | | console.log(url); |
| | | |
| | | // window.top.location.href = url; |
| | | window.top.location.href = url; |
| | | } |
| | | } |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | .createEmailHolder{ |
| | | position: relative; |
| | | display: inline-block; |
| | | width: 80px; |
| | | height: 80px; |
| | | text-align: center; |
| | | } |
| | | .container .uiContainerManager{ |
| | | display: none !important; |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="createEmailHolder" 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 { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForlexCreateQISFromAssetButton'; |
| | | import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | export default class lexCreateQISFromAsset extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | Old_Repair_Name; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | | |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | connectedCallback(){ |
| | | console.log(this.recordId); |
| | | init({recordId:this.recordId}).then(result=>{ |
| | | console.log(result); |
| | | if(result!=null){ |
| | | if (result.id!=null) { |
| | | var boolday=confirm('请确认此件是否属于10天内重复报告,如果是,请使用原QIS里的复制功能重新提交。'); |
| | | if(!boolday){ |
| | | return; |
| | | } |
| | | } |
| | | if (result.repId!=null) { |
| | | var boolday=confirm('请确认此件是否属于10天内重复报告,如果是,需按照原先的维修信息填写。'); |
| | | if(!boolday){ |
| | | return; |
| | | } |
| | | } |
| | | |
| | | } |
| | | }).catch(err=>{ |
| | | console.log("error:"); |
| | | console.log(err); |
| | | }).finally(()=>{ |
| | | |
| | | }); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateQISFromAsset"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <!-- 屏幕流配置 --> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <!-- name js中使用的变量,从屏幕流中获取参数 label 在屏幕流的该LWC的设置中显示 --> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonAssetCtl.init'; |
| | | import initUserName from '@salesforce/apex/buttonAssetCtl.initUserName'; |
| | | import selecctAccountByAccountId from '@salesforce/apex/buttonAssetCtl.selecctAccountByAccountId'; |
| | | import selecctProduct2ById from '@salesforce/apex/buttonAssetCtl.selecctProduct2ById'; |
| | | import selecctRepairByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctRepairByFomatToday'; |
| | | import selecctQISReportByFomatToday from '@salesforce/apex/buttonAssetCtl.selecctQISReportByFomatToday'; |
| | | |
| | | export default class LexCreateRepairFromAsset extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | userID; |
| | | EmployeeNoC; |
| | | day; |
| | | day1; |
| | | day2; |
| | | Name; |
| | | NoPartRiskDateFC; |
| | | ProductIDC; |
| | | AccountId; |
| | | HPIdC; |
| | | HospitalC; |
| | | DepartmentClassC; |
| | | HospitalId; |
| | | DepartmentClassId; |
| | | RepairSalesPointProvinceChinaC; |
| | | notCreateRepairFromAssetButton; |
| | | notCreateRepairFromAssetButton02; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.userID = result.userID; |
| | | this.day = result.day; |
| | | this.day1 = result.day1; |
| | | this.day2 = result.day2; |
| | | this.Name = result.Name; |
| | | this.NoPartRiskDateFC = result.NoPartRiskDateFC == undefined ? "" : result.NoPartRiskDateFC; |
| | | this.ProductIDC = result.ProductIDC == undefined ? "" : result.ProductIDC; |
| | | this.AccountId = result.AccountId == undefined ? "" : result.AccountId; |
| | | this.HPIdC = result.HPIdC == undefined ? "" : result.HPIdC; |
| | | this.HospitalC = result.HospitalC == undefined ? "" : result.HospitalC; |
| | | this.DepartmentClassC = result.DepartmentClassC == undefined ? "" : result.DepartmentClassC; |
| | | this.HospitalId = result.HospitalId == undefined ? "" : result.HospitalId; |
| | | this.DepartmentClassId = result.DepartmentClassId == undefined ? "" : result.DepartmentClassId; |
| | | this.notCreateRepairFromAssetButton = result.notCreateRepairFromAssetButton; |
| | | this.notCreateRepairFromAssetButton02 = result.notCreateRepairFromAssetButton02; |
| | | |
| | | initUserName({ |
| | | userId: this.userID |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.EmployeeNoC = result[0].Employee_No__c; |
| | | this.RepairSalesPointProvinceChinaC = result[0].RepairSalesPoint_Province_China__c; |
| | | } |
| | | this.CreateRepairFromAsset(); |
| | | }) |
| | | |
| | | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建修理 |
| | | CreateRepairFromAsset() { |
| | | var nCRepairFromAssetBSting = this.notCreateRepairFromAssetButton; |
| | | var nCRepairFromAssetB02Sting = this.notCreateRepairFromAssetButton02; |
| | | nCRepairFromAssetBSting = nCRepairFromAssetBSting + nCRepairFromAssetB02Sting; |
| | | var nCRepairFromAssetBList = nCRepairFromAssetBSting.split(','); |
| | | var EmployeeNo = this.EmployeeNoC; |
| | | |
| | | if (nCRepairFromAssetBList.indexOf(EmployeeNo) != -1) { |
| | | alert("对不起,您无权使用此按钮创建修理!"); |
| | | return; |
| | | } |
| | | |
| | | var fomatToday = this.day1; |
| | | var QIS_Name = ''; |
| | | var QIS_Id = ''; |
| | | var url1 = ""; |
| | | var FSE_GI_Main_Leader__id = ''; |
| | | var FSE_GI_Main_Leader__name = ''; |
| | | var FSE_SP_Main_Leader__id = ''; |
| | | var FSE_SP_Main_Leader__name = ''; |
| | | var Incharge_Staff = ''; |
| | | var Incharge_Staff_id = ''; |
| | | var Work_Location = ''; |
| | | var Old_Repair_Name = ''; |
| | | |
| | | selecctQISReportByFomatToday({ |
| | | AssetId: this.Id, |
| | | fomatToday: fomatToday |
| | | }).then(records => { |
| | | console.log(records); |
| | | if (records.length >= 1) { |
| | | var boolday = confirm('请确认此件是否属于10天内重复报告,如果是,请使用原QIS信息填写。'); |
| | | if (!boolday) { |
| | | return; |
| | | } |
| | | } |
| | | if (records.length >= 1) { |
| | | QIS_Name = records[0].Name; |
| | | QIS_Id = records[0].Id; |
| | | } |
| | | }) |
| | | selecctRepairByFomatToday({ |
| | | AssetId: this.Id, |
| | | fomatToday: fomatToday |
| | | }).then(records2 => { |
| | | console.log(records2); |
| | | if (records2.length >= 1) { |
| | | var boolday = confirm('此件设备如为10天内重复报告,建议回到原修理单使用复制功能提交。请确认是否继续新建修理? '); |
| | | if (!boolday) { |
| | | return; |
| | | } |
| | | } |
| | | if (records2.length >= 1) { |
| | | Old_Repair_Name = records2[0].Name; |
| | | } |
| | | }) |
| | | var partSupplyFinishDate = this.NoPartRiskDateFC; |
| | | if (this.day < this.NoPartRiskDateFC && this.NoPartRiskDateFC <= this.day2) { |
| | | alert('预计' + partSupplyFinishDate + '零件即将停产,请送修前与工厂及RC联络'); |
| | | } |
| | | if (this.NoPartRiskDateFC != null && this.NoPartRiskDateFC != undefined && this.NoPartRiskDateFC <= this.day) { |
| | | alert('该型号零件已经停产,有特殊需求,请送修前与工厂RC联络'); |
| | | } |
| | | selecctProduct2ById({ |
| | | Id: this.ProductIDC |
| | | }).then(recordP => { |
| | | console.log(recordP); |
| | | |
| | | if (recordP != null && recordP.length > 0) { |
| | | var canRepair = recordP[0].Can_Repair__c; |
| | | if (canRepair == '第三方') { |
| | | alert('非我司修理对象,无法新建修理,如有不明请咨询CIC'); |
| | | return; |
| | | } |
| | | if (canRepair == '不' || canRepair == null) { |
| | | alert('本设备无法新建修理'); |
| | | return; |
| | | } |
| | | if (canRepair == 'RC送修') { |
| | | url1 = "&00N10000009HAJl=TRUE" |
| | | } |
| | | } |
| | | }) |
| | | selecctAccountByAccountId({ |
| | | AccountId: this.AccountId |
| | | }).then(List => { |
| | | console.log(List); |
| | | if (List != null) { |
| | | var RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | console.log(RecordTypeId); |
| | | if (RecordTypeId != 'Agency') { |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15); |
| | | FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15); |
| | | FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) { |
| | | var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') { |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') { |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GI') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_BF') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ET') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GS') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_URO') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ENT') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GYN') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_OTH') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | } |
| | | |
| | | } |
| | | var url = "/a0J/e?CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClassC + "&CF00N10000002Dx5n_lkid=" + this.Id + "&CF00N10000002Dx5n=" + this.Name + "&CF00N10000002Dx1X_lkid=" + this.Id + "&CF00N10000002Dx1X=" + this.Name + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&CF00N10000009H7yM=" + QIS_Name + "&CF00N10000009H7yM_lkid=" + QIS_Id + "&00N10000009H2fa=" + Old_Repair_Name + "&retURL=%2F" + this.Id; |
| | | if (url1 != undefined) { |
| | | url = url + url1; |
| | | } |
| | | window.open(url); |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonAccountCtl.init'; |
| | | import initUserName from '@salesforce/apex/buttonAccountCtl.initUserName'; |
| | | import selecctAccountByAccountId from '@salesforce/apex/buttonAccountCtl.selecctAccountByAccountId'; |
| | | |
| | | export default class LexCreateRepairFromDepartment extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | RepairSalesPointProvinceChinaC; |
| | | HospitalC; |
| | | HospitalId; |
| | | DepartmentClassC; |
| | | DepartmentClassId; |
| | | Name; |
| | | userID; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.HospitalC = result.HospitalC == undefined ? "" : result.HospitalC;; |
| | | this.HospitalId = result.HospitalId == undefined ? "" : result.HospitalId;; |
| | | this.DepartmentClassC = result.DepartmentClassC == undefined ? "" : result.DepartmentClassC;; |
| | | this.DepartmentClassId = result.DepartmentClassId == undefined ? "" : result.DepartmentClassId;; |
| | | this.Name = result.Name; |
| | | this.userID = result.userID; |
| | | |
| | | initUserName({ |
| | | userId: this.userID |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.RepairSalesPointProvinceChinaC = result[0].RepairSalesPoint_Province_China__c; |
| | | } |
| | | this.CreateRepairFromDepartment(); |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | |
| | | //新建修理 |
| | | CreateRepairFromDepartment() { |
| | | var RecordTypeId; |
| | | var Incharge_Staff = ''; |
| | | var Incharge_Staff_id = ''; |
| | | var Work_Location = ''; |
| | | var FSE_GI_Main_Leader__id = ''; |
| | | var FSE_GI_Main_Leader__name = ''; |
| | | var FSE_SP_Main_Leader__id = ''; |
| | | var FSE_SP_Main_Leader__name = ''; |
| | | |
| | | selecctAccountByAccountId({ |
| | | AccountId: this.Id |
| | | }).then(List => { |
| | | console.log(List); |
| | | if (List[0]['ParentId'] != null) { |
| | | RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | console.log(RecordTypeId); |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15); |
| | | FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15); |
| | | FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) { |
| | | var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | console.log(recordId); |
| | | if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') { |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') { |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GI') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_BF') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ET') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GS') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_URO') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ENT') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GYN') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_OTH') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | } |
| | | var url = "/a0J/e?CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.HospitalC + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClassC + "&CF00N10000002Dx5n_lkid=" + this.Id + "&CF00N10000002Dx5n=" + this.Name + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002FH86=%e5%8f%aa%e4%bf%ae%e7%90%86&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&retURL=%2F" + this.Id; |
| | | window.open(url); |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonOnCallCtl.init'; |
| | | import selecctAccountBySegmentId from '@salesforce/apex/buttonOnCallCtl.selecctAccountBySegmentId'; |
| | | import selecctAccountBySegmentId02 from '@salesforce/apex/buttonOnCallCtl.selecctAccountBySegmentId02'; |
| | | import initUserName from '@salesforce/apex/buttonOnCallCtl.initUserName'; |
| | | |
| | | export default class LexCreateRepairFromOnCall extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | RepairSalesPointProvinceChinaC; |
| | | Name; |
| | | SegmentC; |
| | | HPC; |
| | | HospitalIdC; |
| | | SalesdepartmentHPIDC; |
| | | SalesdepartmentHPC; |
| | | OncallEquipmentC; |
| | | TrableOccurdaYCollectC; |
| | | userID; |
| | | SegmentId; |
| | | OncallEquipmentId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.Name = result.Name; |
| | | this.SegmentC = result.SegmentC == undefined ? "" : result.SegmentC; |
| | | this.HPC = result.HPC == undefined ? "" : result.HPC; |
| | | this.HospitalIdC = result.HospitalIdC == undefined ? "" : result.HospitalIdC; |
| | | this.SalesdepartmentHPIDC = result.SalesdepartmentHPIDC == undefined ? "" : result.SalesdepartmentHPIDC; |
| | | this.SalesdepartmentHPC = result.SalesdepartmentHPC == undefined ? "" : result.SalesdepartmentHPC; |
| | | this.OncallEquipmentC = result.OncallEquipmentC == undefined ? "" : result.OncallEquipmentC; |
| | | this.TrableOccurdaYCollectC = result.TrableOccurdaYCollectC == undefined ? "" : result.TrableOccurdaYCollectC; |
| | | this.userID = result.userID; |
| | | this.SegmentId = result.SegmentId == undefined ? "" : result.SegmentId; |
| | | this.OncallEquipmentId = result.OncallEquipmentId == undefined ? "" : result.OncallEquipmentId; |
| | | |
| | | initUserName({ |
| | | userId: this.userID |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.RepairSalesPointProvinceChinaC = result[0].RepairSalesPoint_Province_China__c; |
| | | } |
| | | this.CreateRepairFromOnCall(); |
| | | }) |
| | | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | //新建修理 |
| | | CreateRepairFromOnCall() { |
| | | var Work_Location = ''; |
| | | var Incharge_Staff = ''; |
| | | var Incharge_Staff_id = ''; |
| | | var FSE_GI_Main_Leader__id = ''; |
| | | var FSE_GI_Main_Leader__name = ''; |
| | | var FSE_SP_Main_Leader__id = ''; |
| | | var FSE_SP_Main_Leader__name = ''; |
| | | var RecordTypeId; |
| | | |
| | | selecctAccountBySegmentId({ |
| | | segmentId: this.SegmentId |
| | | }).then(List => { |
| | | console.log(List); |
| | | if (List[0]['ParentId']) { |
| | | RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | console.log(RecordTypeId); |
| | | } |
| | | |
| | | selecctAccountBySegmentId02({ |
| | | segmentId: this.SegmentId |
| | | }).then(account => { |
| | | console.log(account); |
| | | if (account[0].ParentId != null) { |
| | | if (account[0].Parent.RecordTypeId != null || account[0].Parent.RecordTypeId != undefined) { |
| | | var recordId = account[0].Parent.RecordType_DeveloperName__c.substring(0, 15); |
| | | console.log(recordId); |
| | | if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') { |
| | | if (account[0].Parent.Parent.FSE_GI_Main_Leader__c != null) { |
| | | Work_Location = account[0].Parent.Parent.FSE_GI_Main_Leader__r.Work_Location__c; |
| | | } |
| | | |
| | | } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') { |
| | | if (account[0].Parent.Parent.FSE_SP_Main_Leader__c != null) { |
| | | Work_Location = account[0].Parent.Parent.FSE_SP_Main_Leader__r.Work_Location__c; |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15); |
| | | FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15); |
| | | FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GI') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_BF') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ET') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GS') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_URO') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ENT') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GYN') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_OTH') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | } |
| | | |
| | | var url = "/a0J/e?CF00N10000002FIJU_lkid=" + this.Id + "&CF00N10000002FIJU=" + this.Name + "&CF00N10000002Dx66_lkid=" + this.HospitalIdC + "&CF00N10000002Dx66=" + this.HPC + "&CF00N10000002Dx5t_lkid=" + this.SalesdepartmentHPIDC + "&CF00N10000002Dx5t=" + this.SalesdepartmentHPC + "&CF00N10000002Dx5n_lkid=" + this.SegmentId + "&CF00N10000002Dx5n=" + this.SegmentC + "&CF00N10000002Dx1X_lkid=" + this.OncallEquipmentId + "&CF00N10000002Dx1X=" + this.OncallEquipmentC + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002Dx5y=" + this.TrableOccurdaYCollectC + "&00N10000002FH86=%e4%bb%8eOn-Call&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&retURL=%2F" + this.Id; |
| | | window.open(url); |
| | | }) |
| | | }) |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| New file |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | </div> |
| | | </template> |
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonQISReportCtl.init'; |
| | | import initUserName from '@salesforce/apex/buttonQISReportCtl.initUserName'; |
| | | import selecctAccountByAccountId from '@salesforce/apex/buttonQISReportCtl.selecctAccountByAccountId'; |
| | | |
| | | export default class LexCreateRepairFromQIS extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | Name; |
| | | RepairSalesPointProvinceChinaC; |
| | | Hospital; |
| | | HospitalId; |
| | | nextAction; |
| | | SpecialFollow; |
| | | HPID; |
| | | SourceOnCall; |
| | | DepartmentClassId; |
| | | DepartmentClass; |
| | | HospitalDepartment; |
| | | nonyushohin; |
| | | TrableOccurDaYCollect; |
| | | sourceForRepair; |
| | | OCMJudgementC |
| | | HospitalDepartmentId; |
| | | userId; |
| | | SourceOnCallId; |
| | | nonyushohinId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.Name = result.Name; |
| | | this.SourceOnCallId = result.SourceOnCallId == undefined ? "" : result.SourceOnCallId; |
| | | this.nonyushohinId = result.nonyushohinId == undefined ? "" : result.nonyushohinId; |
| | | this.Hospital = result.Hospital == undefined ? "" : result.Hospital; |
| | | this.HospitalId = result.HospitalId == undefined ? "" : result.HospitalId; |
| | | this.nextAction = result.nextAction == undefined ? "" : result.nextAction; |
| | | this.SpecialFollow = result.SpecialFollow == undefined ? "" : result.SpecialFollow; |
| | | this.HPID = result.HPID == undefined ? "" : result.HPID; |
| | | this.SourceOnCall = result.SourceOnCall == undefined ? "" : result.SourceOnCall; |
| | | this.DepartmentClassId = result.DepartmentClassId == undefined ? "" : result.DepartmentClassId; |
| | | this.DepartmentClass = result.DepartmentClass == undefined ? "" : result.DepartmentClass; |
| | | this.HospitalDepartment = result.HospitalDepartment == undefined ? "" : result.HospitalDepartment; |
| | | this.nonyushohin = result.nonyushohin == undefined ? "" : result.nonyushohin; |
| | | this.TrableOccurDaYCollect = result.TrableOccurDaYCollect == undefined ? "" : result.TrableOccurDaYCollect; |
| | | this.sourceForRepair = result.sourceForRepair == undefined ? "" : result.sourceForRepair; |
| | | this.OCMJudgementC = result.OCMJudgementC == undefined ? "" : result.OCMJudgementC; |
| | | this.HospitalDepartmentId = result.HospitalDepartmentId == undefined ? "" : result.HospitalDepartmentId; |
| | | this.userId = result.userId; |
| | | |
| | | initUserName({ |
| | | userId: this.userId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.RepairSalesPointProvinceChinaC = result[0].RepairSalesPoint_Province_China__c; |
| | | } |
| | | this.CreateRepairFromQIS(); |
| | | }) |
| | | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | //新建修理QIS |
| | | CreateRepairFromQIS() { |
| | | console.log("开始"); |
| | | var newflag = false; |
| | | if ((this.OCMJudgementC == '质量问题' && this.nextAction == '无偿维修' && this.SpecialFollow == '0') || (this.OCMJudgementC == '非质量问题' && this.nextAction == '无偿维修' && this.SpecialFollow == '1') || (this.OCMJudgementC == '非质量问题' && this.nextAction == '有偿维修' && this.SpecialFollow == '0') || (this.OCMJudgementC == '质量问题+非质量问题' && this.nextAction == '无偿维修' && this.SpecialFollow == '1') || (this.OCMJudgementC == '质量问题+非质量问题' && this.nextAction == '有偿维修+无偿维修' && this.SpecialFollow == '0')) { |
| | | newflag = true; |
| | | } |
| | | console.log(newflag); |
| | | if (newflag) { |
| | | selecctAccountByAccountId({ |
| | | HospitalDepartmentId: this.HospitalDepartmentId |
| | | }).then(List => { |
| | | console.log(List); |
| | | var RecordTypeId; |
| | | var Incharge_Staff = ''; |
| | | var Incharge_Staff_id = ''; |
| | | var Work_Location = ''; |
| | | if (List[0]['ParentId'] != null) { |
| | | RecordTypeId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | console.log(RecordTypeId); |
| | | var FSE_GI_Main_Leader__id = ''; |
| | | var FSE_GI_Main_Leader__name = ''; |
| | | var FSE_SP_Main_Leader__id = ''; |
| | | var FSE_SP_Main_Leader__name = ''; |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | FSE_GI_Main_Leader__id = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'].substring(0, 15); |
| | | FSE_GI_Main_Leader__name = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | FSE_SP_Main_Leader__id = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'].substring(0, 15); |
| | | FSE_SP_Main_Leader__name = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Name']; |
| | | } |
| | | if (List[0]['Parent']['RecordType_DeveloperName__c'] != null || List[0]['Parent']['RecordType_DeveloperName__c'] != undefined) { |
| | | var recordId = List[0]['Parent']['RecordType_DeveloperName__c'].substring(0, 15); |
| | | if (recordId == 'Department_Class_GI' || recordId == 'Department_Class_BF' || recordId == 'Department_Class_ET') { |
| | | if (List[0]['Parent']['Parent']['FSE_GI_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_GI_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | } else if (recordId == 'Department_Class_GS' || recordId == 'Department_Class_URO' || recordId == 'Department_Class_ENT' || recordId == 'Department_Class_GYN' || recordId == 'Department_Class_OTH') { |
| | | if (List[0]['Parent']['Parent']['FSE_SP_Main_Leader__c'] != null) { |
| | | Work_Location = List[0]['Parent']['Parent']['FSE_SP_Main_Leader__r']['Work_Location__c']; |
| | | } |
| | | |
| | | } |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GI') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_BF') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ET') { |
| | | Incharge_Staff = FSE_GI_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_GI_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GS') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_URO') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_ENT') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_GYN') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | if (RecordTypeId == 'Department_Class_OTH') { |
| | | Incharge_Staff = FSE_SP_Main_Leader__name; |
| | | Incharge_Staff_id = FSE_SP_Main_Leader__id; |
| | | } |
| | | } |
| | | |
| | | window.open("/a0J/e?CF00N10000002FIJU_lkid=" + this.SourceOnCallId + "&CF00N10000002FIJU=" + this.SourceOnCall + "&CF00N10000002FIJZ_lkid=" + this.Id + "&CF00N10000002FIJZ=" + this.Name + "&CF00N10000002Dx66_lkid=" + this.HospitalId + "&CF00N10000002Dx66=" + this.Hospital + "&CF00N10000002Dx5t_lkid=" + this.DepartmentClassId + "&CF00N10000002Dx5t=" + this.DepartmentClass + "&CF00N10000002Dx5n_lkid=" + this.HospitalDepartmentId + "&CF00N10000002Dx5n=" + this.HospitalDepartment + "&CF00N10000002Dx1X_lkid=" + this.nonyushohinId + "&CF00N10000002Dx1X=" + this.nonyushohin + "&CF00N10000002EMHw_lkid=" + Incharge_Staff_id + "&CF00N10000002EMHw=" + Incharge_Staff + "&00N10000002Dx5y=" + this.TrableOccurDaYCollect + "&00N10000006P6SM=" + encodeURI(Work_Location) + "&00N10000002FH86=" + this.sourceForRepair + "&00N10000006P6Rn=" + this.RepairSalesPointProvinceChinaC + "&retURL=%2F" + this.Id); |
| | | |
| | | }) |
| | | } else { |
| | | alert("不能新建修理"); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <apiVersion>54.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 制作报告书 |
| New file |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | window.location.reload(); |
| | | } |
| | | window.location.reload(); |
| | | }) |
| | | } else { |
| | | this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error") |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 打印维修委托书 |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 修理报价预估 |
| | |
| | | <template> |
| | | <div class="exampleHolder" if:true={IsLoading}> |
| | | <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner> |
| | | <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button> |
| | | </div> |
| | | </template> |
| | |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonQISReportCtl.init'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexQISMBCrequestNew extends LightningElement { |
| | | @api recordId; |
| | |
| | | var status = this.QISStatusC; |
| | | |
| | | if (status != '完毕' && status != '已回答' && status != '取消') { |
| | | this.ShowToastEvent("QIS没有审批完毕或取消,不可以创建QIS M-BC!", "error"); |
| | | alert("QIS没有审批完毕或取消,不可以创建QIS M-BC!"); |
| | | return; |
| | | } |
| | | var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id; |
| | | window.top.location.href = url; |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | |
| | | this.QuarterlyReport(); |
| | | this.SelectProduct2CIC(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | |
| | | |
| | | // 新建CIC/产品 |
| | | SelectProduct2CIC() { |
| | | var pathnames = window.self.location.pathname.split('/'); |
| | | console.log(11111111); |
| | | var pathnames = window.location.pathname.split("/"); |
| | | if (pathnames[1] == "emptyHtmlDoc.html") { |
| | | window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_parent"); |
| | | } else { |
| | |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | <target>lightning__FlowScreen</target> |
| | | </targets> |
| | | <!-- 定义变量 --> |
| | | <targetConfigs> |
| | | <targetConfig targets="lightning__FlowScreen"> |
| | | <property name="recordId" type="String" label="recordId"/> |
| | | </targetConfig> |
| | | </targetConfigs> |
| | | </LightningComponentBundle> |
| | |
| | | } |
| | | |
| | | foo() { |
| | | queryForrecords3({ |
| | | dealer: this.dealer |
| | | }).then(result => { |
| | | if (result.length > 0 && result[0].FirstParagraph__c == true) { |
| | | if (!confirm("该经销商为先款对象,是否继续申请修理?")) { |
| | | return; |
| | | } |
| | | } |
| | | if ( |
| | | this.numberofEffectiveContract == "无" && this.newProductGuaranteTxt != "2: 多年保修" && |
| | | this.newProductGuaranteTxt != "2: 服务多年保修" && this.newProductGuaranteTxt != "8: 市场多年保修" && |
| | | this.onSiteRepair == "直送SORC修理" |
| | | ) { |
| | | if (!confirm("设备为非维修合同且非多年保修对象品,请确认是否直送SORC修理?")) { |
| | | return; |
| | | } |
| | | } |
| | | if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) && |
| | | this.onSiteRepair == "RC修理" && this.FSEState == "山东省" |
| | | ) { |
| | | if (!confirm("该设备为维修合同或多年保修对象品,请确认是否送至RC修理?")) { |
| | | return; |
| | | } |
| | | } |
| | | var today = Date.now(); |
| | | var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions); |
| | | var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000); |
| | | if (this.profileName != "系统管理员" && this.userName != "胡 玉成" && this.userName != "李 琪清" && |
| | | this.userName != "郭 洋" && |
| | | this.delayReportReason == undefined && dates > "1" && |
| | | this.repairSource != "QIS转修理") { |
| | | alert("申请修理时SAP修理申请日超过问题联络收到日1天,必须填写问超时报告的理由"); |
| | | return; |
| | | } |
| | | if (this.quickRepairSign == true && (this.numberofEffectiveContract == "有" || this.newProductGuaranteTxt == "2: 多年保修" || |
| | | this.newProductGuaranteTxt == "2: 服务多年保修" || this.newProductGuaranteTxt == "8: 市场多年保修") && |
| | | (this.onSiteRepair == "RC修理" || this.onSiteRepair == "办事处修理" || this.onSiteRepair == "现场修理")) { |
| | | if (this.RCCD == "2.东北" || this.RCCD == "3.西北") { |
| | | if (!confirm("该型号对应为合同或多年保对象品。如确认为大修理故障,需要选择直送SORC修理,请确认是否继续。")) { |
| | | return; |
| | | } |
| | | } else if (this.RCCD == "1.华北" || this.RCCD == "6.华南" || this.RCCD == "4.西南") { |
| | | if (!confirm("该型号对应为合同或多年保对象品。如确认为大修理故障,需要选择直送OGZ修理,请确认是否继续。")) { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var returnsProductWay = this.returnsProductway; |
| | | if (returnsProductWay == undefined) { |
| | | if (!confirm("返品方式为空,是否继续申请修理!")) { |
| | | return; |
| | | } |
| | | } |
| | | var DetailedAddress = this.detailedAddress; |
| | | if (this.assetOwner != "Olympus") { |
| | | if (DetailedAddress != undefined) { |
| | | var prompt = '当前直返收货地址为:' + DetailedAddress + ',您确认不修改了吗?'; |
| | | if (!confirm(prompt)) { |
| | | return; |
| | | } |
| | | } else { |
| | | alert('当前修理没有录入直返收货的详细地址,不能申请修理!'); |
| | | return; |
| | | } |
| | | } |
| | | queryForEquipments({ |
| | | deliveredProductId: this.deliveredProductId, |
| | | }).then(equipments => { |
| | | if (equipments != null && equipments.length > 0) { |
| | | var equipment = equipments[0]; |
| | | if (equipment.Status == "廃棄") { |
| | | alert("设备废弃,不能提交申请!"); |
| | | return; |
| | | } |
| | | } |
| | | }); |
| | | if (this.FSEApplyForRepairTime != undefined) { |
| | | alert("已修理申请,不再修理申请了"); |
| | | return; |
| | | } |
| | | var surplusCount = 0; |
| | | if (this.URFReapir == false) { |
| | | queryForUrfAsset({ |
| | | maintenanceContractId: this.maintenanceContractId, |
| | | deliveredProductId: this.deliveredProductId, |
| | | }).then(urfAsset => { |
| | | var seriesMaxRepairCount = 0; |
| | | var seriesRepairCount = 0; |
| | | if (urfAsset != null && urfAsset.length > 0) { |
| | | seriesMaxRepairCount = urfAsset[0].Series_MaxRepairCount_F__c; |
| | | seriesRepairCount = urfAsset[0].Series_RepairCount_F__c; |
| | | surplusCount = seriesMaxRepairCount - seriesRepairCount; |
| | | } |
| | | }); |
| | | queryForUrfSeriesInfo({ |
| | | URFLimitSerial: this.URFLimitSerial, |
| | | }).then(urfSeriesInfo => { |
| | | var urfSeries = ""; |
| | | if (urfSeriesInfo != null && urfSeriesInfo.length > 0) { |
| | | urfSeries = urfSeriesInfo[0].URFLimitSerial__c; |
| | | } |
| | | queryForRepairCount({ |
| | | maintenanceContractId: this.maintenanceContractId, |
| | | status1: "1.受理完毕", |
| | | URFLimitSerial: urfSeries, |
| | | }).then(repairCount => { |
| | | if (repairCount.length > 0 && surplusCount == 1) { |
| | | alert("该设备关联限次合同,目前剩余次数小于送修设备。请等待进行中修理完成后再进行申请"); |
| | | return; |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | if (this.status != "草案中" && this.status != "1.受理完毕(SAP待发送)" && this.status != "4.修理品返送阶段") { |
| | | alert("不是草案中不能申请"); |
| | | } else { |
| | | if (this.dealer != undefined) { |
| | | // queryForrecords3({ |
| | | // dealer: this.dealer |
| | | // }).then(result => { |
| | | // if (result.length > 0 && result[0].FirstParagraph__c == true) { |
| | | // if (!confirm("该经销商为先款对象,是否继续申请修理?")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // if ( |
| | | // this.numberofEffectiveContract == "无" && this.newProductGuaranteTxt != "2: 多年保修" && |
| | | // this.newProductGuaranteTxt != "2: 服务多年保修" && this.newProductGuaranteTxt != "8: 市场多年保修" && |
| | | // this.onSiteRepair == "直送SORC修理" |
| | | // ) { |
| | | // if (!confirm("设备为非维修合同且非多年保修对象品,请确认是否直送SORC修理?")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) && |
| | | // this.onSiteRepair == "RC修理" && this.FSEState == "山东省" |
| | | // ) { |
| | | // if (!confirm("该设备为维修合同或多年保修对象品,请确认是否送至RC修理?")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // var today = Date.now(); |
| | | // var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions); |
| | | // var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000); |
| | | // if (this.profileName != "系统管理员" && this.userName != "胡 玉成" && this.userName != "李 琪清" && |
| | | // this.userName != "郭 洋" && |
| | | // this.delayReportReason == undefined && dates > "1" && |
| | | // this.repairSource != "QIS转修理") { |
| | | // alert("申请修理时SAP修理申请日超过问题联络收到日1天,必须填写问超时报告的理由"); |
| | | // return; |
| | | // } |
| | | // if (this.quickRepairSign == true && (this.numberofEffectiveContract == "有" || this.newProductGuaranteTxt == "2: 多年保修" || |
| | | // this.newProductGuaranteTxt == "2: 服务多年保修" || this.newProductGuaranteTxt == "8: 市场多年保修") && |
| | | // (this.onSiteRepair == "RC修理" || this.onSiteRepair == "办事处修理" || this.onSiteRepair == "现场修理")) { |
| | | // if (this.RCCD == "2.东北" || this.RCCD == "3.西北") { |
| | | // if (!confirm("该型号对应为合同或多年保对象品。如确认为大修理故障,需要选择直送SORC修理,请确认是否继续。")) { |
| | | // return; |
| | | // } |
| | | // } else if (this.RCCD == "1.华北" || this.RCCD == "6.华南" || this.RCCD == "4.西南") { |
| | | // if (!confirm("该型号对应为合同或多年保对象品。如确认为大修理故障,需要选择直送OGZ修理,请确认是否继续。")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // } |
| | | // var returnsProductWay = this.returnsProductway; |
| | | // if (returnsProductWay == undefined) { |
| | | // if (!confirm("返品方式为空,是否继续申请修理!")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // var DetailedAddress = this.detailedAddress; |
| | | // if (this.assetOwner != "Olympus") { |
| | | // if (DetailedAddress != undefined) { |
| | | // var prompt = '当前直返收货地址为:' + DetailedAddress + ',您确认不修改了吗?'; |
| | | // if (!confirm(prompt)) { |
| | | // return; |
| | | // } |
| | | // } else { |
| | | // alert('当前修理没有录入直返收货的详细地址,不能申请修理!'); |
| | | // return; |
| | | // } |
| | | // } |
| | | // queryForEquipments({ |
| | | // deliveredProductId: this.deliveredProductId, |
| | | // }).then(equipments => { |
| | | // if (equipments != null && equipments.length > 0) { |
| | | // var equipment = equipments[0]; |
| | | // if (equipment.Status == "廃棄") { |
| | | // alert("设备废弃,不能提交申请!"); |
| | | // return; |
| | | // } |
| | | // } |
| | | // }); |
| | | // if (this.FSEApplyForRepairTime != undefined) { |
| | | // alert("已修理申请,不再修理申请了"); |
| | | // return; |
| | | // } |
| | | // var surplusCount = 0; |
| | | // if (this.URFReapir == false) { |
| | | // queryForUrfAsset({ |
| | | // maintenanceContractId: this.maintenanceContractId, |
| | | // deliveredProductId: this.deliveredProductId, |
| | | // }).then(urfAsset => { |
| | | // var seriesMaxRepairCount = 0; |
| | | // var seriesRepairCount = 0; |
| | | // if (urfAsset != null && urfAsset.length > 0) { |
| | | // seriesMaxRepairCount = urfAsset[0].Series_MaxRepairCount_F__c; |
| | | // seriesRepairCount = urfAsset[0].Series_RepairCount_F__c; |
| | | // surplusCount = seriesMaxRepairCount - seriesRepairCount; |
| | | // } |
| | | // }); |
| | | // queryForUrfSeriesInfo({ |
| | | // URFLimitSerial: this.URFLimitSerial, |
| | | // }).then(urfSeriesInfo => { |
| | | // var urfSeries = ""; |
| | | // if (urfSeriesInfo != null && urfSeriesInfo.length > 0) { |
| | | // urfSeries = urfSeriesInfo[0].URFLimitSerial__c; |
| | | // } |
| | | // queryForRepairCount({ |
| | | // maintenanceContractId: this.maintenanceContractId, |
| | | // status1: "1.受理完毕", |
| | | // URFLimitSerial: urfSeries, |
| | | // }).then(repairCount => { |
| | | // if (repairCount.length > 0 && surplusCount == 1) { |
| | | // alert("该设备关联限次合同,目前剩余次数小于送修设备。请等待进行中修理完成后再进行申请"); |
| | | // return; |
| | | // } |
| | | // }); |
| | | // }); |
| | | // } |
| | | // if (this.status != "草案中" && this.status != "1.受理完毕(SAP待发送)" && this.status != "4.修理品返送阶段") { |
| | | // alert("不是草案中不能申请"); |
| | | // } else { |
| | | // if (this.dealer != undefined) { |
| | | |
| | | queryForFindInvalidLicense({ |
| | | dealerId: this.dealerId, |
| | | }).then(findInvalidLicense => { |
| | | console.log(findInvalidLicense); |
| | | if (findInvalidLicense.length > 0) { |
| | | alert("经销商三证不在有效期,无法送修"); |
| | | return; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | if (this.ifDeadHurt == "有") { |
| | | if (!confirm("是否确认AE要提交?")) { |
| | | return; |
| | | } |
| | | } |
| | | if (this.dayLater30 == "是") { |
| | | alert("创建后超过30天,不能申请了"); |
| | | return; |
| | | } |
| | | var prompt11 = "合同内大修次数已用完,当前修理为合同外的修理,是否继续?"; |
| | | if (this.URFReapir == false && surplusCount == 0) { |
| | | if (!confirm(prompt11)) { |
| | | return; |
| | | } |
| | | } |
| | | updateForRepair1({ |
| | | recordId: this.Id |
| | | }).then(result => { |
| | | if (result != null && result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } else { |
| | | queryForReocrds({ |
| | | inchargeStaffId: this.inchargeStaffId, |
| | | }).then(records => { |
| | | if (records != null && records.length > 0) { |
| | | var staff = records[0]; |
| | | console.log(staff); |
| | | updateRepair2({ |
| | | recordId: this.Id, |
| | | staff: staff, |
| | | DWSign: this.DWSign, |
| | | statusc: "1.受理完毕", |
| | | DOJStatus: this.DOJStatus, |
| | | SAPcondition: this.SAPcondition, |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null && result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } else { |
| | | if (this.salesOfficeCodeSelection == "成都RC") { |
| | | alert("现阶段,成都RC仅受理四川(西藏)内镜、西南全域CV/CLV,其余实物请发至广州RC。"); |
| | | } |
| | | } |
| | | }); |
| | | queryForRds({ |
| | | recordId: this.Id, |
| | | }).then(rds => { |
| | | if (rds != null && rds.length > 0) { |
| | | var repairAft = rds[0]; |
| | | if (repairAft.NewProductGuarante_Formula__c != repairAft.ProductGuarante_Create__c) { |
| | | alert("该设备保修信息已发生变化,请了解"); |
| | | } |
| | | } |
| | | }); |
| | | } else { |
| | | alert("没有找到 修理委托者"); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | // queryForFindInvalidLicense({ |
| | | // dealerId: this.dealerId, |
| | | // }).then(findInvalidLicense => { |
| | | // console.log(findInvalidLicense); |
| | | // if (findInvalidLicense.length > 0) { |
| | | // alert("经销商三证不在有效期,无法送修"); |
| | | // return; |
| | | // } |
| | | // }); |
| | | // } |
| | | // } |
| | | // if (this.ifDeadHurt == "有") { |
| | | // if (!confirm("是否确认AE要提交?")) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // if (this.dayLater30 == "是") { |
| | | // alert("创建后超过30天,不能申请了"); |
| | | // return; |
| | | // } |
| | | // var prompt11 = "合同内大修次数已用完,当前修理为合同外的修理,是否继续?"; |
| | | // if (this.URFReapir == false && surplusCount == 0) { |
| | | // if (!confirm(prompt11)) { |
| | | // return; |
| | | // } |
| | | // } |
| | | // updateForRepair1({ |
| | | // recordId: this.Id |
| | | // }).then(result => { |
| | | // if (result != null && result.length > 0) { |
| | | // var split = result.split(", "); |
| | | // alert(split[1]); |
| | | // } else { |
| | | // queryForReocrds({ |
| | | // inchargeStaffId: this.inchargeStaffId, |
| | | // }).then(records => { |
| | | // if (records != null && records.length > 0) { |
| | | // var staff = records[0]; |
| | | // console.log(staff); |
| | | // updateRepair2({ |
| | | // recordId: this.Id, |
| | | // staff: staff, |
| | | // DWSign: this.DWSign, |
| | | // statusc: "1.受理完毕", |
| | | // DOJStatus: this.DOJStatus, |
| | | // SAPcondition: this.SAPcondition, |
| | | // }).then(result => { |
| | | // console.log(result); |
| | | // if (result != null && result.length > 0) { |
| | | // var split = result.split(", "); |
| | | // alert(split[1]); |
| | | // } else { |
| | | // if (this.salesOfficeCodeSelection == "成都RC") { |
| | | // alert("现阶段,成都RC仅受理四川(西藏)内镜、西南全域CV/CLV,其余实物请发至广州RC。"); |
| | | // } |
| | | // } |
| | | // }); |
| | | // queryForRds({ |
| | | // recordId: this.Id, |
| | | // }).then(rds => { |
| | | // if (rds != null && rds.length > 0) { |
| | | // var repairAft = rds[0]; |
| | | // if (repairAft.NewProductGuarante_Formula__c != repairAft.ProductGuarante_Create__c) { |
| | | // alert("该设备保修信息已发生变化,请了解"); |
| | | // } |
| | | // } |
| | | // }); |
| | | // } else { |
| | | // alert("没有找到 修理委托者"); |
| | | // } |
| | | // }); |
| | | // } |
| | | // }); |
| | | // }); |
| | | |
| | | var staticResource; |
| | | var DetailedAddress = this.detailedAddress; |
| New file |
| | |
| | | .outerBorderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .borderCss{ |
| | | border: 1px solid #D4D4D4; |
| | | border-radius : 5px; |
| | | margin-bottom : 7px; |
| | | border-top : 3px solid #565959; |
| | | } |
| | | .headerDorderCss{ |
| | | border-top: 1px solid #565959; |
| | | border-bottom: 1px solid #D4D4D4; |
| | | padding:3px; |
| | | } |
| | | .centerCss{ |
| | | text-align: center; |
| | | } |
| | | .centerCss .left{ |
| | | margin-left: 100px; |
| | | }/* sample css file *//* sample css file */ |
| | |
| | | <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看"> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <!-- <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看"> --> |
| | | <apex:page controller="ReantalApplySeriesNoController" showHeader="false" sidebar="false" id="allPage" action="{!init}" title="序列查看" lightningStylesheets="true"> |
| | | <!-- 20230525 ljh lightning --> |
| | | <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning --> |
| | | <style type="text/css"> |
| | | .bPageBlock .detailList .dataCol { |
| | | width: auto; |
| | |
| | | </script> |
| | | <apex:form id="allForm"> |
| | | <apex:pageBlock id="searchBlock" title="序列信息"> |
| | | <apex:pageBlockSection columns="3" id="mainSection"> |
| | | <!-- 20230525 ljh lightning start --> |
| | | <!-- <apex:pageBlockSection columns="3" id="mainSection"> |
| | | <apex:pageBlockSectionItem > |
| | | <apex:outputLabel value="型号:" /> |
| | | <apex:outputField value="{!raq.Fixture_Model_No__c}"/> |
| | |
| | | </apex:pageBlockSectionItem> |
| | | <apex:pageBlockSectionItem > |
| | | <apex:outputLabel value="序列类型:"/> |
| | | <!-- {!Isadmix} --> |
| | | <apex:outputText value="{!IF(Isadmix,'混合','单一')}"/> |
| | | <!-- <input name="Isadmix" disabled="true" type="checkbox" value="{!Isadmix}" checked="{!IF(Isadmix,'checked','')}" /> --> |
| | | </apex:pageBlockSectionItem> |
| | | </apex:pageBlockSection> |
| | | </apex:pageBlockSection> --> |
| | | <table style="width:100%;margin:10px 0;" > |
| | | <tr> |
| | | <td>型号:</td> |
| | | <td>{!raq.Fixture_Model_No__c}</td> |
| | | <td>备品存放地:</td> |
| | | <td>{!raq.Internal_asset_location__c}</td> |
| | | <td>本部:</td> |
| | | <td>{!raq.Salesdepartment__c}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>备品分类:</td> |
| | | <td>{!raq.Equipment_Type__c}</td> |
| | | <td>产品分类:</td> |
| | | <td>{!raq.Product_category__c}</td> |
| | | <td>序列类型:</td> |
| | | <td>{!IF(Isadmix,'混合','单一')}</td> |
| | | </tr> |
| | | </table> |
| | | <!-- 20230525 ljh lightning end --> |
| | | </apex:pageBlock> |
| | | <apex:outputPanel id="message"> |
| | | <apex:pageMessages /> |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.connection20)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.apex20)}"/> |
| | | |
| | | <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning --> |
| | | <style type="text/css"> |
| | | .hideDropdown select{ |
| | | display: none |
| | |
| | | .table-head{padding-right:17px;} |
| | | .tablehead0{padding-right:0;} |
| | | .table-body table tr:nth-child(2n){background-color:#f2f2f2;} |
| | | /* 20230524 ljh lightning start */ |
| | | body .pbBody table.list tr th, body .pbBody table.list tr td { |
| | | border: 1px solid #ededed; |
| | | white-space: normal; |
| | | } |
| | | body .pbBody table.list tr.headerRow td,body .pbBody table.list tr.headerRow th { |
| | | background: #f2f3f3; |
| | | border-width: 0 0 1px 1px; |
| | | border-color: #e0e3e5; |
| | | font-size: .9em; |
| | | font-weight: bold; |
| | | } |
| | | /* 20230524 ljh lightning end */ |
| | | /*以下是下拉复选框的样式 start*/ |
| | | * { |
| | | margin: 0; |
| | |
| | | <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.instascan)}"/> |
| | | <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/> |
| | | <apex:stylesheet value="{!URLFOR($Resource.listTable)}"/><!-- 20230525 ljh lightning --> |
| | | <style type="text/css"> |
| | | .hideDropdown select{ |
| | | display: none |
| | |
| | | /* body .pbBody table.list tr.headerRow td, body .pbBody table.list tr.headerRow th { |
| | | border-width: 1px; |
| | | } */ |
| | | body .pbBody table.list tr th, body .pbBody table.list tr td { |
| | | border: 1px solid #ededed; |
| | | white-space: normal; |
| | | } |
| | | body .pbBody table.list tr.headerRow td,body .pbBody table.list tr.headerRow th { |
| | | background: #f2f3f3; |
| | | border-width: 0 0 1px 1px; |
| | | border-color: #e0e3e5; |
| | | font-size: .9em; |
| | | font-weight: bold; |
| | | } |
| | | /* 20230524 ljh lightning end */ |
| | | </style> |
| | | <script type="text/javascript"> |
| New file |
| | |
| | | body .pbBody table.list tr th, body .pbBody table.list tr td { |
| | | border: 1px solid #ededed; |
| | | white-space: normal; |
| | | } |
| | | body .pbBody table.list tr.headerRow td,body .pbBody table.list tr.headerRow th { |
| | | background: #f2f3f3; |
| | | border-width: 0 0 1px 1px; |
| | | border-color: #e0e3e5; |
| | | font-size: .9em; |
| | | font-weight: bold; |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <StaticResource xmlns="http://soap.sforce.com/2006/04/metadata"> |
| | | <cacheControl>Public</cacheControl> |
| | | <contentType>text/css</contentType> |
| | | </StaticResource> |