From c61c92855510f1163b2eb087905e92784bf42cd2 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期二, 11 四月 2023 09:15:39 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js-meta.xml | 11
force-app/main/default/classes/TenderingButtonController.cls-meta.xml | 5
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js-meta.xml | 11
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js-meta.xml | 11
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js-meta.xml | 11
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js | 133 +++
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js | 77 +
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js | 79 +
force-app/main/default/classes/LightingButtonConstant.cls | 6
force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html | 6
force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js | 22
force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js | 25
force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js | 25
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.html | 5
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls-meta.xml | 5
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.html | 6
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js | 92 ++
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html | 5
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html | 5
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js | 52 +
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js | 54 +
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.html | 5
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js | 45 +
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js-meta.xml | 11
force-app/main/default/classes/TenderingButtonController.cls | 54 +
force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js | 25
force-app/main/default/classes/TenderWebService.cls | 83 +
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml | 11
force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js | 25
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html | 6
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.html | 5
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js | 98 ++
force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js | 25
force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js | 25
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js-meta.xml | 11
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html | 5
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js | 102 ++
force-app/main/default/classes/ApplicationButtonController.cls | 48
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js | 69 +
force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js | 25
force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js | 25
force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js | 26
force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js | 25
force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js | 25
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html | 6
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js | 48 +
force-app/main/default/classes/QISReportController.cls | 151 ---
force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js-meta.xml | 11
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js | 192 ++++
force-app/main/default/classes/TenderWebService.cls-meta.xml | 5
force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.css | 22
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.html | 5
force-app/main/default/lwc/lexMailMessege/lexMailMessege.js | 89 ++
force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html | 6
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js | 67 +
force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js | 25
force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js | 75 +
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js | 39
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml | 11
force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js | 25
force-app/main/default/classes/otherButtonRepairController.cls-meta.xml | 2
force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js | 25
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js-meta.xml | 11
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html | 5
force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js | 25
force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js | 25
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js-meta.xml | 11
force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js-meta.xml | 11
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html | 5
force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js-meta.xml | 11
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js | 71 +
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js-meta.xml | 11
force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js | 25
force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js-meta.xml | 11
force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls | 28
force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.html | 6
force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js-meta.xml | 11
force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.html | 5
force-app/main/default/lwc/lexMailMessege/lexMailMessege.html | 5
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml | 11
force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js | 25
81 files changed, 2,321 insertions(+), 221 deletions(-)
diff --git a/force-app/main/default/classes/ApplicationButtonController.cls b/force-app/main/default/classes/ApplicationButtonController.cls
index 4dadb0d..9910696 100644
--- a/force-app/main/default/classes/ApplicationButtonController.cls
+++ b/force-app/main/default/classes/ApplicationButtonController.cls
@@ -3,7 +3,6 @@
public static InitData initSubmitButton (String recordId){
InitData res = new initData();
try{
- // Request_tedner_doc__c report = [SELECT OwnerId,Id,Product_discription__c,Status__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
Request_tedner_doc__c report = [SELECT OwnerId,Id FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
res.OwnerId = report.OwnerId;
res.Id = report.Id;
@@ -17,55 +16,52 @@
//鎺堟潈鐢宠鐨勬彁浜ゆ寜閽�
@AuraEnabled
public static String submit(String recordId) {
+ String messageText = '';
try {
- // Request_tedner_doc__c rac = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c,Request_target__c,Document_format__c,Bid_distributor__c,Product_discription__c,Tedner_date__c,Tender_active_day__c,tender_inactive_date__c,Tender_request_reason__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
Request_tedner_doc__c rac = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
- rac.Status__c = '宸叉彁浜�';
- rac.RecordTypeId = '01210000000RNXn';
+ rac.Status__c = LightingButtonConstant.STATUS_Application_Submitted;
+ rac.RecordTypeId = rac.RecordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_Application + LightingButtonConstant.STATUS_Application_Submitted).getRecordTypeId();
rac.Submit_check_flag__c = true;
rac.Submit_time__c = Datetime.now();
update rac;
- return '1';
+ messageText = '1';
+ return messageText;
} catch (Exception ex) {
System.debug(LoggingLevel.INFO, '*** xu: ' + ex);
- return ex.getMessage();
- // return ex.getMessage().split(',')[1];
- } finally {
-
+ messageText = ex.getMessage();
+ return messageText;
}
}
//鎺堟潈鐢宠鐨勫彇娑堟彁浜ゆ寜閽�
@AuraEnabled
public static String submitCancel(String recordId) {
+ String messageText = '';
try {
Request_tedner_doc__c report = [SELECT Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
- report.Status__c = '鑽夋涓�';
- report.RecordTypeId = '01210000000RNXi';
+ report.Status__c = LightingButtonConstant.STATUS_Application_CancelSubmit;
+ report.RecordTypeId = Schema.SObjectType.Request_tedner_doc__c.getRecordTypeInfosByName().get(LightingButtonConstant.RECORD_TYPE_NAME_Application).getRecordTypeId();
report.Submit_check_flag__c = false;
report.Submit_time__c = null;
update report;
- return '1';
+ messageText = '1';
+ return messageText;
} catch (Exception ex) {
System.debug(LoggingLevel.INFO, '*** cancelXu: ' + ex);
- return ex.getMessage();
- } finally {
-
+ messageText = ex.getMessage();
+ return messageText;
}
}
//鑾峰彇褰撳墠鐧诲綍浜虹殑 id
@AuraEnabled
- public static UserResult UserInfo_Owner() {
+ public static UserResult userInfo_Owner() {
UserResult result = new UserResult();
ID myUserID = UserInfo.getUserId();
-
try {
- User tempUser =
- [select id from user where id = : myUserID ];
+ User tempUser = [select id from user where id = : myUserID ];
result.id = tempUser.id;
} catch (exception e) {
-
result.result = e.getMessage();
}
return result;
@@ -85,15 +81,5 @@
}
@AuraEnabled
public string id;
- //20210105 CHAN-BWX3YU you end
}
-}
-
- // if("{!Request_tedner_doc__c.OwnerId}" == "{!$User.Id}") {
- // var rac = new sforce.SObject("Request_tedner_doc__c");
- // rac.Id = "{!Request_tedner_doc__c.Id}";
- // rac.Status__c = "宸叉彁浜�";
- // rac.Submit_check_flag__c = "true";
- // rac.RecordTypeId = "01210000000RNXn";
- // var serverTimestamp = sforce.connection.getServerTimestamp();
- // rac.Submit_time__c = serverTimestamp.timestamp;
\ No newline at end of file
+}
\ 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 de07222..c68ab80 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -1,4 +1,10 @@
global without sharing class LightingButtonConstant {
+ //鎺堟潈鐢宠鐨勭姸鎬佲�樺凡鎻愪氦鈥�
+ public static final String STATUS_Application_Submitted = '宸叉彁浜�';
+ //鎺堟潈鐢宠鐨勭姸鎬佲�樿崏妗堜腑鈥�
+ public static final String STATUS_Application_CancelSubmit= '鑽夋涓�';
+ //鎺堟潈鐢宠鐨勮褰曠被鍨嬪悕鈥樻巿鏉冪敵璇封��
+ public static final String RECORD_TYPE_NAME_Application = '鎺堟潈鐢宠';
//鍛ㄦ姤鏈堟姤鐨勭姸鎬佲�樿崏妗堜腑鈥�
public static final String STATUS_DRAFT = '鑽夋涓�';
//鎶ュ憡涔︾殑鐘舵�佲�樺畬姣曗��
diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index ea5f6a9..c778eac 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -350,158 +350,7 @@
}
return re;
}
- //OCSM涓嶈鎶ュ憡
- @AuraEnabled
- public static InitData initForlexOCSMNoToReportLightingButton (String recordId){
- InitData res = new initData();
- try{
- QIS_Report__c report = [SELECT id ,OCSMAdministrativeReportNumber__c,OCSMAdministrativeReportDate__c,Aware_date__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- res.Id = report.Id;
- res.oCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
- res.oCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
- res.Awaredate = report.Aware_date__c;
- System.debug(LoggingLevel.INFO, '*** res: ' + res);
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- }
- return res;
- }
- @AuraEnabled
- public static String updateQisForlexOCSMNoToReportLighting (String recordId){
- String re = '鎴愬姛';
- QIS_Report__c report = [SELECT id FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- try{
- QIS_Report__c rac = new QIS_Report__c();
- rac.id = recordId;
- rac.OCSMAdministrativeReportStatus__c = '鏃犻渶鎶ュ憡';
- update rac;
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- re = e.getMessage();
- }
- return re;
- }
- //OCSM瑕佹姤鍛�
- @AuraEnabled
- public static InitData initForlexOCSMToReportLightingButton (String recordId){
- InitData res = new initData();
- try{
- QIS_Report__c report = [SELECT id ,OCSMAdministrativeReportStatus__c,Aware_date__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- res.Id = report.Id;
- res.oCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
- res.Awaredate = report.Aware_date__c;
- System.debug(LoggingLevel.INFO, '*** res: ' + res);
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- }
- return res;
- }
- @AuraEnabled
- public static String updateQisForlexOCSMToReportLighting (String recordId){
- String re = '鎴愬姛';
- QIS_Report__c report = [SELECT id FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- try{
- QIS_Report__c rac = new QIS_Report__c();
- rac.id = recordId;
- rac.OCSMAdministrativeReportStatus__c = '寰呮姤鍛�';
- update rac;
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- re = e.getMessage();
- }
- return re;
- }
-
- //鍙戦�丵IS鍒癝PO
- @AuraEnabled
- public static InitData initForlexSendQISButton (String recordId){
- InitData res = new initData();
- ID myUserID = UserInfo.getUserId();
- User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
- try{
- QIS_Report__c report = [SELECT id ,RecordTypeId,IsSendQIS__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- RecordType rec = [SELECT id,name FROM RecordType where Id = :report.RecordTypeId];
- res.Id = report.Id;
- res.qisRecordTypeId = report.RecordTypeId;
- res.qisRecordName = rec.name;
- res.profileName = userinfo.Profile.name;
- res.IsSendQIS = report.IsSendQIS__c;
- System.debug(LoggingLevel.INFO, '*** res: ' + res);
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- }
- return res;
- }
-
- @AuraEnabled
- public static String updateQisForSendQIS (String recordId){
- String re = '鎴愬姛';
- QIS_Report__c report = [SELECT Id,Name,IsSendQIS__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- if(report == null ){
- return '娌℃湁QIS锛�' + recordId + '鐨勬暟鎹��';
- }
- Savepoint sp = Database.setSavepoint();
- try{
-
- QIS_Report__c rac = new QIS_Report__c();
- rac.id = recordId;
- rac.IsSendQIS__c = true;
- update rac;
- }catch(Exception e){
- Database.rollback(sp);
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- re = e.getMessage();
- }
- return re;
- }
- // OCSM鏈嶅姟鏈儴鏀跺埌瀹炵墿
- @AuraEnabled
- public static InitData initForlexRCRecievedButton (String recordId){
- InitData res = new initData();
- ID myUserID = UserInfo.getUserId();
- User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
- try{
- QIS_Report__c report = [SELECT id ,isAE_Profile__c,QIS_Status__c,isPAE_Profile__c,is_CNBuy__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
- res.Id = report.Id;
- res.isAEProfile = report.isAE_Profile__c;
- res.isPAEProfile = report.isPAE_Profile__c;
- res.QIStatus = report.QIS_Status__c;
- res.isCNBuy = report.is_CNBuy__c;
- System.debug(LoggingLevel.INFO, '*** res: ' + res);
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- }
- return res;
- }
-
- @AuraEnabled
- public static String updateQisForRCRecieved (String recordId){
- String re = '鎴愬姛';
- ID myUserID = UserInfo.getUserId();
- User userinfo = [SELECT id,Alias,BuchangApprovalManagerSales__c,JingliApprovalManager__c, BuchangApprovalManager__c, ZongjianApprovalManager__c FROM User WHERE Id = :myUserID LIMIT 1];
-
- try{
- QIS_Report__c rac = new QIS_Report__c();
- rac.id = recordId;
-
- rac.QIS_Status__c = 'RC妫�娴嬩腑';
- rac.OCM_RC_RecievedDate__c = Date.today();
- rac.RC__c = myUserID;
- rac.RC_Receive_staff__c = userinfo.Alias;
-
- if (userinfo != null && userinfo.BuchangApprovalManagerSales__c!= null) {
- rac.RC_Manager__c = userinfo.BuchangApprovalManagerSales__c;
- } else {
- rac.RC_Manager__c = myUserID;
- }
- update rac;
- }catch(Exception e){
- System.debug(LoggingLevel.INFO, '*** e: ' + e);
- re = e.getMessage();
- }
- return re;
- }
public class InitData{
@AuraEnabled
public String Id;
diff --git a/force-app/main/default/classes/TenderWebService.cls b/force-app/main/default/classes/TenderWebService.cls
new file mode 100644
index 0000000..65fb530
--- /dev/null
+++ b/force-app/main/default/classes/TenderWebService.cls
@@ -0,0 +1,83 @@
+global class TenderWebService {
+ public TenderWebService() {
+
+ }
+ @AuraEnabled
+ //鎷涙姇鏍囧弽閫昏緫鍒犻櫎
+ WebService static String ContraryLogicalDel(String DTenId) {
+ Tender_information__c DTenInfo = [Select Id, InfoId__c, Logical_delete__c, ProjectId__c, Retain_Tender__c From Tender_information__c Where id = : DTenId];
+ // 鏇存柊鍒犻櫎鎷涙姇鏍�
+ List<Tender_information__c> updateTenInfoList = new List<Tender_information__c>();
+ // 鏇存柊淇濈暀鎷涙姇鏍�
+ // List<Tender_information__c> updateBTenList = new List<Tender_information__c>();
+ if (String.isNotBlank(DTenInfo.Retain_Tender__c)) {
+ // System.debug('11111111' + TenInfo.Retain_Tender__c);
+ //瑕佷繚鐣欑殑鎷涙姇鏍�
+ Tender_information__c BTen = [select Id, InfoId__c From Tender_information__c
+ Where Id = : DTenInfo.Retain_Tender__c];
+
+ // 鍒犻櫎鎷涙姇鏍囧叧鑱旂殑璇环
+ // List<Tender_Opportunity_Link__c> DTenLinkList = [select Opportunity__c
+ // from Tender_Opportunity_Link__c
+ // where Tender_information__c = :DTenId and IsRelated__c = true];
+ // System.debug('---------2---------' + DTenLinkList);
+ // Set<Id> DTenLinkOppIdSet = new Set<Id>();
+ // if (DTenLinkList.size() > 0) {
+ // for (Tender_Opportunity_Link__c DTenlink : DTenLinkList) {
+ // DTenLinkOppIdSet.add(DTenlink.Opportunity__c);
+ // }
+ // System.debug('---------3---------' + DTenLinkOppIdSet);
+ // // 鍒犻櫎椤圭洰鍏宠仈骞朵笖涓庝繚鐣欓」鐩叧鑱旂殑璇环鍏宠仈淇℃伅
+ // List<Tender_Opportunity_Link__c> DelD_BTenLinkList = [select id, Opportunity__c, Tender_information__c
+ // from Tender_Opportunity_Link__c
+ // where Tender_information__c = :BTen.Id and Opportunity__c in : DTenLinkOppIdSet];
+ // System.debug('---------1---------' + DelD_BTenLinkList);
+ // if (DelD_BTenLinkList.size() > 0) {
+ // Delete DelD_BTenLinkList;
+ // }
+ // }
+
+ // 淇濈暀椤圭洰閫氳繃杞垹闄ら�昏緫鍏宠仈鏉ョ殑璇环
+ List<Tender_Opportunity_Link__c> DelD_BTenLinkList = [select id, Opportunity__c, Tender_information__c
+ from Tender_Opportunity_Link__c
+ where Tender_information__c = :BTen.Id and IsRelated__c = true];
+ // 鍒ゆ柇link鏄惁涓虹┖
+ if (DelD_BTenLinkList != null && DelD_BTenLinkList.size() > 0) {
+ // 閫昏緫鏈夊ぇ鍧� 鏆傛椂鍙妸鎵撴爣璁扮殑鍒犳帀 涓嶅仛鍥炲啓鐨勬搷浣滀簡
+ // List<Tender_Opportunity_Link__c> add_list = new List<Tender_Opportunity_Link__c>();
+ // for (Tender_Opportunity_Link__c link : DelD_BTenLinkList) {
+ // Tender_Opportunity_Link__c add_link = new Tender_Opportunity_Link__c();
+ // add_link.Tender_information__c = DTenInfo.Id;
+ // add_link.Opportunity__c = link.Opportunity__c;
+ // add_link.Tender_Opportunity_Uniq__c = DTenInfo.Id + '' + link.Opportunity__c;
+ // add_link.IsRelated__c = false;
+ // add_list.add(add_link);
+ // }
+ // 鍒犳帀淇濈暀椤圭洰涓婄殑鍏宠仈璇环
+ delete DelD_BTenLinkList;
+ // 鍒犻櫎椤圭洰涓婄殑鍏宠仈鍔犲洖鏉�
+ // if (add_list.size() > 0) {
+ // insert add_list;
+ // }
+ }
+
+ // 浜掓崲淇濈暀鎷涙姇鏍囦笌鍒犻櫎鎷涙姇鏍囩殑淇℃伅Id
+ DTenInfo.Retain_Tender__c = BTen.Id;
+ String BTenInfo = BTen.InfoId__c;
+ BTen.InfoId__c = DTenInfo.InfoId__c;//淇濈暀鎷涙姇鏍囩殑淇℃伅Id璧嬬粰鍒犻櫎鎷涙姇鏍囩殑淇℃伅Id
+ DTenInfo.InfoId__c = BTenInfo;//鍒犻櫎鎷涙姇鏍囩殑淇℃伅Id璧嬬粰淇濈暀鎷涙姇鏍囩殑淇℃伅Id
+ // 鐐瑰嚮淇濆瓨鍚� 鍒犻櫎鎷涙姇鏍囦笂鐨勯�昏緫鍒犻櫎瀛楁鍙樹负true
+ DTenInfo.Logical_delete__c = false;
+ // update TenInfo;
+ // 涓�璧锋洿鏂板氨琛屼簡
+ updateTenInfoList.add(DTenInfo);
+ updateTenInfoList.add(BTen);
+ update updateTenInfoList;
+
+ // updateBTenList.add(BTen);
+ // update updateBTenList;
+
+ }
+ return 'OK';
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/TenderWebService.cls-meta.xml b/force-app/main/default/classes/TenderWebService.cls-meta.xml
new file mode 100644
index 0000000..e3d1b51
--- /dev/null
+++ b/force-app/main/default/classes/TenderWebService.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>45.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
new file mode 100644
index 0000000..5a2d0ea
--- /dev/null
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -0,0 +1,54 @@
+public class TenderingButtonController {
+ @AuraEnabled
+ public static InitData initTenderingController(String recordId) {
+ InitData res = new initData();
+ try{
+ Tender_information__c report = [SELECT OpportunityNum__c,OwnerId,Id,status__c,Name,IsRelateProject__c FROM Tender_information__c WHERE Id = :recordId LIMIT 1];
+ res.OwnerId = report.OwnerId;
+ res.Id = report.Id;
+ res.status = report.status__c;
+ res.name = report.Name;
+ res.opportunityNum = String.valueOf(report.OpportunityNum__c);
+ res.isRelateProject = report.IsRelateProject__c;
+ res.profileId = UserInfo.getProfileId();
+ res.Environment_Url = System.Label.Environment_Url;
+ System.debug(LoggingLevel.INFO, '*** xu: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** xu: ' + e);
+ }
+ return res;
+ }
+
+ // 鎷涙爣椤圭洰澶卞崟 TenderOpportunityLink
+ // 璋冪敤璇ユ帴鍙ar sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
+ @AuraEnabled
+ public static List<Tender_Opportunity_Link__c> sqlResult (String id) {
+ try {
+ List<Tender_Opportunity_Link__c> TenderOpportunityLink = [SELECT id FROM Tender_Opportunity_Link__c WHERE Tender_information__c = :id];
+ System.debug(LoggingLevel.INFO, '*** xu1: ' + TenderOpportunityLink);
+ return TenderOpportunityLink;
+ } catch (exception e) {
+ System.debug(LoggingLevel.INFO, '*** xu1111111: ' + e);
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String OwnerId;
+ @AuraEnabled
+ public String status;
+ @AuraEnabled
+ public String name;
+ @AuraEnabled
+ public String opportunityNum;
+ @AuraEnabled
+ public String isRelateProject;
+ @AuraEnabled
+ public String profileId;
+ @AuraEnabled
+ public String Environment_Url;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/TenderingButtonController.cls-meta.xml b/force-app/main/default/classes/TenderingButtonController.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/TenderingButtonController.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>
diff --git a/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml b/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
index fbbad0a..9bbf7b4 100644
--- a/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
+++ b/force-app/main/default/classes/otherButtonRepairController.cls-meta.xml
@@ -2,4 +2,4 @@
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>56.0</apiVersion>
<status>Active</status>
-</ApexClass>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
new file mode 100644
index 0000000..3cb0f27
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls
@@ -0,0 +1,28 @@
+public with sharing class otherButtonSpotInspectionReportCtl {
+ public otherButtonSpotInspectionReportCtl() {
+
+ }
+
+ @AuraEnabled
+ 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];
+ System.debug(LoggingLevel.INFO, '*** opp: ' + report);
+ res.Id = report.Id;
+ res.RecordTypeId = report.RecordTypeId;
+
+ System.debug(LoggingLevel.INFO, '*** res: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ }
+ return res;
+ }
+
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String RecordTypeId;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls-meta.xml b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/otherButtonSpotInspectionReportCtl.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/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js b/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
new file mode 100644
index 0000000..d5c600d
--- /dev/null
+++ b/force-app/main/default/lwc/lexASRCEditorRepair/__tests__/lexASRCEditorRepair.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.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/lexASRCEditorRepair/lexASRCEditorRepair.js b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js
new file mode 100644
index 0000000..8387edc
--- /dev/null
+++ b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.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/otherButtonRepairController.init';
+import selectPAEDecisionRecord from '@salesforce/apex/otherButtonRepairController.selectPAEDecisionRecord';
+
+export default class LexASRCEditorRepair extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ RecordTypeId;
+
+ @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.RecordTypeId = result.RecordTypeId;
+
+ this.ASRCEditor();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // Intake universal code缂栬緫
+ ASRCEditor() {
+ var RecordTypeId = "ASRCDecision";
+ var RepairId = this.Id;
+ var url = '';
+ selectPAEDecisionRecord({
+ recordId: RepairId,
+ recordTypeId: RecordTypeId
+ }).then(result => {
+ if (result != null) {
+ if (result.length > 0) {
+ url = "/apex/PAEDecisionRecord?Id=" + result[0].Id + "&RepairId=" + RepairId + "&RecordTypeIds=" + RecordTypeId;
+ } 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/lexASRCEditorRepair.js-meta.xml b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexASRCEditorRepair/lexASRCEditorRepair.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/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
index c75f6c5..ee9ec67 100644
--- a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -1,13 +1,12 @@
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/ApplicationButtonController.initSubmitButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
-import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
-export default class Submit extends LightningElement {
+import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
+export default class lexApplicationCancelSubmit extends LightningElement {
@api recordId;//OwnerId
ownerId;
monthlyReportId;
@@ -19,33 +18,25 @@
const urlValue = currentPageReference.state.recordId;
if (urlValue) {
let str = `${urlValue}`;
- console.log("str:"+str);
this.recordId = str;
}
}
}
-
connectedCallback(){
init({
recordId: this.recordId
}).then(result => {
- if (result != null) {
this.IsLoading = false;
this.ownerId = result.OwnerId;
this.monthlyReportId = result.Id;
this.cancelSubmit();
- }
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
-
+ //鎺堟潈鐢宠 鍙栨秷鎻愪氦
cancelSubmit(){
- UserInfo_Owner({}).then(result=>{
- console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
+ //'鑾峰彇褰撳墠鐧婚檰浜篿d'
+ userInfo_Owner({}).then(result=>{
if(this.ownerId == result.id){
submitCancel({
recordId: this.recordId
@@ -64,7 +55,6 @@
}
})
}
-
updateRecordView() {
updateRecord({fields: { Id: this.recordId }});
diff --git a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
index ae57fdf..90688a9 100644
--- a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
@@ -1,13 +1,12 @@
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/ApplicationButtonController.initSubmitButton';
-import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
+import userInfo_Owner from '@salesforce/apex/ApplicationButtonController.userInfo_Owner';
import submit from '@salesforce/apex/ApplicationButtonController.submit';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-export default class Submit extends LightningElement {
+export default class lexApplicationSubmitButton extends LightningElement {
@api recordId;//OwnerId
ownerId;//鎵�鏈変汉id
id;//杩斿洖鍊肩殑id
@@ -16,41 +15,32 @@
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
- console.log(currentPageReference,'666666666666');
if (currentPageReference) {
const urlValue = currentPageReference.state.recordId;
if (urlValue) {
let str = `${urlValue}`;
- console.log("str:"+str);
this.recordId = str;
}
}
}
-
connectedCallback(){
init({
recordId: this.recordId
}).then(result => {
- console.log(result,"璇锋眰鎴愬姛浜嗗悧")
if (result != null) {
this.IsLoading = false;
this.ownerId = result.OwnerId;
this.id = result.Id;
this.Submit();
}
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
Submit(){
this.arrMessage = [];
//鑾峰彇鑾峰彇褰撳墠鐧婚檰浜�
- UserInfo_Owner({}).then(result=>{
- console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
+ userInfo_Owner({}).then(result=>{
if(this.ownerId == result.id){
submit({
recordId: this.recordId
@@ -66,11 +56,6 @@
}
messageage += this.arrMessage[i+1];
}
- // if(requst.split(',')[1].slice(-1) == '寮�'){
- // messageage = requst.split(',')[1] + "," + requst.split(',')[2] + "," + requst.split(',')[3] + "," + requst.split(',')[4] + "," + requst.split(',')[5] + "," + requst.split(',')[6];
- // }else{
- // messageage = requst.split(',')[1];
- // }
this.showToast(messageage,"error");
}
})
@@ -80,19 +65,16 @@
})
}
-
updateRecordView() {
updateRecord({fields: { Id: this.recordId }});
}
showToast(msg,type) {
- console.log(msg,type);
const event = new ShowToastEvent({
message: msg,
variant: type
});
this.dispatchEvent(event);
- console.log('璧板埌杩欓噷浜嗗悧');
if(type == 'success'){
this.updateRecordView();
}
diff --git a/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js b/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
new file mode 100644
index 0000000..e21bfdf
--- /dev/null
+++ b/force-app/main/default/lwc/lexCopyPIInspectionReport/__tests__/lexCopyPIInspectionReport.test.js
@@ -0,0 +1,25 @@
+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/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js b/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
new file mode 100644
index 0000000..c75ef3d
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateReportMaintenanceContract/__tests__/lexCreateReportMaintenanceContract.test.js
@@ -0,0 +1,25 @@
+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/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js b/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
new file mode 100644
index 0000000..b377bae
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewCopy2/__tests__/lexCustomNewCopy2.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ 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
new file mode 100644
index 0000000..2daf585
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js
@@ -0,0 +1,77 @@
+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 LexCustomNewCopy2 extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ notRenewC;
+ Name;
+
+ @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.notRenewC = result.notRenewC;
+ this.Name = result.Name;
+
+ this.CustomNewCopy2();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).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");
+ }
+ }
+
+ // 寮圭獥
+ 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/lexCustomNewCopy2/lexCustomNewCopy2.js-meta.xml b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewCopy2/lexCustomNewCopy2.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/lexInsPageBtn/__tests__/lexInsPageBtn.test.js b/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
new file mode 100644
index 0000000..bb52449
--- /dev/null
+++ b/force-app/main/default/lwc/lexInsPageBtn/__tests__/lexInsPageBtn.test.js
@@ -0,0 +1,25 @@
+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/lexMailMessege/__tests__/lexMailMessege.test.js b/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
new file mode 100644
index 0000000..a01145a
--- /dev/null
+++ b/force-app/main/default/lwc/lexMailMessege/__tests__/lexMailMessege.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.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/lexMailMessege/lexMailMessege.js b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
new file mode 100644
index 0000000..cf78f1a
--- /dev/null
+++ b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js
@@ -0,0 +1,89 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonRepairController.init';
+export default class LexMailMessege extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;;
+ InchargeStaffEmailC;
+ Name;
+ HPNameC;
+ DeliveredProductC;
+ RepairProductSerialNoC;
+ ServiceRepairNoC;
+ RepairFirstestimatedDateC;
+ RepairEstimatedDateC;
+ RCInformationC;
+ userEmail;
+
+ @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.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.mailMessege();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 鎶ヤ环闄勪欢鏇存柊鐨勯偖浠堕�氱煡
+ mailMessege() {
+ var Link = "https://ocsm--partial.sandbox.my.salesforce.com/" + this.Id;
+ console.log(Link);
+
+ location.href = 'mailto:' + this.InchargeStaffEmailC +
+ '?bcc=' + this.userEmail +
+ '&subject=銆愭姤浠烽檮浠舵洿鏂伴�氱煡:' + this.Name + '銆�' + this.HPNameC + this.DeliveredProductC + this.RepairProductSerialNoC + this.ServiceRepairNoC +
+ '&body=鍏堢敓/濂冲+%0D%0A' +
+ '%0D%0A' +
+ '鍏充簬涓婚鐨勪慨鐞嗭紝淇悊鎶ヤ环鐨勯檮浠舵洿鏂板ソ浜�%0D%0A' +
+ '璇风‘璁ゅ苟璺熻繘涓�涓�%0D%0A' +
+ '%0D%0A' +
+ '鍒濇鎶ヤ环鏃ワ細' + this.RepairFirstestimatedDateC + '%0D%0A' +
+ '姝ゆ鎶ヤ环鏃ワ細' + this.RepairEstimatedDateC + '%0D%0A' +
+ '%0D%0A' +
+ 'RC鑱旂粶浜嬮」锛�' + this.RCInformationC + '%0D%0A' +
+ '%0D%0A' + Link + '';
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js-meta.xml b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexMailMessege/lexMailMessege.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/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
new file mode 100644
index 0000000..511b2f0
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/__tests__/lexOCSMNoToReportRepair.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ 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
new file mode 100644
index 0000000..44ef2be
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js
@@ -0,0 +1,102 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonRepairController.init';
+import updateRepair from '@salesforce/apex/otherButtonRepairController.updateRepair';
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexOCSMNoToReportRepair extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;;
+ OCSMAdministrativeReportNumberC;
+ OCSMAdministrativeReportDateC;
+ AwareDateC;
+
+ @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.OCSMAdministrativeReportNumberC = result.OCSMAdministrativeReportNumberC;
+ this.OCSMAdministrativeReportDateC = result.OCSMAdministrativeReportDateC;
+ this.AwareDateC = result.AwareDateC;
+
+ this.OCSMNoToReport();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // OCSM涓嶈鎶ュ憡
+ OCSMNoToReport() {
+ 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;
+ }
+ })
+ window.location.reload();
+ } else {
+ this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
+ // alert("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�");
+ return;
+ }
+ }
+
+ // 寮圭獥
+ 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/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js-meta.xml b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportRepair/lexOCSMNoToReportRepair.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/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js b/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
new file mode 100644
index 0000000..96ed586
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/__tests__/lexOCSMToReportRepair.test.js
@@ -0,0 +1,25 @@
+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/lexOCSMToReportRepair/lexOCSMToReportRepair.html b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
new file mode 100644
index 0000000..40ebdc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js
@@ -0,0 +1,92 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonRepairController.init';
+import updateRepair from '@salesforce/apex/otherButtonRepairController.updateRepair';
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+
+export default class LexOCSMToReportRepair extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ AwareDateC;
+ OCSMAdministrativeReportStatusC;
+
+ @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.AwareDateC = result.AwareDateC;
+ this.OCSMAdministrativeReportStatusC = result.OCSMAdministrativeReportStatusC;
+
+ this.OCSMToReport();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // OCSM瑕佹姤鍛�
+ OCSMToReport() {
+ if (!confirm("鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
+ return;
+ }
+ if (this.OCSMAdministrativeReportStatusC == undefined && this.AwareDateC != undefined) {
+ updateRepair({
+ recordId: this.Id
+ }).catch(error => {
+ if (error.body.pageErrors.length > 0) {
+ // alert(messages.join("\n"));
+ var errmsg = error.body.pageErrors[0].message.toString();
+ this.ShowToastEvent(errmsg.join("\n"), "error")
+ return;
+ }
+ })
+ window.location.reload();
+ } else {
+ this.ShowToastEvent("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�", "error")
+ return;
+ }
+ }
+
+ // 寮圭獥
+ 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/lexOCSMToReportRepair.js-meta.xml b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReportRepair/lexOCSMToReportRepair.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/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js b/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
new file mode 100644
index 0000000..7387e21
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFMaintenanceCommission/__tests__/lexPDFMaintenanceCommission.test.js
@@ -0,0 +1,25 @@
+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/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.html b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.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/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js
new file mode 100644
index 0000000..3f5d7bb
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js
@@ -0,0 +1,54 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonRepairController.init';
+export default class LexPDFMaintenanceCommission 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() {
+ console.log(this.recordId);
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.Id = result.Id;
+
+ this.PDFMaintenanceCommission();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 鎵撳嵃缁翠慨濮旀墭涔�
+ PDFMaintenanceCommission() {
+ window.open('/apex/MaintenanceCommissionPDF?id=' + this.Id, 'MaintenanceCommissionPDF');
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js-meta.xml b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFMaintenanceCommission/lexPDFMaintenanceCommission.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/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js b/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
new file mode 100644
index 0000000..4fb8447
--- /dev/null
+++ b/force-app/main/default/lwc/lexPreContractSubmit/__tests__/lexPreContractSubmit.test.js
@@ -0,0 +1,25 @@
+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/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js b/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
new file mode 100644
index 0000000..013ddd6
--- /dev/null
+++ b/force-app/main/default/lwc/lexProductRepairQuoteRepair/__tests__/lexProductRepairQuoteRepair.test.js
@@ -0,0 +1,25 @@
+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/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.html b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.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/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
new file mode 100644
index 0000000..ef8176d
--- /dev/null
+++ b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js
@@ -0,0 +1,67 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+
+import init from '@salesforce/apex/otherButtonRepairController.init';
+import selectAssetID from '@salesforce/apex/otherButtonRepairController.selectAssetID';
+
+export default class LexProductRepairQuoteRepair extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ RecordTypeId;
+ AssetOwnerC;
+ DeliveredProductC;
+
+ @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.RecordTypeId = result.RecordTypeId;
+
+ this.ProductRepairQuoteRepair();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 淇悊鎶ヤ环棰勪及
+ ProductRepairQuoteRepair() {
+ selectAssetID({
+ recordId: this.Id
+ }).then(result => {
+ this.DeliveredProductC = result;
+ window.open('/apex/ProductRepairQuote?productid=' + this.DeliveredProductC + '&flag=asset', '', 'height=250, width=500, top=300, left=350,location=no')
+ }).catch(error => {
+ console.log(error);
+ })
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js-meta.xml b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexProductRepairQuoteRepair/lexProductRepairQuoteRepair.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/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js b/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
new file mode 100644
index 0000000..95b6a0e
--- /dev/null
+++ b/force-app/main/default/lwc/lexQuarterlyReport/__tests__/lexQuarterlyReport.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.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/lexQuarterlyReport/lexQuarterlyReport.js b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js
new file mode 100644
index 0000000..fc1f1e2
--- /dev/null
+++ b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.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/otherButtonMaintenanceContractCtl.init';
+
+export default class LexQuarterlyReport extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ RecordTypeDeveloperNameC;
+ EstimateTargetC;
+
+ @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.RecordTypeDeveloperNameC = result.RecordTypeDeveloperNameC;
+ this.EstimateTargetC = result.EstimateTargetC;
+
+
+ this.QuarterlyReport();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 鍒朵綔瀛f姤
+ QuarterlyReport() {
+ var MaintenanceContractId = this.Id;
+ var RecordTypeName = this.RecordTypeDeveloperNameC;
+ var EstimateTarget = this.EstimateTargetC;
+ 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/lexQuarterlyReport/lexQuarterlyReport.js-meta.xml b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexQuarterlyReport/lexQuarterlyReport.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/lexRCCDScomplete/lexRCCDScomplete.css b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.css
new file mode 100644
index 0000000..79456f2
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.css
@@ -0,0 +1,22 @@
+.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;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="sisToOPDHolder" 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/lexRCCDScomplete/lexRCCDScomplete.js b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
new file mode 100644
index 0000000..4f7e882
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js
@@ -0,0 +1,98 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/QISReportController.initForRCCDScompleteButton';
+import updateQis from '@salesforce/apex/QISReportController.updateQisForRCCDScomplete';
+import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
+import { updateRecord } from 'lightning/uiRecordApi';
+
+export default class lexRCCDScomplete extends LightningElement {
+ @api recordId;
+ IsLoading = true;
+ qisReportId;
+ cdsdate;
+ QIStatus;
+ err;
+
+ @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 () {
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ this.IsLoading = false;
+ this.qisReportId = result.Id;
+ this.cdsdate = result.cdsdate;
+ this.QIStatus = result.qIStatus;
+ if (this.QIStatus == 'RC妫�娴嬬敵璇�') {
+ const evt = new ShowToastEvent({
+ title : '闇�瑕佸厛鐐瑰嚮锛籓CM鏈嶅姟鏈儴鏀跺埌瀹炵墿锛�',
+ message: '',
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ if (this.cdsdate != null) {
+ const evt = new ShowToastEvent({
+ title : 'OCM鏈嶅姟鏈儴CDS宸茬粡瀹屾瘯',
+ message: '',
+ variant: 'error'
+ });
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ this.updateQisSubmit();
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
+ }
+
+ 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);
+ }
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this.updateRecordView(this.recordId);
+ }).catch(error => {
+ console.log('error='+error);
+ }).finally(() => {
+
+ });
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js-meta.xml b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js-meta.xml
new file mode 100644
index 0000000..b85f028
--- /dev/null
+++ b/force-app/main/default/lwc/lexRCCDScomplete/lexRCCDScomplete.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexRCCDScomplete">
+ <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/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js b/force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js
new file mode 100644
index 0000000..0f076e5
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/__tests__/lexSendRepairsToEtQ.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ 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
new file mode 100644
index 0000000..927e6d3
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js
@@ -0,0 +1,192 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonRepairController.init';
+import selectRecords from '@salesforce/apex/otherButtonRepairController.selectRecords';
+import sendToETQ from '@salesforce/apex/otherButtonRepairController.sendToETQ';
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexSendRepairsToEtQ extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;;
+ PAEDetermineC;
+ ETQUPLOADSTATUSC;
+ AEDetermineResultC;
+ PAEDetermineACC;
+ RepairInspectionDateC;
+ ContainUseRSAC;
+ userID;
+ profileId;
+
+ @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.PAEDetermineC = result.PAEDetermineC;
+ this.ETQUPLOADSTATUSC = result.ETQUPLOADSTATUSC;
+ this.AEDetermineResultC = result.AEDetermineResultC;
+ this.PAEDetermineACC = result.PAEDetermineACC;
+ this.RepairInspectionDateC = result.RepairInspectionDateC;
+ this.ContainUseRSAC = result.ContainUseRSAC;
+ this.userID = result.userID;
+ this.profileId = result.profileId;
+
+ this.myDate();
+ this.myReload();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 鏍规嵁鏃ユ湡鏋勫缓MessageGroupNumber
+ myDate() {
+ let messageNumber = '';
+ let today = new Date();
+ messageNumber = today.getFullYear() + '' + (today.getMonth() + 1) + '' + today.getDate() + '' + today.getHours() + '' +
+ today.getMinutes() + '' + today.getSeconds();
+ return messageNumber;
+ }
+
+ // 鎸夐挳鐐瑰嚮鍚庤Е鍙�,鍒ゆ柇鏄惁鍙戦�佽繃ETQ,濡傛灉鍙戦�佽繃缁欏嚭鎻愮ず骞剁伆鎺夋寜閽�
+ // 濡傛灉娌℃湁鍙戦�佽繃璋冪敤鍙戦�佹柟娉�
+ myReload() {
+ 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) {
+ 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('璇ヤ慨鐞嗕箣鍓嶅凡缁忓彂閫佽繃浜�')
+ } 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鐨勬潈闄愩��");
+ return;
+ }
+ var statu = '';
+ if (this.PAEDetermineC == undefined) {
+ this.ShowToastEvent("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�", "error");
+ // alert("OCSM QARA鐨凱AE鍒ゅ畾鏄┖鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ銆�");
+ return;
+ }
+ if (this.ETQUPLOADSTATUSC == "3") {
+ if (!confirm("鏄惁娓呯┖EtQ鍚屾鐘舵�侊紝閲嶆柊鍚屾鏁版嵁锛�")) {
+ return;
+ }
+ }
+ if (this.PAEDetermineC == "nonPAE" && this.AEDetermineResultC == "nonAE" && this.PAEDetermineACC == "nonPAE" && uid != "005100000068zJ6") {
+ this.ShowToastEvent("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ", "error");
+ // alert("Close Complait鐨勬椂鍊欙紝涓嶅彲浠ュ彂閫佸埌EtQ");
+ return;
+ }
+ if (this.PAEDetermineC != undefined && this.AEDetermineResultC != undefined && this.PAEDetermineACC == undefined) {
+ statu = "R1";
+ } 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銆�");
+ return;
+ }
+ if (this.ContainUseRSAC == 1) {
+ this.ShowToastEvent("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�", "error");
+ // alert("Final universal code涓虹┖锛屾垨鑰呭寘鍚玌seRSA锛岃纭銆�");
+ return;
+ }
+ }
+
+ var result;
+ try {
+ var repairids = new Array()
+ repairids[0] = this.Id;
+
+ var statuArr = new Array();
+ statuArr.push(statu);
+
+ sendToETQ({
+ iflog_Id: "",
+ rowDataSFDC: "",
+ repairIds: repairids,
+ statu: statuArr[0]
+ }).then(result => {
+ this.ShowToastEvent(result, "error");
+ // alert(result);
+ }).catch(error => {
+ console.log(error);
+ })
+
+ var btns = document.getElementsByName("sendrepairstoetq");
+ for (var i = 0; i < btns.length; i++) {
+ 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);
+ }
+ }
+
+ // 寮圭獥
+ 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/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js-meta.xml b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexSendRepairsToEtQ/lexSendRepairsToEtQ.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/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js b/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
new file mode 100644
index 0000000..fa04967
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitForApproval/__tests__/lexSubmitForApproval.test.js
@@ -0,0 +1,25 @@
+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/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html
new file mode 100644
index 0000000..81a3516
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="AntiLogicButton" 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/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
new file mode 100644
index 0000000..1220eb0
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
@@ -0,0 +1,52 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
+import ContraryLogicalDel from '@salesforce/apex/TenderWebService.ContraryLogicalDel';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexTenderingAntiLogicButton extends LightningElement {
+ @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+ id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
+ IsLoading = true;
+
+ @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.id = result.Id;
+ this.AntiLogicButton();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+
+ //鎷涙爣椤圭洰鍙嶉�昏緫鍒犻櫎
+ AntiLogicButton(){
+ ContraryLogicalDel({DTenId : this.id}).then(result =>{
+ if(result == 'OK'){
+ this.showToast("鍙嶉�昏緫鍒犻櫎鎴愬姛","success");
+ }
+ 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/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html
new file mode 100644
index 0000000..edb0a0d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="AttachmentButton" 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/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
new file mode 100644
index 0000000..c9f5295
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
@@ -0,0 +1,45 @@
+import { LightningElement,wire,track,api} from 'lwc';
+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 lexTenderingAttachmentButton extends LightningElement {
+ @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+ id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
+ IsLoading = true;
+
+ @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.id = result.Id;
+ this.AttachmentButton();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+
+ //鎷涙爣椤圭洰鏌ョ湅闄勪欢
+ AttachmentButton(){
+ window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ }
+}
diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexTenderingHospitalButton/lexTenderingHospitalButton.html b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html
new file mode 100644
index 0000000..dc43ef6
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="HospitalButton" 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/lexTenderingHospitalButton/lexTenderingHospitalButton.js b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
new file mode 100644
index 0000000..e577335
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
@@ -0,0 +1,48 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
+export default class lexTenderingHospitalButton extends LightningElement {
+ @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+ id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
+ name;//鎷涙爣椤圭洰鍚�
+ Environment_Url;//鏂板缓鍖婚櫌鍦板潃
+ IsLoading = true;
+
+ @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.id = result.Id;
+ this.name = result.name;
+ this.Environment_Url = result.Environment_Url;
+ this.HospitalButton();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }).catch(() => {
+ }).finally(() => {
+
+ });
+ }
+
+ //鎷涙爣椤圭洰鏂板缓鍖婚櫌
+ HospitalButton(){
+ var url = this.Environment_Url+'001/e?CF00N10000009I0o7='+encodeURIComponent(this.name)
+ +'&CF00N10000009I0o7_lkid='+encodeURIComponent(this.id)
+ +'&00N10000009HFQT='+encodeURIComponent('鎷涙爣椤圭洰')
+ +'&RecordType=01210000000QemG'
+ +'&retURL='+ encodeURIComponent(this.id);
+ window.location.href = url;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexTenderingLogicButton/lexTenderingLogicButton.html b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.html
new file mode 100644
index 0000000..e7eb872
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="LogicButton" 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/lexTenderingLogicButton/lexTenderingLogicButton.js b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
new file mode 100644
index 0000000..54959c0
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
@@ -0,0 +1,39 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
+export default class lexTenderingLogicButton extends LightningElement {
+ @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+ id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
+ IsLoading = true;
+
+ @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 => {
+ if (result != null) {
+ this.IsLoading = false;
+ this.id = result.Id;
+ this.LogicButton();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ })
+ }
+
+ //鎷涙爣椤圭洰閫昏緫鍒犻櫎
+ LogicButton(){
+ window.open (`/apex/TenderDeletePagelwc?id=${this.id}`, '', 'height=350, width=600, top=200, left=350');
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexTenderingLostButton/lexTenderingLostButton.html b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
new file mode 100644
index 0000000..e94a2ef
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="LostButton" 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/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
new file mode 100644
index 0000000..ff5d294
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -0,0 +1,71 @@
+import { LightningElement,wire,track,api} from 'lwc';
+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 lexTenderingLostButton extends LightningElement {
+ @api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
+ id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
+ status;//鐘舵��
+ profileId;//profileId id
+ IsLoading = true;
+
+ @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.id = result.Id;
+ this.status = result.status;
+ this.profileId = result.profileId.slice(0,15);
+ this.LoseButton();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+
+ //鎷涙爣椤圭洰澶卞崟
+ LoseButton(){
+ sqlResult({id: this.id}).then(result=>{
+ //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
+ if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
+ this.showToast("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�","error");
+ return;
+ }
+ // 鍒ゆ柇鍐呴儴纭鐘舵��
+ if(this.status == '01.寰呯‘璁�'|| this.status == '02.涓嶇浉鍏�'){
+ this.showToast("鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�","error");
+ return;
+ }
+ // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
+ if(this.status == '05.璇环涓�'|| this.status == '06.鎴愪氦' || this.status == '07.閮ㄥ垎鎴愪氦' || this.status == '08.澶卞崟' || result.length > 0){
+ if(confirm('姝ら」鐩凡鍏宠仈璇环锛岃纭疄鏄惁鏂板缓璇环鎻愪氦澶卞崟銆�')) {
+
+ }else{
+ return;
+ }
+ }
+ window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
+ })
+ }
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js b/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
new file mode 100644
index 0000000..3986cf6
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/__tests__/lexUploadToRecognitionModel.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ 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
new file mode 100644
index 0000000..6e22dc1
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js
@@ -0,0 +1,133 @@
+import {
+ LightningElement,
+ wire,
+ api
+} from 'lwc';
+import {
+ CurrentPageReference
+} from "lightning/navigation";
+import {
+ CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import updateColunm from '@salesforce/apex/MaintenanceContractSetColunmWebService.updateColunm';
+import up2sap from '@salesforce/apex/MaintenanceContractWebService.up2sap';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+export default class LexUploadToRecognitionModel extends LightningElement {
+ @api recordId;
+ str;
+ IsLoading = true;
+ Id;
+ ContractQuotationOrNotC;
+ oldIsRecognitionModelC;
+ MaintenanceContractNoC;
+ uploadToRMTimeC;
+ uploadToSapTimeC;
+ PaymentPlanSumFirstC;
+
+ @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.ContractQuotationOrNotC = result.ContractQuotationOrNotC;
+ this.oldIsRecognitionModelC = result.oldIsRecognitionModelC;
+ this.MaintenanceContractNoC = result.MaintenanceContractNoC;
+ this.uploadToSapTimeC = result.uploadToSapTimeC;
+ this.uploadToRMTimeC = result.uploadToRMTimeC;
+ this.PaymentPlanSumFirstC = result.PaymentPlanSumFirstC;
+
+ this.uploadToRecognitionModel();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 涓婁紶璁ゆ鍚堝悓
+ 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('涓婁紶璁ゆ鍚堝悓澶辫触,鍥犱负 鏉ュ勾鍚堝悓鐩稿叧淇℃伅淇敼澶辫触');
+ 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("涓婁紶璁ゆ鍚堝悓鎴愬姛");
+ location.href = "/" + this.Id;
+ } else {
+ this.ShowToastEvent(rtn, "error")
+ // alert(rtn);
+ }
+ }).catch(error => {
+ console.log(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/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js-meta.xml b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadToRecognitionModel/lexUploadToRecognitionModel.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/lexUploadToSap/__tests__/lexUploadToSap.test.js b/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
new file mode 100644
index 0000000..d5f3d47
--- /dev/null
+++ b/force-app/main/default/lwc/lexUploadToSap/__tests__/lexUploadToSap.test.js
@@ -0,0 +1,25 @@
+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/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js b/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
new file mode 100644
index 0000000..02e891b
--- /dev/null
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/__tests__/lexYanshoudanRequest.test.js
@@ -0,0 +1,25 @@
+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.html b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="exampleHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+ </div>
+</template>
\ 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
new file mode 100644
index 0000000..84fe55d
--- /dev/null
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.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/otherButtonRepairController.init';
+import updateYanshoudan from '@salesforce/apex/otherButtonRepairController.updateYanshoudan';
+import {
+ ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexYanshoudanRequest 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() {
+ console.log(this.recordId);
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ console.log(result);
+ if (result != null) {
+ this.IsLoading = false;
+ this.Id = result.Id;
+
+ this.YanshoudanRequest();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }).catch(error => {
+ console.log(error);
+ }).finally(() => {
+
+ });
+ }
+
+ // 楠屾敹鍗曞洖鏀剁敵璇�
+ YanshoudanRequest() {
+ updateYanshoudan({
+ recordId: this.Id
+ }).then(result => {
+ console.log(result);
+ if (result.length > 0) {
+ var indexs = result.indexOf(": ")
+ var resolves = result.substring(indexs + 1, result.length);
+ alert(resolves);
+ }
+ location.reload();
+ })
+ }
+
+ // 寮圭獥
+ 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/lexYanshoudanRequest/lexYanshoudanRequest.js-meta.xml b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexYanshoudanRequest/lexYanshoudanRequest.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
--
Gitblit v1.9.1