From f6a201e215d929bda9815e1689907d166a603519 Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期一, 15 五月 2023 15:08:27 +0800
Subject: [PATCH] 5月15日陈京武按钮开发
---
force-app/main/default/lwc/lexCancelReport/lexCancelReport.js | 34 +-
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.html | 5
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js | 68 ++++
force-app/main/default/classes/OpportunityLightingButtonController.cls | 129 +++++++
force-app/main/default/lwc/lexLoseReport/lexLoseReport.js | 2
force-app/main/default/classes/LightingButtonConstant.cls | 11
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html | 6
force-app/main/default/classes/lexLightingButtonConstant.cls | 112 +++++++
force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js | 8
force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js-meta.xml | 11
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css | 10
force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js | 25 +
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html | 6
force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js | 25 +
force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js | 6
force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js | 20
force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js | 2
force-app/main/default/lwc/lexASACEditor/lexASACEditor.js | 33 +
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js | 35 +
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js | 51 +++
force-app/main/default/lwc/lexRequestDB/lexRequestDB.js | 35 +
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js | 33 +
force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js | 19
force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js | 21
force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml | 1
force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js | 25 +
force-app/main/default/classes/lexLightingButtonConstant.cls-meta.xml | 5
force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js | 13
force-app/main/default/classes/ReportController.cls | 58 +-
force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js | 2
force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js-meta.xml | 11
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js | 113 +++++++
force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js | 4
force-app/main/default/lwc/lexLoseBid/lexLoseBid.js | 8
force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js-meta.xml | 11
35 files changed, 803 insertions(+), 155 deletions(-)
diff --git a/force-app/main/default/classes/LightingButtonConstant.cls b/force-app/main/default/classes/LightingButtonConstant.cls
index ef82288..c629ad6 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -89,6 +89,17 @@
public static final String LU_SHENG_NAME = '闄� 鑳�';
public static final String HU_DI_AN_NAME = '鑳� 杩畨';
public static final String SYSTEM_PROFILE_NAME = '绯荤粺绠$悊鍛�';
+ public static final String TwoS10_FSE_ManagerMent = '2S10_FSE绠$悊鑰�';
+ public static final String TwoS1_Sales_Hospital = '2S1_閿�鍞尰闄㈡媴褰�';
+ public static final String TwoS1_Sales_Hospital_Non_Singleton = '2S1_閿�鍞尰闄㈡媴褰擄紙闈炲崟鐐癸級';
+ public static final String TwoS2_Sales_Product = '2S2_閿�鍞骇鍝佹媴褰�';
+ public static final String TwoS4_Sales_Manager = '2S4_閿�鍞鐞嗚��';
+ public static final String TwoS4_Sales_Manager_Non_Singleton = '2S4_閿�鍞鐞嗚�咃紙闈炲崟鐐癸級';
+ public static final String TwoS4_Sales_Manager_Majordomo = '2S4_閿�鍞鐞嗚��(鎬荤洃)';
+ public static final String TwoS6_Trade_Assistant = '2S6-2_钀ヤ笟鍔╃悊';
+ public static final String TwoS6_Sales_Headquarters = '2S6-1_閿�鍞湰閮ㄧ獥鍙�';
+ public static final String TwoS7_Sales_Headquarters = '2S7_閿�鍞湰閮ㄥ悎鍚岀鐞嗙獥鍙�';
+ public static final String TwoM4_Marketplace_Manager = '2M4_甯傚満浜у搧鏈儴鎷呭綋(璇环)';
public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
public static final String SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '闈炲璞�';
diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index e2b9655..55cccf5 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-12 11:16:07
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-23 14:55:57
+ * @LastEditTime: 2023-05-15 13:40:51
*/
public with sharing class OpportunityLightingButtonController {
@AuraEnabled
@@ -65,8 +65,12 @@
res.trade = opportunity.Trade__c;
res.isCorrosion = opportunity.Is_Corrosion__c;
res.ifAuthorizingLock = opportunity.If_Authorizing_Lock__c;
- String profile18 = UserInfo.getProfileId();
- res.profileId = profile18.substring(0,profile18.length() - 3);
+ res.profileId = UserInfo.getProfileId();
+ res.systemProfileId = getProfileIdByName(lexLightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.j3ProfileId = getProfileIdByName(lexLightingButtonConstant.J3_PROFILE_NAME);
+ res.s61ProfileId = getProfileIdByName(lexLightingButtonConstant.S61_PROFILE_NAME);
+ res.s62ProfileId = getProfileIdByName(lexLightingButtonConstant.S62_PROFILE_NAME);
+ res.m4ProfileId = getProfileIdByName(lexLightingButtonConstant.M4_PROFILE_NAME);
} catch (Exception e) {
System.debug('e:****' + e);
}
@@ -117,7 +121,7 @@
return res;
}
@AuraEnabled
- public static InitData initFoBeforeOPDPDFBtnButton(String recordId){
+ public static InitData initForBeforeOPDPDFBtnButton(String recordId){
InitData res = new InitData();
try {
Opportunity opportunity = [
@@ -176,8 +180,10 @@
res.bidPlannedDate = opportunity.Bid_Planned_Date__c;
res.salesAssistantName = opportunity.Sales_assistant_name__c;
res.salesAssistantID = opportunity.Sales_assistant_ID__c;
- String profileId18 = UserInfo.getProfileId();
- res.profileId = profileId18.substring(0, profileId18.length() - 3);
+ res.profileId = UserInfo.getProfileId();
+ res.systemProfileId = getProfileIdByName(lexLightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.s1ProfileId = getProfileIdByName(lexLightingButtonConstant.S1_PROFILE_NAME);
+ res.s4ProfileId = getProfileIdByName(lexLightingButtonConstant.S4_PROFILE_NAME);
} catch (Exception e) {
System.debug('e:****' + e);
}
@@ -387,6 +393,65 @@
return res;
}
@AuraEnabled
+ public static InitData initForCreateActivityButton(String recordId){
+ InitData res = new InitData();
+ try {
+ Opportunity opp = [
+ select
+ AccountId
+ from Opportunity where Id =: recordId
+ ];
+ res.accountId = opp.AccountId;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ @AuraEnabled
+ public static InitData initForAssignTaskButtonButton(String recordId){
+ InitData res = new InitData();
+ try {
+ Opportunity opp = [
+ select
+ AccountId,
+ Name
+ from Opportunity where Id =: recordId
+ ];
+ Account acc = [
+ select
+ Name
+ from Account where Id =:opp.AccountId
+ ];
+ res.accountId = opp.AccountId;
+ res.accountName = acc.Name;
+ res.name = opp.Name;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ @AuraEnabled
+ public static InitData initForChangeContractTypeButton(String recordId){
+ InitData res = new InitData();
+ try {
+ Opportunity opp = [
+ select
+ StageName,
+ Estimation_Decision__c,
+ SAP_Send_OK__c,
+ If_Authorizing_Lock__c
+ from Opportunity where Id =: recordId
+ ];
+ res.stageName = opp.StageName;
+ res.estimationDecision = opp.Estimation_Decision__c;
+ res.sapSendOK = opp.SAP_Send_OK__c;
+ res.ifAuthorizingLock = opp.If_Authorizing_Lock__c;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ @AuraEnabled
public static string updateForAgencyAuthorizeButton(String recordId){
try {
Opportunity opp = new Opportunity();
@@ -441,9 +506,9 @@
Opportunity opp = new Opportunity();
opp.Id = recordId;
if(flag){
- opp.Stock_apply_status__c = '濉啓瀹屾瘯';
+ opp.Stock_apply_status__c = lexLightingButtonConstant.STOCK_APPLY_STATUS_WRITE_OVER;
}else {
- opp.Stock_apply_status__c = '鑽夋涓�';
+ opp.Stock_apply_status__c = lexLightingButtonConstant.STOCK_APPLY_STATUS_DRAFT;
}
update opp;
return null;
@@ -503,7 +568,7 @@
select id,
Tender_information__r.subInfoType__c
from Tender_Opportunity_Link__c
- where (Tender_information__r.subInfoType__c = '3-1锛氬簾鏍囧叕鍛�' OR Tender_information__r.subInfoType__c ='3-2锛氭祦鏍囧叕鍛�') and Opportunity__c =: recordId
+ where (Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_SCRAPPED_LABEL OR Tender_information__r.subInfoType__c =:lexLightingButtonConstant.SUB_INFO_TYPE_FLOW_LABEL) and Opportunity__c =: recordId
];
} catch (Exception e) {
System.debug('e:****' + e);
@@ -518,7 +583,7 @@
quotes = [
select
id
- from QuoteIrai__c where Note__c like :opportunityId and QuoteIrai_Status__c = '鑽夋涓�'
+ from QuoteIrai__c where Note__c like :opportunityId and QuoteIrai_Status__c =:lexLightingButtonConstant.QUOTEIRAI_STATUS_DRAFT
];
} catch (Exception e) {
System.debug('e:****' + e);
@@ -585,6 +650,34 @@
Integer left = eMessage.indexOf(',') + 1;
Integer right = eMessage.length();
return eMessage.substring(left,right);
+ }
+ }
+ @AuraEnabled
+ public static string getUserIdByName(String userName){
+ User user = null;
+ try {
+ user = [
+ select
+ Id
+ from User where Name =: userName
+ ];
+ return user.Id;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+ @AuraEnabled
+ public static string getProfileIdByName(String profileName){
+ Profile pro = null;
+ try {
+ pro = [
+ select
+ Id
+ from Profile where Name =: profileName
+ ];
+ return pro.Id;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
}
}
public class InitData{
@@ -688,5 +781,21 @@
public String siDecideID;
@AuraEnabled
public String opportunityNo;
+ @AuraEnabled
+ public String systemProfileId;
+ @AuraEnabled
+ public String j3ProfileId;
+ @AuraEnabled
+ public String s62ProfileId;
+ @AuraEnabled
+ public String s61ProfileId;
+ @AuraEnabled
+ public String m4ProfileId;
+ @AuraEnabled
+ public String s4ProfileId;
+ @AuraEnabled
+ public String s1ProfileId;
+ @AuraEnabled
+ public String accountName;
}
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index d75f918..9afd242 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -77,8 +77,8 @@
try {
Report__c report = [select Status__c,VOC_Satisfy__c,VOC_Satisfy1__c from Report__c where Id = :recordId];
res.status = report.Status__c;
- res.Satisfy = report.VOC_Satisfy__c;
- res.Satisfy1 = report.VOC_Satisfy1__c;
+ res.satisfy = report.VOC_Satisfy__c;
+ res.satisfy1 = report.VOC_Satisfy1__c;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -105,8 +105,8 @@
InitData res = new InitData();
try {
Report__c report = [select OCSMAdministrativeReportNumber__c,OCSMAdministrativeReportDate__c,Aware_date__c from Report__c where Id = :recordId];
- res.OCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
- res.OCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
+ res.theOCSMAdministrativeReportDate = report.OCSMAdministrativeReportDate__c;
+ res.theOCSMAdministrativeReportNumber = report.OCSMAdministrativeReportNumber__c;
res.awareDate = report.Aware_date__c;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -134,7 +134,7 @@
InitData res = new InitData();
try {
Report__c report = [select OCSMAdministrativeReportStatus__c,AwareDate__C from Report__c where Id = :recordId];
- res.OCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
+ res.theOCSMAdministrativeReportStatus = report.OCSMAdministrativeReportStatus__c;
res.awareDate = report.AwareDate__C;
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -163,11 +163,11 @@
try {
PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c = :recordId And RecordType.DeveloperName = :developerName Order by LastModifiedDate desc];
if (report != null && !report.isEmpty()) {
- res.LastModifiedDate = report[0].LastModifiedDate;
- res.Id = report[0].Id;
- res.Name = report[0].Name;
- res.LastModifiedById = report[0].LastModifiedById;
- res.DeveloperName = report[0].RecordType.DeveloperName;
+ res.lastModifiedDate = report[0].LastModifiedDate;
+ res.id = report[0].Id;
+ res.name = report[0].Name;
+ res.lastModifiedById = report[0].LastModifiedById;
+ res.developerName = report[0].RecordType.DeveloperName;
}
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -184,11 +184,11 @@
try {
PAE_DecisionRecord__c[] report = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_Report__c = :recordId And RecordType.DeveloperName = :recordTypeId Order by LastModifiedDate desc];
if (report != null && !report.isEmpty()) {
- res.LastModifiedDate = report[0].LastModifiedDate;
- res.Id = report[0].Id;
- res.Name = report[0].Name;
- res.LastModifiedById = report[0].LastModifiedById;
- res.DeveloperName = report[0].RecordType.DeveloperName;
+ res.lastModifiedDate = report[0].LastModifiedDate;
+ res.id = report[0].Id;
+ res.name = report[0].Name;
+ res.lastModifiedById = report[0].LastModifiedById;
+ res.developerName = report[0].RecordType.DeveloperName;
}
} catch (Exception e) {
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -379,15 +379,15 @@
//VOC缁撴灉纭鏇存柊鐩稿簲鏁版嵁
@AuraEnabled
- public static String updateForVOCConfirmButton(String recordId,String Satisfy,String Satisfy1){
+ public static String updateForVOCConfirmButton(String recordId,String satisfy,String satisfy1){
try {
Report__c rac = new Report__c();
rac.Id = recordId;
- if (Satisfy == LightingButtonConstant.CN_YES) {
+ if (satisfy == LightingButtonConstant.CN_YES) {
rac.Status__c = LightingButtonConstant.STATUS_VOC_CONFIRMED;
- } else if (Satisfy == LightingButtonConstant.CN_NO) {
+ } else if (satisfy == LightingButtonConstant.CN_NO) {
// 瀵惧繙绲愭灉锛堜竴鍥炵洰锛夈伀鍊ゃ仾銇戙倢銇般�佷竴鍥炵洰銇�屽惁銆嶃仺瑕嬨仾銇�
- if (Satisfy1 != LightingButtonConstant.CN_NO) {
+ if (satisfy1 != LightingButtonConstant.CN_NO) {
Report__c[] records = [SELECT Id, VOC_Satisfy__c, VOC_Unsatisfy_Reason__c, VOC_follow_up_result__c, VOC_solution_category__c FROM Report__c WHERE Id = :recordId];
rac.VOC_Satisfy__c = null;
rac.VOC_Unsatisfy_Reason__c = null;
@@ -579,29 +579,29 @@
@AuraEnabled
public String ownerId;
@AuraEnabled
- public String Satisfy;
+ public String satisfy;
@AuraEnabled
- public String Satisfy1;
+ public String satisfy1;
@AuraEnabled
public String profileId;
@AuraEnabled
- public String OCSMAdministrativeReportNumber;
+ public String theOCSMAdministrativeReportNumber;
@AuraEnabled
- public Date OCSMAdministrativeReportDate;
+ public Date theOCSMAdministrativeReportDate;
@AuraEnabled
public Date awareDate;
@AuraEnabled
- public String OCSMAdministrativeReportStatus;
+ public String theOCSMAdministrativeReportStatus;
@AuraEnabled
- public Datetime LastModifiedDate;
+ public Datetime lastModifiedDate;
@AuraEnabled
- public String Id;
+ public String id;
@AuraEnabled
- public String Name;
+ public String name;
@AuraEnabled
- public String LastModifiedById;
+ public String lastModifiedById;
@AuraEnabled
- public String DeveloperName;
+ public String developerName;
@AuraEnabled
public String userId;
@AuraEnabled
diff --git a/force-app/main/default/classes/lexLightingButtonConstant.cls b/force-app/main/default/classes/lexLightingButtonConstant.cls
new file mode 100644
index 0000000..f3e6ee8
--- /dev/null
+++ b/force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -0,0 +1,112 @@
+public with sharing class lexLightingButtonConstant {
+ //涓爣閫氱煡涔︾殑鐘舵�佲�樺鐞嗗畬姣曗��
+ public static final String STATUS_Bid_Announcement_Consent = '澶勭悊瀹屾瘯';
+ //涓爣閫氱煡涔︾殑鐘舵�佲�樿崏妗堜腑鈥�
+ public static final String STATUS_Bid_Announcement_Reject = '鑽夋涓�';
+ //涓爣閫氱煡涔︾殑鐘舵�佲�樼敵璇蜂腑鈥�
+ public static final String STATUS_Bid_Announcement_ApplyFor = '鐢宠涓�';
+ //鎺堟潈鐢宠鐨勭姸鎬佲�樺凡鎻愪氦鈥�
+ 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 = '鑽夋涓�';
+ //鎶ュ憡涔︾殑鐘舵�佲�樺畬姣曗��
+ public static final String STATUS_COMPLETE = '瀹屾瘯';
+ //鎶ュ憡涔︾殑鐘舵�佲�樺彇娑堚��
+ public static final String STATUS_CANCEL = '鍙栨秷';
+ //OCSM鎶ュ憡鐨勭姸鎬佲�樺緟鎶ュ憡鈥�
+ public static final String STATUS_TO_BE_REPORTED = '寰呮姤鍛�';
+ //OCSM鎶ュ憡鐨勭姸鎬佲�樻棤闇�鎶ュ憡鈥�
+ public static final String STATUS_TO_NOT_REPORT = '鏃犻渶鎶ュ憡';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樼粨鏋滅‘璁ゅ畬姣曗��
+ public static final String STATUS_VOC_CONFIRMED = '缁撴灉纭瀹屾瘯';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樺洖绛斿畬姣曗��
+ public static final String STATUS_VOC_END_OF_ANSWER = '鍥炵瓟瀹屾瘯';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樼敵璇蜂腑鈥�
+ public static final String STATUS_VOC_APPLYING = '鐢宠珛涓�';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樺垽瀹氬畬姣曗��
+ public static final String STATUS_VOC_CHECK_OVER = '鍒ゅ畾瀹屾瘯';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樺~鍐欏畬姣曗��
+ public static final String STATUS_VOC_WRITE_OVER = '濉啓瀹屾瘯';
+ //澶囪揣鐢宠鐨勭姸鎬佲�樺~鍐欏畬姣曗��
+ public static final String STOCK_APPLY_STATUS_WRITE_OVER = '濉啓瀹屾瘯';
+ //澶囪揣鐢宠鐨勭姸鎬佲�樿崏妗堜腑鈥�
+ public static final String STOCK_APPLY_STATUS_DRAFT = '鑽夋涓�';
+ //VOC鎶ュ憡鐨勭姸鎬佲�樺畬姣曗��
+ public static final String STATUS_VOC_FINISH = '瀹屾瘯';
+ //鎶ヤ环濮旀墭鍔熻兘鐨勭姸鎬佲�樿崏妗堜腑鈥�
+ public static final String QUOTEIRAI_STATUS_DRAFT = '鑽夋涓�';
+ //QIS鐨勭姸鎬佲�極SH妫�娴嬩腑鈥�
+ public static final String STATUS_QIS_OSH_TESTING = 'OSH妫�娴嬩腑';
+ //QIS鐨勭姸鎬佲�極SH濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_OSH_COMPLATED = 'OSH濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�極SH妫�娴嬬敵璇封��
+ public static final String STATUS_QIS_OSH_TESTING_APP = 'OSH妫�娴嬬敵璇�';
+ //QIS鐨勭姸鎬佲�楻C濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_RC_COMPLATED = 'RC濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�樺彇娑堢敵璇封��
+ public static final String STATUS_QIS_CANCEL = '鍙栨秷鐢宠';
+ //QIS鐨勭姸鎬佲�楻C妫�娴嬩腑鈥�
+ public static final String STATUS_QIS_RC_CHECKING = 'RC妫�娴嬩腑';
+ //QIS鐨勭姸鎬佲�楩SE濉啓瀹屾瘯鈥�
+ public static final String STATUS_QIS_FSE_COMPLATED = 'FSE濉啓瀹屾瘯';
+ //QIS鐨勭姸鎬佲�樺畬姣曗��
+ public static final String STATUS_QIS_COMPLATED = '瀹屾瘯';
+ //鎷涙爣椤圭洰鐨勯樁娈佃ˉ鍏呰鏄庘��3-1锛氬簾鏍囧叕鍛娾��
+ public static final String SUB_INFO_TYPE_SCRAPPED_LABEL = '3-1锛氬簾鏍囧叕鍛�';
+ //鎷涙爣椤圭洰鐨勯樁娈佃ˉ鍏呰鏄庘��3-2锛氭祦鏍囧叕鍛娾��
+ public static final String SUB_INFO_TYPE_FLOW_LABEL = '3-2锛氭祦鏍囧叕鍛�';
+ //鍛ㄦ姤鏈堟姤鐨勮褰曠被鍨嬪悕鈥樺懆鎶モ��
+ public static final String RECORD_TYPE_NAME_BY_MONTHLY_REPORT = '鍛ㄦ姤';
+ //鎶ュ憡涔︾殑璁板綍绫诲瀷鈥樻彁浜も��
+ public static final String RECORD_TYPE_NAME_BY_SUBMIT = '鎻愪氦';
+ //鎶ュ憡涔︾殑璁板綍绫诲瀷鈥樿窡鍙扳��
+ public static final String RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE = '璺熷彴';
+ //鎶ュ憡涔︾殑璁板綍绫诲瀷鈥極PD鈥�
+ public static final String RECORD_TYPE_NAME_BY_OPD= 'OPD';
+ //QIS鐨勮褰曠被鍨嬧��3.OSH鈥�
+ public static final String RECORD_TYPE_NAME_BY_OSH= '3.OSH';
+ //QIS鐨勮褰曠被鍨嬧��4.OSH鍥炵瓟瀹屾瘯鈥�
+ public static final String RECORD_TYPE_NAME_BY_OSH_FINASH= '4.OSH鍥炵瓟瀹屾瘯';
+ //QIS鐨勮褰曠被鍨嬧��9.Final 瀹屾瘯鈥�
+ public static final String RECORD_TYPE_NAME_BY_FINAL= '9.Final 瀹屾瘯';
+ //QIS鐨勮褰曠被鍨嬧��5.鐜板満缁撴鈥�
+ public static final String RECORD_TYPE_NAME_BY_COMP= '5.鐜板満缁撴';
+ //璁板綍绫诲瀷鐨刣eveloperName鈥楢SRCDecision鈥�
+ public static final String DEVELOPER_NAME_ASRC_DECISION = 'ASRCDecision';
+ //璁板綍绫诲瀷鐨刣eveloperName鈥楢SACDecision鈥�
+ public static final String DEVELOPER_NAME_ASAC_DECISION = 'ASACDecision';
+ //宸ヤ綔鍒嗙被鐨勯攢鍞湇鍔�
+ public static final String TYPE_OF_SALES_SERVICES = '閿�鍞湇鍔�';
+ //userAccess鍙傛暟鍚庣紑_Edit
+ public static final String USER_ACCESS_EDIT = '_Edit';
+ //userAccess鍙傛暟鍚庣紑_Read
+ public static final String USER_ACCESS_READ = '_Read';
+ //浠诲姟鐨勫悕瀛椻�樹腑鏍囩粨鏋滅‘璁も��
+ public static final String TASK_NAME_BY_CONFIRMATION_OF_WINNING_BID = '涓爣缁撴灉纭';
+ //璇环鐨凜onfirmationofAward__c瀛楁鍊尖�極LY涓爣鈥�
+ public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_OLY_WIN_BID = 'OLY涓爣';
+ //璇环鐨凜onfirmationofAward__c瀛楁鍊尖�樼珵浜夊鎵嬩腑鏍団��
+ public static final String OPPORTUNITY_CONFIRMATION_OF_AWARD_LOSE_BID = '绔炰簤瀵规墜涓爣';
+ public static final String PREDICTED_DATE_STATUS = '瀹℃壒涓�';
+ public static final String CN_YES = '鏄�';
+ public static final String CN_NO = '鍚�';
+ public static final String VOC_NAME = 'VOC';
+ public static final String OK = 'OK';
+ public static final String LU_SHENG_NAME = '闄� 鑳�';
+ public static final String HU_DI_AN_NAME = '鑳� 杩畨';
+ public static final String SYSTEM_PROFILE_NAME = '绯荤粺绠$悊鍛�';
+ public static final String J3_PROFILE_NAME = '2J3_鐗圭害搴楃獥鍙�';
+ public static final String S62_PROFILE_NAME = '2S6-2_钀ヤ笟鍔╃悊';
+ public static final String S61_PROFILE_NAME = '2S6-1_閿�鍞湰閮ㄧ獥鍙�';
+ public static final String M4_PROFILE_NAME = '2M4_甯傚満浜у搧鏈儴鎷呭綋(璇环)';
+ public static final String S1_PROFILE_NAME = '2S1_閿�鍞尰闄㈡媴褰�';
+ public static final String S4_PROFILE_NAME = '2S4_閿�鍞鐞嗚��';
+ public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
+ public static final String SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
+ public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '闈炲璞�';
+ public static final String REPAIR_FIELD_SAP_CONDITION_IS_TRUE = 'true';
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLightingButtonConstant.cls-meta.xml b/force-app/main/default/classes/lexLightingButtonConstant.cls-meta.xml
new file mode 100644
index 0000000..9bbf7b4
--- /dev/null
+++ b/force-app/main/default/classes/lexLightingButtonConstant.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/lexASACEditor/lexASACEditor.js b/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
index a40f487..b343456 100644
--- a/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
+++ b/force-app/main/default/lwc/lexASACEditor/lexASACEditor.js
@@ -1,14 +1,22 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-08 14:36:32
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-15 09:20:08
+ */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/ReportController.initForASACEditorButton';
export default class LexASACEditor extends LightningElement {
@api recordId;
- LastModifiedDate
- Id
- Name
- LastModifiedById
- DeveloperName
+ lastModifiedDate
+ id
+ name
+ lastModifiedById
+ developerName
IsLoading = true;
url;
@wire(CurrentPageReference)
@@ -35,12 +43,11 @@
console.log(result);
if (result != undefined) {
console.log("if");
- this.LastModifiedById = result.LastModifiedById;
- this.LastModifiedDate = result.LastModifiedDate;
- this.Id = result.Id;
- this.Name = result.Name;
- this.DeveloperName = result.DeveloperName;
- console.log(this.Id);
+ this.lastModifiedById = result.lastModifiedById;
+ this.lastModifiedDate = result.lastModifiedDate;
+ this.id = result.id;
+ this.name = result.name;
+ this.developerName = result.developerName;
this.editor();
this.dispatchEvent(new CloseActionScreenEvent());
//window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
@@ -61,8 +68,8 @@
}
editor(){
- if (this.Id != undefined){
- this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
+ if (this.id != undefined){
+ this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
console.log(this.url);
} else {
this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASACDecision";
diff --git a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
index 982af66..f58a718 100644
--- a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
+++ b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js
@@ -1,3 +1,11 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-08 14:36:32
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-15 09:22:15
+ */
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
@@ -5,11 +13,11 @@
export default class LexASRCEditor extends LightningElement {
@api recordId;
- LastModifiedDate
- Id
- Name
- LastModifiedById
- DeveloperName
+ lastModifiedDate
+ id
+ name
+ lastModifiedById
+ developerName
IsLoading = true;
url;
@wire(CurrentPageReference)
@@ -36,12 +44,11 @@
console.log(result);
if (result != undefined) {
console.log("if");
- this.LastModifiedById = result.LastModifiedById;
- this.LastModifiedDate = result.LastModifiedDate;
- this.Id = result.Id;
- this.Name = result.Name;
- this.DeveloperName = result.DeveloperName;
- console.log(this.Id);
+ this.lastModifiedById = result.lastModifiedById;
+ this.lastModifiedDate = result.lastModifiedDate;
+ this.id = result.id;
+ this.name = result.name;
+ this.developerName = result.developerName;
this.editor();
this.dispatchEvent(new CloseActionScreenEvent());
//window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
@@ -62,8 +69,8 @@
}
editor(){
- if (this.Id != undefined){
- this.url = "/apex/RepPAEDecisionRecord?Id="+this.Id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
+ if (this.id != undefined){
+ this.url = "/apex/RepPAEDecisionRecord?Id="+this.id+"&ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
console.log(this.url);
} else {
this.url = "/apex/RepPAEDecisionRecord?ReportId="+this.recordId+"&RecordTypeIds="+"ASRCDecision";
diff --git a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml
index 952a036..6562db5 100644
--- a/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml
+++ b/force-app/main/default/lwc/lexASRCEditor/lexASRCEditor.js-meta.xml
@@ -1,3 +1,4 @@
+
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
<apiVersion>54.0</apiVersion>
diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
index 30da2db..8f2dd4a 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-12 14:51:44
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-19 09:11:02
+ * @LastEditTime: 2023-05-11 13:46:32
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -37,6 +37,11 @@
isCorrosion;
profileId;
ifAuthorizingLock;
+ systemProfileId;
+ j3ProfileId;
+ s61ProfileId;
+ s62ProfileId;
+ m4ProfileId;
IsLoading = true;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -76,6 +81,11 @@
this.isCorrosion = result.isCorrosion;
this.profileId = result.profileId;
this.ifAuthorizingLock = result.ifAuthorizingLock;
+ this.systemProfileId = result.systemProfileId;
+ this.j3ProfileId = result.j3ProfileId;
+ this.s61ProfileId = result.s61ProfileId;
+ this.s62ProfileId = result.s62ProfileId;
+ this.m4ProfileId = result.m4ProfileId;
this.AgencyAuthorize();
})
}
@@ -89,9 +99,10 @@
var oppid = this.recordId;
var angency = this.agency1Id;
var profileId = this.profileId;
-
- if (profileId != '00e10000000Y3o5' && profileId != '00e10000000Nab7' && profileId != '00e10000000xnpR' && profileId != '00e10000000xyK6' && profileId != '00e10000000NbCE'
- && profileId != '00e10000000xyK6' && profileId != '00e10000000Nb7i') {
+ //娴嬭瘯宸查攣瀹氭巿鏉冨悎鍚岀敵璇蜂负鈥�1鈥�
+ this.estimationId = 'test';
+ this.detailNum = 1;
+ if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) {
this.showToast("鎮ㄦ病鏈夋巿鏉冪敵璇风殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��","error");
return;
}
@@ -108,9 +119,10 @@
this.showToast("鑰楁潗涓嶅彲涓庡ゥ杈変骇鍝佸悓鏃跺瓨鍦紒","error");
return;
} else if (this.cntLostCancelDraft > 0) {
- if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
- return ;
- }
+ if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return ;
+ }
} else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
this.showToast('璇环鏈夊凡鎻愪氦鐨勫彇娑�/澶卞崟鎶ュ憡銆�',"error");
return;
@@ -123,16 +135,11 @@
} else if (this.salesRoot != '璨╁2搴�') {
this.showToast('鍖婚櫌鐩撮攢涓嶉渶瑕佹巿鏉冪敵璇枫��',"error");
return;
- }
- // else if ('{!Opportunity.AcecideCntCheck__c}' != '1') {
- // alert('闃胯タ璧涘璇环鍙兘鍖呭惈鍗卞寲鍝侊紝鎴栬�咃紝鏅�氳浠蜂笉鑳藉寘鍚嵄鍖栧搧銆�');
- // return;
- // }
- else if (this.ifSubmit == '1') {
+ }else if (this.ifSubmit == '1') {
this.showToast('涓婁紶澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�!',"error");
return;
}
- if (this.ifAuthorizingLock == 'true') {
+ if (this.ifAuthorizingLock == true) {
this.showToast('璇环姝e湪鎺堟潈涓紝璇蜂笉瑕侀噸澶嶆彁浜ゃ��',"error");
return;
}
diff --git a/force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js b/force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js
new file mode 100644
index 0000000..f42e285
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssignTaskButton/__tests__/lexAssignTaskButton.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexAssignTaskButton from 'c/lexAssignTaskButton';
+
+describe('c-lex-assign-task-button', () => {
+ 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-assign-task-button', {
+ is: LexAssignTaskButton
+ });
+
+ // 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/lexAssignTaskButton/lexAssignTaskButton.html b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.html
new file mode 100644
index 0000000..95e9376
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="lexAssignTaskButtonHolder" 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/lexAssignTaskButton/lexAssignTaskButton.js b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
new file mode 100644
index 0000000..854790a
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js
@@ -0,0 +1,68 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-15 11:14:32
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-15 11:50:12
+ */
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/OpportunityLightingButtonController.initForAssignTaskButtonButton';
+export default class LexAssignTaskButton extends LightningElement {
+ @api recordId;
+ accountName;
+ accountId;
+ oppName;
+ @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.accountId = result.accountId;
+ this.accountName = result.accountName;
+ this.oppName = result.name;
+ this.assignTask();
+ }).catch(error=>{
+ console.log("error");
+ console.log(error);
+ });
+ }
+ assignTask(){
+ //鍩虹璺緞
+ var url = '/setup/ui/recordtypeselect.jsp?ent=01I100000016llf';
+ //璁板綍绫诲瀷
+ url += '&p3=01210000000cWfw';
+ url += '&retURL=%2F';
+ url += '&save_new_url=%2Fa3V%2Fe%3FretURL%3D%252Fa3V%252Fo';
+ //瀹㈡埛
+ url += '&CF00N100000095tn6=' + this.accountName;
+ url += '&CF00N100000095tn6_lkid=' + this.accountId;
+ //璇环
+ url += '&CF00N100000095zcA=' + this.oppName;
+ url += '&CF00N100000095zcA_lkid=' + this.recordId;
+ //浠诲姟鐘舵��
+ url += '&00N100000095tnR=01 鍒嗛厤';
+ //浠诲姟鍖哄垎
+ url += '&00N100000095tnP=涓婄骇鍒嗛厤浠诲姟';
+ //浠诲姟鍚嶇О
+ url += '&Name=*';
+ window.open(url);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js-meta.xml b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.js-meta.xml
new file mode 100644
index 0000000..952a036
--- /dev/null
+++ b/force-app/main/default/lwc/lexAssignTaskButton/lexAssignTaskButton.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/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
index babbb46..9c8037f 100644
--- a/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
+++ b/force-app/main/default/lwc/lexBeforeOPDPDFBtn/lexBeforeOPDPDFBtn.js
@@ -4,12 +4,12 @@
* @Author: chen jing wu
* @Date: 2023-04-13 15:08:43
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-14 15:37:35
+ * @LastEditTime: 2023-05-11 15:49:41
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import init from '@salesforce/apex/OpportunityLightingButtonController.initFoBeforeOPDPDFBtnButton';
+import init from '@salesforce/apex/OpportunityLightingButtonController.initForBeforeOPDPDFBtnButton';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import selectCommonSequence from '@salesforce/apex/ControllerUtil.selectCommonSequence';
import addReportOPWithEvaluationPDF from '@salesforce/apex/Add_Report.addReportOPWithEvaluationPDF';
diff --git a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
index 0032022..d75559e 100644
--- a/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
+++ b/force-app/main/default/lwc/lexCancelReport/lexCancelReport.js
@@ -5,6 +5,7 @@
import queryForCancelReportButton from '@salesforce/apex/OpportunityLightingButtonController.queryForCancelReportButton';
import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import ConSent from '@salesforce/apex/BidAnnouncementController.ConSent';
export default class LexCancelReport extends LightningElement {
@api recordId;
stageName;
@@ -40,19 +41,20 @@
init({
recordId: this.recordId
}).then(result=>{
- this.stageName = result.stageName;
- this.sapSendOK = result.sapSendOK;
- this.cntLostCancelDraft = result.cntLostCancelDraft;
- this.cntLostCancelReport = result.cntLostCancelReport;
- this.jobCategory = result.jobCategory;
- this.biddingProjectNameBid = result.biddingProjectNameBid;
- this.name = result.name;
- this.salesAssistantID = result.salesAssistantID;
- this.salesAssistantName = result.salesAssistantName;
- this.managerName = result.managerName;
- this.salesManagerDepartmentID = result.salesManagerDepartmentID;
- this.salesOwnerBuchang = result.salesOwnerBuchang;
- this.salesOwnerBuchangID = result.salesOwnerBuchangID;
+ console.log(result);
+ this.stageName = result.stageName == undefined ? '' : result.stageName;
+ this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK;
+ this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft;
+ this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport;
+ this.jobCategory = result.jobCategory == undefined ? '' : result.jobCategory;
+ this.biddingProjectNameBid = result.biddingProjectNameBid == undefined ? '' : result.biddingProjectNameBid;
+ this.name = result.name == undefined ? '' : result.name;
+ this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID;
+ this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName;
+ this.managerName = result.managerName == undefined ? '' : result.managerName;
+ this.salesManagerDepartmentID = result.salesManagerDepartmentID == undefined ? '' : result.salesManagerDepartmentID;
+ this.salesOwnerBuchang = result.salesOwnerBuchang == undefined ? '' : result.salesOwnerBuchang;
+ this.salesOwnerBuchangID = result.salesOwnerBuchangID == undefined ? '' : result.salesOwnerBuchangID;
this.cancelReport();
})
}
@@ -83,17 +85,17 @@
}
else if (this.sapSendOK == '1') {
- this.showToast("宸茬粡涓婁紶SAP銆佷笉鑳藉仛 鍙栨秷 浜嗭紒","");
+ this.showToast("宸茬粡涓婁紶SAP銆佷笉鑳藉仛 鍙栨秷 浜嗭紒","error");
}
else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
this.showToast("璇环宸茬粡鏈� 鍙栨秷锛忓け鍗曟姤鍛� 浜嗭紒","error");
}
else if (this.jobCategory == '鏀彺') {
- this.showToast("璇环鎵�鏈変汉鏄姪鐞嗙殑锛屽厛璇蜂慨鏀瑰埌閿�鍞媴褰擄紒","");
+ this.showToast("璇环鎵�鏈変汉鏄姪鐞嗙殑锛屽厛璇蜂慨鏀瑰埌閿�鍞媴褰擄紒","error");
}
//XLIU-CG98L5 銆愬鎵樸�戙�愯瘎浼般�戞柊闇�姹�-鎷涙爣椤圭洰/璇环瀵瑰簲娴佹爣銆佸簾鏍囨敼鍠� start
//else if({!NOT(ISBLANK(Opportunity.Bidding_Project_Name_Bid__c))}&& '{!Opportunity.subInfoType__c}' != '3-1锛氬簾鏍囧叕鍛�' &&'{!Opportunity.subInfoType__c}' != '3-2锛氭祦鏍囧叕鍛�'){
- else if(this.biddingProjectNameBid != undefined && sqlResult.size == 0){
+ else if(this.biddingProjectNameBid != '' && sqlResult.length == 0){
this.showToast("鏈夋嫑鎶曟爣椤圭洰鏃跺彧鑳藉仛澶卞崟鎴栭儴鍒嗗け鍗曟姤鍛婏紒","error");
}
//XLIU-CG98L5 銆愬鎵樸�戙�愯瘎浼般�戞柊闇�姹�-鎷涙爣椤圭洰/璇环瀵瑰簲娴佹爣銆佸簾鏍囨敼鍠� end
diff --git a/force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js b/force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js
new file mode 100644
index 0000000..1e24706
--- /dev/null
+++ b/force-app/main/default/lwc/lexChangeContractType/__tests__/lexChangeContractType.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexChangeContractType from 'c/lexChangeContractType';
+
+describe('c-lex-change-contract-type', () => {
+ 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-change-contract-type', {
+ is: LexChangeContractType
+ });
+
+ // 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/lexChangeContractType/lexChangeContractType.css b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
new file mode 100644
index 0000000..b37012f
--- /dev/null
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.css
@@ -0,0 +1,10 @@
+.lexChangeContractTypeHolder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+.container .uiContainerManager{
+ display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
new file mode 100644
index 0000000..e5250f7
--- /dev/null
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="lexChangeContractTypeHolder" 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/lexChangeContractType/lexChangeContractType.js b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
new file mode 100644
index 0000000..07b19ca
--- /dev/null
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js
@@ -0,0 +1,113 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-15 13:17:26
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-15 15:01:19
+ */
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { updateRecord } from 'lightning/uiRecordApi';
+import init from '@salesforce/apex/OpportunityLightingButtonController.initForChangeContractTypeButton';
+import changeTrade from '@salesforce/apex/OpportunityWebService.changeTrade';
+
+export default class LexChangeContractType extends LightningElement {
+ @api recordId;
+ stageName;
+ estimationDecision;
+ sapSendOK;
+ ifAuthorizingLock;
+ IsLoading = true;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ console.log(111);
+ console.log(currentPageReference);
+
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ console.log("str");
+ console.log(str);
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ this.stageName = result.stageName;
+ this.estimationDecision = result.estimationDecision;
+ this.sapSendOK = result.sapSendOK;
+ this.ifAuthorizingLock = result.ifAuthorizingLock;
+ this.changeContractType();
+ }).catch(error=>{
+ console.log("error");
+ console.log(error);
+ });
+ }
+ changeContractType(){
+ var oppId = this.recordId;
+ var str ;
+ var status = this.stageName;
+ var quostatus = this.estimationDecision;
+ var win = this.sapSendOK;
+ var Auth = this.ifAuthorizingLock;
+
+ if(status != '寮曞悎'){
+ this.showToast('鍙湁鐘舵��1鏄浠风殑鍙互鏇存敼鍚堝悓绫诲瀷','error');
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ if(Auth == '1'){
+ this.showToast('璇环姝e湪鎺堟潈鐢宠涓紝璇峰湪SPO涓┏鍥炲悗鍐嶅仛杞崲銆�','error');
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ if(quostatus == 'true' || quostatus == true){
+ this.showToast('宸插喅瀹氭姤浠凤紝涓嶈兘淇敼鍐呰锤/澶栬锤','error');
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ if(win == 'true' || win == true){
+ this.showToast('璇峰厛鍙栨秷WIN锛� 鍐嶈浆鎹㈠唴澶栬锤','error');
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ if(confirm('鍙樻洿鍚堝悓绫诲瀷浼氬垹闄ゅ叏閮ㄦ姤浠凤紝鏄惁缁х画锛�')){
+ changeTrade({
+ oppId: oppId
+ }).then(result=>{
+ str = result;
+ if(str != '1'){
+ this.showToast(str,"error");
+ }
+ this.IsLoading = false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ window.location.href = 'https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Opportunity/' + this.recordId + '/view';
+ }).catch(error=>{
+ console.log("error");
+ console.log(error);
+ });
+ }else{
+ this.dispatchEvent(new CloseActionScreenEvent());
+ return;
+ }
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ title: '',
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ }
+ updateRecordView(recordId) {
+ updateRecord({fields: { Id: recordId }});
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js-meta.xml b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.js-meta.xml
new file mode 100644
index 0000000..329e839
--- /dev/null
+++ b/force-app/main/default/lwc/lexChangeContractType/lexChangeContractType.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/lexCopyWithAsset/lexCopyWithAsset.js b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
index 51c400e..5cf2046 100644
--- a/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
+++ b/force-app/main/default/lwc/lexCopyWithAsset/lexCopyWithAsset.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-21 14:32:09
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-10 17:05:09
+ * @LastEditTime: 2023-05-12 15:25:47
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
diff --git a/force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js b/force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js
new file mode 100644
index 0000000..8d031e7
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateActivity/__tests__/lexCreateActivity.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCreateActivity from 'c/lexCreateActivity';
+
+describe('c-lex-create-activity', () => {
+ 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-activity', {
+ is: LexCreateActivity
+ });
+
+ // 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/lexCreateActivity/lexCreateActivity.html b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
new file mode 100644
index 0000000..583edb8
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="lexCreateActivityHolder" 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/lexCreateActivity/lexCreateActivity.js b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
new file mode 100644
index 0000000..626bb7c
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js
@@ -0,0 +1,51 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-15 09:50:42
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-15 10:34:33
+ */
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/OpportunityLightingButtonController.initForCreateActivityButton';
+export default class LexCreateActivity extends LightningElement {
+ @api recordId;
+ accountId;
+ @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=>{
+ console.log(result);
+ this.accountId = result.accountId;
+ this.createActivity();
+ }).catch(error=>{
+ console.log("error");
+ console.log(error);
+ });
+ }
+ createActivity(){
+ window.open(
+ "/apex/SimpleEventRegister?retURL=%2Fapex%2FVFClosePage&accid="
+ + this.accountId + "&oid="
+ + this.recordId + "&source=AccountPCL&save_new=1&sfdc.override=1");
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js-meta.xml b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateActivity/lexCreateActivity.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/lexLoseBid/lexLoseBid.js b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
index db1b2da..a42f54f 100644
--- a/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
+++ b/force-app/main/default/lwc/lexLoseBid/lexLoseBid.js
@@ -1,3 +1,11 @@
+/*
+ * @Description:
+ * @version:
+ * @Author: chen jing wu
+ * @Date: 2023-05-08 14:36:33
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-05-11 14:48:31
+ */
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
diff --git a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
index 3c1bcf1..ea92549 100644
--- a/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
+++ b/force-app/main/default/lwc/lexLoseReport/lexLoseReport.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-20 14:08:55
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-24 13:58:53
+ * @LastEditTime: 2023-05-12 11:35:46
*/
/*
* @Description:
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
index 7871e35..c5dbd36 100644
--- a/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
+++ b/force-app/main/default/lwc/lexNewOpportunityAgency/lexNewOpportunityAgency.js
@@ -60,13 +60,13 @@
if(this.closeForecastedDate == undefined){
this.closeForecastedDate = '';
}else{
- this.closeForecastedDate = new String(this.closeForecastedDate).replace("-","/");
+ this.closeForecastedDate = new String(this.closeForecastedDate).replaceAll("-","/");
}
console.log(this.closeForecastedDate);
if(this.bidPlannedDate == undefined){
this.bidPlannedDate = '';
}else{
- this.bidPlannedDate = new String(this.bidPlannedDate).replace("-","/");
+ this.bidPlannedDate = new String(this.bidPlannedDate).replaceAll("-","/");
}
if(this.dealerFinalPrice == undefined){
this.dealerFinalPrice = '';
@@ -86,14 +86,17 @@
if (this.agency1Id == undefined) {
newflag = false;
this.showToast("缁忛攢鍟嗕笉瀛樺湪锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
}
else if (this.agencyOpportunity != undefined) {
newflag = false;
this.showToast("宸茬粡杞垚杩囥�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
}
else if (this.trade != '鍐呰部') {
newflag = false;
this.showToast("涓嶆槸鍐呰锤锛屼笉鑳借浆鎴愩�愮粡閿�鍟嗙洰鏍囪浠枫�戙��","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
}
else {
var records = null;
@@ -103,9 +106,11 @@
hospitalId: this.hospitalId
}).then(result=>{
records = result;
+ console.log(records.length);
if (records == null || records.length == 0) {
newflag = false;
this.showToast("娌℃湁鏈夋晥鐨勩�愮粡閿�鍟嗗尰闄€�戙��","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
}
if (newflag) {
console.log("5");
@@ -118,6 +123,7 @@
var recTypeList = result;
if (recTypeList.length == 0) {
this.showToast("娌℃湁鎵惧埌锛岀粡閿�鍟嗚浠风殑瀹氫箟銆�","error");
+ this.dispatchEvent(new CloseActionScreenEvent());
} else {
console.log("7");
queryForRecords2({
@@ -198,6 +204,7 @@
+ encodeURIComponent(this.opportunityCategory);
console.log(url);
window.open(url);
+ this.dispatchEvent(new CloseActionScreenEvent());
} catch (error) {
console.log(error)
}
@@ -206,10 +213,8 @@
})
}
});
- console.log("4");
}
this.IsLoading = false;
- this.dispatchEvent(new CloseActionScreenEvent());
}
showToast(msg,type) {
const event = new ShowToastEvent({
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
index eb74567..c54490f 100644
--- a/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
+++ b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-03-28 15:59:44
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-09 15:20:58
+ * @LastEditTime: 2023-05-15 09:15:58
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,9 +17,9 @@
export default class LexOCSMNoToReportForReport extends LightningElement {
@api recordId;
IsLoading = true;
- OCSMAdministrativeReportNumber;
- OCSMAdministrativeReportDate;
- AwareDate;
+ theOCSMAdministrativeReportNumber;
+ theOCSMAdministrativeReportDate;
+ awareDate;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -46,9 +46,9 @@
recordId: this.recordId
}).then(result=>{
console.log(result);
- this.OCSMAdministrativeReportDate = result.OCSMAdministrativeReportDate;
- this.OCSMAdministrativeReportNumber = result.OCSMAdministrativeReportNumber;
- this.AwareDate = result.awareDate;
+ this.theOCSMAdministrativeReportDate = result.theOCSMAdministrativeReportDate;
+ this.theOCSMAdministrativeReportNumber = result.theOCSMAdministrativeReportNumber;
+ this.awareDate = result.awareDate;
this.noToReport();
}).catch(error=>{
console.log(error);
@@ -74,13 +74,13 @@
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
- if(this.OCSMAdministrativeReportNumber != undefined || this.OCSMAdministrativeReportDate != undefined ){
+ if(this.theOCSMAdministrativeReportNumber != undefined || this.theOCSMAdministrativeReportDate != undefined ){
this.showToast("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
- this.AwareDate = Date.now();
- if(this.AwareDate != undefined ){
+ this.awareDate = Date.now();
+ if(this.awareDate != undefined ){
updateForOCSMNoToReportButton({
recordId: this.recordId
}).then(result=>{
diff --git a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
index a7d8d5f..61b2ce7 100644
--- a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-07 09:02:03
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-11 11:26:11
+ * @LastEditTime: 2023-05-15 09:17:27
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -16,7 +16,7 @@
export default class LexOCSMToReport extends LightningElement {
@api recordId;
IsLoading = true;
- OCSMAdministrativeReportStatus;
+ theOCSMAdministrativeReportStatus;
awareDate;
@@ -43,7 +43,7 @@
}).then(result => {
console.log(result);
if (result != null) {
- this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
+ this.theOCSMAdministrativeReportStatus = result.theOCSMAdministrativeReportStatus;
this.awareDate = result.awareDate;
this.toReport();
}
@@ -75,7 +75,7 @@
return;
}
- if(this.OCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
+ if(this.theOCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
updateForOCSMToReportButton({
recordId: this.recordId
}).then(result =>{
diff --git a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
index 36377b4..22d1607 100644
--- a/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
+++ b/force-app/main/default/lwc/lexOpporSplite/lexOpporSplite.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-23 10:09:31
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-10 17:38:56
+ * @LastEditTime: 2023-05-15 11:06:07
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -41,16 +41,17 @@
recordId: this.recordId
}).then(result=>{
console.log(result);
- this.authorizedDBNo = result.authorizedDBNo;
- this.estimationDecision = result.estimationDecision;
- this.siDecideID = result.siDecideID;
- this.name = result.name;
- this.opportunityNo = result.opportunityNo;
- this.isAuthorized = result.isAuthorized;
+ this.authorizedDBNo = result.authorizedDBNo == undefined ? '' : result.authorizedDBNo;
+ this.estimationDecision = result.estimationDecision == undefined ? '' : result.estimationDecision;
+ this.siDecideID = result.siDecideID == undefined ? '' : result.siDecideID;
+ this.name = result.name == undefined ? '' : result.name;
+ this.opportunityNo = result.opportunityNo == undefined ? '' : result.opportunityNo;
+ this.isAuthorized = result.isAuthorized == undefined ? '' : result.isAuthorized;
this.opporSplite();
})
}
opporSplite(){
+ this.authorizedDBNo = 'test';
if(this.recordId == '宸茬粓姝�'){
this.showToast("闇�姹傝〃宸茬粓姝紝涓嶈兘鎷嗗崟","error");
}else if(this.authorizedDBNo == ''){
@@ -60,8 +61,10 @@
}else if(this.siDecideID == ''){
this.showToast("闇�姹傝〃鏈壒鍑嗭紝涓嶈兘鎷嗗崟","error");
}else if(this.recordId != '鑽夋涓�' && this.recordId != '宸叉彁浜�' && this.recordId != '宸茬粓姝�'){
+ console.log("sss");
window.open(
- this.recordId
+ "/"
+ + this.recordId
+ "/e?clone=1&retURL=%2F"
+ this.recordId + "&00N10000002Cbwh=*&CF00N10000006qHai="
+ this.name + "&00Np0000001DOwi=***&00Np0000001CxmR="
@@ -69,7 +72,7 @@
+ this.recordId + "&00N10000006qHav="
+ this.opportunityNo + "&00N10000009Glvn="
+ this.isAuthorized + "&00N10000008pnmd=1&00N10000002DXkZ=&00N10000002DXke=&00N10000002CmTf=&00N10000002Cb9P=&00N10000002DItz=&00N10000003O9oO=&00N10000003O9o4=&00N10000002CYHy=&00Np00000030gzb=&00Np0000002ajGe=&00Np00000034Qlb"
- );
+ );
}
this.dispatchEvent(new CloseActionScreenEvent());
}
diff --git a/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js b/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
index 6720168..7139eaf 100644
--- a/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
+++ b/force-app/main/default/lwc/lexQuotationProductNew/lexQuotationProductNew.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-14 17:15:33
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-14 17:20:45
+ * @LastEditTime: 2023-05-12 14:43:54
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
diff --git a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
index d968b59..fe10c67 100644
--- a/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
+++ b/force-app/main/default/lwc/lexQuotationRequest/lexQuotationRequest.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-14 11:09:28
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-04-14 11:21:24
+ * @LastEditTime: 2023-05-12 13:17:30
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -37,8 +37,8 @@
init({
recordId: this.recordId
}).then(result=>{
- this.biddingProjectNameBidId = result.biddingProjectNameBidId;
- this.estimationId = result.estimationId;
+ this.biddingProjectNameBidId = result.biddingProjectNameBidId == undefined ? '' : result.biddingProjectNameBidId;
+ this.estimationId = result.estimationId == undefined ? '' : result.estimationId;
this.quotationRequest();
})
}
diff --git a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
index b3ddb3a..a70cb25 100644
--- a/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
+++ b/force-app/main/default/lwc/lexRequestDB/lexRequestDB.js
@@ -18,6 +18,9 @@
salesAssistantName;
salesAssistantID;
profileId;
+ systemProfileId;
+ s1ProfileId;
+ s4ProfileId;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
console.log(111);
@@ -37,31 +40,35 @@
init({
recordId: this.recordId
}).then(result=>{
- this.stageName = result.stageName;
- this.sapSendOK = result.sapSendOK;
- this.cntLostCancelReport = result.cntLostCancelReport;
- this.cntLostCancelDraft = result.cntLostCancelDraft;
- this.agency1 = result.agency1;
- this.agency1Id = result.agency1Id;
- this.name = result.name;
- this.bidPlannedDate = result.bidPlannedDate;
- this.salesAssistantName = result.salesAssistantName;
- this.salesAssistantID = result.salesAssistantID;
- this.profileId = result.profileId;
+ console.log(result);
+ this.stageName = result.stageName == undefined ? '' : result.stageName;
+ this.sapSendOK = result.sapSendOK == undefined ? '' : result.sapSendOK;
+ this.cntLostCancelReport = result.cntLostCancelReport == undefined ? '' : result.cntLostCancelReport;
+ this.cntLostCancelDraft = result.cntLostCancelDraft == undefined ? '' : result.cntLostCancelDraft;
+ this.agency1 = result.agency1 == undefined ? '' : result.agency1;
+ this.agency1Id = result.agency1Id == undefined ? '' : result.agency1Id;
+ this.name = result.name == undefined ? '' : result.name;
+ this.bidPlannedDate = result.bidPlannedDate == undefined ? '' : result.bidPlannedDate.replace(/-/g, '/');;
+ this.salesAssistantName = result.salesAssistantName == undefined ? '' : result.salesAssistantName;
+ this.salesAssistantID = result.salesAssistantID == undefined ? '' : result.salesAssistantID;
+ this.profileId = result.profileId == undefined ? '' : result.profileId;
+ this.systemProfileId = result.systemProfileId == undefined ? '' : result.systemProfileId;
+ this.s1ProfileId = result.s1ProfileId == undefined ? '' : result.s1ProfileId;
+ this.s4ProfileId = result.s4ProfileId == undefined ? '' : result.s4ProfileId;
this.requestDB();
})
}
requestDB(){
var profileId = this.profileId;
- if (profileId != '00e10000000Y3o5' && profileId != '00e10000000xnp2' &&
- profileId != '00e10000000xnpH') {
+ if (profileId != this.systemProfileId && profileId != this.s1ProfileId &&
+ profileId != this.s4ProfileId) {
this.showToast("鎮ㄦ病鏈夋巿鏉冨鎵樼殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��","error");
}
// js銇牬鍚堛�佺炕瑷炽仌銈屻仧鍊ゃ亴銇с倠銇仹銆佽娉ㄦ剰
else if (this.stageName != '寮曞悎'
&& this.stageName != '璇环'
) {
- this.showToast("鐘舵��1:" + this.stageName + "銆佷笉鑳藉仛鎺堟潈鐢宠锛�","");
+ this.showToast("鐘舵��1:" + this.stageName + "銆佷笉鑳藉仛鎺堟潈鐢宠锛�","error");
}
else if (this.sapSendOK == '1') {
this.showToast("宸茬粡涓婁紶SAP銆佷笉鑳藉仛鎺堟潈鐢宠浜嗭紒","error");
diff --git a/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js b/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
index 0cb39f5..da06c20 100644
--- a/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
+++ b/force-app/main/default/lwc/lexVOCConfirm/lexVOCConfirm.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-03-27 14:08:56
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-09 10:04:33
+ * @LastEditTime: 2023-05-15 09:13:55
*/
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -17,8 +17,8 @@
export default class LexVOCConfirm extends LightningElement {
@api recordId;
status;
- VOCSatisfy;
- VOCSatisfy1;
+ satisfy;
+ satisfy1;
Isloading = true;
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
@@ -46,11 +46,8 @@
console.log(result);
if (result != null) {
this.status = result.status;
- this.VOCSatisfy = result.Satisfy;
- this.VOCSatisfy1 = result.Satisfy1;
- console.log(this.VOCSatisfy);
- console.log(this.VOCSatisfy1);
- console.log(this.status);
+ this.satisfy = result.satisfy;
+ this.satisfy1 = result.satisfy1;
this.update();
}
}).catch(error => {
@@ -80,15 +77,15 @@
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
- if (this.VOCSatisfy == undefined) {
+ if (this.satisfy == undefined) {
this.showToast("璇烽�夋嫨鏄惁婊℃剰","error");
this.dispatchEvent(new CloseActionScreenEvent());
return;
}
updateForVOCConfirmButton({
recordId: this.recordId,
- Satisfy: this.VOCSatisfy,
- Satisfy1: this.VOCSatisfy1
+ satisfy: this.sSatisfy,
+ satisfy1: this.satisfy1
}).then(result=>{
if(result){
this.showToast(result,"error");
--
Gitblit v1.9.1