From 1ce13a35baf4d4a8cd047aacfb27afaae3278073 Mon Sep 17 00:00:00 2001
From: zhangzhengmei <zhangzhengmei@prec-tech.com>
Date: 星期四, 18 五月 2023 14:06:28 +0800
Subject: [PATCH] Merge branch 'LEX_dev' into LEX_zhangzhengmei_dev
---
force-app/main/default/lwc/lexApplyForRepair/lexApplyForRepair.js | 1
force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html | 0
force-app/main/default/lwc/lexESignFormAttachment/lexESignFormAttachment.js | 39
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js | 47
force-app/main/default/lwc/lexESignAcceptanceFranchiser/lexESignAcceptanceFranchiser.js-meta.xml | 11
force-app/main/default/classes/AddSubmitApprovalProcessController.cls | 27
force-app/main/default/classes/buttonMaintenanceContractAssetCtl.cls-meta.xml | 5
force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js-meta.xml | 18
force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.css | 22
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/lwc/lexConsumablesLost/lexConsumablesLost.html | 5
force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml | 11
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/lwc/lexSelectAssetsMaintenance/lexSelectAssetsMaintenance.js | 2
force-app/main/default/classes/TenderingButtonController.cls | 54
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/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/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/AllReceivedFseController.cls | 13
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js | 77
force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.html | 29
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html | 0
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js | 21
force-app/main/default/classes/buttonQISReportCtl.cls | 62
force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js | 484 ++-----
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js | 6
force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html | 0
force-app/main/default/lwc/lexTenderingNotarizeButton/lexTenderingNotarizeButton.js | 135 -
force-app/main/default/lwc/lexTenderingUsedAttachmentButton/lexTenderingUsedAttachmentButton.js | 31
force-app/main/default/classes/ReturnDeliverySlipController.cls | 15
force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html | 0
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js | 10
force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js | 71 +
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js | 28
force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js | 27
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls | 5
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 +
force-app/main/default/lwc/lexSLADetails/lexSLADetails.js-meta.xml | 11
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js | 2
force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js | 16
force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml | 11
force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js | 47
force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js | 79 +
force-app/main/default/lwc/lexPrintInspectupReportInspectupPlan/lexPrintInspectupReportInspectupPlan.js | 52
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js | 29
force-app/main/default/lwc/lexQISIntakeuniversalcode/lexQISIntakeuniversalcode.js | 2
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/lexCustomNewCopy2/lexCustomNewCopy2.js | 8
force-app/main/default/classes/LightingButtonConstant.cls | 15
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls | 40
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/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js | 28
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/lexESignAcceptanceHospital/lexESignAcceptanceHospital.js | 159 -
force-app/main/default/lwc/lexSLADetails/lexSLADetails.js | 52
force-app/main/default/classes/loanerArrangedEmailController.cls | 67
force-app/main/default/lwc/lexTenderingRelevancyButton/lexTenderingRelevancyButton.js | 97
force-app/main/default/classes/EquipmentRentalPicturePDFController.cls | 6
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js | 6
force-app/main/default/classes/LexLostSubmitApprovalController.cls | 45
force-app/main/default/classes/otherButtonRepairController.cls | 48
force-app/main/default/lwc/lexUploadToSap/lexUploadToSap.js | 18
force-app/main/default/lwc/lexInsPageBtn/lexInsPageBtn.js | 8
force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.html | 5
force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html | 5
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js | 77
force-app/main/default/classes/buttonMaintenanceTaskCtl.cls-meta.xml | 5
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/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js | 75 +
force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js-meta.xml | 17
force-app/main/default/lwc/lexAddress/lexAddress.js | 2
force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.css | 7
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js | 11
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/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js | 81 +
/dev/null | 22
force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml | 11
force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js | 103
force-app/main/default/lwc/lexPreContractSubmit/lexPreContractSubmit.js | 13
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
108 files changed, 2,432 insertions(+), 1,287 deletions(-)
diff --git a/force-app/main/default/classes/AddSubmitApprovalProcessController.cls b/force-app/main/default/classes/AddSubmitApprovalProcessController.cls
index 1694ba1..016eb2c 100644
--- a/force-app/main/default/classes/AddSubmitApprovalProcessController.cls
+++ b/force-app/main/default/classes/AddSubmitApprovalProcessController.cls
@@ -1,7 +1,4 @@
public with sharing class AddSubmitApprovalProcessController {
- public AddSubmitApprovalProcessController() {
-
- }
@AuraEnabled
public static InitData init(String recordId){
@@ -40,9 +37,12 @@
res.applyUserId = ra.applyUser__r.Id;
res.ownerId = ra.OwnerId;
res.rentalApplyStatus = ra.Status__c;
+ res.demoRequestPastDataId = Schema.SObjectType.Rental_Apply__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_BY_PastData).getRecordTypeId();
List<Rental_Apply_Equipment_Set_Detail__c> raeSet = [SELECT Id from Rental_Apply_Equipment_Set_Detail__c WHERE Rental_Apply__c = :recordId AND Draft_Appended__c=1];
res.detailSize = raeSet.size();
+ res.addApprovalStatus = '鑽夋涓�';
+ res.detailSize = 1;
}
catch (Exception e) {
System.debug(LoggingLevel.INFO, '****e:' + e);
@@ -51,7 +51,24 @@
}
- public Class InitData{
+ //鎻愪氦瀹℃壒
+ @AuraEnabled
+ public static String submitApproval(String recordId){
+ Savepoint sp = Database.setSavepoint();
+ try {
+ Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
+ req1.setObjectId(recordId);
+ Approval.ProcessResult submitResult = Approval.process(req1);
+ return 'OK';
+ }
+ catch (Exception e) {
+ Database.rollback(sp);
+ return e.getMessage();
+ }
+ }
+
+
+ private class InitData{
@AuraEnabled
public String rentalApplyId; //澶囧搧鍊熷嚭鐢宠Id
@AuraEnabled
@@ -102,5 +119,7 @@
public String ownerId; //澶囧搧鍊熷嚭鐢宠.鎵�鏈変汉Id
@AuraEnabled
public String rentalApplyStatus; //澶囧搧鍊熷嚭鐢宠.鐘舵��
+ @AuraEnabled
+ public String demoRequestPastDataId; //澶囧搧鐢宠 杩囧幓鍘嗗彶杞ЩId
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/AllReceivedFseController.cls b/force-app/main/default/classes/AllReceivedFseController.cls
index 9d19029..23805dc 100644
--- a/force-app/main/default/classes/AllReceivedFseController.cls
+++ b/force-app/main/default/classes/AllReceivedFseController.cls
@@ -1,14 +1,11 @@
public with sharing class AllReceivedFseController {
- public AllReceivedFseController() {
-
- }
@AuraEnabled
public static InitData init(String recordId){
InitData res = new InitData();
Rental_Apply__c ra = [SELECT Id, Loaner_received_ng_num__c from Rental_Apply__c where Id = :recordId];
- res.Id = ra.Id;
- res.LoanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
+ res.id = ra.Id;
+ res.loanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
return res;
}
@@ -28,7 +25,7 @@
if(updateList.size()>0){
try {
- update updateList;
+ Update updateList;
return 'SUCCESS';
}
catch (Exception e) {
@@ -41,8 +38,8 @@
public Class InitData{
@AuraEnabled
- public String Id;
+ public String id;
@AuraEnabled
- public Integer LoanerReceivedNgNum;
+ public Integer loanerReceivedNgNum;
}
}
\ No newline at end of file
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/EquipmentRentalPicturePDFController.cls b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls
index d7ceca7..04ddbac 100644
--- a/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls
+++ b/force-app/main/default/classes/EquipmentRentalPicturePDFController.cls
@@ -11,7 +11,7 @@
res.pageLength = Math.mod(setLength,10)== 0 ? setLength/10 : (setLength/10) +1 ;
res.raesList = raeSet;
}
- res.ShipmentRequestedCnt = Integer.valueOf(ra.Shipment_requested_cnt__c);
+ res.shipmentRequestedCnt = Integer.valueOf(ra.Shipment_requested_cnt__c);
}
catch (Exception e) {
System.debug(LoggingLevel.INFO, '****e:' + e);
@@ -21,11 +21,11 @@
public class InitData{
@AuraEnabled
- public String Id;
+ public String id;
@AuraEnabled
public Integer pagelength;
@AuraEnabled
- public Integer ShipmentRequestedCnt;
+ public Integer shipmentRequestedCnt;
@AuraEnabled
public List<Rental_Apply_Equipment_Set__c> raesList;
}
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 f29bf2c..df3b465 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -89,8 +89,23 @@
public static final String LU_SHENG_NAME = '闄� 鑳�';
public static final String HU_DI_AN_NAME = '鑳� 杩畨';
public static final String SYSTEM_PROFILE_NAME = '绯荤粺绠$悊鍛�';
+ public static final String TwoS10_FSE_ManagerMent = '2S10_FSE绠$悊鑰�';
public static final String TwoS1_Sales_Hospital = '2S1_閿�鍞尰闄㈡媴褰�';
+ public static final String TwoS1_Sales_Hospital_Non_Singleton = '2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級';
+ public static final String TwoS2_Sales_Product = '2S2_閿�鍞骇鍝佹媴褰�';
public static final String TwoS4_Sales_Manager = '2S4_閿�鍞鐞嗚��';
+ public static final String TwoS4_Sales_Manager_Non_Singleton = '2S4_閿�鍞鐞嗚�咃紙闈炲崟鐐癸級';
+ public static final String TwoS4_Sales_Manager_Majordomo = '2S4_閿�鍞鐞嗚��(鎬荤洃)';
+ public static final String TwoS6_Trade_Assistant = '2S6-2_钀ヤ笟鍔╃悊';
+ public static final String TwoS6_Sales_Headquarters = '2S6-1_閿�鍞湰閮ㄧ獥鍙�';
+ public static final String TwoS7_Sales_Headquarters = '2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�';
+ public static final String TwoS8_Sales_Administrative_Assistant = '2S8_閿�鍞鏀垮姪鐞�';
+ 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';
public static final String SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '闈炲璞�';
diff --git a/force-app/main/default/classes/ReturnDeliverySlipController.cls b/force-app/main/default/classes/ReturnDeliverySlipController.cls
index 0a97ed6..1d2295b 100644
--- a/force-app/main/default/classes/ReturnDeliverySlipController.cls
+++ b/force-app/main/default/classes/ReturnDeliverySlipController.cls
@@ -1,7 +1,4 @@
public with sharing class ReturnDeliverySlipController {
- public ReturnDeliverySlipController() {
-
- }
@AuraEnabled
public static InitData init(String recordId){
@@ -14,9 +11,9 @@
res.raeSet = raSet;
system.debug('raeSet===='+res.raeSet);
}
- res.Name = ra.Name;
- res.RentalApplyEquipmentSetCnt = Integer.valueOf(ra.Rental_Apply_Equipment_Set_Cnt__c);
- res.LoanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
+ res.name = ra.Name;
+ res.rentalApplyEquipmentSetCnt = Integer.valueOf(ra.Rental_Apply_Equipment_Set_Cnt__c);
+ res.loanerReceivedNgNum = Integer.valueOf(ra.Loaner_received_ng_num__c);
}
catch (Exception e) {
system.debug('INFO****' + e);
@@ -26,11 +23,11 @@
public class InitData{
@AuraEnabled
- public Integer RentalApplyEquipmentSetCnt;
+ public Integer rentalApplyEquipmentSetCnt;
@AuraEnabled
- public Integer LoanerReceivedNgNum;
+ public Integer loanerReceivedNgNum;
@AuraEnabled
- public String Name;
+ public String name;
@AuraEnabled
public List<Rental_Apply_Equipment_Set_Detail__c> raeSet;
}
diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
index 5e01974..6b12f61 100644
--- a/force-app/main/default/classes/TenderingButtonController.cls
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -8,12 +8,26 @@
res.Id = report.Id;
res.status = report.status__c;
res.name = report.Name;
- res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+ // res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+ res.opportunityNum = Integer.valueOf(report.OpportunityNum__c);
res.isRelateProject = report.IsRelateProject__c;
res.profileId = UserInfo.getProfileId();
res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
- res.SalesManagerId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
- res.SalesHospitalId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.TwoS1_Sales_Hospital = getProfileIdByName(LightingButtonConstant.TwoS1_Sales_Hospital);
+ res.TwoS1_Sales_Hospital_Non_Singleton = getProfileIdByName(LightingButtonConstant.TwoS1_Sales_Hospital_Non_Singleton );
+ res.TwoS2_Sales_Product = getProfileIdByName(LightingButtonConstant.TwoS2_Sales_Product);
+ res.TwoS4_Sales_Manager = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager);
+ res.TwoS4_Sales_Manager_Non_Singleton = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager_Non_Singleton);
+ res.TwoS4_Sales_Manager_Majordomo = getProfileIdByName(LightingButtonConstant.TwoS4_Sales_Manager_Majordomo);
+ res.TwoS6_Trade_Assistant = getProfileIdByName(LightingButtonConstant.TwoS6_Trade_Assistant);
+ res.TwoS6_Sales_Headquarters = getProfileIdByName(LightingButtonConstant.TwoS6_Sales_Headquarters);
+ res.TwoS7_Sales_Headquarters = getProfileIdByName(LightingButtonConstant.TwoS7_Sales_Headquarters);
+ res.TwoS8_Sales_Administrative_Assistant = getProfileIdByName(LightingButtonConstant.TwoS8_Sales_Administrative_Assistant);
+ res.TwoS8_Sales_Administrative_Assistant_Plan = getProfileIdByName(LightingButtonConstant.TwoS8_Sales_Administrative_Assistant_Plan);
+ res.TwoS9_Spare = getProfileIdByName(LightingButtonConstant.TwoS9_Spare);
+ res.OBA1_Tenderee = getProfileIdByName(LightingButtonConstant.OBA1_Tenderee);
+ res.OBA7_Enquiry_Tenderee = getProfileIdByName(LightingButtonConstant.OBA7_Enquiry_Tenderee);
+ res.TwoM4_Marketplace_Manager = getProfileIdByName(LightingButtonConstant.TwoM4_Marketplace_Manager);
res.Environment_Url = System.Label.Environment_Url;
System.debug(LoggingLevel.INFO, '*** xu: ' + res);
}catch(Exception e){
@@ -56,7 +70,7 @@
@AuraEnabled
public String name;
@AuraEnabled
- public String opportunityNum;
+ public Integer opportunityNum;
@AuraEnabled
public String isRelateProject;
@AuraEnabled
@@ -64,9 +78,37 @@
@AuraEnabled
public String systemProfileId;
@AuraEnabled
- public String SalesManagerId;
+ public String TwoS1_Sales_Hospital;
@AuraEnabled
- public String SalesHospitalId;
+ public String TwoS1_Sales_Hospital_Non_Singleton;
+ @AuraEnabled
+ public String TwoS2_Sales_Product;
+ @AuraEnabled
+ public String TwoS4_Sales_Manager;
+ @AuraEnabled
+ public String TwoS4_Sales_Manager_Non_Singleton;
+ @AuraEnabled
+ public String TwoS4_Sales_Manager_Majordomo;
+ @AuraEnabled
+ public String TwoS6_Trade_Assistant;
+ @AuraEnabled
+ public String TwoS6_Sales_Headquarters;
+ @AuraEnabled
+ public String TwoS7_Sales_Headquarters;
+ @AuraEnabled
+ public String TwoS8_Sales_Administrative_Assistant;
+ @AuraEnabled
+ public String TwoS8_Sales_Administrative_Assistant_Plan;
+ @AuraEnabled
+ public String TwoS9_Spare;
+ @AuraEnabled
+ public String OBA1_Tenderee;
+ @AuraEnabled
+ public String OBA7_Enquiry_Tenderee;
+ @AuraEnabled
+ public String TwoM4_Marketplace_Manager;
+ @AuraEnabled
+ public String SalesMarketplaceId;
@AuraEnabled
public String Environment_Url;
}
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..9f50c0f 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,63 @@
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;
+ }
+
+ // 鏌ユ壘绠�妗�
+ @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 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/loanerArrangedEmailController.cls b/force-app/main/default/classes/loanerArrangedEmailController.cls
index bb34d2f..fd8db23 100644
--- a/force-app/main/default/classes/loanerArrangedEmailController.cls
+++ b/force-app/main/default/classes/loanerArrangedEmailController.cls
@@ -1,9 +1,4 @@
-public with sharing class loanerArrangedEmailController {
-
-
-
- public loanerArrangedEmailController() {
- }
+public with sharing class LoanerArrangedEmailController {
@AuraEnabled
public static InitData init(String recordId) {
@@ -16,22 +11,22 @@
if( rac.Campaign__c != null ){
//鑾峰彇瀛︿細瀵硅薄
Campaign camp = [select Id, Status, Rental_Apply_Flag__c,IF_Approved__c,Approved_Status__c, Meeting_Approved_No__c from Campaign where id = :rac.Campaign__c];
- res.CampaignId = camp.Id;
- res.CampaignStatus = camp.Status;
- res.IFApproved = camp.IF_Approved__c;
- res.MeetingApprovedNo = camp.Meeting_Approved_No__c;
- res.ApprovedStatus = camp.Approved_Status__c;
+ res.campaignId = camp.Id;
+ res.campaignStatus = camp.Status;
+ res.iFApproved = camp.IF_Approved__c;
+ res.meetingApprovedNo = camp.Meeting_Approved_No__c;
+ res.approvedStatus = camp.Approved_Status__c;
}
- res.Id = recordId;
- res.RaStatus = rac.Status__c;
- res.WeiAssignedCnt = Integer.valueOf(rac.Wei_Assigned_Cnt__c);
- res.AssignedNotShipment = Integer.valueOf(rac.Assigned_Not_Shipment__c);
- res.DemoPurpose1 = rac.Demo_purpose1__c;
- res.ContractPdfUpdated = rac.Contract_pdf_updated__c;
- res.RepairId = rac.Repair__c;
- res.RepairFinalInspectionDateF = rac.Repair_Final_Inspection_Date_F__c;
- res.RCReturnToOffice = rac.RC_return_to_office__c;
- res.StatusList = status;
+ res.id = recordId;
+ res.raStatus = rac.Status__c;
+ res.weiAssignedCnt = Integer.valueOf(rac.Wei_Assigned_Cnt__c);
+ res.assignedNotShipment = Integer.valueOf(rac.Assigned_Not_Shipment__c);
+ res.demoPurpose1 = rac.Demo_purpose1__c;
+ res.contractPdfUpdated = rac.Contract_pdf_updated__c;
+ res.repairId = rac.Repair__c;
+ res.repairFinalInspectionDateF = rac.Repair_Final_Inspection_Date_F__c;
+ res.rCReturnToOffice = rac.RC_return_to_office__c;
+ res.statusList = status;
}
catch (Exception e) {
System.debug(LoggingLevel.INFO, '****e:' + e);
@@ -62,34 +57,34 @@
public class InitData{
@AuraEnabled
- public String Id;
+ public String id;
@AuraEnabled
- public String CampaignStatus; //瀛︿細鐘舵��
+ public String campaignStatus; //瀛︿細鐘舵��
@AuraEnabled
- public String CampaignId; //瀛︿細Id
+ public String campaignId; //瀛︿細Id
@AuraEnabled
- public String RaStatus; //澶囧搧鍊熷嚭鐢宠鐘舵��
+ public String raStatus; //澶囧搧鍊熷嚭鐢宠鐘舵��
@AuraEnabled
- public Integer WeiAssignedCnt; //鏈垎閰嶄欢鏁� Wei_Assigned_Cnt__c
+ public Integer weiAssignedCnt; //鏈垎閰嶄欢鏁� Wei_Assigned_Cnt__c
@AuraEnabled
- public Integer AssignedNotShipment; //宸插垎閰嶆湭鍑哄簱鎸囩ず Assigned_Not_Shipment__c
+ public Integer assignedNotShipment; //宸插垎閰嶆湭鍑哄簱鎸囩ず Assigned_Not_Shipment__c
@AuraEnabled
- public String DemoPurpose1; //浣跨敤鐩殑1 Demo_purpose1__c
+ public String demoPurpose1; //浣跨敤鐩殑1 Demo_purpose1__c
@AuraEnabled
- public Boolean ContractPdfUpdated; //鍚堝悓涔﹀凡涓婁紶 Contract_pdf_updated__c
+ public Boolean contractPdfUpdated; //鍚堝悓涔﹀凡涓婁紶 Contract_pdf_updated__c
@AuraEnabled
- public String RepairId; //瀛︿細.淇悊Id
+ public String repairId; //瀛︿細.淇悊Id
@AuraEnabled
- public Date RepairFinalInspectionDateF; //淇悊鏈�缁堟娴嬫棩F Repair_Final_Inspection_Date_F__c
+ public Date repairFinalInspectionDateF; //淇悊鏈�缁堟娴嬫棩F Repair_Final_Inspection_Date_F__c
@AuraEnabled
- public Date RCReturnToOffice; //RC淇悊鍝佽繑閫佹棩 RC_return_to_office__c
+ public Date rCReturnToOffice; //RC淇悊鍝佽繑閫佹棩 RC_return_to_office__c
@AuraEnabled
- public Boolean IFApproved; //瀛︿細.鏄惁闇�瑕佺敵璇峰喅瑁�
+ public Boolean iFApproved; //瀛︿細.鏄惁闇�瑕佺敵璇峰喅瑁�
@AuraEnabled
- public String MeetingApprovedNo; //瀛︿細.浼氳鍐宠缂栫爜
+ public String meetingApprovedNo; //瀛︿細.浼氳鍐宠缂栫爜
@AuraEnabled
- public String ApprovedStatus; //瀛︿細.鍐宠鐘舵�� Approved_Status__c
+ public String approvedStatus; //瀛︿細.鍐宠鐘舵�� Approved_Status__c
@AuraEnabled
- public List<String> StatusList;
+ public List<String> statusList;
}
}
\ 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 3caa6cb..67ab652 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/otherButtonRepairController.cls b/force-app/main/default/classes/otherButtonRepairController.cls
index 986cab3..1907e8d 100644
--- a/force-app/main/default/classes/otherButtonRepairController.cls
+++ b/force-app/main/default/classes/otherButtonRepairController.cls
@@ -309,7 +309,7 @@
//閫氳繃Is_Validity__c鍜孖d瀛楁鏌ヨAccount鐨勮褰曞苟杩斿洖
@AuraEnabled
- public static List<Account> queryForFindInvalidLicense(Boolean isValidity,String dealerId){
+ public static List<Account> queryForFindInvalidLicense(String dealerId){
try {
List<Account> accounts = [select Id,Is_Validity__c from Account where Is_Validity__c = false And Id = :dealerId];
return accounts;
@@ -342,10 +342,9 @@
//閫氳繃Id鏌ヨRepair__c涓殑Dealer__c锛屽啀鏍规嵁Dealer__c鏌ヨAccount涓殑璁板綍骞惰繑鍥�
@AuraEnabled
- public static List<Account> queryForrecords3(String recordId){
+ public static List<Account> queryForrecords3(String dealer){
try {
- Repair__c repair = [select Repair__c.Dealer__c from Repair__c where Id =:recordId];
- List<Account> accounts = [select id, FirstParagraph__c from Account where name =:repair.Dealer__c];
+ List<Account> accounts = [SELECT id, FirstParagraph__c from Account where name =:dealer];
return accounts;
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
@@ -355,24 +354,24 @@
//鏇存柊Repair__c涓殑璁板綍锛屽皢Maintenance_Contract__c鍜孧aintenanceContractType__c瀛楁鏇存柊涓虹┖锛岃嫢鎹曡幏鍒板紓甯稿垯杩斿洖閿欒淇℃伅
@AuraEnabled
public static String updateForRepair1(String recordId){
+ String res='';
try {
Repair__c repair = new Repair__c();
- repair.ID = recordId;
+ repair.Id = recordId;
repair.Maintenance_Contract__c = null;
repair.MaintenanceContractType__c = null;
update repair;
return null;
} catch (Exception e) {
- String eMessage = e.getMessage();
- Integer left = eMessage.indexOf(',') + 1;
- Integer right = eMessage.length();
- return eMessage.substring(left,right);
+ res = e.getMessage();
}
+ return res;
}
//鏇存柊Repair__c涓殑璁板綍锛岃嫢鎹曡幏鍒板紓甯稿垯杩斿洖閿欒淇℃伅
@AuraEnabled
public static String updateRepair2(String recordId,User staff,Boolean DWSign,String statusc,String DOJStatus,String SAPcondition){
+ String res='';
try {
Repair__c repair = new Repair__c();
repair.Id = recordId;
@@ -399,15 +398,36 @@
repair.SAP_Transfer_time__c = Datetime.now();
}
update repair;
- return null;
} catch (Exception e) {
- String eMessage = e.getMessage();
- Integer left = eMessage.indexOf(',') + 1;
- Integer right = eMessage.length();
- return eMessage.substring(left,right);
+ res = e.getMessage();
}
+ 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;
+ }
+
+ // 鏌ユ壘UserName
+ @AuraEnabled
+ public static List<User> initUserName(String userId){
+ List<User> res = new List<User>();
+ try{
+ res = [SELECT Id,name FROM User WHERE Id=: userId ];
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
public class InitData{
@AuraEnabled
public String detailedAddress;
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/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
index 54e7d73..eb9baa5 100644
--- a/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
+++ b/force-app/main/default/lwc/lexAddSubmitApprovalProcess/lexAddSubmitApprovalProcess.js
@@ -5,7 +5,9 @@
import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/AddSubmitApprovalProcessController.init';
-import setSObjectShare from '@salesforce/apex/ControllerUtil.setSObjectShare'
+import submitApproval from '@salesforce/apex/AddSubmitApprovalProcessController.submitApproval';
+import setSObjectShare from '@salesforce/apex/ControllerUtil.setSObjectShare';
+
export default class lexAddSubmitApprovalProcess extends LightningElement {
@api recordId;
IsLoading = true;
@@ -27,7 +29,7 @@
recordId: this.recordId
}).then(result=>{
if(result.addApprovalStatus != '鑽夋涓�' || result.detailSize == 0){
- this.ToastShow('娌℃湁闇�瑕佸鎵圭殑杩藉姞闄勫睘鍝�');
+ this.ToastShow('娌℃湁闇�瑕佸鎵圭殑杩藉姞闄勫睘鍝�','warning');
return;
}
if (!confirm("涓�鏃︽彁浜ゆ璁板綍浠ュ緟鎵瑰噯锛屾牴鎹偍鐨勮缃偍鍙兘涓嶅啀鑳藉缂栬緫姝よ褰曟垨灏嗕粬浠庢壒鍑嗚繃绋嬩腑璋冨洖銆傛槸鍚︾户缁紵")) {
@@ -39,53 +41,54 @@
// alert('甯屾湜鍒拌揣鏃ヤ笉鑳芥棭浜庣敵璇锋彁浜ゆ棩');
// return;
// }
+ console.log(JSON.stringify(result));
if(result.repairId != null){
if(result.demoPurpose1 == '缁翠慨浠g敤' && result.demoPurpose2 == '涓�鑸敤鎴�'){
if(result.repairEstimatedDateFormula == null){
- this.ToastShow('涓�鑸淮淇棤鎶ヤ环鏃ワ紝涓嶅彲鍊熺敤澶囧搧');
+ this.ToastShow('涓�鑸淮淇棤鎶ヤ环鏃ワ紝涓嶅彲鍊熺敤澶囧搧','warning');
return;
}else if(result.repairEstimatedDateFormula <'2019-07-01' && result.agreedDate == null){
- this.ToastShow('鎶ヤ环鏃ュ湪2019/7/1涔嬪墠涓旀埛鍚屾剰鏃ヤ负绌猴紝涓嶅彲鍊熺敤澶囧搧');
+ this.ToastShow('鎶ヤ环鏃ュ湪2019/7/1涔嬪墠涓旀埛鍚屾剰鏃ヤ负绌猴紝涓嶅彲鍊熺敤澶囧搧','warning');
return;
}
}
-
- if(result.recordTypeId !='01210000000RHIn' && result.newProductGuaranteeObject=='2: 鏈嶅姟澶氬勾淇濅慨' && (result.assetModelNo=='CV-V1' ||result.assetModelNo=='CV-V1(A)'||result.assetModelNo=='CV-V1(B)'||result.assetModelNo=='GIF-LV1'||result.assetModelNo=='CF-LV1L'||result.assetModelNo=='CF-LV1I'||result.assetModelNo=='MAJ-1910') &&(result.demoPurpose2=='涓�鑸敤鎴�'||result.demoPurpose2=='鍐嶄慨鐞�')){
- this.ToastShow('濂ヨ緣璁惧锛屼繚淇湡鍐呬笉鎻愪緵澶囧搧.');
+ //澶囧搧鐢宠 杩囧幓鍘嗗彶杞Щ
+ if(result.recordTypeId != result.demoRequestPastDataId && result.newProductGuaranteeObject=='2: 鏈嶅姟澶氬勾淇濅慨' && (result.assetModelNo=='CV-V1' ||result.assetModelNo=='CV-V1(A)'||result.assetModelNo=='CV-V1(B)'||result.assetModelNo=='GIF-LV1'||result.assetModelNo=='CF-LV1L'||result.assetModelNo=='CF-LV1I'||result.assetModelNo=='MAJ-1910') &&(result.demoPurpose2=='涓�鑸敤鎴�'||result.demoPurpose2=='鍐嶄慨鐞�')){
+ this.ToastShow('濂ヨ緣璁惧锛屼繚淇湡鍐呬笉鎻愪緵澶囧搧.','warning');
return;
}
}
if(result.campaignId!=null || result.campaignId!=''){
- if(result.rentalApplyFlag == '鑽夋涓�'){
- this.ToastShow('瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦');
+ if(result.campaignStatus == '鑽夋涓�'){
+ this.ToastShow('瀛︿細鐘舵�佷负鑽夋涓紝涓嶈兘鎻愪氦','warning');
return;
}
- if(result.rentalApplyFlag == '鐢宠涓�'){
- this.ToastShow('瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻愪氦');
+ if(result.campaignStatus == '鐢宠涓�'){
+ this.ToastShow('瀛︿細鐘舵�佷负鐢宠涓紝涓嶈兘鎻愪氦','warning');
return;
}
- if(result.rentalApplyFlag == '宸茬粨鏉�'){
- this.ToastShow('瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦');
+ if(result.campaignStatus == '宸茬粨鏉�'){
+ this.ToastShow('瀛︿細鐘舵�佷负宸茬粨鏉燂紝涓嶈兘鎻愪氦','warning');
return;
}
- if(result.rentalApplyFlag == '宸叉彁浜ゆ姤鍛�'){
- this.ToastShow('瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦');
+ if(result.campaignStatus == '宸叉彁浜ゆ姤鍛�'){
+ this.ToastShow('瀛︿細鐘舵�佷负宸叉彁浜ゆ姤鍛婏紝涓嶈兘鎻愪氦','warning');
return;
}
- if(result.rentalApplyFlag == '鍙栨秷鐢宠涓�'){
- this.ToastShow('瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦');
+ if(result.campaignStatus == '鍙栨秷鐢宠涓�'){
+ this.ToastShow('瀛︿細鐘舵�佷负鍙栨秷鐢宠涓紝涓嶈兘鎻愪氦','warning');
return;
}
- if(result.rentalApplyFlag == '鍙栨秷'){
- this.ToastShow('瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�');
+ if(result.campaignStatus == '鍙栨秷'){
+ this.ToastShow('瀛︿細鐘舵�佷负鍙栨秷锛屼笉鑳芥彁浜�','warning');
return;
}
}
if(result.qISNumber!=null || result.qISNumber!=''){
if(result.nextAction=='閫佸洖'){
- this.ToastShow('QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�');
+ this.ToastShow('QIS 宸查�佸洖锛屼笉鑳藉啀鐢宠澶囧搧浜�','warning');
return;
}
}
@@ -112,48 +115,60 @@
userAccess:userAccess,
ownerId:result.ownerId
}).then(res=>{
- if(res!='OK'){
- this.ToastShow(res);
+ console.log('setSObjectShareSuccess===='+res);
+ if(res!='OK'){
+ this.ToastShow(res,'warning');
return;
}
}).catch(err=>{
- console.log('setSObjectShareErr====',err);
+ console.log('setSObjectShareErr===='+err);
})
-
- var request = new sforce.ProcessSubmitRequest();
- request.objectId = "{!Rental_Apply__c.Id}";
- var processResults = sforce.connection.process([request]);
+ // var request = new sforce.ProcessSubmitRequest();
+ // request.objectId = "{!Rental_Apply__c.Id}";
+ // var processResults = sforce.connection.process([request]);
- if (processResults[0].errors != null) {
- var back = new sforce.SObject("Rental_Apply__c");
- back.Id = "{!Rental_Apply__c.Id}";
- back.Add_Approval_Status__c = "鑽夋涓�";
- var backResult = sforce.connection.update([back]);
- backMessages = this.getConnectDMLErrorMessages(backResult);
- if (backMessages.length > 0) {
- alert(backMessages.join("\n"));
- return;
- }
+ // if (processResults[0].errors != null) {
+ // var back = new sforce.SObject("Rental_Apply__c");
+ // back.Id = "{!Rental_Apply__c.Id}";
+ // back.Add_Approval_Status__c = "鑽夋涓�";
+ // var backResult = sforce.connection.update([back]);
+ // backMessages = this.getConnectDMLErrorMessages(backResult);
+ // if (backMessages.length > 0) {
+ // this.showToast(backMessages.join("\n"),'error');
+ // return;
+ // }
- var errmsg = processResults[0].errors.message.toString();
- alert(errmsg);
- return;
- }
+ // var errmsg = processResults[0].errors.message.toString();
+ // this.showToast(errmsg,'error');
+ // return;
+ // }
+ //updateRecord({fields: { Id: this.recordId }});
+
+ submitApproval({
+ recordId: this.recordId
+ }).then(res=>{
+ console.log('submitApproval===='+res);
+ if(res == 'OK'){
+ this.ToastShow('鎻愪氦鎴愬姛','success');
+ }else{
+ this.ToastShow(res,'error');
+ }
+ })
updateRecord({fields: { Id: this.recordId }});
}).catch(err=>{
- console.log('sErr====',err);
+ console.log('sErr====',err.message);
})
}
- ToastShow(msg){
+ ToastShow(msg,type){
const evt = new ShowToastEvent({
title : msg,
message: '',
- variant: 'warning'
+ variant: type
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
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/lexAllReceivedFse/lexAllReceivedFse.js b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
index f6ebf2b..f97ad18 100644
--- a/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
+++ b/force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
@@ -25,13 +25,15 @@
init({
recordId: this.recordId
}).then(res=>{
- if(res.LoanerReceivedNgNum == 0){
+ console.log('loanerReceivedNgNum==='+ res.loanerReceivedNgNum);
+ if(res.loanerReceivedNgNum == 0){
const evt = new ShowToastEvent({
title : '鐜板満宸茬粡鍏ㄩ儴鏀跺埌瀹炵墿浜�',
message: '',
- variant: 'success'
+ variant: 'error'
});
this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
}else{
getRaeSet({
recordId: this.recordId
@@ -57,9 +59,12 @@
}
})
+ .catch(err=>{
+ console.log('getRaeSet==='+err);
+ })
}
}).catch(err=>{
- console.log(err);
+ console.log('init==='+err);
})
}
}
\ No newline at end of file
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/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
index bd82704..2d24bf8 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
@@ -1,6 +1,9 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
+
import init from '@salesforce/apex/EquipmentRentalPicturePDFController.init';
export default class lexEquipmentRentalPicturePDF extends LightningElement {
@api recordId;
@@ -22,20 +25,36 @@
init({
recordId: this.recordId
}).then(result=>{
- //console.log('result.ShipmentRequestedCnt===' + result.ShipmentRequestedCnt)
- if( result.ShipmentRequestedCnt > 0){
+ //console.log('result.shipmentRequestedCnt===' + result.shipmentRequestedCnt)
+ if( result.shipmentRequestedCnt > 0){
console.log(result.pagelength);
for(var i =0; i<result.pagelength; i++){
+ this.dispatchEvent(new CloseActionScreenEvent());
window.open('/apex/FixtureRentalPicturePDF?raid='+ this.recordId +'&page=' + i);
}
}else{
- alert('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��');
+ this.showToast('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��','error');
}
- this.dispatchEvent(new CloseActionScreenEvent());
}).catch(err=>{
this.dispatchEvent(new CloseActionScreenEvent());
- console.log(err);
+ console.log('initerr===='+err);
})
}
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ 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/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/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
index 3916190..bd626db 100644
--- a/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
+++ b/force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
@@ -1,6 +1,8 @@
import { LightningElement, track, wire, api } from 'lwc';
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/loanerArrangedEmailController.init';
import getRentalApplyEquipmentSet from '@salesforce/apex/loanerArrangedEmailController.getRentalApplyEquipmentSet';
@@ -25,49 +27,50 @@
init({
recordId: this.recordId
}).then(result => {
- console.log(this.recordId);
+ let statusArr = result.statusList;
console.log('result==='+JSON.stringify(result));
if(result != null) {
- if( result.WeiAssignedCnt > 0 ) {
- alert("鐢宠鍗曞唴瀛樺湪鏈垎閰嶇殑閰嶅锛岃鍒嗛厤澶囧搧鎴栧垎鍓茬敵璇峰崟");
- }else if(result.CampaignStatus == "鍙栨秷") {
- alert("瀛︿細鍙栨秷锛屼笉鍙嚭搴撴寚绀�");
- }else if (result.RaStatus == "宸插嚭搴撴寚绀�" && result.AssignedNotShipment == 0){
- alert("鎵�鏈夌殑鍊熷嚭澶囧搧Set涓�瑙堥兘杩涜杩囧嚭搴撴寚绀轰簡");
- }else if (result.AssignedNotShipment == 0) {
- alert("娌℃湁鍙互鍑哄簱鎸囩ず鐨勬槑缁�");
- }else if (result.DemoPurpose1 == "闀挎湡鍊熷嚭" && result.ContractPdfUpdated == 0){
- alert("闀挎湡鍊熷嚭鏃讹紝蹇呴』鍏堜笂浼犲绾︿功");
- }else if (result.RepairId != '' && (result.RepairFinalInspectionDateF != null && result.RepairFinalInspectionDateF != '') || (result.RCReturnToOffice != null && result.RCReturnToOffice != '')){
- alert("淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙嚭搴撴寚绀�");
- }else if (result.IFApproved == "true" && (result.MeetingApprovedNo == null || result.MeetingApprovedNo == "")){
- alert("娌℃湁鍐宠鍙风殑锛屾殏涓嶈兘鍑哄��,璇锋洿鏂拌鍐充俊鎭��");
- }else if (result.IFApproved == "true" && result.MeetingApprovedNo != "" && result.StatusList.indexOf(records[0].Approved_Status__c) != -1){
- alert("宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢銆�");
- }else {
+ if( result.weiAssignedCnt > 0 ) {
+ this.showToast("鐢宠鍗曞唴瀛樺湪鏈垎閰嶇殑閰嶅锛岃鍒嗛厤澶囧搧鎴栧垎鍓茬敵璇峰崟",'error');
+ }else if(result.campaignStatus == "鍙栨秷") {
+ this.showToast("瀛︿細鍙栨秷锛屼笉鍙嚭搴撴寚绀�",'error');
+ }else if (result.raStatus == "宸插嚭搴撴寚绀�" && result.assignedNotShipment == 0){
+ this.showToast("鎵�鏈夌殑鍊熷嚭澶囧搧Set涓�瑙堥兘杩涜杩囧嚭搴撴寚绀轰簡",'error');
+ }else if (result.assignedNotShipment == 0) {
+ this.showToast("娌℃湁鍙互鍑哄簱鎸囩ず鐨勬槑缁�",'error');
+ }else if (result.demoPurpose1 == "闀挎湡鍊熷嚭" && result.contractPdfUpdated == false){
+ this.showToast("闀挎湡鍊熷嚭鏃讹紝蹇呴』鍏堜笂浼犲绾︿功",'error');
+ }else if (result.repairId != '' && (result.repairFinalInspectionDateF != null && result.repairFinalInspectionDateF != '') || (result.rCReturnToOffice != null && result.rCReturnToOffice != '')){
+ this.showToast("淇悊鏈夋渶缁堟娴嬫棩鎴栦慨鐞嗗搧杩旈�佹棩锛屼笉鍙嚭搴撴寚绀�",'error');
+ }else if (result.iFApproved == true && (result.meetingApprovedNo == null || result.meetingApprovedNo == "")){
+ this.showToast("娌℃湁鍐宠鍙风殑锛屾殏涓嶈兘鍑哄��,璇锋洿鏂拌鍐充俊鎭��",'error');
+ }else if (result.iFApproved == true && result.meetingApprovedNo != "" && statusArr.indexOf(result.approvedStatus) != -1){
+ this.showToast("宸茬敵璇峰喅瑁佷絾鍐宠鐘舵�佷笉绗﹀悎鏉′欢銆�",'error');
+ }else{
approvalCheck({
rentalApplyId: this.recordId
- }).then(res=>{
- if (res != '1') {
- alert(rs1);
- } else {
+ }).then(res1 =>{
+ if (res1 != '1') {
+ this.showToast(res1,'error');
+ }else{
//bp2 var rs2 = sforce.apex.execute("RentalApplyWebService", "reserve", {rentalApplyId: raid});
//bp2 if (rs2 != '1') {
//bp2 alert(rs2);
//bp2 } else {
//var rs1 = sforce.apex.execute("RentalApplyWebService", "setShipment_request", {raid : "{!Rental_Apply__c.Id}"});
-
+ console.log('setShipment_request==');
setShipment_request({
raid: this.recordId
}).then(res=>{
- if (res == "鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�") {
- alert("鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�");
+ console.log('res==',res);
+ if (res == "鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�") {
+ this.showToast("鐘舵�佹洿鏂板埌宸插嚭搴撴寚绀�",'success');
print();
- setTimeout(function() {
- location.href = "/{!Rental_Apply__c.Id}";
- },100);
+ // setTimeout(function() {
+ // location.href = "/{!Rental_Apply__c.Id}";
+ // },100);
}else {
- alert(res);
+ this.showToast(res,'error');
}
}).catch(e=>{
console.log('approvalCheck==='+e);
@@ -99,4 +102,20 @@
var Seconds = fixTime(date.getSeconds());
return date.getFullYear() + "-" + Month + "-" + Day + "T" + Time;
}
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ 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/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..777f405 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') {
+ var power = this.profileName;
+
+ if (power != '2B2_澶囧搧涓績妫�娴�&浠撳簱绠$悊') {
this.ShowToastEvent("瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�", "error");
- // alert('瀵逛笉璧凤紝鎮ㄦ病鏈夋潈闄愭彁浜ゆ鐢宠锛�');
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/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.css b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.css
new file mode 100644
index 0000000..fb281d8
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.css
@@ -0,0 +1,7 @@
+.Holder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.html b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.html
new file mode 100644
index 0000000..960b41d
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Holder" 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/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js
new file mode 100644
index 0000000..65b7dce
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js
@@ -0,0 +1,16 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+// 2023/05/12 鍊熷嚭澶囧搧閰嶅涓�瑙� 閫夋嫨閰嶅鎸夐挳
+export default class lexRentalFixtureSetSelect extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading=true;
+
+ connectedCallback(){
+ if (this.recordId) {
+ window.open("/apex/RentalFixtureSetSelect?pt_recid="+this.recordId, "_top");
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js-meta.xml b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js-meta.xml
new file mode 100644
index 0000000..0509532
--- /dev/null
+++ b/force-app/main/default/lwc/lexRentalFixtureSetSelect/lexRentalFixtureSetSelect.js-meta.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSplitApply">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <property name="recordId" type="String" label="recordId"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js
index b8c66e8..01b9adc 100644
--- a/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js
+++ b/force-app/main/default/lwc/lexReturnDeliverySlip/lexReturnDeliverySlip.js
@@ -2,9 +2,10 @@
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
+
import init from '@salesforce/apex/ReturnDeliverySlipController.init';
-
-
export default class lexReturnDeliverySlip extends LightningElement {
@api recordId;
@@ -27,27 +28,33 @@
init({
recordId: this.recordId
}).then(result =>{
- if(result.RentalApplyEquipmentSetCnt > 0){
- console.log(JSON.stringify(result.raeSet));
- if(JSON.stringify(result.raeSet) != '[]'){
- var check = result.raeSet && result.raeSet.length>0;
- if((check || result.RentalApplyEquipmentSetCnt - result.LoanerReceivedNgNum > 0) && result.RentalApplyEquipmentSetCnt > 0){
- window.open("/apex/EquipmentSetShippmentReceived4?id=" + result.Name);
- }else{
- alert("娌℃湁鐢宠鑰呮敹鍒扮‘璁ょ殑鍊熷嚭澶囧搧");
- }
- }else{
- alert("娌℃湁绗﹀悎鏉′欢鐨勫鍝佸�熷嚭鐢宠涓�瑙堟槑缁�");
- console.log('else');
- }
- this.dispatchEvent(new CloseActionScreenEvent());
- }else{
- this.dispatchEvent(new CloseActionScreenEvent());
- alert("娌℃湁澶囧搧鍊熷嚭鐢宠涓�瑙堝強涓�瑙堟槑缁�");
- }
+ console.log(JSON.stringify(result.raeSet));
+ var check = result.raeSet && result.raeSet.length>0;
+ if((check || result.rentalApplyEquipmentSetCnt - result.loanerReceivedNgNum > 0) && result.rentalApplyEquipmentSetCnt > 0){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ window.open("/apex/EquipmentSetShippmentReceived4?id=" + result.name);
+ }else{
+ this.showToast("娌℃湁鐢宠鑰呮敹鍒扮‘璁ょ殑鍊熷嚭澶囧搧", 'error');
+ }
}).catch(err=>{
this.dispatchEvent(new CloseActionScreenEvent());
console.log('err=='+err);
})
}
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ if(type == 'success'){
+ this.updateRecordView();
+ }
+ 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/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/lexSendNFM103/lexSendNFM103.js b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
index e6f21ea..eea8f44 100644
--- a/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
+++ b/force-app/main/default/lwc/lexSendNFM103/lexSendNFM103.js
@@ -1,5 +1,7 @@
import getStaticResource from "@salesforce/apex/ButtonJsUtility.getStaticResource";
import init from "@salesforce/apex/otherButtonRepairController.init";
+import initSelectProfile from '@salesforce/apex/otherButtonRepairController.initSelectProfile';
+import initUserName from '@salesforce/apex/otherButtonRepairController.initUserName';
import queryForEquipments from "@salesforce/apex/otherButtonRepairController.queryForEquipments";
import queryForFindInvalidLicense from "@salesforce/apex/otherButtonRepairController.queryForFindInvalidLicense";
import queryForRds from "@salesforce/apex/otherButtonRepairController.queryForRds";
@@ -75,6 +77,9 @@
profileId;
userId;
AWSDataId;
+ userName;
+ profileName;
+ Id;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -98,21 +103,21 @@
btns[i].disabled = true;
btns[i].className = 'btnDisabled';
}
-
+ this.Id = result.Id;
this.detailedAddress = result.detailedAddress;
- this.dealer = result.dealer;
+ this.dealer = result.DealerC;
this.numberofEffectiveContract = result.numberofEffectiveContract;
this.newProductGuaranteTxt = result.newProductGuaranteTxt;
- this.onSiteRepair = result.onSiteRepair;
+ this.onSiteRepair = result.OnSiteRepairC;
this.maintenanceContract = result.maintenanceContract;
this.VMMaintenanceContract = result.VMMaintenanceContract;
this.FSEState = result.FSEState;
- this.dateReceiptQuestions = result.dateReceiptQuestions;
- this.delayReportReason = result.delayReportReason;
+ this.dateReceiptQuestions = result.DateReceiptQuestionsC;
+ this.delayReportReason = result.DelayReportReasonC;
this.repairSource = result.repairSource;
this.quickRepairSign = result.quickRepairSign;
this.RCCD = result.RCCD;
- this.returnsProductway = result.returnsProductway;
+ this.returnsProductway = result.ReturnsProductWayC;
this.salesDeptHP = result.salesDeptHP;
this.isAohuiProduct = result.isAohuiProduct;
this.stateHospital = result.stateHospital;
@@ -123,7 +128,7 @@
this.URFLimitSerial = result.URFLimitSerial;
this.status = result.status;
this.dealerId = result.dealerId;
- this.ifDeadHurt = result.ifDeadHurt;
+ this.ifDeadHurt = result.ifDeadHurtC;
this.dayLater30 = result.dayLater30;
this.recallCorrespondence = result.recallCorrespondence;
this.URFReapir = result.URFReapir;
@@ -131,177 +136,123 @@
this.DWSign = result.DWSign;
this.DOJStatus = result.DOJStatus;
this.SAPcondition = result.SAPcondition;
- this.salesOfficeCodeSelection = result.salesOfficeCodeSelection;
+ this.salesOfficeCodeSelection = result.SalesOfficeCodeSelectionC;
this.profileId = result.profileId;
- this.userId = result.userId;
+ this.userId = result.userID;
this.AWSDataId = result.AWSDataId;
-
- this.logicalJudgmentA();
+
+ initUserName({
+ userId: this.userId
+ }).then(result => {
+ if (result != null) {
+ this.IsLoading = false;
+ this.userName = result[0].Name;
+ }
+ })
+
+ initSelectProfile({
+ profileId: this.profileId
+ }).then(result => {
+ if (result != null) {
+ this.IsLoading = false;
+ this.profileName = result[0].Name;
+
+ this.foo();
+ }
+ })
+ this.dispatchEvent(new CloseActionScreenEvent());
}).catch(error => {
- console.log("error");
console.log(error);
});
}
-
- showToast(msg, type) {
- const event = new ShowToastEvent({
- title: '',
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
- }
-
- updateRecordView(recordId) {
- updateRecord({
- fields: {
- Id: recordId
- }
- });
- }
-
- logicalJudgmentA() {
- try {
- if (
- this.numberofEffectiveContract == "鏃�" &&
- this.newProductGuaranteTxt != "2: 澶氬勾淇濅慨" &&
- this.newProductGuaranteTxt != "2: 鏈嶅姟澶氬勾淇濅慨" &&
- this.newProductGuaranteTxt != "8: 甯傚満澶氬勾淇濅慨" &&
- this.onSiteRepair == "鐩撮�丼ORC淇悊"
- ) {
- if (
- !confirm("璁惧涓洪潪缁翠慨鍚堝悓涓旈潪澶氬勾淇濅慨瀵硅薄鍝侊紝璇风‘璁ゆ槸鍚︾洿閫丼ORC淇悊锛�")
- ) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ foo() {
+ queryForrecords3({
+ dealer: this.dealer
+ }).then(result => {
+ if (result.length > 0 && result[0].FirstParagraph__c == true) {
+ if (!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紵")) {
return;
}
}
- console.log("11");
if (
- (this.maintenanceContract != undefined ||
- this.VMMaintenanceContract != undefined) &&
- this.onSiteRepair == "RC淇悊" &&
- this.FSEState == "灞变笢鐪�"
+ this.numberofEffectiveContract == "鏃�" && this.newProductGuaranteTxt != "2: 澶氬勾淇濅慨" &&
+ this.newProductGuaranteTxt != "2: 鏈嶅姟澶氬勾淇濅慨" && this.newProductGuaranteTxt != "8: 甯傚満澶氬勾淇濅慨" &&
+ this.onSiteRepair == "鐩撮�丼ORC淇悊"
) {
- if (
- !confirm("璇ヨ澶囦负缁翠慨鍚堝悓鎴栧骞翠繚淇璞″搧锛岃纭鏄惁閫佽嚦RC淇悊锛�")
- ) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ if (!confirm("璁惧涓洪潪缁翠慨鍚堝悓涓旈潪澶氬勾淇濅慨瀵硅薄鍝侊紝璇风‘璁ゆ槸鍚︾洿閫丼ORC淇悊锛�")) {
+ return;
+ }
+ }
+ if ((this.maintenanceContract != undefined || this.VMMaintenanceContract != undefined) &&
+ this.onSiteRepair == "RC淇悊" && this.FSEState == "灞变笢鐪�"
+ ) {
+ if (!confirm("璇ヨ澶囦负缁翠慨鍚堝悓鎴栧骞翠繚淇璞″搧锛岃纭鏄惁閫佽嚦RC淇悊锛�")) {
return;
}
}
var today = Date.now();
var dateReceiptQuestions = Date.parse(this.dateReceiptQuestions);
var dates = (today - dateReceiptQuestions) / (24 * 60 * 60 * 1000);
- if (
- this.profileId != "00e10000000Y3o5" &&
- this.userId != "0051000000AKgzv" &&
- this.userId != "0051000000AKh05" &&
- this.userId != "00510000004q1ed" &&
- this.delayReportReason == "" &&
- dates > "1" &&
- this.repairSource != "QIS杞慨鐞�"
- ) {
- this.showToast("鐢宠淇悊鏃禨AP淇悊鐢宠鏃ヨ秴杩囬棶棰樿仈缁滄敹鍒版棩1澶╋紝蹇呴』濉啓闂秴鏃舵姤鍛婄殑鐞嗙敱", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ if (this.profileName != "绯荤粺绠$悊鍛�" && this.userName != "鑳� 鐜夋垚" && this.userName != "鏉� 鐞竻" &&
+ this.userName != "閮� 娲�" &&
+ this.delayReportReason == undefined && dates > "1" &&
+ this.repairSource != "QIS杞慨鐞�") {
+ alert("鐢宠淇悊鏃禨AP淇悊鐢宠鏃ヨ秴杩囬棶棰樿仈缁滄敹鍒版棩1澶╋紝蹇呴』濉啓闂秴鏃舵姤鍛婄殑鐞嗙敱");
return;
}
- if (
- this.quickRepairSign == true &&
- (this.numberofEffectiveContract == "鏈�" ||
- this.newProductGuaranteTxt == "2: 澶氬勾淇濅慨" ||
- this.newProductGuaranteTxt == "2: 鏈嶅姟澶氬勾淇濅慨" ||
- this.newProductGuaranteTxt == "8: 甯傚満澶氬勾淇濅慨") &&
- (this.onSiteRepair == "RC淇悊" ||
- this.onSiteRepair == "鍔炰簨澶勪慨鐞�" ||
- this.onSiteRepair == "鐜板満淇悊")
- ) {
+ if (this.quickRepairSign == true && (this.numberofEffectiveContract == "鏈�" || this.newProductGuaranteTxt == "2: 澶氬勾淇濅慨" ||
+ this.newProductGuaranteTxt == "2: 鏈嶅姟澶氬勾淇濅慨" || this.newProductGuaranteTxt == "8: 甯傚満澶氬勾淇濅慨") &&
+ (this.onSiteRepair == "RC淇悊" || this.onSiteRepair == "鍔炰簨澶勪慨鐞�" || this.onSiteRepair == "鐜板満淇悊")) {
if (this.RCCD == "2.涓滃寳" || this.RCCD == "3.瑗垮寳") {
- if (
- !confirm(
- "璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丼ORC淇悊锛岃纭鏄惁缁х画銆�"
- )
- ) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ if (!confirm("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丼ORC淇悊锛岃纭鏄惁缁х画銆�")) {
return;
}
- } else if (
- this.RCCD == "1.鍗庡寳" ||
- this.RCCD == "6.鍗庡崡" ||
- this.RCCD == "4.瑗垮崡"
- ) {
- if (
- !confirm(
- "璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丱GZ淇悊锛岃纭鏄惁缁х画銆�"
- )
- ) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ } else if (this.RCCD == "1.鍗庡寳" || this.RCCD == "6.鍗庡崡" || this.RCCD == "4.瑗垮崡") {
+ if (!confirm("璇ュ瀷鍙峰搴斾负鍚堝悓鎴栧骞翠繚瀵硅薄鍝併�傚纭涓哄ぇ淇悊鏁呴殰锛岄渶瑕侀�夋嫨鐩撮�丱GZ淇悊锛岃纭鏄惁缁х画銆�")) {
return;
}
}
}
var returnsProductWay = this.returnsProductway;
- var falg = true;
if (returnsProductWay == undefined) {
if (!confirm("杩斿搧鏂瑰紡涓虹┖锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紒")) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
return;
}
}
- if (this.assetOwner == "Olympus") {} else {
- console.log(this.detailedAddress);
- if (this.detailedAddress != undefined) {
- var prompt =
- "褰撳墠鐩磋繑鏀惰揣鍦板潃涓猴細" + this.detailedAddress + ",鎮ㄧ‘璁や笉淇敼浜嗗悧锛�";
+ var DetailedAddress = this.detailedAddress;
+ if (this.assetOwner != "Olympus") {
+ if (DetailedAddress != undefined) {
+ var prompt = '褰撳墠鐩磋繑鏀惰揣鍦板潃涓猴細' + DetailedAddress + ',鎮ㄧ‘璁や笉淇敼浜嗗悧锛�';
if (!confirm(prompt)) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
return;
}
} else {
- this.showToast("褰撳墠淇悊娌℃湁褰曞叆鐩磋繑鏀惰揣鐨勮缁嗗湴鍧�锛屼笉鑳界敵璇蜂慨鐞嗭紒", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ alert('褰撳墠淇悊娌℃湁褰曞叆鐩磋繑鏀惰揣鐨勮缁嗗湴鍧�锛屼笉鑳界敵璇蜂慨鐞嗭紒');
return;
}
}
-
queryForEquipments({
deliveredProductId: this.deliveredProductId,
- }).then((result) => {
- var equipments = result;
+ }).then(equipments => {
if (equipments != null && equipments.length > 0) {
var equipment = equipments[0];
if (equipment.Status == "寤冩") {
- this.showToast("璁惧搴熷純锛屼笉鑳芥彁浜ょ敵璇�!", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ alert("璁惧搴熷純锛屼笉鑳芥彁浜ょ敵璇�!");
return;
}
}
});
if (this.FSEApplyForRepairTime != undefined) {
- this.showToast("宸蹭慨鐞嗙敵璇凤紝涓嶅啀淇悊鐢宠浜�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ alert("宸蹭慨鐞嗙敵璇凤紝涓嶅啀淇悊鐢宠浜�");
return;
}
var surplusCount = 0;
- if (this.URFReapir == true) {
- var urfAsset = null;
-
+ if (this.URFReapir == false) {
queryForUrfAsset({
maintenanceContractId: this.maintenanceContractId,
deliveredProductId: this.deliveredProductId,
- }).then((result) => {
- urfAsset = result;
+ }).then(urfAsset => {
var seriesMaxRepairCount = 0;
var seriesRepairCount = 0;
if (urfAsset != null && urfAsset.length > 0) {
@@ -310,117 +261,114 @@
surplusCount = seriesMaxRepairCount - seriesRepairCount;
}
});
- var urfSeriesInfo = null;
-
queryForUrfSeriesInfo({
URFLimitSerial: this.URFLimitSerial,
- }).then((result) => {
- urfSeriesInfo = result;
+ }).then(urfSeriesInfo => {
var urfSeries = "";
if (urfSeriesInfo != null && urfSeriesInfo.length > 0) {
urfSeries = urfSeriesInfo[0].URFLimitSerial__c;
}
- var repairCount = null;
-
queryForRepairCount({
maintenanceContractId: this.maintenanceContractId,
status1: "1.鍙楃悊瀹屾瘯",
URFLimitSerial: urfSeries,
- }).then((result) => {
- repairCount = result;
+ }).then(repairCount => {
+ if (repairCount.length > 0 && surplusCount == 1) {
+ alert("璇ヨ澶囧叧鑱旈檺娆″悎鍚岋紝鐩墠鍓╀綑娆℃暟灏忎簬閫佷慨璁惧銆傝绛夊緟杩涜涓慨鐞嗗畬鎴愬悗鍐嶈繘琛岀敵璇�");
+ return;
+ }
});
- if (repairCount.length > 0 && surplusCount == 1) {
- this.showToast("璇ヨ澶囧叧鑱旈檺娆″悎鍚岋紝鐩墠鍓╀綑娆℃暟灏忎簬閫佷慨璁惧銆傝绛夊緟杩涜涓慨鐞嗗畬鎴愬悗鍐嶈繘琛岀敵璇�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
});
}
- if (
- this.status != "鑽夋涓�" &&
- this.status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" &&
- this.status != "4.淇悊鍝佽繑閫侀樁娈�"
- ) {
- this.showToast("涓嶆槸鑽夋涓笉鑳界敵璇�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ if (this.status != "鑽夋涓�" && this.status != "1.鍙楃悊瀹屾瘯(SAP寰呭彂閫�)" && this.status != "4.淇悊鍝佽繑閫侀樁娈�") {
+ alert("涓嶆槸鑽夋涓笉鑳界敵璇�");
} else {
if (this.dealer != undefined) {
- var findInvalidLicense = null;
queryForFindInvalidLicense({
- isValidity: false,
dealerId: this.dealerId,
- }).then((result) => {
- findInvalidLicense = result;
- if (findInvalidLicense.size > 0) {
- this.showToast("缁忛攢鍟嗕笁璇佷笉鍦ㄦ湁鏁堟湡锛屾棤娉曢�佷慨", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ }).then(findInvalidLicense => {
+ console.log(findInvalidLicense);
+ if (findInvalidLicense.length > 0) {
+ alert("缁忛攢鍟嗕笁璇佷笉鍦ㄦ湁鏁堟湡锛屾棤娉曢�佷慨");
return;
}
});
}
- if (this.ifDeadHurt == "鏈�") {
- if (!confirm("鏄惁纭AE瑕佹彁浜わ紵")) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- }
- if (this.dayLater30 == "鏄�") {
- this.showToast("鍒涘缓鍚庤秴杩�30澶╋紝涓嶈兘鐢宠浜�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ if (this.ifDeadHurt == "鏈�") {
+ if (!confirm("鏄惁纭AE瑕佹彁浜わ紵")) {
return;
}
- var prompt11 = "鍚堝悓鍐呭ぇ淇鏁板凡鐢ㄥ畬锛屽綋鍓嶄慨鐞嗕负鍚堝悓澶栫殑淇悊锛屾槸鍚︾户缁紵";
- if (this.URFReapir == true && surplusCount == 0) {
- var resultTmp = null;
- if (!confirm(prompt11)) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
-
- updateForRepair1({
- recordId: this.recordId,
- }).then((result) => {
- resultTmp = result;
- console.log("1111");
- var messagesTmp = "";
- if (resultTmp) {
- messagesTmp = this.getConnectDMLErrorMessages(resultTmp);
- }
- if (messagesTmp.length > 0) {
- this.showToast(messagesTmp.join("\n"), "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
+ }
+ if (this.dayLater30 == "鏄�") {
+ alert("鍒涘缓鍚庤秴杩�30澶╋紝涓嶈兘鐢宠浜�");
+ return;
+ }
+ var prompt11 = "鍚堝悓鍐呭ぇ淇鏁板凡鐢ㄥ畬锛屽綋鍓嶄慨鐞嗕负鍚堝悓澶栫殑淇悊锛屾槸鍚︾户缁紵";
+ if (this.URFReapir == false && surplusCount == 0) {
+ if (!confirm(prompt11)) {
+ return;
+ }
+ }
+ updateForRepair1({
+ recordId: this.Id
+ }).then(result => {
+ if (result != null && result.length > 0) {
+ var split = result.split(", ");
+ alert(split[1]);
+ } else {
+ queryForReocrds({
+ inchargeStaffId: this.inchargeStaffId,
+ }).then(records => {
+ if (records != null && records.length > 0) {
+ var staff = records[0];
+ console.log(staff);
+ updateRepair2({
+ recordId: this.Id,
+ staff: staff,
+ DWSign: this.DWSign,
+ statusc: "1.鍙楃悊瀹屾瘯",
+ DOJStatus: this.DOJStatus,
+ SAPcondition: this.SAPcondition,
+ }).then(result => {
+ console.log(result);
+ if (result != null && result.length > 0) {
+ var split = result.split(", ");
+ alert(split[1]);
+ } else {
+ if (this.salesOfficeCodeSelection == "鎴愰兘RC") {
+ alert("鐜伴樁娈碉紝鎴愰兘RC浠呭彈鐞嗗洓宸濓紙瑗胯棌锛夊唴闀溿�佽タ鍗楀叏鍩烠V/CLV锛屽叾浣欏疄鐗╄鍙戣嚦骞垮窞RC銆�");
+ }
+ }
+ });
+ queryForRds({
+ recordId: this.Id,
+ }).then(rds => {
+ if (rds != null && rds.length > 0) {
+ var repairAft = rds[0];
+ if (repairAft.NewProductGuarante_Formula__c != repairAft.ProductGuarante_Create__c) {
+ alert("璇ヨ澶囦繚淇俊鎭凡鍙戠敓鍙樺寲锛岃浜嗚В");
+ }
+ }
+ });
+ } else {
+ alert("娌℃湁鎵惧埌 淇悊濮旀墭鑰�");
}
});
}
- var records = null;
+ });
+ });
- queryForReocrds({
- inchargeStaffId: this.inchargeStaffId,
- }).then((result) => {
- records = result;
- console.log(result);
- this.logicalJudgmentB(records);
- });
- }
- } catch (error) {
- console(error);
- }
- var staticResource = null;
+ var staticResource;
+ var DetailedAddress = this.detailedAddress;
getStaticResource({
sobj: "Repair__c"
}).then(result => {
console.log(result);
staticResource = JSON.parse(result);
+
Promise.all([
loadScript(this, AWSService + '/AWSService.js'),
loadScript(this, jqueryurl),
@@ -434,137 +382,21 @@
function (data) {
console.log(data);
if (data && data.object) {
- var DetailedAddress = data.object.detailedAddress;
+ DetailedAddress = data.object.detailedAddress;
}
this.foo();
},
- staticResource.token).then(result => {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- });
- }).catch(error => {
- console.log('Failed to load the JQuery : ' + error);
+ staticResource.token);
});
- }).catch(error => {
- console.log('Failed to load the JQuery : ' + error);
+ })
+ }
+
+ ShowToastEvent(msg, type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
});
- console.log('load correctly');
- }
-
- foo() {
- console.log("end");
- var records3 = null;
-
- queryForrecords3({
- recordId: this.recordId,
- }).then((result) => {
- records3 = result;
- });
- var FirstParagraph__c = "";
- if (records3.length >= 1) {
- FirstParagraph__c = records3[0].FirstParagraph__c;
- }
- if (FirstParagraph__c == "true") {
- if (!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁敵璇蜂慨鐞嗭紵")) {
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- return;
- }
- }
- console.log("endend");
- }
-
- logicalJudgmentB(records) {
- if (records != null && records.length > 0) {
- var staff = records[0];
- var res = null;
- updateRepair2({
- recordId: this.recordId,
- staff: staff,
- DWSign: this.DWSign,
- statusc: "1.鍙楃悊瀹屾瘯",
- DOJStatus: this.DOJStatus,
- SAPcondition: this.SAPcondition,
- }).then((result) => {
- console.log(result + "result");
- res = result;
- console.log("start3");
- var messages = "";
- if (res) {
- messages = this.getConnectDMLErrorMessages(res);
- }
- if (messages.length > 0) {
- this.showToast(messages.join("\n"), "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- } else {
- if (this.salesOfficeCodeSelection == "鎴愰兘RC") {
-
- this.showToast("鐜伴樁娈碉紝鎴愰兘RC浠呭彈鐞嗗洓宸濓紙瑗胯棌锛夊唴闀溿�佽タ鍗楀叏鍩烠V/CLV锛屽叾浣欏疄鐗╄鍙戣嚦骞垮窞RC銆�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- }
- }
- var rds = null;
-
- queryForRds({
- recordId: this.recordId,
- }).then((result) => {
- rds = result;
- if (rds != null && rds.length > 0) {
- var repairAft = rds[0];
- if (
- repairAft.NewProductGuarante_Formula__c !=
- repairAft.ProductGuarante_Create__c
- ) {
- this.showToast("璇ヨ澶囦繚淇俊鎭凡鍙戠敓鍙樺寲锛岃浜嗚В", "error");
- }
- }
- });
- });
-
- } else {
- this.showToast("娌℃湁鎵惧埌 淇悊濮旀墭鑰�", "error");
- this.updateRecordView(this.recordId);
- this.dispatchEvent(new CloseActionScreenEvent());
- }
- }
-
- getConnectDMLErrorMessages(results) {
- console.log(results);
- var messages = [],
- i = 0,
- len = results.length,
- r;
- console.log("sos");
- for (; i < len; i++) {
- r = results[i];
- if (!r.getBoolean("success")) {
- messages = messages.concat(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 + " " + getConnectDMLErrorFields(e));
- }
- return messages;
- }
-
- getConnectDMLErrorFields(error) {
- var fields = error.getArray("fields");
- if (fields.length > 0) {
- return "[" + fields.join(",") + "]";
- } else {
- return "";
- }
+ this.dispatchEvent(event);
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
index 30ae41a..8cee80b 100644
--- a/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
+++ b/force-app/main/default/lwc/lexSendQISToEtQ/lexSendQISToEtQ.js
@@ -13,7 +13,7 @@
import sendToETQ from '@salesforce/apex/buttonQISReportCtl.sendToETQ';
import updateQISReportC from '@salesforce/apex/buttonQISReportCtl.updateQISReportC';
import selectQISReportC from '@salesforce/apex/buttonQISReportCtl.selectQISReportC';
-
+import initSelectProfile from '@salesforce/apex/otherButtonRepairController.initSelectProfile';
import {
ShowToastEvent
} from 'lightning/platformShowToastEvent';
@@ -31,6 +31,7 @@
QISFinalJudgementC;
ETQUPLOADSTATUSC;
AEDetermineResultC;
+ profileName;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -60,8 +61,17 @@
this.ETQUPLOADSTATUSC = result.ETQUPLOADSTATUSC;
this.AEDetermineResultC = result.AEDetermineResultC;
- this.myDate();
- this.myReload();
+ initSelectProfile({
+ profileId: this.profileId
+ }).then(result => {
+ if (result != null) {
+ this.IsLoading = false;
+ this.profileName = result[0].Name;
+
+ this.myDate();
+ this.myReload();
+ }
+ })
this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(error => {
@@ -79,24 +89,22 @@
// 鍙戦�丵IS鍒癊tQ
SendQISToEtQ() {
+ console.log(this.profileName);
var QId = this.Id;
var uid = this.userId;
- if (this.profileId != "00e10000000xnoO" && this.profileId != "00e10000000hl7w") {
+ if (this.profileName != "2F7_OSH鎷呭綋" && this.profileName != "2F7_OSH璐ㄩ噺娉曡") {
alert("鎮ㄦ病鏈夊彂閫丵IS鍒癊tQ鐨勬潈闄愩��");
return;
}
-
if (this.PAEDetermineC == undefined) {
alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
return;
}
-
if (this.AEDetermineResultC == "nonAE" && this.PAEDetermineC == "nonPAE" && this.PAEDetermineACC == "nonPAE" && this.OCMJudgementC == undefined && this.QISFinalJudgementC == undefined) {
alert("nonAE骞秐onPAE鐨凲IS鍚屾鍒癊tQ鐨勬椂鍊欙紝妫�娴嬬粨璁�(OCSM)鏄繀濉殑銆備笉鍙互鍙戦�佸埌EtQ銆�");
return;
}
-
if (this.ETQUPLOADSTATUSC == "3") {
if (!confirm("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�")) {
return;
@@ -158,7 +166,8 @@
selectQISReportC({
QId: this.Id
}).then(record => {
- if (record.AsyncData__c == 'true' && record.ETQ_UPLOAD_STATUS__c != '3' || record.Complaint_Number__c != null) {
+ console.log(record);
+ if (record[0].AsyncData__c == 'true' && record[0].ETQ_UPLOAD_STATUS__c != '3' || record[0].Complaint_Number__c != null) {
var btns = document.getElementsByName("sendqistoetq");
for (var i = 0; i < btns.length; i++) {
btns[i].disabled = true;
@@ -166,7 +175,7 @@
}
alert('璇IS涔嬪墠宸茬粡鍙戦�佽繃浜�')
} else {
- SendQISToEtQ();
+ this.SendQISToEtQ();
}
})
}
diff --git a/force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js b/force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js
deleted file mode 100644
index 0f076e5..0000000
--- a/force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexSendRepairsToEtQ from 'c/lexSendRepairsToEtQ';
-
-describe('c-lex-send-repairs-to-et-q', () => {
- 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-send-repairs-to-et-q', {
- is: LexSendRepairsToEtQ
- });
-
- // 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/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
index 927e6d3..82f115d 100644
--- a/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
@@ -12,6 +12,8 @@
import init from '@salesforce/apex/otherButtonRepairController.init';
import selectRecords from '@salesforce/apex/otherButtonRepairController.selectRecords';
import sendToETQ from '@salesforce/apex/otherButtonRepairController.sendToETQ';
+import initSelectProfile from '@salesforce/apex/otherButtonRepairController.initSelectProfile';
+import initUserName from '@salesforce/apex/otherButtonRepairController.initUserName';
import {
ShowToastEvent
} from 'lightning/platformShowToastEvent';
@@ -29,6 +31,8 @@
ContainUseRSAC;
userID;
profileId;
+ profileName;
+ userName;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -58,16 +62,32 @@
this.ContainUseRSAC = result.ContainUseRSAC;
this.userID = result.userID;
this.profileId = result.profileId;
+ initUserName({
+ userId: this.userID
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.userName = result[0].Name;
+ }
+ })
+ initSelectProfile({
+ profileId: this.profileId
+ }).then(result => {
+ if (result != null) {
+ this.IsLoading = false;
+ this.profileName = result[0].Name;
- this.myDate();
- this.myReload();
+ this.myDate();
+ this.myReload();
+ }
+ })
+
this.dispatchEvent(new CloseActionScreenEvent());
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 鏍规嵁鏃ユ湡鏋勫缓MessageGroupNumber
@@ -85,40 +105,30 @@
selectRecords({
recordId: this.Id
}).then(result => {
- console.log(result);
- if (result.AsyncData__c == 'true' && result.ETQ_UPLOAD_STATUS__c != '3' || result.Complaint_Number__c != null) {
+ if (result[0].AsyncData__c == 'true' && result[0].ETQ_UPLOAD_STATUS__c != '3' || result[0].Complaint_Number__c != null) {
var btns = document.getElementsByName("sendrepairstoetq");
for (var i = 0; i < btns.length; i++) {
btns[i].disabled = true;
btns[i].className = 'btnDisabled';
}
- this.ShowToastEvent('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�', "error");
- // alert('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�')
+ alert('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�');
} else {
this.SendRepairsToEtQ();
}
}).catch(error => {
console.log(error);
- }).finally(() => {
-
- });
+ })
}
// 鍙戦�丒TQ
SendRepairsToEtQ() {
- console.log(this.userID);
- console.log(this.profileId);
-
- var uid = this.userID;
- if (this.profileId != "00e10000000xnoO" && this.profileId != "00e10000000hl7w" && this.profileId != '00e10000000Y3o5') {
- this.ShowToastEvent("鎮ㄦ病鏈夊彂閫佷慨鐞嗗埌EtQ鐨勬潈闄愩��", "error");
- // alert("鎮ㄦ病鏈夊彂閫佷慨鐞嗗埌EtQ鐨勬潈闄愩��");
+ if (this.profileName != "2F7_OSH鎷呭綋" && this.profileName != "2F7_OSH璐ㄩ噺娉曡" && this.profileName != '绯荤粺绠$悊鍛�') {
+ alert("鎮ㄦ病鏈夊彂閫佷慨鐞嗗埌EtQ鐨勬潈闄愩��");
return;
}
var statu = '';
if (this.PAEDetermineC == undefined) {
- this.ShowToastEvent("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
- // alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+ alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
return;
}
if (this.ETQUPLOADSTATUSC == "3") {
@@ -126,9 +136,8 @@
return;
}
}
- if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && uid != "005100000068zJ6") {
- this.ShowToastEvent("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ", "error");
- // alert("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ");
+ if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && this.userName != "闆� 鏂板缓") {
+ alert("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ");
return;
}
if (this.PAEDetermineC != undefined && this.AEDetermineResultC != undefined && this.PAEDetermineACC == undefined) {
@@ -136,19 +145,15 @@
} else if ((this.AEDetermineResultC != undefined && this.PAEDetermineC != undefined && this.PAEDetermineACC != undefined) &&
!(this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE")) {
statu = "R2";
- if (this.RepairInspectionDateC == "") {
- this.ShowToastEvent("5.淇悊妫�娴嬫棩鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
- // alert("5.淇悊妫�娴嬫棩鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+ if (this.RepairInspectionDateC == undefined) {
+ alert("5.淇悊妫�娴嬫棩鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
return;
}
if (this.ContainUseRSAC == 1) {
- this.ShowToastEvent("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�", "error");
- // alert("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�");
+ alert("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�");
return;
}
}
-
- var result;
try {
var repairids = new Array()
repairids[0] = this.Id;
@@ -162,10 +167,8 @@
repairIds: repairids,
statu: statuArr[0]
}).then(result => {
- this.ShowToastEvent(result, "error");
- // alert(result);
- }).catch(error => {
- console.log(error);
+ alert(result);
+ location.reload();
})
var btns = document.getElementsByName("sendrepairstoetq");
@@ -173,10 +176,8 @@
btns[i].disabled = true;
btns[i].className = 'btnDisabled';
}
- location.reload();
} catch (error) {
- this.ShowToastEvent("鍙戦�佷慨鐞嗗埌EtQ澶辫触" + error.faultstring + ' code:' + error.faultcode, "error");
- // alert("鍙戦�佷慨鐞嗗埌EtQ澶辫触" + error.faultstring + ' code:' + error.faultcode);
+ alert("鍙戦�佷慨鐞嗗埌EtQ澶辫触" + error.faultstring + ' code:' + error.faultcode);
}
}
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.css b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.css
new file mode 100644
index 0000000..95c1c55
--- /dev/null
+++ b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.css
@@ -0,0 +1,22 @@
+.holder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
+.toast{
+ border: 1px solid #c9c9c9;
+ border-radius: 10px;
+ width: 50%;
+ margin: 0 auto;
+ font-size: 18px;
+ font-weight: bold;
+ padding: 10px 20px;
+ background: #feb75d;
+ display: flex;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.html b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.html
new file mode 100644
index 0000000..b690487
--- /dev/null
+++ b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.html
@@ -0,0 +1,29 @@
+<template>
+ <div class="holder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+ <div if:false={IsLoading} class="toast">
+ <span style="padding: 10px;">{msg}</span>
+ <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+ <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+ title="Close" style="color: black;"></lightning-icon>
+ <span class="slds-assistive-text">Close</span>
+ </button>
+ <!-- <lightning:icon iconName="utility:warning" alternativeText="Warning!" title="Warning" /> -->
+ </div>
+ <!-- <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" if:false={IsLoading}>
+ <div class="slds-modal__container">
+ <header class="slds-modal__header" style="color: black;">
+ <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">璇烽�夋嫨鍊熷嚭澶囧搧涓�瑙堣褰�</h2>
+ </header>
+
+ <div style="height: 100px;">
+ <div class="rewardDetailsTitle">Details</div>
+ </div>
+
+ <footer class="slds-modal__footer">
+ <lightning-button variant="brand" label="纭畾" class="slds-var-m-left_x-small" onclick={handleSubmit}></lightning-button>
+ </footer>
+ </div>
+ </section> -->
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
new file mode 100644
index 0000000..758f066
--- /dev/null
+++ b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js
@@ -0,0 +1,28 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+// 2023/05/11 鍊熷嚭澶囧搧閰嶅涓�瑙� 鍒嗗崟鎸夐挳
+export default class lexSplitApplyFlowLWC extends NavigationMixin(LightningElement) {
+ @api recordId;
+ //鍙幏鍙栧綋鍓峫ist閫変腑鐨勪竴瑙圛d
+ @api rentalApplyIds;
+ IsLoading=true;
+ //鎻愮ず淇℃伅
+ msg;
+
+ 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() {
+ //杩斿洖褰撳墠鐨勫鍝佺敵璇�
+ window.open("/"+this.recordId,'_self');
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js-meta.xml b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js-meta.xml
new file mode 100644
index 0000000..83124ba
--- /dev/null
+++ b/force-app/main/default/lwc/lexSplitApplyFlowLWC/lexSplitApplyFlowLWC.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSplitApply">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
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/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
index 1d901d0..be9daf2 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -9,8 +9,8 @@
status;//鐘舵��
profileId;//profileId id
systemProfileId;
- SalesManagerId;
- SalesHospitalId;
+ TwoS1_Sales_Hospital;
+ TwoS4_Sales_Manager;
IsLoading = true;
@wire(CurrentPageReference)
@@ -33,8 +33,8 @@
this.status = result.status;
this.profileId = result.profileId;
this.systemProfileId = result.systemProfileId;
- this.SalesManagerId = result.SalesManagerId;
- this.SalesHospitalId = result.SalesHospitalId;
+ this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital;
+ this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager;
this.LoseButton();
this.dispatchEvent(new CloseActionScreenEvent());
})
@@ -44,7 +44,7 @@
LoseButton(){
sqlResult({id: this.recordId}).then(result=>{
//绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
- if (this.profileId != this.SalesManagerId && this.profileId != this.SalesHospitalId && this.profileId != this.systemProfileId) {
+ if (this.profileId != this.TwoS1_Sales_Hospital && this.profileId != this.TwoS4_Sales_Manager && this.profileId != this.systemProfileId) {
this.showToast("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�","error");
return;
}
diff --git a/force-app/main/default/lwc/lexTenderingNotarizeButton/lexTenderingNotarizeButton.js b/force-app/main/default/lwc/lexTenderingNotarizeButton/lexTenderingNotarizeButton.js
index eb7832f..2886c8c 100644
--- a/force-app/main/default/lwc/lexTenderingNotarizeButton/lexTenderingNotarizeButton.js
+++ b/force-app/main/default/lwc/lexTenderingNotarizeButton/lexTenderingNotarizeButton.js
@@ -2,13 +2,23 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import sqlResult from '@salesforce/apex/TenderingButtonController.sqlResult';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingNotarizeButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
status;//鐘舵��
profileId;//profileId id
+ systemProfileId;//绯荤粺绠$悊鍛�
+ TwoS1_Sales_Hospital;//2S1_閿�鍞尰闄㈡媴褰�
+ TwoS1_Sales_Hospital_Non_Singleton;//2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級
+ TwoS6_Trade_Assistant;//2S6-2_钀ヤ笟鍔╃悊
+ TwoS6_Sales_Headquarters;//2S6-1_閿�鍞湰閮ㄧ獥鍙�
+ TwoS7_Sales_Headquarters;//2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�
+ TwoS8_Sales_Administrative_Assistant;//2S8_閿�鍞鏀垮姪鐞�
+ TwoS8_Sales_Administrative_Assistant_Plan;//2S8_閿�鍞鏀垮姪鐞�(璁″垝浠〃鏉�)
+ TwoS9_Spare;//2S9_澶囧搧绐楀彛
+ OBA1_Tenderee;//OBA1_鎷涙爣绠$悊
+ OBA7_Enquiry_Tenderee;//OBA7_璇环+鎷涙爣绠$悊
IsLoading = true;
@wire(CurrentPageReference)
@@ -27,54 +37,57 @@
init({
recordId: this.recordId
}).then(result => {
- console.log(result)
- this.IsLoading = false;
- this.id = result.Id;
- this.status = result.status;
- this.profileId = result.profileId.slice(0,15);
- this.NotarizeButton();
- this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ this.IsLoading = false;
+ this.id = result.Id;
+ this.status = result.status;
+ this.profileId = result.profileId;
+ this.systemProfileId = result.systemProfileId;
+ this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital;
+ this.TwoS1_Sales_Hospital_Non_Singleton = result.TwoS1_Sales_Hospital_Non_Singleton;
+ this.TwoS6_Trade_Assistant = result.TwoS6_Trade_Assistant;
+ this.TwoS6_Sales_Headquarters = result.TwoS6_Sales_Headquarters;
+ this.TwoS7_Sales_Headquarters = result.TwoS7_Sales_Headquarters;
+ this.TwoS8_Sales_Administrative_Assistant = result.TwoS8_Sales_Administrative_Assistant;
+ this.TwoS8_Sales_Administrative_Assistant_Plan = result.TwoS8_Sales_Administrative_Assistant_Plan;
+ this.TwoS9_Spare = result.TwoS9_Spare;
+ this.OBA1_Tenderee = result.OBA1_Tenderee;
+ this.OBA7_Enquiry_Tenderee = result.OBA7_Enquiry_Tenderee;
+ this.NotarizeButton();
+ })
}
- //鐩稿叧鎬х‘璁�
+ //鎷涙爣椤圭洰 鐩稿叧鎬х‘璁�
NotarizeButton(){
- console.log(this.ProfileId,'琛屽悧');
- if( this.profileId!= '00e1m000000MSci'
+ if(
+ //绠�妗f棤 璇ユ潯鏁版嵁 this.profileId!= '00e1m000000MSci'
// 绯荤粺绠$悊鍛�
- && this.profileId!= '00e10000000Y3o5'
- // 2s6
- && this.profileId!= '00e10000000xnpR' && this.profileId!= '00e10000000xyK6'
- // 2s7
- && this.profileId!= '00e10000000xnpW'
- // 2s8
- && this.profileId!= '00e10000000xnpb' && this.profileId!= '00e10000000xyKB'
- // 2s9
- && this.profileId!= '00e10000000a7NY'
- // OBA1
- && this.profileId!= '00e10000000s2fZ'
- // OBA7
- && this.profileId!= '00e10000000s3Jp'
+ this.profileId != this.systemProfileId
+ //2s1 2S1_閿�鍞尰闄㈡媴褰� 2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級
+ && this.profileId!= this.TwoS1_Sales_Hospital && this.profileId!= this.TwoS1_Sales_Hospital_Non_Singleton
+ // 2s6 2S6-2_钀ヤ笟鍔╃悊 2S6-1_閿�鍞湰閮ㄧ獥鍙�
+ && this.profileId!= this.TwoS6_Trade_Assistant && this.profileId!= this.TwoS6_Sales_Headquarters
+ // 2s7 2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�
+ && this.profileId!= this.TwoS7_Sales_Headquarters
+ // 2s8 2S8_閿�鍞鏀垮姪鐞� 2S8_閿�鍞鏀垮姪鐞�(璁″垝浠〃鏉�)
+ && this.profileId!= this.TwoS8_Sales_Administrative_Assistant && this.profileId !=this.TwoS8_Sales_Administrative_Assistant_Plan
+ // 2s9 2S9_澶囧搧绐楀彛
+ && this.profileId!= this.TwoS9_Spare
+ // OBA1 OBA1_鎷涙爣绠$悊
+ && this.profileId!= this.OBA1_Tenderee
+ // OBA7 OBA7_璇环+鎷涙爣绠$悊
+ && this.profileId!= this.OBA7_Enquiry_Tenderee
){
- // alert("鍙湁鍔╃悊鎵嶈兘杩涜鐩稿叧鎬х‘璁わ紒");
this.showToast("鍙湁鍔╃悊鎵嶈兘杩涜鐩稿叧鎬х‘璁わ紒","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
- if(this.status== '01.寰呯‘璁�' ||
- this.status== '02.涓嶇浉鍏�' ||
- this.status == '03.涓嶅簲鏍�' ||
- this.status== '04.寰呭叧鑱旇浠�'
- ){
+ if(this.status== '01.寰呯‘璁�' || this.status== '02.涓嶇浉鍏�' || this.status == '03.涓嶅簲鏍�' || this.status== '04.寰呭叧鑱旇浠�'){
window.open (`/apex/Relevance?id=${this.id}`, '', 'height=500, width=800, top=200, left=250,location=no');
+ this.dispatchEvent(new CloseActionScreenEvent());
}
else{
- // alert('鍙湁01.寰呯‘璁ゆ椂闇�瑕佽繘琛岀浉鍏虫�х‘璁わ紒');
- // alert('鍏宠仈璇环鍚庝笉鑳借繘琛岀浉鍏虫�х‘璁わ紒');
this.showToast("鍏宠仈璇环鍚庝笉鑳借繘琛岀浉鍏虫�х‘璁わ紒","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
}
}
@@ -84,51 +97,5 @@
variant: type
});
this.dispatchEvent(event);
- this.dispatchEvent(new CloseActionScreenEvent());
}
-}
-
-
-// function init(){
-// var ProfileId = "{!$Profile.Id}";
-// if( ProfileId!= '00e1m000000MSci'
-// // 绯荤粺绠$悊鍛�
-// && ProfileId!= '00e10000000Y3o5'
-// // 2s1
-// // && ProfileId!= '00e10000000xnp2' && ProfileId!= '00e10000000xzQ0'
-
-// // 2s6
-// && ProfileId!= '00e10000000xnpR' && ProfileId!= '00e10000000xyK6'
-
-// // 2s7
-// && ProfileId!= '00e10000000xnpW'
-
-// // 2s8
-// && ProfileId!= '00e10000000xnpb' && ProfileId!= '00e10000000xyKB'
-
-// // 2s9
-// && ProfileId!= '00e10000000a7NY'
-// // OBA1
-// && ProfileId!= '00e10000000s2fZ'
-// // OBA7
-// && ProfileId!= '00e10000000s3Jp'
-// )
-// {
-// alert("鍙湁鍔╃悊鎵嶈兘杩涜鐩稿叧鎬х‘璁わ紒");
-// return;
-// }
-
-
-// if('{!Tender_information__c.status__c}' == '01.寰呯‘璁�' ||
-// '{!Tender_information__c.status__c}' == '02.涓嶇浉鍏�' ||
-// '{!Tender_information__c.status__c}' == '03.涓嶅簲鏍�' ||
-// '{!Tender_information__c.status__c}' == '04.寰呭叧鑱旇浠�' )
-// {
-// window.open ('/apex/Relevance?id={!Tender_information__c.Id}', '', 'height=500, width=800, top=200, left=250,location=no');
-// }
-// else{
-// // alert('鍙湁01.寰呯‘璁ゆ椂闇�瑕佽繘琛岀浉鍏虫�х‘璁わ紒');
-// alert('鍏宠仈璇环鍚庝笉鑳借繘琛岀浉鍏虫�х‘璁わ紒');
-// }
-// }
-// init();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingRelevancyButton/lexTenderingRelevancyButton.js b/force-app/main/default/lwc/lexTenderingRelevancyButton/lexTenderingRelevancyButton.js
index dbc1eac..9c663be 100644
--- a/force-app/main/default/lwc/lexTenderingRelevancyButton/lexTenderingRelevancyButton.js
+++ b/force-app/main/default/lwc/lexTenderingRelevancyButton/lexTenderingRelevancyButton.js
@@ -1,15 +1,24 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexTenderingRelevancyButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
- ProfileId;
+ ProfileId;// 璐﹀彿鐨勬潈闄�
+ systemProfileId;//绯荤粺绠$悊鍛�
+ TwoS1_Sales_Hospital;//'2S1_閿�鍞尰闄㈡媴褰�';
+ TwoS1_Sales_Hospital_Non_Singleton;//2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級
+ TwoS2_Sales_Product;//'2S2_閿�鍞骇鍝佹媴褰�';
+ TwoS4_Sales_Manager;//2S4_閿�鍞鐞嗚��
+ TwoS4_Sales_Manager_Non_Singleton;//'2S4_閿�鍞鐞嗚�咃紙闈炲崟鐐癸級'
+ TwoS4_Sales_Manager_Majordomo;//'2S4_閿�鍞鐞嗚��(鎬荤洃)'
+ TwoS6_Trade_Assistant;//2S6-2_钀ヤ笟鍔╃悊
+ TwoS6_Sales_Headquarters;//2S6-1_閿�鍞湰閮ㄧ獥鍙�
+ TwoS7_Sales_Headquarters;//2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�
+ TwoM4_Marketplace_Manager;//2M4_甯傚満浜у搧鏈儴鎷呭綋(璇环)
IsLoading = true;
@wire(CurrentPageReference)
@@ -27,89 +36,55 @@
init({
recordId: this.recordId
}).then(result => {
- console.log(result);
this.IsLoading = false;
this.id = result.Id;
- this.ProfileId = result.profileId.slice(0,15);
+ this.ProfileId = result.profileId;
+ this.systemProfileId = result.systemProfileId;//绯荤粺绠$悊鍛�
+ this.TwoS1_Sales_Hospital = result.TwoS1_Sales_Hospital;//'2S1_閿�鍞尰闄㈡媴褰�';
+ this.TwoS1_Sales_Hospital_Non_Singleton = result.TwoS1_Sales_Hospital_Non_Singleton;//2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級
+ this.TwoS2_Sales_Product = result.TwoS2_Sales_Product;//'2S2_閿�鍞骇鍝佹媴褰�';
+ this.TwoS4_Sales_Manager = result.TwoS4_Sales_Manager;//2S4_閿�鍞鐞嗚��
+ this.TwoS4_Sales_Manager_Non_Singleton = result.TwoS4_Sales_Manager_Non_Singleton;//'2S4_閿�鍞鐞嗚�咃紙闈炲崟鐐癸級'
+ this.TwoS4_Sales_Manager_Majordomo = result.TwoS4_Sales_Manager_Majordomo;//'2S4_閿�鍞鐞嗚��(鎬荤洃)'
+ this.TwoS6_Trade_Assistant = result.TwoS6_Trade_Assistant;//2S6-2_钀ヤ笟鍔╃悊
+ this.TwoS6_Sales_Headquarters = result.TwoS6_Sales_Headquarters;//2S6-1_閿�鍞湰閮ㄧ獥鍙�
+ this.TwoS7_Sales_Headquarters = result.TwoS7_Sales_Headquarters;//2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�
+ this.TwoM4_Marketplace_Manager = result.TwoM4_Marketplace_Manager;//2M4_甯傚満浜у搧鏈儴鎷呭綋(璇环)
this.RelevancyButton();
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
//鎷涙爣椤圭洰 鍏宠仈宸叉湁璇环
RelevancyButton(){
- if( this.ProfileId != '00e1m000000MSci'
+ // 鏃犺绠�妗f暟鎹� '00e1m000000MSci'
+ if(
// 绯荤粺绠$悊鍛�
- && this.ProfileId != '00e10000000Y3o5'
+ this.ProfileId != this.systemProfileId
// 2s1
- && this.ProfileId != '00e10000000xnp2' && this.ProfileId != '00e10000000xzQ0'
- // 2s2
- && this.ProfileId != '00e10000000xnp7'&& this.ProfileId != '00e10000001220i'
+ && this.ProfileId != this.TwoS1_Sales_Hospital && this.ProfileId != this.TwoS1_Sales_Hospital_Non_Singleton
+ // 2s2 鏃犺绠�妗f暟鎹� 00e10000001220i
+ && this.ProfileId != this.TwoS2_Sales_Product
// 2s4
- && this.ProfileId != '00e10000000xnpH' && this.ProfileId != '00e10000000xzQA'
- && this.ProfileId != '00e10000000hkas'
+ && this.ProfileId != this.TwoS4_Sales_Manager && this.ProfileId != this.TwoS4_Sales_Manager_Non_Singleton && this.ProfileId != this.TwoS4_Sales_Manager_Majordomo
// 2s6
- && this.ProfileId != '00e10000000xnpR' && this.ProfileId != '00e10000000xyK6'
+ && this.ProfileId != this.TwoS6_Trade_Assistant && this.ProfileId != this.TwoS6_Sales_Headquarters
// 2s7
- && this.ProfileId != '00e10000000xnpW'
+ && this.ProfileId != this.TwoS7_Sales_Headquarters
// 2M4 20221012 ljh SWAG-CK28WT
- && this.ProfileId != '00e10000000Nb7i'
+ && this.ProfileId != this.TwoM4_Marketplace_Manager
){
// alert('鍙湁鎷呭綋鍜屽姪鐞嗘墠鑳藉叧鑱旇浠凤紒');
this.showToast('鍙湁鎷呭綋鍜屽姪鐞嗘墠鑳藉叧鑱旇浠�','error');
return;
}
-
window.open ('/apex/Enquiry?id='+this.recordId, '_blank');
}
- // this.showToast(result,'success');
- // this.showToast('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠','error');
showToast(msg,type) {
const event = new ShowToastEvent({
- // title: title,
message: msg,
variant: type
});
this.dispatchEvent(event);
}
-}
-
-// function RelateOpp(){
-
-// var ProfileId = "{!$Profile.Id}";
-// if( ProfileId!= '00e1m000000MSci'
-// // 绯荤粺绠$悊鍛�
-// && ProfileId!= '00e10000000Y3o5'
-// // 2s1
-// && ProfileId!= '00e10000000xnp2' && ProfileId!= '00e10000000xzQ0'
-
-// // 2s2
-// && ProfileId!= '00e10000000xnp7'&& ProfileId!= '00e10000001220i'
-
-// // 2s4
-// && ProfileId!= '00e10000000xnpH' && ProfileId!= '00e10000000xzQA'
-
-// && ProfileId!= '00e10000000hkas'
-
-// // 2s6
-// && ProfileId!= '00e10000000xnpR' && ProfileId!= '00e10000000xyK6'
-
-// // 2s7
-// && ProfileId!= '00e10000000xnpW'
-// // 2M4 20221012 ljh SWAG-CK28WT
-// && ProfileId!= '00e10000000Nb7i'
-// ){
-// alert('鍙湁鎷呭綋鍜屽姪鐞嗘墠鑳藉叧鑱旇浠凤紒');
-// return;
-// }
-
-
-// url = window.location.pathname;
-// url = url.substring(url.lastIndexOf('/') + 1, url.length);
-// window.open ('/apex/Enquiry?id='+url, '_blank');
-// }
-// RelateOpp();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingUsedAttachmentButton/lexTenderingUsedAttachmentButton.js b/force-app/main/default/lwc/lexTenderingUsedAttachmentButton/lexTenderingUsedAttachmentButton.js
index ad4fa58..3e419d9 100644
--- a/force-app/main/default/lwc/lexTenderingUsedAttachmentButton/lexTenderingUsedAttachmentButton.js
+++ b/force-app/main/default/lwc/lexTenderingUsedAttachmentButton/lexTenderingUsedAttachmentButton.js
@@ -2,7 +2,6 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingUsedAttachmentButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
@@ -18,37 +17,15 @@
}
}
}
-
+ //鎷涙爣椤圭洰 鏌ョ湅闄勪欢(鏃�)
connectedCallback(){
init({
recordId: this.recordId
}).then(result => {
this.IsLoading = false;
this.id = result.Id;
- this.AttachmentButton();
+ window.open(`/apex/QLMAttachmentPreview?parentId=${this.id}`);
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
-
- //鏌ョ湅闄勪欢(鏃�)
- AttachmentButton(){
- window.open(`/apex/QLMAttachmentPreview?parentId=${this.id}`);
- }
-
- showToast(msg,type) {
- const event = new ShowToastEvent({
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
- }
-}
-
-// var From= function(){
-// window.open( "/apex/QLMAttachmentPreview?parentId={!URLENCODE(Tender_information__c.Id)}");
-// }
-// From();
\ No newline at end of file
+}
\ 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