From beaf695f5fe0b6c28950f78f7305c71eea44e56d Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 17 五月 2023 16:12:30 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml | 11
force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js | 79 ++
force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js | 52 +
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js | 2
force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js | 1
force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html | 0
force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml | 11
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.html | 4
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js | 23
force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js | 39
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js | 8
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js | 47 -
force-app/main/default/classes/LightingButtonConstant.cls | 1
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls | 40 +
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js-meta.xml | 11
force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js-meta.xml | 11
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js-meta.xml | 11
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml | 5
force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js | 3
force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js | 3
force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js | 9
force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html | 0
force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js | 6
force-app/main/default/classes/buttonRepairQuotationCtl.cls | 16
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js | 96 ++
force-app/main/default/classes/buttonQISSCReportCtl.cls | 13
force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.html | 5
force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js | 159 +---
force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml | 11
force-app/main/default/lwc/lexSLADetails/lexSLADetails.js | 52 +
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js | 6
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js | 98 ++
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js | 14
force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js | 98 +-
force-app/main/default/classes/LexLostSubmitApprovalController.cls | 45 +
force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js | 2
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js | 18
force-app/main/default/lwc/lexSLADetails/lexSLADetails.html | 5
force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js | 57 +
force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html | 5
force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.html | 5
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js | 8
force-app/main/default/classes/ESignController.cls | 57
force-app/main/default/classes/LexLostSubmitApprovalController.cls-meta.xml | 5
force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js | 96 ++
force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html | 5
force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js | 69 +
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js | 21
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js | 6
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml | 5
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html | 0
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js | 21
force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html | 5
force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js-meta.xml | 11
force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js | 41
force-app/main/default/classes/buttonQISReportCtl.cls | 50 +
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js | 6
force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html | 0
force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js | 75 ++
force-app/main/default/lwc/lexAddress/lexAddress.js | 2
force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html | 0
force-app/main/default/classes/lexConsumablesLostController.cls-meta.xml | 5
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js | 170 ++--
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js | 9
force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js | 10
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js | 71 +
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js | 34
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls | 5
force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js | 81 ++
force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml | 11
force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml | 11
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls | 25
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml | 11
force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js | 73 +
/dev/null | 22
force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml | 11
force-app/main/default/lwc/lexSLADetails/lexSLADetails.js-meta.xml | 11
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js | 13
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js | 2
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js | 27
force-app/main/default/classes/lexConsumablesLostController.cls | 29
force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls | 6
82 files changed, 1,642 insertions(+), 560 deletions(-)
diff --git a/force-app/main/default/classes/ESignController.cls b/force-app/main/default/classes/ESignController.cls
index a997487..bdb7e66 100644
--- a/force-app/main/default/classes/ESignController.cls
+++ b/force-app/main/default/classes/ESignController.cls
@@ -3,20 +3,35 @@
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;
}
//妫�绱CSM绠$悊鐪� 涓婄殑钀ヤ笟绠$悊閮ㄦ媴褰�
@@ -38,8 +53,6 @@
public class InitData{
@AuraEnabled
public String Id;
- // @AuraEnabled
- // public String RCManagerId;
@AuraEnabled
public Boolean GrouppurchasePCL;
@AuraEnabled
@@ -47,34 +60,20 @@
@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;
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexLostSubmitApprovalController.cls b/force-app/main/default/classes/LexLostSubmitApprovalController.cls
new file mode 100644
index 0000000..2902ba8
--- /dev/null
+++ b/force-app/main/default/classes/LexLostSubmitApprovalController.cls
@@ -0,0 +1,45 @@
+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();
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexLostSubmitApprovalController.cls-meta.xml b/force-app/main/default/classes/LexLostSubmitApprovalController.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/LexLostSubmitApprovalController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/LightingButtonConstant.cls b/force-app/main/default/classes/LightingButtonConstant.cls
index 6fe5385..df3b465 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -103,6 +103,7 @@
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';
diff --git a/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls
new file mode 100644
index 0000000..6cd4761
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls
@@ -0,0 +1,25 @@
+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;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls
new file mode 100644
index 0000000..2ce4c10
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls
@@ -0,0 +1,40 @@
+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;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/buttonQISReportCtl.cls b/force-app/main/default/classes/buttonQISReportCtl.cls
index 364dfe5..973266e 100644
--- a/force-app/main/default/classes/buttonQISReportCtl.cls
+++ b/force-app/main/default/classes/buttonQISReportCtl.cls
@@ -7,7 +7,7 @@
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;
@@ -15,7 +15,12 @@
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();
@@ -29,7 +34,7 @@
@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 {
@@ -134,10 +139,51 @@
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;
diff --git a/force-app/main/default/classes/buttonQISSCReportCtl.cls b/force-app/main/default/classes/buttonQISSCReportCtl.cls
index 8704763..2ae493e 100644
--- a/force-app/main/default/classes/buttonQISSCReportCtl.cls
+++ b/force-app/main/default/classes/buttonQISSCReportCtl.cls
@@ -21,15 +21,18 @@
// 鏍规嵁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{
diff --git a/force-app/main/default/classes/buttonRepairQuotationCtl.cls b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
index e7213e6..71aa39d 100644
--- a/force-app/main/default/classes/buttonRepairQuotationCtl.cls
+++ b/force-app/main/default/classes/buttonRepairQuotationCtl.cls
@@ -44,7 +44,7 @@
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) {
@@ -60,7 +60,7 @@
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) {
@@ -98,6 +98,18 @@
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;
diff --git a/force-app/main/default/classes/lexConsumablesLostController.cls b/force-app/main/default/classes/lexConsumablesLostController.cls
new file mode 100644
index 0000000..cef1fe2
--- /dev/null
+++ b/force-app/main/default/classes/lexConsumablesLostController.cls
@@ -0,0 +1,29 @@
+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;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexConsumablesLostController.cls-meta.xml b/force-app/main/default/classes/lexConsumablesLostController.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/lexConsumablesLostController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
index 771838e..4c78b64 100644
--- a/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
+++ b/force-app/main/default/classes/otherButtonMaintenanceContractCtl.cls
@@ -7,7 +7,7 @@
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];
@@ -41,10 +41,10 @@
// 缁翠慨鍚堝悓澶卞崟鎶ュ憡
@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);
}
diff --git a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
index 3cb0f27..cd124a1 100644
--- a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
+++ b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
@@ -7,10 +7,11 @@
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){
@@ -24,5 +25,7 @@
public String Id;
@AuraEnabled
public String RecordTypeId;
+ @AuraEnabled
+ public String RecordType;
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js b/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js
deleted file mode 100644
index 4116118..0000000
--- a/force-app/main/default/lwc/lexASACEditorRepair/__tests__/lexASACEditorRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexASACEditorRepair from 'c/lexASACEditorRepair';
-
-describe('c-lex-asac-editor-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-asac-editor-repair', {
- is: LexASACEditorRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js b/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
index 66db124..230b14c 100644
--- a/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
+++ b/force-app/main/default/lwc/lexASACEditorRepair/lexASACEditorRepair.js
@@ -64,11 +64,8 @@
} else {
url = "/apex/PAEDecisionRecord?RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId;
}
-
window.open(url, '_self');
}
- }).catch(error => {
- console.log(error);
})
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js b/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
deleted file mode 100644
index d5c600d..0000000
--- a/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexASRCEditorRepair from 'c/lexASRCEditorRepair';
-
-describe('c-lex-asrc-editor-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-asrc-editor-repair', {
- is: LexASRCEditorRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
index 8387edc..88df15b 100644
--- a/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
+++ b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
@@ -46,9 +46,7 @@
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// Intake universal code缂栬緫
@@ -68,8 +66,6 @@
}
window.open(url, '_self');
}
- }).catch(error => {
- console.log(error);
})
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js b/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js
deleted file mode 100644
index 668985d..0000000
--- a/force-app/main/default/lwc/lexAddress/__tests__/lexAddress.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexAddress from 'c/lexAddress';
-
-describe('c-lex-address', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-address', {
- is: LexAddress
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAddress/lexAddress.js b/force-app/main/default/lwc/lexAddress/lexAddress.js
index 49b0dc0..33a766b 100644
--- a/force-app/main/default/lwc/lexAddress/lexAddress.js
+++ b/force-app/main/default/lwc/lexAddress/lexAddress.js
@@ -59,10 +59,8 @@
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');
}
diff --git a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js b/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
index 40da9e3..33dbd59 100644
--- a/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
+++ b/force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js
@@ -57,7 +57,6 @@
var status = this.StatusC;
if (status != '寰呭鐞�') {
this.ShowToastEvent("鎶ヤ慨瀛愬崟鐨勭姸鎬佷笉鏄� 寰呭鐞� 鏃犳硶鐢宠淇悊", "error")
- // alert('鎶ヤ慨瀛愬崟鐨勭姸鎬佷笉鏄� 寰呭鐞� 鏃犳硶鐢宠淇悊');
return;
}
var url = '/apex/ChoiceAsset?Id=' + this.Id + '&Type=Repair';
diff --git a/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.html b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js
new file mode 100644
index 0000000..880e9e5
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js
@@ -0,0 +1,73 @@
+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 }});
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js-meta.xml b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexConsumablesLost/lexConsumablesLost.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js b/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
deleted file mode 100644
index e21bfdf..0000000
--- a/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyPIInspectionReport from 'c/lexCopyPIInspectionReport';
-
-describe('c-lex-copy-pi-inspection-report', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-copy-pi-inspection-report', {
- is: LexCopyPIInspectionReport
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js b/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
deleted file mode 100644
index 4ecaaab..0000000
--- a/force-app/main/default/lwc/lexCopyPIOnCall/__tests__/lexCopyPIOnCall.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyPIOnCall from 'c/lexCopyPIOnCall';
-
-describe('c-lex-copy-pi-on-call', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-copy-pi-on-call', {
- is: LexCopyPIOnCall
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js b/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js
deleted file mode 100644
index 4f5bab3..0000000
--- a/force-app/main/default/lwc/lexCopyRepair/__tests__/lexCopyRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCopyRepair from 'c/lexCopyRepair';
-
-describe('c-lex-copy-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-copy-repair', {
- is: LexCopyRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
similarity index 100%
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
new file mode 100644
index 0000000..af00de6
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
@@ -0,0 +1,71 @@
+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);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
similarity index 100%
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
new file mode 100644
index 0000000..e9cea49
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
@@ -0,0 +1,69 @@
+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);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js b/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
deleted file mode 100644
index bdd855f..0000000
--- a/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCreateNewServiceContract from 'c/lexCreateNewServiceContract';
-
-describe('c-lex-create-new-service-contract', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-create-new-service-contract', {
- is: LexCreateNewServiceContract
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js b/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
deleted file mode 100644
index c75ef3d..0000000
--- a/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCreateReportMaintenanceContract from 'c/lexCreateReportMaintenanceContract';
-
-describe('c-lex-create-report-maintenance-contract', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-create-report-maintenance-contract', {
- is: LexCreateReportMaintenanceContract
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js b/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
index ea1d95a..c965a6b 100644
--- a/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
+++ b/force-app/main/default/lwc/lexCreateReportMaintenanceTask/lexCreateReportMaintenanceTask.js
@@ -9,15 +9,15 @@
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) {
@@ -31,7 +31,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -39,31 +38,35 @@
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');
+ })
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html
similarity index 100%
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js
new file mode 100644
index 0000000..45665b5
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js
@@ -0,0 +1,96 @@
+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);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js b/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js
deleted file mode 100644
index fcc78ff..0000000
--- a/force-app/main/default/lwc/lexCustomDelete/__tests__/lexCustomDelete.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCustomDelete from 'c/lexCustomDelete';
-
-describe('c-lex-custom-delete', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-custom-delete', {
- is: LexCustomDelete
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
index 0c3c21f..5123b26 100644
--- a/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
+++ b/force-app/main/default/lwc/lexCustomDelete/lexCustomDelete.js
@@ -61,14 +61,9 @@
}).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("涓嶆槸鎵�鏈変汉銆佸垱寤轰汉鎴朏SE涓昏礋璐d汉锛屼笉鑳藉垹闄�", "error")
diff --git a/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js b/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
deleted file mode 100644
index b377bae..0000000
--- a/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCustomNewCopy2 from 'c/lexCustomNewCopy2';
-
-describe('c-lex-custom-new-copy2', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-custom-new-copy2', {
- is: LexCustomNewCopy2
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
index 2daf585..3f59c5f 100644
--- a/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
+++ b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
@@ -34,7 +34,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -50,18 +49,15 @@
}
}).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");
}
}
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js
new file mode 100644
index 0000000..9adcd42
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js
@@ -0,0 +1,81 @@
+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");
+ }
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html
similarity index 100%
copy from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
copy to force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js
new file mode 100644
index 0000000..5fd4900
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js
@@ -0,0 +1,79 @@
+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);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
index a29af3b..f446a53 100644
--- a/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
+++ b/force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -36,7 +36,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -61,14 +60,13 @@
}).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;
}
}
@@ -93,7 +91,6 @@
return;
}
})
- location.reload();
})
}
diff --git a/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.html b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.html
new file mode 100644
index 0000000..e9c9349
--- /dev/null
+++ b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.html
@@ -0,0 +1,4 @@
+<template>
+ <div class="lexESignAcceptanceHospital" if:true={IsLoding}>
+ <lightning-spinner alternative-text="Loading" size="medium"> </lightning-spinner> </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js
new file mode 100644
index 0000000..a41b8ba
--- /dev/null
+++ b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js
@@ -0,0 +1,96 @@
+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;
+ }
+ //妫�绱CSM绠$悊鐪� 涓婄殑钀ヤ笟绠$悊閮ㄦ媴褰�
+ OcsmResult({GrouppurchasePCL:Group_purchase_PCL}).then(res=>{
+ //钀ヤ笟绠$悊閮ㄦ媴褰搃d
+ var salesManage;
+ console.log(res[0].SalesManage__c);
+ salesManage = res[0].SalesManage__c;
+ //鐢靛瓙绛炬敹鍗昳d
+ 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());
+ }
+}
diff --git a/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js-meta.xml b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js-meta.xml
new file mode 100644
index 0000000..8b422cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js b/force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js
index a5e8655..57ae846 100644
--- a/force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js
+++ b/force-app/main/default/lwc/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js
@@ -3,23 +3,21 @@
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) {
@@ -36,46 +34,31 @@
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;
+ }
//妫�绱CSM绠$悊鐪� 涓婄殑钀ヤ笟绠$悊閮ㄦ媴褰�
- // 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");
- // //钀ヤ笟绠$悊閮ㄦ媴褰搃d
- // 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)
+ //钀ヤ笟绠$悊閮ㄦ媴褰搃d
var salesManage;
salesManage = res[0].SalesManage__c;
//鐢靛瓙绛炬敹鍗昳d
@@ -86,34 +69,32 @@
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鐩存帴璨╁2'){
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({
@@ -121,66 +102,6 @@
variant: type
});
this.dispatchEvent(event);
- if(type == 'success'){
- this.updateRecordView();
- }
this.dispatchEvent(new CloseActionScreenEvent());
}
-}
-
-// var foo = function() {
-// //褰撳墠鐢ㄦ埛鐧诲綍id
-// var userId = "{!CASESAFEID($User.Id)}";
-// //褰撳墠鐢ㄦ埛绠�妗d
-// 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}";
-// }
-// //妫�绱CSM绠$悊鐪� 涓婄殑钀ヤ笟绠$悊閮ㄦ媴褰�
-// 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");
-// //钀ヤ笟绠$悊閮ㄦ媴褰搃d
-// var salesManage;
-// if (ocsm) {
-// salesManage = ocsm[0].SalesManage__c;
-// }
-
-// //鐢靛瓙绛炬敹鍗昳d
-// 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鐩存帴璨╁2'){
-// 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();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js b/force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js
index 611281c..3291613 100644
--- a/force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js
+++ b/force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js
@@ -1,11 +1,11 @@
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) {
@@ -17,32 +17,15 @@
}
}
}
-
+ //绛炬敹鍗� 鏌ョ湅闄勪欢
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();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js b/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
deleted file mode 100644
index bb52449..0000000
--- a/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexInsPageBtn from 'c/lexInsPageBtn';
-
-describe('c-lex-ins-page-btn', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-ins-page-btn', {
- is: LexInsPageBtn
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js b/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
index e0c1dbd..ed7e85f 100644
--- a/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
+++ b/force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js
@@ -17,6 +17,7 @@
IsLoading = true;
Id;
RecordTypeId;
+ RecordType;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -38,21 +39,20 @@
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';
diff --git a/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
new file mode 100644
index 0000000..d87684e
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js
@@ -0,0 +1,98 @@
+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());
+ })
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js-meta.xml b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexLostSubmitApproval/lexLostSubmitApproval.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js b/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
deleted file mode 100644
index a01145a..0000000
--- a/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexMailMessege from 'c/lexMailMessege';
-
-describe('c-lex-mail-messege', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-mail-messege', {
- is: LexMailMessege
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
index cf78f1a..6cbc7d5 100644
--- a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
+++ b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
@@ -46,16 +46,16 @@
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());
@@ -70,7 +70,6 @@
// 鎶ヤ环闄勪欢鏇存柊鐨勯偖浠堕�氱煡
mailMessege() {
var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
- console.log(Link);
location.href = 'mailto:' + this.InchargeStaffEmailC +
'?bcc=' + this.userEmail +
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
deleted file mode 100644
index 511b2f0..0000000
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOCSMNoToReportRepair from 'c/lexOCSMNoToReportRepair';
-
-describe('c-lex-ocsm-no-to-report-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-ocsm-no-to-report-repair', {
- is: LexOCSMNoToReportRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
index 44ef2be..219ac17 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
@@ -53,9 +53,7 @@
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// OCSM涓嶈鎶ュ憡
@@ -63,29 +61,24 @@
if (!confirm("涓嶈鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
return;
}
-
if (this.OCSMAdministrativeReportNumberC != undefined ||
this.OCSMAdministrativeReportDateC != undefined) {
this.ShowToastEvent("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�", "error")
- // alert("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮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鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
- // alert("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�");
return;
}
}
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
deleted file mode 100644
index 635bc6c..0000000
--- a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.outerBorderCss{
- border: 1px solid #D4D4D4;
- border-radius : 5px;
- border-top : 3px solid #565959;
-}
-.borderCss{
- border: 1px solid #D4D4D4;
- border-radius : 5px;
- margin-bottom : 7px;
- border-top : 3px solid #565959;
-}
-.headerDorderCss{
- border-top: 1px solid #565959;
- border-bottom: 1px solid #D4D4D4;
- padding:3px;
-}
-.centerCss{
- text-align: center;
-}
-.centerCss .left{
- margin-left: 100px;
-}/* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
index f7be272..d9f159f 100644
--- a/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
+++ b/force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
@@ -1,101 +1,97 @@
-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);
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
deleted file mode 100644
index 96ed586..0000000
--- a/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOCSMToReportRepair from 'c/lexOCSMToReportRepair';
-
-describe('c-lex-ocsm-to-report-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-ocsm-to-report-repair', {
- is: LexOCSMToReportRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js b/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
deleted file mode 100644
index 1e819d2..0000000
--- a/force-app/main/default/lwc/lexOSHNogoods/__tests__/lexOSHNogoods.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexOSHNogoods from 'c/lexOSHNogoods';
-
-describe('c-lex-osh-nogoods', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-osh-nogoods', {
- is: LexOSHNogoods
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
index c8ce47e..388856a 100644
--- a/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
+++ b/force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -55,11 +55,10 @@
})
}
- // 鍑忎环鐢宠
+ // OSH鏃犲疄鐗╅�佽揪
OSHNogoods() {
if (this.QISStatusC != 'OSH妫�娴嬬敵璇�' && this.QISStatusC != '瀹屾瘯') {
this.ShowToastEvent("OSH宸茬粡鏀跺埌瀹炵墿", "error")
- // alert('OSH宸茬粡鏀跺埌瀹炵墿');
} else {
updateOSHNogoods({
Id: this.Id,
@@ -71,9 +70,6 @@
var split = result.split(", ");
alert(split[1]);
}
- location.reload();
- }).catch(error => {
- console.log(error);
})
}
}
diff --git a/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js b/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
deleted file mode 100644
index 7387e21..0000000
--- a/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexPDFMaintenanceCommission from 'c/lexPDFMaintenanceCommission';
-
-describe('c-lex-pdf-maintenance-commission', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-pdf-maintenance-commission', {
- is: LexPDFMaintenanceCommission
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js b/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
deleted file mode 100644
index 4fb8447..0000000
--- a/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexPreContractSubmit from 'c/lexPreContractSubmit';
-
-describe('c-lex-pre-contract-submit', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-pre-contract-submit', {
- is: LexPreContractSubmit
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
index 1340680..9cb57e1 100644
--- a/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
+++ b/force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js
@@ -57,9 +57,7 @@
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 鍚堝悓澶嶆牳
@@ -67,26 +65,22 @@
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("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
@@ -97,7 +91,6 @@
}).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;
}
diff --git a/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.html b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js
new file mode 100644
index 0000000..b0c2282
--- /dev/null
+++ b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js
@@ -0,0 +1,52 @@
+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");
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js-meta.xml b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js b/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
deleted file mode 100644
index 013ddd6..0000000
--- a/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexProductRepairQuoteRepair from 'c/lexProductRepairQuoteRepair';
-
-describe('c-lex-product-repair-quote-repair', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-product-repair-quote-repair', {
- is: LexProductRepairQuoteRepair
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
index f3236b0..5ec60dc 100644
--- a/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
+++ b/force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js
@@ -45,7 +45,7 @@
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;
diff --git a/force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
similarity index 100%
rename from force-app/main/default/lwc/lexCustomDelete/lexCopyRepair.html
rename to force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
new file mode 100644
index 0000000..e879bed
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
@@ -0,0 +1,75 @@
+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娌℃湁瀹℃壒瀹屾瘯鎴栧彇娑堬紝涓嶅彲浠ュ垱寤篞IS 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);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
index f368b27..c08db18 100644
--- a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
@@ -44,7 +44,7 @@
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;
diff --git a/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js b/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
deleted file mode 100644
index 95b6a0e..0000000
--- a/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexQuarterlyReport from 'c/lexQuarterlyReport';
-
-describe('c-lex-quarterly-report', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-quarterly-report', {
- is: LexQuarterlyReport
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
index fc1f1e2..4884575 100644
--- a/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
+++ b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
@@ -31,7 +31,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -42,15 +41,12 @@
this.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
this.EstimateTargetC = result.EstimateTargetC;
-
this.QuarterlyReport();
this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 鍒朵綔瀛f姤
diff --git a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js b/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
index 07b8885..9ef40cb 100644
--- a/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
+++ b/force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
@@ -11,7 +11,7 @@
} 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';
@@ -24,6 +24,7 @@
RentalApplyDiscountStatusC;
LoanerRepairSysC;
profileId;
+ profileName;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -49,7 +50,17 @@
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 => {
@@ -59,23 +70,20 @@
// 澶囧搧鍑忎环鐢宠
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("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鎵瑰噯') {
this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -91,12 +99,10 @@
}
})
} else {
- this.ShowToastEvent("璇峰厛濉啓澶囧搧鍑忎环閲戦锛�", "error");
- // alert("璇峰厛濉啓澶囧搧鍑忎环閲戦锛�");
+ this.ShowToastEvent("鎻愪氦澶辫触", "error");
return;
}
}
- location.reload();
}
// 寮圭獥
diff --git a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
index 2ff072b..2f0f4de 100644
--- a/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
+++ b/force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
@@ -48,16 +48,13 @@
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 鎻愪氦寰呭鎵�
SCSubmit() {
if (this.StatusC != '鑽夋涓�') {
this.ShowToastEvent("宸茬粡鎻愪氦瀹℃壒", "error")
- // alert('宸茬粡鎻愪氦瀹℃壒');
return;
}
@@ -66,15 +63,16 @@
}
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();
})
}
diff --git a/force-app/main/default/lwc/lexSLADetails/lexSLADetails.html b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js
new file mode 100644
index 0000000..da98b86
--- /dev/null
+++ b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js
@@ -0,0 +1,52 @@
+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');
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js-meta.xml b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexSLADetails/lexSLADetails.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
deleted file mode 100644
index 2b62f83..0000000
--- a/force-app/main/default/lwc/lexSelectAssetsMaintenance/__tests__/lexSelectAssetsMaintenance.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexSelectAssetsMaintenance from 'c/lexSelectAssetsMaintenance';
-
-describe('c-lex-select-assets-maintenance', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-select-assets-maintenance', {
- is: LexSelectAssetsMaintenance
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
index 21cb5c4..0f622ff 100644
--- a/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
+++ b/force-app/main/default/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js
@@ -9,7 +9,7 @@
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;
diff --git a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
new file mode 100644
index 0000000..8eec3a3
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
@@ -0,0 +1,57 @@
+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");
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml
@@ -0,0 +1,11 @@
+<?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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
index ed36fa7..26b7f7d 100644
--- a/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
+++ b/force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -12,6 +12,7 @@
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';
@@ -24,6 +25,7 @@
Id;
CutPriceStatusServiceC;
profileId;
+ profileName;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -37,7 +39,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -48,31 +49,40 @@
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_鎶�鏈帹杩涢儴_闈濻SO') {
this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
- // alert('瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�');
return;
}
var status = this.CutPriceStatusServiceC;
if (status == '瀹℃壒涓�') {
this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒鎻愪氦鎴愬姛,褰撳墠姝e湪瀹℃壒璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鎵瑰噯') {
this.ShowToastEvent("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒", "error");
- // alert("瀹℃壒宸叉壒鍑�,璇峰嬁鍐嶆彁浜わ紒");
return;
}
if (status == '鑽夋涓�' || status == undefined || status == '椹冲洖') {
@@ -95,12 +105,11 @@
alert("鎻愪氦澶辫触 " + split[1]);
return;
} else {
- // alert("瀹℃壒鎻愪氦鎴愬姛锛�");
this.ShowToastEvent("瀹℃壒鎻愪氦鎴愬姛锛�", "success");
+ location.reload();
}
})
}
- location.reload();
}
// 寮圭獥
diff --git a/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
index fd326ad..758f066 100644
--- a/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
+++ b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
@@ -15,12 +15,13 @@
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');
}
diff --git a/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js b/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
deleted file mode 100644
index fa04967..0000000
--- a/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexSubmitForApproval from 'c/lexSubmitForApproval';
-
-describe('c-lex-submit-for-approval', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-submit-for-approval', {
- is: LexSubmitForApproval
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js b/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
index aa88e1f..8cb768c 100644
--- a/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
+++ b/force-app/main/default/lwc/lexSubmitForApproval/lexSubmitForApproval.js
@@ -30,7 +30,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -44,26 +43,21 @@
}
}).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");
})
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js b/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
index 2d3938b..db735ab 100644
--- a/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
+++ b/force-app/main/default/lwc/lexTerminalMaintenance/lexTerminalMaintenance.js
@@ -55,7 +55,6 @@
//涓
Terminal() {
- // sforce.connection.sessionId = this.sessionId;
if (this.ProcessStatusC == "鑽夋涓�" ||
this.ProcessStatusC == "涓嶆壒鍑�" ||
this.ProcessStatusC == "鎵瑰噯"
@@ -63,16 +62,13 @@
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("璇ョ淮淇悎鍚屾姤浠疯繕鍦ㄥ鎵逛腑 鎴� 宸茬粡涓锛屼笉鑳戒腑姝紒")
}
}
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
deleted file mode 100644
index 3986cf6..0000000
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexUploadToRecognitionModel from 'c/lexUploadToRecognitionModel';
-
-describe('c-lex-upload-to-recognition-model', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-upload-to-recognition-model', {
- is: LexUploadToRecognitionModel
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
index 6e22dc1..987e871 100644
--- a/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
@@ -67,55 +67,38 @@
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);
})
}
}
diff --git a/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js b/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
deleted file mode 100644
index d5f3d47..0000000
--- a/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexUploadToSap from 'c/lexUploadToSap';
-
-describe('c-lex-upload-to-sap', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-upload-to-sap', {
- is: LexUploadToSap
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js b/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
index 5bd9188..e06e449 100644
--- a/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
+++ b/force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js
@@ -33,6 +33,7 @@
urfFlag;
rtn1;
rtn;
+
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
if (currentPageReference) {
@@ -45,7 +46,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -66,32 +66,25 @@
}
}).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('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�', "error")
- // alert('缁翠慨鍚堝悓绠$悊缂栫爜涓虹┖锛屼笉鑳戒笂浼燬AP銆�');
} 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('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�', "error")
- // alert('褰撳墠缁翠慨鍚堝悓娌℃湁瀹屾垚璁ゆ锛屼笉鑳戒笂浼燬AP銆�');
return;
}
}
@@ -101,7 +94,6 @@
}).then(result => {
if (result != '1') {
this.ShowToastEvent('涓婁紶SAP澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触', "error")
- // alert('涓婁紶SAP澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触');
}
});
updateFirstContract({
@@ -109,7 +101,6 @@
}).then(result => {
if (result != '1') {
this.ShowToastEvent(result, "error")
- // alert(result);
}
});
this.urfFlag = this.URFContractFC;
@@ -130,15 +121,12 @@
});
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);
}
}
}
diff --git a/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js b/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
deleted file mode 100644
index 02e891b..0000000
--- a/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexYanshoudanRequest from 'c/lexYanshoudanRequest';
-
-describe('c-lex-yanshoudan-request', () => {
- afterEach(() => {
- // The jsdom instance is shared across test cases in a single file so reset the DOM
- while (document.body.firstChild) {
- document.body.removeChild(document.body.firstChild);
- }
- });
-
- it('TODO: test case generated by CLI command, please fill in test logic', () => {
- // Arrange
- const element = createElement('c-lex-yanshoudan-request', {
- is: LexYanshoudanRequest
- });
-
- // Act
- document.body.appendChild(element);
-
- // Assert
- // const div = element.shadowRoot.querySelector('div');
- expect(1).toBe(1);
- });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
index ad1fd9a..97a70c1 100644
--- a/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js
@@ -33,7 +33,6 @@
}
connectedCallback() {
- console.log(this.recordId);
init({
recordId: this.recordId
}).then(result => {
@@ -56,48 +55,14 @@
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 "";
- }
}
// 寮圭獥
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
deleted file mode 100644
index 9acb129..0000000
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.outerBorderCss{
- border: 1px solid #D4D4D4;
- border-radius : 5px;
- border-top : 3px solid #565959;
-}
-.borderCss{
- border: 1px solid #D4D4D4;
- border-radius : 5px;
- margin-bottom : 7px;
- border-top : 3px solid #565959;
-}
-.headerDorderCss{
- border-top: 1px solid #565959;
- border-bottom: 1px solid #D4D4D4;
- padding:3px;
-}
-.centerCss{
- text-align: center;
-}
-.centerCss .left{
- margin-left: 100px;
-}/* sample css file *//* sample css file */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
index 95bfd52..b35e67a 100644
--- a/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
+++ b/force-app/main/default/lwc/lexcopyQIS/lexcopyQIS.js
@@ -1,52 +1,70 @@
-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 : '鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�',
- 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('鐘舵�佷负鍙栨秷鐨凲IS鎵嶅彲浠ヨ澶嶅埗骞舵柊寤�', '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);
+ }
}
\ No newline at end of file
--
Gitblit v1.9.1