Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
4 文件已复制
26个文件已删除
37个文件已修改
39个文件已添加
1 文件已重命名
| | |
| | | public static InitData ESignController (String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c FROM eSignForm__c WHERE Id = :recordId LIMIT 1]; |
| | | eSignForm__c report = [SELECT Id,Group_purchase_PCL__c,OCM_man_province_cus__c,HPSignUpStatus__c,Sales_Root_Formula__c,HPSignUpDate__c,agencyAutoSignUpStatus__c,agencySignUpDate__c FROM eSignForm__c WHERE Id = :recordId LIMIT 1]; |
| | | res.Id = report.Id; |
| | | // res.RCManagerId = report.RC_ManagerId__c; |
| | | res.GrouppurchasePCL = report.Group_purchase_PCL__c; |
| | | res.OCMManProvinceCus = report.OCM_man_province_cus__c; |
| | | res.HPSignUpStatus = report.HPSignUpStatus__c; |
| | | res.agencyAutoSignUpStatus = report.agencyAutoSignUpStatus__c; |
| | | res.SalesRootFormula = report.Sales_Root_Formula__c; |
| | | res.HPSignUpDate = report.HPSignUpDate__c; |
| | | res.agencySignUpDate = report.agencySignUpDate__c; |
| | | res.profileId = UserInfo.getProfileId(); |
| | | res.userId = UserInfo.getUserId(); |
| | | res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME); |
| | | res.OBA4_sinFor = getProfileIdByName(LightingButtonConstant.OBA4_sinFor); |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static string getProfileIdByName(String name){ |
| | | Profile profile = null; |
| | | try { |
| | | profile = [select Id from Profile where Name =:name]; |
| | | } catch (Exception e) { |
| | | throw new AuraHandledException(e.getMessage()); |
| | | } |
| | | return profile.Id; |
| | | } |
| | | |
| | | //检索OCSM管理省 上的营业管理部担当 |
| | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | // @AuraEnabled |
| | | // public String RCManagerId; |
| | | @AuraEnabled |
| | | public Boolean GrouppurchasePCL; |
| | | @AuraEnabled |
| | |
| | | @AuraEnabled |
| | | public String HPSignUpStatus; |
| | | @AuraEnabled |
| | | public String agencyAutoSignUpStatus; |
| | | @AuraEnabled |
| | | public String SalesRootFormula; |
| | | @AuraEnabled |
| | | public Date HPSignUpDate; |
| | | @AuraEnabled |
| | | public String profileId; |
| | | } |
| | | |
| | | //获取当前登录人的 id |
| | | public Date agencySignUpDate; |
| | | @AuraEnabled |
| | | public static UserResult UserInfo_Owner() { |
| | | UserResult result = new UserResult(); |
| | | ID myUserID = UserInfo.getUserId(); |
| | | try { |
| | | User tempUser = [select id from user where id = : myUserID ]; |
| | | result.id = tempUser.id; |
| | | } catch (exception e) { |
| | | result.result = e.getMessage(); |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | public class UserResult { |
| | | @AuraEnabled |
| | | public string result; |
| | | public UserResult( ) { |
| | | result = 'Success'; |
| | | } |
| | | @AuraEnabled |
| | | public string id; |
| | | } |
| | | public String profileId; |
| | | @AuraEnabled |
| | | public String userId; |
| | | @AuraEnabled |
| | | public String systemProfileId; |
| | | @AuraEnabled |
| | | public String OBA4_sinFor; |
| | | } |
| | | } |
| New file |
| | |
| | | public with sharing class LexLostSubmitApprovalController { |
| | | |
| | | // 遗失报告 提交待审核 |
| | | @AuraEnabled |
| | | public static InitData LexLostSubmitApprovalController(String recordId) { |
| | | InitData res = new initData(); |
| | | try{ |
| | | List<LostReport_Detail__c> reportDetail = new List<LostReport_Detail__c>(); |
| | | LostReport__c report = [SELECT Id,Status__c FROM LostReport__c WHERE Id = :recordId LIMIT 1]; |
| | | res.Id = report.Id; |
| | | res.statusTf = report.Status__c; |
| | | reportDetail = [SELECT Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c FROM LostReport_Detail__c WHERE id = :recordId AND Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c != null]; |
| | | res.reportDetailList = reportDetail; |
| | | System.debug(LoggingLevel.INFO, '*** zq: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** zq: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String statusTf; |
| | | @AuraEnabled |
| | | public List<LostReport_Detail__c> reportDetailList; |
| | | } |
| | | |
| | | //提交按钮 |
| | | @AuraEnabled |
| | | public static String submit(String recordId) { |
| | | try { |
| | | LostReport__c rac = [SELECT Id,Status__c FROM LostReport__c WHERE Id = :recordId LIMIT 1]; |
| | | rac.Id = rac.Id; |
| | | rac.Status__c = '填写完毕'; |
| | | update rac; |
| | | return '1'; |
| | | } catch (Exception ex) { |
| | | System.debug(LoggingLevel.INFO, '*** zq: ' + ex); |
| | | // return errMsg; |
| | | return ex.getMessage(); |
| | | } |
| | | } |
| | | } |
| 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> |
| | |
| | | public static final String TwoS8_Sales_Administrative_Assistant_Plan = '2S8_销售行政助理(计划仪表板)'; |
| | | public static final String TwoS9_Spare = '2S9_备品窗口'; |
| | | public static final String OBA1_Tenderee = 'OBA1_招标管理'; |
| | | public static final String OBA4_sinFor = 'OBA4_签收管理'; |
| | | public static final String OBA7_Enquiry_Tenderee = 'OBA7_询价+招标管理'; |
| | | public static final String TwoM4_Marketplace_Manager = '2M4_市场产品本部担当(询价)'; |
| | | public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share'; |
| New file |
| | |
| | | public with sharing class buttonMaintenanceContractAssetCtl { |
| | | public buttonMaintenanceContractAssetCtl() { |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Maintenance_Contract_Asset__c report = [SELECT Id FROM Maintenance_Contract_Asset__c 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> |
| New file |
| | |
| | | public with sharing class buttonMaintenanceTaskCtl { |
| | | public buttonMaintenanceTaskCtl() { |
| | | |
| | | } |
| | | |
| | | @AuraEnabled |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Maintenance_Task__c report = [SELECT Id,Maintenance_Contract__c FROM Maintenance_Task__c WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.MaintenanceContractC = report.Maintenance_Contract__c; |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | |
| | | @AuraEnabled |
| | | public static List<Maintenance_Contract__c> selectMaintenanceContract(String Id){ |
| | | List<Maintenance_Contract__c> res = new List<Maintenance_Contract__c>(); |
| | | try{ |
| | | res = [SELECT Id,RecordType_DeveloperName__c,Estimate_Target__c from Maintenance_Contract__c WHERE Id =: Id]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String MaintenanceContractC; |
| | | } |
| | | } |
| 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> |
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | QIS_Report__c report = [SELECT 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 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.PAEDetermineC = report.PAE_Determine__c; |
| | | res.PAEDetermineACC = report.PAE_DetermineAC__c; |
| | | res.OCMJudgementC = report.OCM_judgement__c; |
| | |
| | | res.ETQUPLOADSTATUSC = report.ETQ_UPLOAD_STATUS__c; |
| | | res.AEDetermineResultC = report.AE_DetermineResult__c; |
| | | res.Id = report.Id; |
| | | res.Name = report.Name; |
| | | res.QISStatusC = report.QIS_Status__c; |
| | | |
| | | res.isAEProfileC = report.isAE_Profile__c; |
| | | res.isCNBuyC = report.is_CNBuy__c; |
| | | res.isPAEProfileC = report.isPAE_Profile__c; |
| | | res.userId = UserInfo.getUserId(); |
| | | res.email = UserInfo.getUserEmail(); |
| | | res.profileId = UserInfo.getProfileId(); |
| | |
| | | @AuraEnabled |
| | | public static String updateOSHNogoods(String Id,String email,String userId){ |
| | | List<User> user = new List<User>(); |
| | | user = [SELECT Id,Alias from User]; |
| | | user = [SELECT Id,Alias,Alias__c from User]; |
| | | |
| | | String res =''; |
| | | try { |
| | |
| | | return res; |
| | | } |
| | | |
| | | // 根据ID修理报价提交 |
| | | @AuraEnabled |
| | | public static String updateQisForRCRecieved(String QId,String uid){ |
| | | String res=''; |
| | | try { |
| | | List<User> user = new List<User>(); |
| | | user = [SELECT Id,Alias,Alias__c from User]; |
| | | |
| | | QIS_Report__c rac = new QIS_Report__c(); |
| | | rac.Id = QId; |
| | | rac.QIS_Status__c = 'RC检测中'; |
| | | rac.OCM_RC_RecievedDate__c = Date.today(); |
| | | rac.RC__c = uid; |
| | | rac.RC_Receive_staff__c = user[0].Alias; |
| | | List<User> records = new List<User>(); |
| | | records = [SELECT Id, BuchangApprovalManagerSales__c,JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id=: uid ]; |
| | | if (records != null && records.size() > 0 && records[0].BuchangApprovalManagerSales__c != null) { |
| | | rac.RC_Manager__c = records[0].BuchangApprovalManagerSales__c; |
| | | } else { |
| | | rac.RC_Manager__c = uid; |
| | | } |
| | | rac.CDS_date__c = Date.today(); |
| | | rac.RC_CDS_staff__c = user[0].Alias__c; |
| | | rac.OCSM_Nogoods__c = true; |
| | | update rac; |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | res = e.getMessage(); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String isAEProfileC; |
| | | @AuraEnabled |
| | | public String isCNBuyC; |
| | | @AuraEnabled |
| | | public String isPAEProfileC; |
| | | |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String Name; |
| | | @AuraEnabled |
| | | public String QISStatusC; |
| | | @AuraEnabled |
| | | public String userId; |
| | |
| | | |
| | | // 根据ID修改QIS市场部 |
| | | @AuraEnabled |
| | | public static void updateQISSCReport(String Id){ |
| | | public static String updateQISSCReport(String QId){ |
| | | String s; |
| | | try { |
| | | QIS_SC_Report__c qis_Sc = new QIS_SC_Report__c(); |
| | | qis_Sc.Id = Id; |
| | | qis_Sc.Status__c = '已提交'; |
| | | update qis_Sc; |
| | | QIS_SC_Report__c qis = new QIS_SC_Report__c(); |
| | | qis.Id = QId; |
| | | qis.Status__c = '已提交'; |
| | | update qis; |
| | | } catch (Exception e) { |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | s=e.getMessage(); |
| | | } |
| | | return s; |
| | | } |
| | | |
| | | public class InitData{ |
| | |
| | | String res =''; |
| | | try { |
| | | Repair_Quotation__c repair = new Repair_Quotation__c(); |
| | | repair.Id = recordid; |
| | | repair.Id = recordId; |
| | | repair.CutPriceStatus_Service__c = '已提交'; |
| | | update repair; |
| | | } catch (Exception e) { |
| | |
| | | String res =''; |
| | | try { |
| | | Repair_Quotation__c repair = new Repair_Quotation__c(); |
| | | repair.Id = recordid; |
| | | repair.Id = recordId; |
| | | repair.Rental_Apply_Discount_Status__c = '已提交'; |
| | | update repair; |
| | | } catch (Exception e) { |
| | |
| | | return res; |
| | | } |
| | | |
| | | // 查找简档 |
| | | @AuraEnabled |
| | | public static List<Profile> initSelectProfile(String profileId){ |
| | | List<Profile> res = new List<Profile>(); |
| | | try{ |
| | | res = [SELECT Id,name FROM Profile WHERE Id=: profileId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| New file |
| | |
| | | public with sharing class lexConsumablesLostController { |
| | | // 耗材备品申请 取消 |
| | | @AuraEnabled |
| | | public static InitData lexConsumablesLostController(String recordId) { |
| | | InitData res = new initData(); |
| | | try{ |
| | | Consum_Apply__c report = [SELECT Id,Status__c,RA_Status__c,Yi_loaner_arranged__c FROM Consum_Apply__c WHERE Id = :recordId LIMIT 1]; |
| | | res.Id = report.Id; |
| | | res.statusTf = report.Status__c; |
| | | res.raStatusTf = report.RA_Status__c; |
| | | res.yiLoanerArr = report.Yi_loaner_arranged__c; |
| | | System.debug(LoggingLevel.INFO, '*** zq: ' + res); |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** zq: ' + e); |
| | | } |
| | | return res; |
| | | } |
| | | |
| | | public class InitData{ |
| | | @AuraEnabled |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String statusTf; |
| | | @AuraEnabled |
| | | public String raStatusTf; |
| | | @AuraEnabled |
| | | public Decimal yiLoanerArr; |
| | | } |
| | | } |
| 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> |
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Maintenance_Contract__c report = [SELECT URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c, |
| | | Maintenance_Contract__c report = [SELECT URF_Contract__c,RecordTypeId,Is_RecognitionModel__c,Status__c,MC_approval_status__c,Payment_Plan_Sum_First__c, |
| | | Contract_quotation_or_not__c,Name,notRenew__c,Contract_print_completed__c,Maintenance_Contract_No__c, |
| | | upload_to_sap_time__c,old_Is_RecognitionModel__c,upload_to_RM_time__c,Is_Recognition_Model_True__c, |
| | | Id,URF_Contract_F__c,RecordType_DeveloperName__c,Estimate_Target__c FROM Maintenance_Contract__c WHERE Id =: recordId LIMIT 1]; |
| | |
| | | |
| | | // 维修合同失单报告 |
| | | @AuraEnabled |
| | | public static List<Lost_Report__c> selectRecords(String recordId){ |
| | | public static List<Lost_Report__c> selectRecords(String mcId){ |
| | | List<Lost_Report__c> res = new List<Lost_Report__c>(); |
| | | try{ |
| | | res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: recordId ]; |
| | | res = [SELECT Id,Status__c,Other_Reasons__c,Other__c,Third_Party_Company__c,Third_Party_Contract_Price__c,To_Where__c,Specific_Reasons__c,Maintenance_Contract__c from Lost_Report__c where Maintenance_Contract__c =: mcId ]; |
| | | }catch(Exception e){ |
| | | System.debug(LoggingLevel.INFO, '*** e: ' + e); |
| | | } |
| | |
| | | public static InitData init(String recordId){ |
| | | InitData res = new initData(); |
| | | try{ |
| | | Inspection_Report__c report = [SELECT Id,RecordTypeId FROM Inspection_Report__c WHERE Id =: recordId LIMIT 1]; |
| | | Inspection_Report__c report = [SELECT Id,RecordTypeId,RecordType.DeveloperName FROM Inspection_Report__c WHERE Id =: recordId LIMIT 1]; |
| | | System.debug(LoggingLevel.INFO, '*** opp: ' + report); |
| | | res.Id = report.Id; |
| | | res.RecordTypeId = report.RecordTypeId; |
| | | res.RecordType = report.RecordType.DeveloperName; |
| | | |
| | | System.debug(LoggingLevel.INFO, '*** res: ' + res); |
| | | }catch(Exception e){ |
| | |
| | | public String Id; |
| | | @AuraEnabled |
| | | public String RecordTypeId; |
| | | @AuraEnabled |
| | | public String RecordType; |
| | | } |
| | | } |
| | |
| | | } else { |
| | | url = "/apex/PAEDecisionRecord?RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId; |
| | | } |
| | | |
| | | window.open(url, '_self'); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // Intake universal code编辑 |
| | |
| | | } |
| | | window.open(url, '_self'); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | } |
| | |
| | | Address() { |
| | | if (this.partArrangementCompleteC != undefined) { |
| | | this.ShowToastEvent('零件已齐备完毕,直返收货地址不能修改!',"error") |
| | | // alert('零件已齐备完毕,直返收货地址不能修改!'); |
| | | } else if (this.RepairShippedDateC != undefined) { |
| | | this.ShowToastEvent('RC修理品已返送,直返收货地址不能修改!',"error") |
| | | // alert('RC修理品已返送,直返收货地址不能修改!'); |
| | | } else { |
| | | window.open("/apex/StraightBackAddress?id=" + this.Id, '_self'); |
| | | } |
| | |
| | | var status = this.StatusC; |
| | | if (status != '待处理') { |
| | | this.ShowToastEvent("报修子单的状态不是 待处理 无法申请修理", "error") |
| | | // alert('报修子单的状态不是 待处理 无法申请修理'); |
| | | return; |
| | | } |
| | | var url = '/apex/ChoiceAsset?Id=' + this.Id + '&Type=Repair'; |
| 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,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import updateForSubmitButton from '@salesforce/apex/ReportController.updateForSubmitButton'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | |
| | | import init from '@salesforce/apex/lexConsumablesLostController.lexConsumablesLostController'; |
| | | |
| | | export default class LexConsumablesLost extends LightningElement { |
| | | |
| | | @api recordId; |
| | | IsLoading = true; |
| | | @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(){ |
| | | this.IsLoading = false; |
| | | // this.submit(); |
| | | init({recordId:this.recordId}) |
| | | .then(result=>{ |
| | | console.log("LexConsumablesLost------>>>",result) |
| | | if (result.statusTf == "取消" ) { |
| | | this.showToast('已经取消!','error') |
| | | return; |
| | | } |
| | | if (result.statusTf == "删除" ) { |
| | | this.showToast('已经删除!','error') |
| | | return; |
| | | } |
| | | //状态为终止的不能提交审批 |
| | | if(result.raStatusTf == "已出库" || result.yiLoanerArr > 0){ |
| | | this.showToast('备品已经出库,不能取消!','error') |
| | | return; |
| | | } |
| | | window.open("/apex/ConsumApplyCancel?objId="+this.recordId, 'ConsumApplyCancel', 'width=500,height=250'); |
| | | // window.open("/apex/ConsumApplyCancel?objId={!URLENCODE(Consum_Apply__c.Id)}", 'ConsumApplyCancel', 'width=500,height=250'); |
| | | }) |
| | | .catch(e=>{console.log(e)}) |
| | | .finally(()=>{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonCampaignCtl.init'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCreateAssessmentReport extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | Status; |
| | | |
| | | @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.Status = result.Status; |
| | | |
| | | this.CreateAssessmentReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建授课/考核报告 |
| | | CreateAssessmentReport() { |
| | | var status = this.Status; |
| | | if (status == '公开中') { |
| | | window.open("/apex/AssessmentReport?camid=" + this.Id, "_top"); |
| | | } else { |
| | | this.ShowToastEvent("只有批准后才能创建报告!", "error") |
| | | } |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonCampaignCtl.init'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCreateInstructReport extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | Status; |
| | | |
| | | @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.Status = result.Status; |
| | | |
| | | this.CreateInstructReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建带教报告 |
| | | CreateInstructReport() { |
| | | var status = this.Status; |
| | | if (status == '公开中') { |
| | | window.open("/apex/InstructReport?camid="+this.Id, "_top"); |
| | | } else { |
| | | this.ShowToastEvent("只有批准后才能创建报告!", "error") |
| | | } |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init'; |
| | | import init from '@salesforce/apex/buttonMaintenanceTaskCtl.init'; |
| | | import selectMaintenanceContract from '@salesforce/apex/buttonMaintenanceTaskCtl.selectMaintenanceContract'; |
| | | |
| | | export default class LexCreateReportMaintenanceTask extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | RecordTypeDeveloperNameC; |
| | | EstimateTargetC; |
| | | MaintenanceContractC; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC; |
| | | this.EstimateTargetC = result.EstimateTargetC; |
| | | this.MaintenanceContractC = result.MaintenanceContractC; |
| | | |
| | | this.CreateReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 制作报告书 |
| | | CreateReport() { |
| | | var MaintenanceContractId = this.Id; |
| | | var RecordTypeName = this.RecordTypeDeveloperNameC; |
| | | var EstimateTarget = this.EstimateTargetC; |
| | | selectMaintenanceContract({ |
| | | Id: this.MaintenanceContractC |
| | | }).then(result => { |
| | | console.log(result); |
| | | var MaintenanceContractId = this.MaintenanceContractC; |
| | | var RecordTypeName = result[0].RecordType_DeveloperName__c; |
| | | var EstimateTarget = result[0].Estimate_Target__c; |
| | | |
| | | var url = ''; |
| | | if (EstimateTarget == "经销商" && (RecordTypeName == "NewMaintenance_Contract" || RecordTypeName == "VM_Contract")) { |
| | | url = "/apex/MoreMaintenanceContractPop?Id=" + MaintenanceContractId + "&RecordTypeName=" + RecordTypeName; |
| | | } else { |
| | | url = "http://powerbi.olympus.com.cn/Home/Login"; |
| | | } |
| | | window.open(url, '_bank'); |
| | | console.log(RecordTypeName); |
| | | console.log(EstimateTarget); |
| | | var url = ''; |
| | | if (EstimateTarget == "经销商" && (RecordTypeName == "NewMaintenance_Contract" || RecordTypeName == "VM_Contract")) { |
| | | url = "/apex/MoreMaintenanceContractPop?Id=" + MaintenanceContractId + "&RecordTypeName=" + RecordTypeName; |
| | | } else { |
| | | url = "http://powerbi.olympus.com.cn/Home/Login"; |
| | | } |
| | | window.open(url, '_bank'); |
| | | }) |
| | | } |
| | | } |
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init'; |
| | | import selectMaintenanceContractEstimate from '@salesforce/apex/otherButtonMaintenanceContractCtl.selectMaintenanceContractEstimate'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCustomAnewMaintenance extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | StatusC; |
| | | RecordTypeId; |
| | | URFContractC; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.RecordTypeId = result.RecordTypeId; |
| | | this.StatusC = result.StatusC; |
| | | this.URFContractC = result.URFContractC; |
| | | |
| | | this.CustomAnew(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | //中止 |
| | | CustomAnew() { |
| | | if (this.StatusC != "引合中") { |
| | | this.ShowToastEvent("维修合同不是询价中的状态,不能再报价", "error") |
| | | // alert("维修合同不是询价中的状态,不能再报价"); |
| | | } else { |
| | | init().then(result => { |
| | | if (result.length == 1) { |
| | | if (this.RecordTypeId == "01210000000gTYq") { |
| | | //URF限次合同2期 LY 20220902 start |
| | | if (this.URFContractC == true) { |
| | | window.open("/apex/SelectAssetEstimateURF?copyid=" + ids[0], "_top"); |
| | | } else { |
| | | window.open("/apex/SelectAssetEstimateVM?copyid=" + ids[0], "_top"); |
| | | } |
| | | //URF限次合同2期 LY 20220902 end |
| | | } else { |
| | | window.open("/apex/SelectAssetEstimate?copyid=" + ids[0], "_top"); |
| | | } |
| | | |
| | | } else { |
| | | this.ShowToastEvent('请选择一个报价', "error") |
| | | // alert('请选择一个报价'); |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 弹窗 |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | }).then(repList => { |
| | | if (repList != null && repList.length > 0) { |
| | | var rp = repList[0]; |
| | | if (rp.Status__c != "草案中" && |
| | | rp.Status__c != "1.受理完毕(SAP待发送)" && |
| | | rp.Status__c != "4.修理品返送阶段" |
| | | ) { |
| | | if (rp.Status__c != "草案中" && rp.Status__c != "1.受理完毕(SAP待发送)" && rp.Status__c != "4.修理品返送阶段") { |
| | | this.ShowToastEvent("不是草案中,不能删除", "error") |
| | | } else if (rp.Status__c == "4.修理品返送阶段" && |
| | | (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined) |
| | | ) { |
| | | } else if (rp.Status__c == "4.修理品返送阶段" && (rp.SAP_Transfer_time__c != undefined || rp.Repair_Ordered_Date__c != undefined)) { |
| | | this.ShowToastEvent("已经发送过SAP,不能删除", "error") |
| | | } else if (this.userID.substring(0, 15) != rp.CreatedById.substring(0, 15) && this.userID.substring(0, 15) != rp.Acc_OwnerId__c.substring(0, 15) && this.userID.substring(0, 15) != rp.FSE_ownerid__c.substring(0, 15)) { |
| | | this.ShowToastEvent("不是所有人、创建人或FSE主负责人,不能删除", "error") |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 继续新服务合同 |
| | | CustomNewCopy2() { |
| | | if (this.notRenewC) { |
| | | this.ShowToastEvent("请联系服务商品部!", "error"); |
| | | // alert("请联系服务商品部!"); |
| | | } else { |
| | | window.open("/" + this.Id + "/e?clone=1&Name=&00N10000002Dx5D=&00N10000002Dx5S=%e5%bc%95%e5%90%88%e4%b8%ad&00NO00000010sDc=&CF00NO00000010hyI=&CF00NO00000010hyI_lkid=&CF00NO00000010hyX=&CF00NO00000010hyX_lkid=&CF00NO00000010hyN=&CF00NO00000010hyN_lkid=&RecordType=01210000000gTYq&00N10000002pmOp=&00N10000006gZDd=&00N10000006gZDe=&00NO00000010hy4=&00N10000002Dx4j=&00N10000002Dx4m=&00N10000002Dx4w=&00N10000002Dx4k=&00N10000002Dx5J=&00N10000002Dx5M=&00N10000002Dx4i=&00N10000002Dx4h=&00N10000002Dx5K=&00N10000003OXdT=&00N100000048zfn=&00N10000002FMsq=&00N10000003OlGF=&00N10000002Dx4r=&00N100000047AY1=&00N100000047AYB=&00N100000047AY6=&00N10000003PCeB=&00N10000005HBNe=&00N10000006plAl=&00N10000002Dx5C=&retURL=%2F" + this.Id + "&saveURL=%2Fapex/SaveMaintenanceByCopy?mid=" + this.Id + "&CF00N100000048Paw=" + this.Name + "&CF00N100000048Paw_lkid=" + this.Id, "_blank"); |
| | | window.open("/" + this.Id + "/e?clone=1&Name=&00N10000002Dx5D=&00N10000002Dx5S=%e5%bc%95%e5%90%88%e4%b8%ad&00NO00000010sDc=&CF00NO00000010hyI=&CF00NO00000010hyI_lkid=&CF00NO00000010hyX=&CF00NO00000010hyX_lkid=&CF00NO00000010hyN=&CF00NO00000010hyN_lkid=&RecordType=01210000000gTYq&00N10000002pmOp=&00N10000006gZDd=&00N10000006gZDe=&00NO00000010hy4=&00N10000002Dx4j=&00N10000002Dx4m=&00N10000002Dx4w=&00N10000002Dx4k=&00N10000002Dx5J=&00N10000002Dx5M=&00N10000002Dx4i=&00N10000002Dx4h=&00N10000002Dx5K=&00N10000003OXdT=&00N100000048zfn=&00N10000002FMsq=&00N10000003OlGF=&00N10000002Dx4r=&00N100000047AY1=&00N100000047AYB=&00N100000047AY6=&00N10000003PCeB=&00N10000005HBNe=&00N10000006plAl=&00N10000002Dx5C=&retURL=%2F{!Maintenance_Contract__c.Id}&saveURL=%2Fapex/SaveMaintenanceByCopy?mid=" + this.Id + "&CF00N100000048Paw=" + this.Name + "&CF00N100000048Paw_lkid=" + this.Id, "_blank"); |
| | | } |
| | | } |
| | | |
| 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/otherButtonMaintenanceContractCtl.init'; |
| | | |
| | | export default class LexCustomNewMCMaintenance extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | StatusC; |
| | | IsRecognitionModelC; |
| | | RecordTypeId; |
| | | URFContractC; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.StatusC = result.StatusC; |
| | | this.IsRecognitionModelC = result.IsRecognitionModelC; |
| | | this.RecordTypeId = result.RecordTypeId; |
| | | this.URFContractC = result.URFContractC; |
| | | |
| | | this.CustomNewMC(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建新服务合同报价 |
| | | CustomNewMC() { |
| | | if ( this.StatusC != "引合中") { |
| | | alert("维修合同不是询价中的状态,不能新建报价"); |
| | | } else { |
| | | //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 start |
| | | if (this.IsRecognitionModelC == 1) { |
| | | if (!confirm("该经销商为先款对象,是否继续新建报价?")) { |
| | | return; |
| | | } |
| | | } |
| | | //维修合同新建报价时,如果是先款对象,弹出对话框提示 thh 20220304 end |
| | | if (this.RecordTypeId == "01210000000gTYq") { |
| | | if (this.URFContractC == "0") { |
| | | window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top"); |
| | | } else { |
| | | window.open("/apex/SelectAssetEstimateURF?mcid=" + this.Id, "_top"); |
| | | } |
| | | } else { |
| | | window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top"); |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html
| New file |
| | |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexCustomNewMaintenance extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | StatusC; |
| | | RecordTypeId; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.StatusC = result.StatusC; |
| | | this.RecordTypeId = result.RecordTypeId; |
| | | |
| | | this.CustomNew(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建维修合同报价 |
| | | CustomNew() { |
| | | if (this.StatusC != "引合中") { |
| | | this.ShowToastEvent("维修合同不是询价中的状态,不能新建报价", "error"); |
| | | // alert("维修合同不是询价中的状态,不能新建报价"); |
| | | } else { |
| | | if (this.RecordTypeId == "01210000000gTYq") { |
| | | window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top"); |
| | | } else { |
| | | window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 弹窗 |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | }).then(repairs => { |
| | | if (repairs != null && repairs.length > 0) { |
| | | var rp = repairs[0]; |
| | | if (rp.Return_Without_Repair_IF__c == 'true') { |
| | | console.log(rp); |
| | | if (rp.Return_Without_Repair_IF__c == true) { |
| | | this.ShowToastEvent("未修理归还的修理不允许减价申请", "error"); |
| | | // alert("未修理归还的修理不允许减价申请"); |
| | | return; |
| | | } else { |
| | | if (rp.Return_Without_Repair__c == 'true') { |
| | | if (rp.Return_Without_Repair__c == true) { |
| | | this.ShowToastEvent("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作", "error"); |
| | | // alert("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | return; |
| | | } |
| | | }) |
| | | location.reload(); |
| | | }) |
| | | } |
| | | |
| New file |
| | |
| | | <template> |
| | | <div class="lexESignAcceptanceHospital" if:true={IsLoding}> |
| | | <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 init from '@salesforce/apex/ESignController.ESignController'; |
| | | import OcsmResult from '@salesforce/apex/ESignController.OcsmResult'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | export default class lexESignAcceptanceFranchiser extends LightningElement { |
| | | @api recordId;//OwnerId |
| | | IsLoading = true; |
| | | profileId = '';//当前登录人的权限 |
| | | GrouppurchasePCL = null; //是否集采询价 |
| | | OCMManProvinceCus = null; //OCSM管理省 |
| | | agencyAutoSignUpStatus = null; //经销商状态 |
| | | agencySignUpDate = null;// 经销商签收日 |
| | | userId; // 当前登录人 |
| | | systemProfileId;//系统管理员 |
| | | OBA4_sinFor;//OBA4_签收管理 |
| | | |
| | | @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.agencyAutoSignUpStatus); |
| | | this.GrouppurchasePCL = result.GrouppurchasePCL; |
| | | this.OCMManProvinceCus = result.OCMManProvinceCus; |
| | | this.agencyAutoSignUpStatus = result.agencyAutoSignUpStatus; |
| | | this.agencySignUpDate = result.agencySignUpDate; |
| | | this.profileId = result.profileId; |
| | | this.userId = result.userId; |
| | | this.systemProfileId = result.systemProfileId; |
| | | this.OBA4_sinFor = result.OBA4_sinFor; |
| | | this.IsLoading = false; |
| | | this.AcceptanceFranchiser(); |
| | | }) |
| | | } |
| | | //签收单 验收确认(经销商) |
| | | AcceptanceFranchiser(){ |
| | | var Group_purchase_PCL ; |
| | | if(this.GrouppurchasePCL == 1){ |
| | | Group_purchase_PCL = '集采课'; |
| | | }else{ |
| | | Group_purchase_PCL = this.OCMManProvinceCus; |
| | | } |
| | | //检索OCSM管理省 上的营业管理部担当 |
| | | OcsmResult({GrouppurchasePCL:Group_purchase_PCL}).then(res=>{ |
| | | //营业管理部担当id |
| | | var salesManage; |
| | | console.log(res[0].SalesManage__c); |
| | | salesManage = res[0].SalesManage__c; |
| | | //电子签收单id |
| | | var id = this.recordId |
| | | //new 一个对象 |
| | | var eSignForm; |
| | | //经销商状态 |
| | | var status = this.agencyAutoSignUpStatus; |
| | | if (salesManage || this.profileId == this.systemProfileId) { |
| | | if (salesManage != this.userId && this.profileId != this.systemProfileId && this.profileId != this.OBA4_sinFor) { |
| | | // alert('您只能审批营业管理部担当是自己的签收单!'); |
| | | this.showToast("您只能审批营业管理部担当是自己的签收单!","error"); |
| | | return; |
| | | } else if (status != '申请中') { |
| | | // alert('您只能审批申请中的签收单!') |
| | | this.showToast("您只能审批申请中的签收单!","error"); |
| | | return; |
| | | } else if (this.agencySignUpDate == undefined || this.agencySignUpDate == null || this.agencySignUpDate == "") { |
| | | // alert('经销商签收日为空时,不可以确认!'); |
| | | this.showToast("经销商签收日为空时,不可以确认!","error"); |
| | | return; |
| | | }else{ |
| | | window.open ('/apex/AgencyConfirmPage?id='+this.recordId, '经销商确认', |
| | | 'height=440, width=750, top=150, left=300, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentSetRental_Order"> |
| | | <apiVersion>51.0</apiVersion> |
| | | <isExposed>true</isExposed> |
| | | <targets> |
| | | <target>lightning__AppPage</target> |
| | | <target>lightning__RecordPage</target> |
| | | <target>lightning__HomePage</target> |
| | | <target>lightning__RecordAction</target> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/ESignController.ESignController'; |
| | | import OcsmResult from '@salesforce/apex/ESignController.OcsmResult'; |
| | | import UserInfo_Owner from '@salesforce/apex/ESignController.UserInfo_Owner'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | export default class Submit extends LightningElement { |
| | | export default class lexESignAcceptanceHospital extends LightningElement { |
| | | @api recordId;//OwnerId |
| | | ownerId;//所有人id |
| | | id;//返回值的id |
| | | IsLoading = true; |
| | | profileId = ''; |
| | | arrMessage = []; |
| | | RCManagerId = null; |
| | | GrouppurchasePCL = null; |
| | | OCMManProvinceCus = null; |
| | | HPSignUpStatus = null; |
| | | SalesRootFormula = null; |
| | | HPSignUpDate = null; |
| | | salesManage = null; |
| | | profileId = '';//当前登录人的权限 |
| | | GrouppurchasePCL = null; //是否集采询价 |
| | | OCMManProvinceCus = null; //OCSM管理省 |
| | | HPSignUpStatus = null; //医院审批状态 |
| | | SalesRootFormula = null; // 销售渠道(文本) |
| | | HPSignUpDate = null;// 医院签收日 |
| | | userId; // 当前登录人 |
| | | systemProfileId;//系统管理员 |
| | | OBA4_sinFor;//OBA4_签收管理 |
| | | |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | console.log(result); |
| | | // this.RCManagerId = result.RCManagerId; |
| | | this.GrouppurchasePCL = result.GrouppurchasePCL; |
| | | this.OCMManProvinceCus = result.OCMManProvinceCus; |
| | | this.HPSignUpStatus = result.HPSignUpStatus; |
| | | this.SalesRootFormula = result.SalesRootFormula; |
| | | this.HPSignUpDate = result.HPSignUpDate; |
| | | this.profileId = result.profileId.slice(0,15); |
| | | this.profileId = result.profileId; |
| | | this.userId = result.userId; |
| | | this.systemProfileId = result.systemProfileId; |
| | | this.OBA4_sinFor = result.OBA4_sinFor; |
| | | this.IsLoading = false; |
| | | this.AcceptanceHospital(); |
| | | }) |
| | | } |
| | | //签收单 验收确认(医院) |
| | | AcceptanceHospital(){ |
| | | //先判断是否为集采课 |
| | | // var Group_purchase_PCL ; |
| | | // var Group_purchase_PCLFlag = "{!eSignForm__c.Group_purchase_PCL__c}"; |
| | | // if(Group_purchase_PCLFlag == 1){ |
| | | // Group_purchase_PCL = '集采课'; |
| | | // }else{ |
| | | // Group_purchase_PCL = "{!eSignForm__c.OCM_man_province_cus__c}"; |
| | | // } |
| | | console.log(this.GrouppurchasePCL,this.OCMManProvinceCus,'111111111') |
| | | var Group_purchase_PCL ; |
| | | // if(this.GrouppurchasePCL == 1){ |
| | | // Group_purchase_PCL = '集采课'; |
| | | // }else{ |
| | | Group_purchase_PCL = this.OCMManProvinceCus; |
| | | // } |
| | | if(this.GrouppurchasePCL == 1){ |
| | | Group_purchase_PCL = '集采课'; |
| | | }else{ |
| | | Group_purchase_PCL = this.OCMManProvinceCus; |
| | | } |
| | | //检索OCSM管理省 上的营业管理部担当 |
| | | // var sql = "select id, Name, SalesManage__c from OCM_Management_Province__c where Name = "+"\'"+Group_purchase_PCL+"\'"; |
| | | // var ocsmResult = sforce.connection.query(sql); |
| | | // var ocsm = ocsmResult.getArray("records"); |
| | | // //营业管理部担当id |
| | | // var salesManage; |
| | | // if (ocsm) { |
| | | // salesManage = ocsm[0].SalesManage__c; |
| | | // } |
| | | console.log(Group_purchase_PCL,this.profileId,'77777777777') |
| | | OcsmResult({GrouppurchasePCL:Group_purchase_PCL}).then(res=>{ |
| | | console.log(res) |
| | | //营业管理部担当id |
| | | var salesManage; |
| | | salesManage = res[0].SalesManage__c; |
| | | //电子签收单id |
| | |
| | | var status = this.HPSignUpStatus; |
| | | //销售渠道 |
| | | var sales_Root_Formula = this.SalesRootFormula; |
| | | if (salesManage || this.profileId == '00e10000000Y3o5') { |
| | | UserInfo_Owner().then(res => { |
| | | var userId = ''; |
| | | userId = res.id; |
| | | if (salesManage != userId && this.profileId != '00e10000000Y3o5' && this.profileId != '00e10000000s2cp') { |
| | | alert('您只能审批营业管理部担当是自己的签收单!'); |
| | | return; |
| | | } else if (status != '申请中') { |
| | | alert('您只能审批申请中的签收单!') |
| | | return; |
| | | } else if (this.HPSignUpDate) { |
| | | alert('医院签收日为空时,不可以确认!'); |
| | | return; |
| | | }else{ |
| | | if (salesManage || this.profileId == this.systemProfileId) { |
| | | if (salesManage != this.userId && this.profileId != this.systemProfileId && this.profileId != this.OBA4_sinFor) { |
| | | // alert('您只能审批营业管理部担当是自己的签收单!'); |
| | | this.showToast("您只能审批营业管理部担当是自己的签收单!","error"); |
| | | return; |
| | | } else if (status != '申请中') { |
| | | // alert('您只能审批申请中的签收单!') |
| | | this.showToast("您只能审批申请中的签收单!","error"); |
| | | return; |
| | | } else if (this.HPSignUpDate == undefined) { |
| | | // alert('医院签收日为空时,不可以确认!'); |
| | | this.showToast("医院签收日为空时,不可以确认!","error"); |
| | | return; |
| | | }else{ |
| | | if(sales_Root_Formula == 'OCM直接販売'){ |
| | | window.open ('/apex/HPDirectSalesConfirmPage?id='+this.recordId, '医院确认', |
| | | 'height=340, width=600, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }else{ |
| | | window.open ('/apex/HPConfirmPage?id='+this.recordId, '医院确认', |
| | | 'height=340, width=600, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | updateRecordView() { |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | } |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | if(type == 'success'){ |
| | | this.updateRecordView(); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | } |
| | | |
| | | // var foo = function() { |
| | | // //当前用户登录id |
| | | // var userId = "{!CASESAFEID($User.Id)}"; |
| | | // //当前用户简档id |
| | | // var ProfileId = "{!$Profile.Id}"; |
| | | // // var RC_Manager = "{!eSignForm__c.RC_ManagerId__c }"; |
| | | // //先判断是否为集采课 |
| | | // var Group_purchase_PCL ; |
| | | // var Group_purchase_PCLFlag = "{!eSignForm__c.Group_purchase_PCL__c}"; |
| | | // if(Group_purchase_PCLFlag == 1){ |
| | | // Group_purchase_PCL = '集采课'; |
| | | // }else{ |
| | | // Group_purchase_PCL = "{!eSignForm__c.OCM_man_province_cus__c}"; |
| | | // } |
| | | // //检索OCSM管理省 上的营业管理部担当 |
| | | // var sql = "select id, Name, SalesManage__c from OCM_Management_Province__c where Name = "+"\'"+Group_purchase_PCL+"\'"; |
| | | // var ocsmResult = sforce.connection.query(sql); |
| | | // var ocsm = ocsmResult.getArray("records"); |
| | | // //营业管理部担当id |
| | | // var salesManage; |
| | | // if (ocsm) { |
| | | // salesManage = ocsm[0].SalesManage__c; |
| | | // } |
| | | |
| | | // //电子签收单id |
| | | // var id = "{!eSignForm__c.Id}"; |
| | | // //new 一个对象 |
| | | // var eSignForm; |
| | | // //医院状态 |
| | | // var status = "{!eSignForm__c.HPSignUpStatus__c}"; |
| | | // //销售渠道 |
| | | // var sales_Root_Formula = "{!eSignForm__c.Sales_Root_Formula__c}"; |
| | | |
| | | // if (salesManage || ProfileId == '00e10000000Y3o5') { |
| | | // if (salesManage != userId && ProfileId != '00e10000000Y3o5' && ProfileId != '00e10000000s2cp') { |
| | | // alert('您只能审批营业管理部担当是自己的签收单!'); |
| | | // return; |
| | | // } else if (status != '申请中') { |
| | | // alert('您只能审批申请中的签收单!') |
| | | // return; |
| | | // } else if (!'{!eSignForm__c.HPSignUpDate__c}') { |
| | | // alert('医院签收日为空时,不可以确认!'); |
| | | // return; |
| | | // }else{ |
| | | // if(sales_Root_Formula == 'OCM直接販売'){ |
| | | // window.open ('/apex/HPDirectSalesConfirmPage?id='+"{!eSignForm__c.Id}", '医院确认', |
| | | // 'height=340, width=600, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | // }else{ |
| | | // window.open ('/apex/HPConfirmPage?id='+"{!eSignForm__c.Id}", '医院确认', |
| | | // 'height=340, width=600, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no'); |
| | | // } |
| | | |
| | | // } |
| | | // } |
| | | // } |
| | | // foo(); |
| | | } |
| | |
| | | import { LightningElement,wire,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import init from '@salesforce/apex/ESignController.ESignController'; |
| | | |
| | | export default class lexESignFormAttachment extends LightningElement { |
| | | @api recordId; |
| | | id; |
| | | IsLoading = true; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | //签收单 查看附件 |
| | | connectedCallback () { |
| | | this.IsLoading = false; |
| | | this.Attachment(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | Attachment(){ |
| | | window.open( `/apex/eSignFormAttachment?parentId=${this.recordId}`); |
| | | } |
| | | |
| | | // 弹窗 |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | this.IsLoading = false; |
| | | this.id = result.Id |
| | | window.open( `/apex/eSignFormAttachment?parentId=${this.id}`); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | // var From= function(){ |
| | | // window.open( "/apex/eSignFormAttachment?parentId={!URLENCODE(eSignForm__c.Id)}"); |
| | | // } |
| | | // From(); |
| | |
| | | IsLoading = true; |
| | | Id; |
| | | RecordTypeId; |
| | | RecordType; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.RecordTypeId = result.RecordTypeId; |
| | | this.RecordType = result.RecordType; |
| | | |
| | | this.insPageBtn(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 报告书明细编辑 |
| | | insPageBtn() { |
| | | var url; |
| | | if (this.RecordTypeId == '01210000000aLii') { |
| | | if (this.RecordType == 'ContractInspection') { |
| | | url = '/apex/OFSInsReportLayoutForVm'; |
| | | } else { |
| | | url = '/apex/OFSInsReportLayout'; |
| 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,track,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import updateForSubmitButton from '@salesforce/apex/ReportController.updateForSubmitButton'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/LexLostSubmitApprovalController.LexLostSubmitApprovalController'; |
| | | import submit from '@salesforce/apex/LexLostSubmitApprovalController.submit'; |
| | | |
| | | // 遗失报告 提交待审核 |
| | | export default class LexLostSubmitApproval extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | | @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(){ |
| | | this.IsLoading = false; |
| | | // this.submit(); |
| | | init({recordId:this.recordId}) |
| | | .then(result=>{ |
| | | console.log("LexConsumablesLost------>>>",result) |
| | | |
| | | if (result.statusTf == "填写完毕" || result.statusTf == "申请中" || result.statusTf == "已批准") { |
| | | this.showToast('请确认遗失报告状态,已经提交过的申请,不能重复提交','warning') |
| | | return; |
| | | } |
| | | |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | |
| | | // ----------------------------------------------------------------------------------------------------- |
| | | if (result.reportDetailList.length > 0) { |
| | | var qianpinDate = new Date(result.reportDetailList[0].Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c); |
| | | for (var i = 1; i < result.reportDetailList.length; i++) { |
| | | var d = new Date(result.reportDetailList[i].Rental_Apply_Equipment_Set_Detail__r.Lost_item_check_day__c); |
| | | if(d < qianpinDate){ |
| | | qianpinDate = d; |
| | | } |
| | | } |
| | | qianpinDate.setDate(qianpinDate.getDate() + 90); |
| | | var d = '' + qianpinDate.getFullYear()+'/' + (qianpinDate.getMonth()+1) + '/' + qianpinDate.getDate(); |
| | | this.showToast('请您的上级领导于' + d + '前完成遗失报告审批,否则备品自动断念,遗失报告自动取消。','warning'); |
| | | } |
| | | // ----------------------------------------------------------------------------------------------------- |
| | | |
| | | this.submitApproval() |
| | | }) |
| | | .catch(e=>{console.log(e)}) |
| | | .finally(()=>{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | |
| | | |
| | | showToast(msg,type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | submitApproval(){ |
| | | submit({ |
| | | recordId: this.recordId |
| | | }).then(result=>{ |
| | | if(result != '1'){ |
| | | this.showToast(result,"error"); |
| | | return |
| | | } |
| | | this.updateRecordView(this.recordId); |
| | | // this.showToast("提交成功","success"); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }) |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.InchargeStaffEmailC = result.InchargeStaffEmailC; |
| | | this.Name = result.Name; |
| | | this.HPNameC = result.HPNameC; |
| | | this.DeliveredProductC = result.DeliveredProductC; |
| | | this.RepairProductSerialNoC = result.RepairProductSerialNoC; |
| | | this.ServiceRepairNoC = result.ServiceRepairNoC; |
| | | this.RepairFirstestimatedDateC = result.RepairFirstestimatedDateC; |
| | | this.RepairEstimatedDateC = result.RepairEstimatedDateC; |
| | | this.RCInformationC = result.RCInformationC; |
| | | this.userEmail = result.userEmail; |
| | | this.InchargeStaffEmailC = result.InchargeStaffEmailC == undefined ? "" : result.InchargeStaffEmailC; |
| | | this.Name = result.Name == undefined ? "" : result.Name; |
| | | this.HPNameC = result.HPNameC == undefined ? "" : result.HPNameC; |
| | | this.DeliveredProductC = result.DeliveredProductC == undefined ? "" : result.DeliveredProductC; |
| | | this.RepairProductSerialNoC = result.RepairProductSerialNoC == undefined ? "" : result.RepairProductSerialNoC; |
| | | this.ServiceRepairNoC = result.ServiceRepairNoC == undefined ? "" : result.ServiceRepairNoC; |
| | | this.RepairFirstestimatedDateC = result.RepairFirstestimatedDateC == undefined ? "" : result.RepairFirstestimatedDateC; |
| | | this.RepairEstimatedDateC = result.RepairEstimatedDateC == undefined ? "" : result.RepairEstimatedDateC; |
| | | this.RCInformationC = result.RCInformationC == undefined ? "" : result.RCInformationC; |
| | | this.userEmail = result.userEmail == undefined ? "" : result.userEmail; |
| | | |
| | | this.mailMessege(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | // 报价附件更新的邮件通知 |
| | | mailMessege() { |
| | | var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id; |
| | | console.log(Link); |
| | | |
| | | location.href = 'mailto:' + this.InchargeStaffEmailC + |
| | | '?bcc=' + this.userEmail + |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // OCSM不要报告 |
| | |
| | | if (!confirm("不要报告后无法撤回,是否继续?")) { |
| | | return; |
| | | } |
| | | |
| | | if (this.OCSMAdministrativeReportNumberC != undefined || |
| | | this.OCSMAdministrativeReportDateC != undefined) { |
| | | this.ShowToastEvent("已经报告的QIS,不可以点击OCSM不要报告。", "error") |
| | | // alert("已经报告的QIS,不可以点击OCSM不要报告。"); |
| | | return; |
| | | } |
| | | |
| | | if (this.AwareDateC != undefined) { |
| | | updateRepair({ |
| | | recordId: this.Id |
| | | }).catch(error => { |
| | | if (error.body.pageErrors.length > 0) { |
| | | var errmsg = error.body.pageErrors[0].message.toString(); |
| | | this.ShowToastEvent(errmsg.join("\n"), "error") |
| | | // alert(errmsg.join("\n")); |
| | | return; |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | window.location.reload(); |
| | | }) |
| | | window.location.reload(); |
| | | } else { |
| | | this.ShowToastEvent("没有AwareDate或已经OCSM行政报告,请确认。", "error") |
| | | // alert("没有AwareDate或已经OCSM行政报告,请确认。"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | 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 { updateRecord } from 'lightning/uiRecordApi'; |
| | | import init from '@salesforce/apex/QISReportController.initForlexRCRecievedButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisForRCRecieved'; |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/buttonQISReportCtl.init'; |
| | | import updateQisForRCRecieved from '@salesforce/apex/buttonQISReportCtl.updateQisForRCRecieved'; |
| | | |
| | | export default class lexOCSMNogoods extends LightningElement { |
| | | @api recordId; |
| | | err; |
| | | IsLoading = true; |
| | | qisReportId; |
| | | qisStatus; |
| | | isAEProfile; |
| | | isCNBuy; |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | console.log(111); |
| | | console.log(currentPageReference); |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | userId; |
| | | QISStatusC; |
| | | isAEProfileC; |
| | | isCNBuyC; |
| | | isPAEProfileC; |
| | | |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | console.log("str"); |
| | | console.log(str); |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | |
| | | connectedCallback () { |
| | | connectedCallback() { |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | | this.IsLoading = false; |
| | | this.qisReportId = result.Id; |
| | | this.qisStatus = result.qIStatus; |
| | | this.isAEProfile = result.isAEProfile; |
| | | this.isCNBuy = result.isCNBuy; |
| | | console.log('this.qisStatus='+this.qisStatus); |
| | | if (this.qisStatus!='RC检测申请') { |
| | | const evt = new ShowToastEvent({ |
| | | title : 'OCM服务本部已经收到实物', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.Id = result.Id; |
| | | this.userId = result.userId; |
| | | this.QISStatusC = result.QISStatusC; |
| | | this.isAEProfileC = result.isAEProfileC; |
| | | this.isPAEProfileC = result.isPAEProfileC; |
| | | this.isCNBuyC = result.isCNBuyC; |
| | | |
| | | this.OCSMNogoods(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | if (this.isAEProfile == null || this.isPAEProfile == null || this.isCNBuy != 'true') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '安全信息未判定,请联系质量法规部', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | }else{ |
| | | this.updateQisSubmit(); |
| | | } |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | updateRecordView(recordId) { |
| | | updateRecord({fields: { Id: recordId }}); |
| | | } |
| | | |
| | | updateQisSubmit(){ |
| | | updateQis({ |
| | | recordId: this.recordId |
| | | }).then(result =>{ |
| | | |
| | | console.log('result'+result); |
| | | this.err = result; |
| | | if (result!='成功') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '更新失败', |
| | | message: this.err, |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | //OCSM无实物送达 |
| | | OCSMNogoods() { |
| | | if (this.QISStatusC != 'RC检测申请') { |
| | | this.ShowToastEvent("OCM服务本部已经收到实物", "error"); |
| | | } else { |
| | | if ((this.isAEProfileC == undefined || this.isPAEProfileC == undefined) && this.isCNBuyC != 'true') { |
| | | this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error"); |
| | | var btns = document.getElementsByName('rc_recieved'); |
| | | for (var i = 0; i < btns.length; i++) { |
| | | btns[i].disabled = true; |
| | | btns[i].className = 'btnDisabled'; |
| | | } |
| | | } else { |
| | | updateQisForRCRecieved({ |
| | | QId: this.Id, |
| | | uid: this.userId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | alert(result); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.updateRecordView(this.recordId); |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 弹窗 |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | // 减价申请 |
| | | // OSH无实物送达 |
| | | OSHNogoods() { |
| | | if (this.QISStatusC != 'OSH检测申请' && this.QISStatusC != '完毕') { |
| | | this.ShowToastEvent("OSH已经收到实物", "error") |
| | | // alert('OSH已经收到实物'); |
| | | } else { |
| | | updateOSHNogoods({ |
| | | Id: this.Id, |
| | |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | location.reload(); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | } |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 合同复核 |
| | |
| | | if (this.oldIsRecognitionModelC) { |
| | | if (this.uploadToRMTimeC == null) { |
| | | this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。', "error") |
| | | // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能复核。'); |
| | | return; |
| | | } else { |
| | | if (!this.IsRecognitionModelTrueC) { |
| | | this.ShowToastEvent('当前维修合同没有完成认款,不能进行复核。', "error") |
| | | // alert('当前维修合同没有完成认款,不能进行复核。'); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | var status = this.MCApprovalStatusC; |
| | | if (status != 'Draft' && status != 'Reject' && status != undefined) { |
| | | this.ShowToastEvent('复核已经提交,请确认状态。', "success") |
| | | // alert('复核已经提交,请确认状态。'); |
| | | this.ShowToastEvent('复核已经提交,请确认状态。', "error") |
| | | return; |
| | | } |
| | | var con_no = this.ContractprintCompletedC; |
| | | if (con_no == '') { |
| | | if (con_no == undefined) { |
| | | this.ShowToastEvent('合同盖章完毕为空,不能提交合同复核申请。', "error") |
| | | // alert('合同盖章完毕为空,不能提交合同复核申请。'); |
| | | return; |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | |
| | | }).catch(error => { |
| | | if (error.body.pageErrors[0] != null) { |
| | | var errmsg = error.body.pageErrors[0].message.toString(); |
| | | // alert(errmsg + '_sys'); |
| | | this.ShowToastEvent(errmsg + '_sys', "error") |
| | | return; |
| | | } |
| 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/otherButtonMaintenanceContractCtl.init'; |
| | | |
| | | export default class LexPrintInspectupReportInspectupPlan extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | |
| | | @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.PrintInspectupReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 报告书明细编辑 |
| | | PrintInspectupReport() { |
| | | window.open("/apex/PrintInspectupReport?id=" + this.Id, "_blank", "height=700px,innerHeight=700,width=700px,innerWidth=700px,top=100,left=300", "scrollbars=auto,resizable=yes,modal=false,alwaysRaised=yes"); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | console.log('result2='+this.paeId); |
| | | } |
| | | var url = ''; |
| | | if (result!=null){ |
| | | if (result!=null&& this.paeId!=null){ |
| | | url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ; |
| | | } else { |
| | | url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId; |
| 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 { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | |
| | | export default class LexQISMBCrequestNew extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | QISStatusC; |
| | | Name; |
| | | |
| | | @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.QISStatusC = result.QISStatusC; |
| | | this.Name = result.Name; |
| | | |
| | | this.QISMBCRequestNew(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建QIS M-BC申请. |
| | | QISMBCRequestNew() { |
| | | var status = this.QISStatusC; |
| | | |
| | | if (status != '完毕' && status != '已回答' && status != '取消') { |
| | | this.ShowToastEvent("QIS没有审批完毕或取消,不可以创建QIS M-BC!", "error"); |
| | | 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); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | console.log('result='+this.paeId); |
| | | } |
| | | var url = ''; |
| | | if (result!=null){ |
| | | if (result!=null&& this.paeId!=null){ |
| | | url = "/apex/PAEDecisionRecord?Id="+this.paeId+"&QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId ; |
| | | } else { |
| | | url = "/apex/PAEDecisionRecord?QISReportId="+this.qisReportId +"&RecordTypeIds="+RecordTypeId; |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC; |
| | | this.EstimateTargetC = result.EstimateTargetC; |
| | | |
| | | |
| | | this.QuarterlyReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 制作季报 |
| | |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/buttonRepairQuotationCtl.init'; |
| | | import updateRepairQuotation03 from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation03'; |
| | | |
| | | import initSelectProfile from '@salesforce/apex/buttonRepairQuotationCtl.initSelectProfile'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | |
| | | RentalApplyDiscountStatusC; |
| | | LoanerRepairSysC; |
| | | profileId; |
| | | profileName; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | this.RentalApplyDiscountStatusC = result.RentalApplyDiscountStatusC; |
| | | this.LoanerRepairSysC = result.LoanerRepairSysC; |
| | | |
| | | this.RentalApplyDiscountApproval(); |
| | | |
| | | initSelectProfile({ |
| | | profileId: this.profileId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.profileName = result[0].Name; |
| | | this.RentalApplyDiscountApproval(); |
| | | } |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | |
| | | |
| | | // 备品减价申请 |
| | | RentalApplyDiscountApproval() { |
| | | var power = this.profileId; |
| | | // 2B2_备品中心检测&仓库管理 00e10000000xnoY |
| | | if (power != '00e10000000xnoY') { |
| | | this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | // alert('对不起,您没有权限提交此申请!'); |
| | | return; |
| | | } |
| | | var power = this.profileName; |
| | | |
| | | // if (power != '2B2_备品中心检测&仓库管理') { |
| | | // this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | // return; |
| | | // } |
| | | |
| | | var status = this.RentalApplyDiscountStatusC; |
| | | if (status == '审批中') { |
| | | this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error"); |
| | | // alert("审批提交成功,当前正在审批请勿再提交!"); |
| | | return; |
| | | } |
| | | if (status == '批准') { |
| | | this.ShowToastEvent("审批已批准,请勿再提交!", "error"); |
| | | // alert("审批已批准,请勿再提交!"); |
| | | return; |
| | | } |
| | | if (status == '草案中' || status == undefined || status == '驳回') { |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | this.ShowToastEvent("请先填写备品减价金额!", "error"); |
| | | // alert("请先填写备品减价金额!"); |
| | | this.ShowToastEvent("提交失败", "error"); |
| | | return; |
| | | } |
| | | } |
| | | location.reload(); |
| | | } |
| | | |
| | | // 弹窗 |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 提交待审批 |
| | | SCSubmit() { |
| | | if (this.StatusC != '草案中') { |
| | | this.ShowToastEvent("已经提交审批", "error") |
| | | // alert('已经提交审批'); |
| | | return; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | updateQISSCReport({ |
| | | Id: this.Id |
| | | QId: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } else { |
| | | this.ShowToastEvent("已提交", "success") |
| | | window.location.reload(); |
| | | } |
| | | this.ShowToastEvent("已提交", "success") |
| | | // alert('已提交!') |
| | | window.location.reload(); |
| | | }) |
| | | } |
| | | |
| 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/otherButtonMaintenanceContractCtl.init'; |
| | | export default class LexSLADetails extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | |
| | | @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.SLADetails(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // SLA报告书信息 |
| | | SLADetails() { |
| | | var url = '/00O10000006tLAl?pv0=' + this.Id; |
| | | window.open(url, '_bank'); |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init'; |
| | | import init from '@salesforce/apex/buttonMaintenanceContractAssetCtl.init'; |
| | | |
| | | export default class LexSelectAssetsMaintenance extends LightningElement { |
| | | @api recordId; |
| 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/buttonCaseCtl.init'; |
| | | |
| | | export default class LexSelectProduct2CIC extends LightningElement { |
| | | @api recordId; |
| | | str; |
| | | IsLoading = true; |
| | | Id; |
| | | |
| | | @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.QuarterlyReport(); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | // 新建CIC/产品 |
| | | SelectProduct2CIC() { |
| | | var pathnames = window.self.location.pathname.split('/'); |
| | | if (pathnames[1] == "emptyHtmlDoc.html") { |
| | | window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_parent"); |
| | | } else { |
| | | window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_self"); |
| | | } |
| | | } |
| | | } |
| 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> |
| | | </targets> |
| | | </LightningComponentBundle> |
| | |
| | | import init from '@salesforce/apex/buttonRepairQuotationCtl.init'; |
| | | import updateRepairQuotation from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation'; |
| | | import updateRepairQuotation02 from '@salesforce/apex/buttonRepairQuotationCtl.updateRepairQuotation02'; |
| | | import initSelectProfile from '@salesforce/apex/buttonRepairQuotationCtl.initSelectProfile'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | |
| | | Id; |
| | | CutPriceStatusServiceC; |
| | | profileId; |
| | | profileName; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | this.CutPriceStatusServiceC = result.CutPriceStatusServiceC; |
| | | this.profileId = result.profileId; |
| | | |
| | | this.ServiceCutPriceApply(); |
| | | initSelectProfile({ |
| | | profileId: this.profileId |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != null) { |
| | | this.IsLoading = false; |
| | | this.profileName = result[0].Name; |
| | | this.ServiceCutPriceApply(); |
| | | } |
| | | }) |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | //服务本部减价申请 |
| | | ServiceCutPriceApply() { |
| | | var power = this.profileId; |
| | | if (power != '00e10000000xnnz' && power != '00e10000000xno9' && power != '00e10000000NbC4') { |
| | | var power = this.profileName; |
| | | |
| | | if (power != '2F2A_RC' && power != '2F4_技术推进部' && power != '2F4_技术推进部_非SSO') { |
| | | this.ShowToastEvent("对不起,您没有权限提交此申请!", "error"); |
| | | // alert('对不起,您没有权限提交此申请!'); |
| | | return; |
| | | } |
| | | var status = this.CutPriceStatusServiceC; |
| | | if (status == '审批中') { |
| | | this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error"); |
| | | // alert("审批提交成功,当前正在审批请勿再提交!"); |
| | | return; |
| | | } |
| | | if (status == '批准') { |
| | | this.ShowToastEvent("审批已批准,请勿再提交!", "error"); |
| | | // alert("审批已批准,请勿再提交!"); |
| | | return; |
| | | } |
| | | if (status == '草案中' || status == undefined || status == '驳回') { |
| | |
| | | alert("提交失败 " + split[1]); |
| | | return; |
| | | } else { |
| | | // alert("审批提交成功!"); |
| | | this.ShowToastEvent("审批提交成功!", "success"); |
| | | location.reload(); |
| | | } |
| | | }) |
| | | } |
| | | location.reload(); |
| | | } |
| | | |
| | | // 弹窗 |
| | |
| | | connectedCallback(){ |
| | | if (this.recordId && JSON.stringify(this.rentalApplyIds)) { |
| | | window.open("/apex/RentalApplySplit?objId="+this.recordId+"&raesIds="+this.rentalApplyIds, 'RentalApplySplit', 'width=600,height=200'); |
| | | this.closeAction(); |
| | | }else{ |
| | | this.msg = '请选择借出备品一览记录'; |
| | | this.IsLoading = false; |
| | | } |
| | | } |
| | | closeAction(event) { |
| | | closeAction() { |
| | | //返回当前的备品申请 |
| | | window.open("/"+this.recordId,'_self'); |
| | | } |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 关闭询价/关闭续签 |
| | | SubmitForApproval() { |
| | | var url = ''; |
| | | selectRecords({ |
| | | recordId: this.Id |
| | | mcId: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | url = "/apex/SubmitForApprovalPage?id=" + result[0].Id; |
| | | } else { |
| | | url = "/apex/SubmitForApprovalPage?mcId=" + this.Id; |
| | | } |
| | | window.open(url, '', 'height=350, width=600, top=200, left=350,location=no'); |
| | | }).catch(error => { |
| | | console.log("error"); |
| | | }) |
| | | } |
| | | } |
| | |
| | | |
| | | //中止 |
| | | Terminal() { |
| | | // sforce.connection.sessionId = this.sessionId; |
| | | if (this.ProcessStatusC == "草案中" || |
| | | this.ProcessStatusC == "不批准" || |
| | | this.ProcessStatusC == "批准" |
| | |
| | | updateMaintenanceContract({ |
| | | recordId: this.Id |
| | | }).then(result => { |
| | | this.ShowToastEvent("该维修合同报价中止了!", "success"); |
| | | // alert("该维修合同报价中止了!") |
| | | window.location.reload(); |
| | | |
| | | this.ShowToastEvent("该维修合同报价中止了!", "success"); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } else { |
| | | this.ShowToastEvent("该维修合同报价还在审批中 或 已经中止,不能中止!", "error"); |
| | | // alert("该维修合同报价还在审批中 或 已经中止,不能中止!") |
| | | } |
| | | } |
| | | |
| | |
| | | uploadToRecognitionModel() { |
| | | if (this.ContractQuotationOrNotC == '还没做报价') { |
| | | this.ShowToastEvent("您还没有做合同报价,不能上传认款合同。", "error") |
| | | // alert("您还没有做合同报价,不能上传认款合同。"); |
| | | } else if (this.MaintenanceContractNoC == undefined) { |
| | | this.ShowToastEvent('合同号码为空,不能上传认款合同。', "error") |
| | | // alert('合同号码为空,不能上传认款合同。'); |
| | | } else if (this.uploadToSapTimeC != undefined) { |
| | | this.ShowToastEvent('已经上传SAP,不能再次上传认款合同。', "error") |
| | | // alert('已经上传SAP,不能再次上传认款合同。'); |
| | | } else if (this.uploadToRMTimeC != undefined) { |
| | | this.ShowToastEvent('已经上传认款合同,不能再次上传认款合同。', "error") |
| | | // alert('已经上传认款合同,不能再次上传认款合同。'); |
| | | } else { |
| | | if (!this.oldIsRecognitionModelC) { |
| | | this.ShowToastEvent('经销商为空或经销商不是先款对象,不需要上传认款合同。', "error") |
| | | // alert('经销商为空或经销商不是先款对象,不需要上传认款合同。'); |
| | | } else if (this.PaymentPlanSumFirstC == undefined) { |
| | | this.ShowToastEvent('第一次计划付款金额不能为空。', "error") |
| | | // alert('第一次计划付款金额不能为空。'); |
| | | } else { |
| | | if (!confirm('请确认是否要上传认款合同。')) { |
| | | return; |
| | | } |
| | | |
| | | updateColunm({ |
| | | mcid: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result != '1') { |
| | | this.ShowToastEvent('上传认款合同失败,因为 来年合同相关信息修改失败', "error") |
| | | // alert('上传认款合同失败,因为 来年合同相关信息修改失败'); |
| | | alert('上传认款合同失败,因为 来年合同相关信息修改失败') |
| | | location.href = "/" + this.Id; |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | |
| | | up2sap({ |
| | | mcid: this.Id |
| | | }).then(rtn => { |
| | | console.log(rtn); |
| | | if (rtn == '1') { |
| | | this.ShowToastEvent("上传认款合同成功", "success") |
| | | // alert("上传认款合同成功"); |
| | | alert("上传认款合同成功") |
| | | location.href = "/" + this.Id; |
| | | } else { |
| | | this.ShowToastEvent(rtn, "error") |
| | | // alert(rtn); |
| | | alert(rtn) |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }) |
| | | } |
| | | } |
| | |
| | | urfFlag; |
| | | rtn1; |
| | | rtn; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | } |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | | |
| | | }); |
| | | }) |
| | | } |
| | | |
| | | // 上传SAP |
| | | uploadToSap() { |
| | | if (this.MCApprovalStatusC != 'Pass') { |
| | | this.ShowToastEvent("合同复核批准后才可以上传SAP。", "error") |
| | | // alert("合同复核批准后才可以上传SAP。"); |
| | | } else if (this.MaintenanceContractNoC == undefined) { |
| | | this.ShowToastEvent('维修合同管理编码为空,不能上传SAP。', "error") |
| | | // alert('维修合同管理编码为空,不能上传SAP。'); |
| | | } else if (this.uploadToSapTimeC != undefined) { |
| | | this.ShowToastEvent('已经上传SAP,不能重复上传。', "error") |
| | | // alert('已经上传SAP,不能重复上传。'); |
| | | } else { |
| | | if (this.oldIsRecognitionModelC) { |
| | | if (this.uploadToRMTimeC == undefined) { |
| | | this.ShowToastEvent('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。', "error") |
| | | // alert('当前维修合同的经销商是先款对象,需要先【上传认款合同】,然后完成认款以后才能上传SAP。'); |
| | | return; |
| | | } else { |
| | | if (!this.IsRecognitionModelTrueC) { |
| | | this.ShowToastEvent('当前维修合同没有完成认款,不能上传SAP。', "error") |
| | | // alert('当前维修合同没有完成认款,不能上传SAP。'); |
| | | return; |
| | | } |
| | | } |
| | |
| | | }).then(result => { |
| | | if (result != '1') { |
| | | this.ShowToastEvent('上传SAP失败,因为 来年合同相关信息修改失败', "error") |
| | | // alert('上传SAP失败,因为 来年合同相关信息修改失败'); |
| | | } |
| | | }); |
| | | updateFirstContract({ |
| | |
| | | }).then(result => { |
| | | if (result != '1') { |
| | | this.ShowToastEvent(result, "error") |
| | | // alert(result); |
| | | } |
| | | }); |
| | | this.urfFlag = this.URFContractFC; |
| | |
| | | }); |
| | | if (this.rtn == '1') { |
| | | this.ShowToastEvent("上传SAP成功", "success") |
| | | // alert("上传SAP成功"); |
| | | window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Maintenance_Contract__c/" + this.recordId + "/view"); |
| | | location.href = "/" + this.Id; |
| | | } else { |
| | | this.ShowToastEvent(this.rtn, "error") |
| | | // alert(this.rtn); |
| | | } |
| | | } else { |
| | | this.ShowToastEvent(this.rtn1, "error") |
| | | // alert(this.rtn1); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | connectedCallback() { |
| | | console.log(this.recordId); |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result => { |
| | |
| | | recordId: this.Id |
| | | }).then(result => { |
| | | console.log(result); |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | if (result != null) { |
| | | if (result.length > 0) { |
| | | var split = result.split(", "); |
| | | alert(split[1]); |
| | | } |
| | | } |
| | | location.reload(); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | alert("已经申请过了,不允许重新申请"); |
| | | }) |
| | | } |
| | | |
| | | getConnectDMLErrorMessages(results) { |
| | | var messages = [], |
| | | i = 0, |
| | | len = results.length, |
| | | r; |
| | | for (; i < len; i++) { |
| | | r = results[i]; |
| | | if (!r.getBoolean("success")) { |
| | | messages = messages.concat(this.getConnectDMLMessagesOfAResult(r)); |
| | | } |
| | | } |
| | | return messages; |
| | | } |
| | | getConnectDMLMessagesOfAResult(res) { |
| | | var messages = [], |
| | | errors = res.getArray("errors"), |
| | | i = 0, |
| | | len = errors.length, |
| | | e; |
| | | for (; i < len; i++) { |
| | | e = errors[i]; |
| | | messages.push(e.message + " " + this.getConnectDMLErrorFields(e)); |
| | | } |
| | | return messages; |
| | | } |
| | | getConnectDMLErrorFields(error) { |
| | | var fields = error.getArray('fields'); |
| | | if (fields.length > 0) { |
| | | return "[" + fields.join(",") + "]" |
| | | } else { |
| | | return ""; |
| | | } |
| | | } |
| | | |
| | | // 弹窗 |
| | |
| | | import { LightningElement,wire,api} from 'lwc'; |
| | | import { CurrentPageReference } from "lightning/navigation"; |
| | | import { CloseActionScreenEvent } from 'lightning/actions'; |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForlexcopyQISButton'; |
| | | import { |
| | | LightningElement, |
| | | wire, |
| | | api |
| | | } from 'lwc'; |
| | | import { |
| | | CurrentPageReference |
| | | } from "lightning/navigation"; |
| | | import { |
| | | CloseActionScreenEvent |
| | | } from 'lightning/actions'; |
| | | import { |
| | | ShowToastEvent |
| | | } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/buttonQISReportCtl.init'; |
| | | |
| | | |
| | | export default class lexcopyQIS extends LightningElement { |
| | | @api recordId; |
| | | err; |
| | | IsLoading = true; |
| | | qisReportId; |
| | | qisStatus; |
| | | name; |
| | | |
| | | @wire(CurrentPageReference) |
| | | getStateParameters(currentPageReference) { |
| | | if (currentPageReference) { |
| | | const urlValue = currentPageReference.state.recordId; |
| | | if (urlValue) { |
| | | let str = `${urlValue}`; |
| | | this.recordId = str; |
| | | } |
| | | } |
| | | } |
| | | @api recordId; |
| | | err; |
| | | IsLoading = true; |
| | | Id; |
| | | QISStatusC; |
| | | Name; |
| | | |
| | | connectedCallback () { |
| | | @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 => { |
| | | this.IsLoading = false; |
| | | this.qisReportId = result.Id; |
| | | this.qisStatus = result.qIStatus; |
| | | this.name = result.name; |
| | | if (this.qisStatus != '取消') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '状态为取消的QIS才可以被复制并新建', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | var url = "/"+this.qisReportId+"/e?newclone=1&retURL=%2F"+this.qisReportId+" &CF00N100000073PA0="+this.name+"&CF00N100000073PA0_lkid="+this.qisReportId; |
| | | window.open(url); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.Id = result.Id; |
| | | this.QISStatusC = result.QISStatusC; |
| | | this.Name = result.Name; |
| | | |
| | | this.copyQIS() |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | console.log(error); |
| | | }) |
| | | } |
| | | |
| | | copyQIS() { |
| | | if (this.QISStatusC != '取消') { |
| | | this.ShowToastEvent('状态为取消的QIS才可以被复制并新建', 'error'); |
| | | return; |
| | | } |
| | | var url = "/" + this.Id + "/e?newclone=1&retURL=%2F" + this.Id + " &CF00N100000073PA0=" + this.Name + "&CF00N100000073PA0_lkid=" + this.Id; |
| | | window.open(url); |
| | | } |
| | | |
| | | ShowToastEvent(msg, type) { |
| | | const event = new ShowToastEvent({ |
| | | title: '', |
| | | message: msg, |
| | | variant: type |
| | | }); |
| | | this.dispatchEvent(event); |
| | | } |
| | | } |