From bc11d6edd670912d12da2435d696ff69656ec359 Mon Sep 17 00:00:00 2001
From: KKbes <1620284052@qq.com>
Date: 星期五, 28 七月 2023 17:59:45 +0800
Subject: [PATCH] button
---
force-app/main/default/classes/LexGuaranteeStatuAchievements.cls | 13
force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.html | 3
force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js-meta.xml | 18
force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp-meta.xml | 5
force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js | 29 +
force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.css | 2
force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp | 8
force-app/main/default/classes/LexOPDSupplementaryController.cls | 30 +
force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js-meta.xml | 11
force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js | 82 ++++
force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp-meta.xml | 5
force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js | 31 +
force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js-meta.xml | 5
force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js | 177 +++++++++
force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraController.js | 5
force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js | 43 ++
force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.html | 5
force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraHelper.js | 5
force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp | 10
force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.html | 5
force-app/main/default/classes/LexGuaranteeStatuAchievements.cls-meta.xml | 5
force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js-meta.xml | 11
force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.css | 2
force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraController.js | 5
force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js | 82 ++++
force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.html | 29 +
force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.html | 5
force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.css | 22 +
force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.html | 5
force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraHelper.js | 5
force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js | 146 +++++++
force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.html | 29 +
force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js-meta.xml | 18
force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.html | 5
force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js-meta.xml | 11
force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js | 86 ++++
force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js-meta.xml | 11
force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js-meta.xml | 11
force-app/main/default/classes/LexSubmitCampaignController.cls | 85 ++++
force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.css | 22 +
40 files changed, 1,084 insertions(+), 3 deletions(-)
diff --git a/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp
new file mode 100644
index 0000000..74f790c
--- /dev/null
+++ b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp
@@ -0,0 +1,8 @@
+<aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global">
+ <aura:attribute name="recordId" type="String" />
+ <aura:handler name="render" value="{!this}" action="{!c.closeModal}" />
+ <aura:attribute name="isDoneRendering" type="Boolean" default="false"/>
+ <div class="exampleHolder">
+ <c:lexMeetingDelayApplyCampaign recordId="{!v.recordId}" />
+ </div>
+</aura:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp-meta.xml b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp-meta.xml
new file mode 100644
index 0000000..632b900
--- /dev/null
+++ b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.css b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.css
new file mode 100644
index 0000000..a5839d4
--- /dev/null
+++ b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAura.css
@@ -0,0 +1,2 @@
+.THIS {
+}
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraController.js b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraController.js
new file mode 100644
index 0000000..bb1e8ab
--- /dev/null
+++ b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraController.js
@@ -0,0 +1,5 @@
+({
+ myAction : function(component, event, helper) {
+
+ }
+})
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraHelper.js b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraHelper.js
new file mode 100644
index 0000000..24be77e
--- /dev/null
+++ b/force-app/main/default/aura/lexMeetingDelayApplyAura/lexMeetingDelayApplyAuraHelper.js
@@ -0,0 +1,5 @@
+({
+ helperMethod : function() {
+
+ }
+})
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp
new file mode 100644
index 0000000..46d0a71
--- /dev/null
+++ b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp
@@ -0,0 +1,10 @@
+<aura:component implements="flexipage:availableForAllPageTypes,force:lightningQuickActionWithoutHeader,force:hasRecordId,lightning:actionOverride,lightning:isUrlAddressable" access="global">
+ <aura:attribute name="recordId" type="String" />
+ <aura:handler name="render" value="{!this}" action="{!c.closeModal}" />
+ <aura:attribute name="isDoneRendering" type="Boolean" default="false"/>
+ <div class="exampleHolder">
+
+ <c:lexSubmitCampaignService recordId="{!v.recordId}" />
+
+ </div>
+</aura:component>
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp-meta.xml b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp-meta.xml
new file mode 100644
index 0000000..632b900
--- /dev/null
+++ b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.cmp-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>54.0</apiVersion>
+ <description>A Lightning Component Bundle</description>
+</AuraDefinitionBundle>
diff --git a/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.css b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.css
new file mode 100644
index 0000000..a5839d4
--- /dev/null
+++ b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAura.css
@@ -0,0 +1,2 @@
+.THIS {
+}
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraController.js b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraController.js
new file mode 100644
index 0000000..bb1e8ab
--- /dev/null
+++ b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraController.js
@@ -0,0 +1,5 @@
+({
+ myAction : function(component, event, helper) {
+
+ }
+})
\ No newline at end of file
diff --git a/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraHelper.js b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraHelper.js
new file mode 100644
index 0000000..24be77e
--- /dev/null
+++ b/force-app/main/default/aura/lexSubmitCampaignServiceAura/lexSubmitCampaignServiceAuraHelper.js
@@ -0,0 +1,5 @@
+({
+ helperMethod : function() {
+
+ }
+})
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls b/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls
new file mode 100644
index 0000000..b8e0821
--- /dev/null
+++ b/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls
@@ -0,0 +1,13 @@
+public with sharing class LexGuaranteeStatuAchievements {
+ @AuraEnabled
+ public static Statu_Achievements__c init(String recordId){
+ Statu_Achievements__c res = new Statu_Achievements__c();
+ try{
+ res = [SELECT InstallDate__c FROM Statu_Achievements__c WHERE Id=:recordId];
+ return res;
+ }
+ catch(Exception e){
+ return res;
+ }
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls-meta.xml b/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls-meta.xml
new file mode 100644
index 0000000..70f89f4
--- /dev/null
+++ b/force-app/main/default/classes/LexGuaranteeStatuAchievements.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>51.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexOPDSupplementaryController.cls b/force-app/main/default/classes/LexOPDSupplementaryController.cls
index efd40d3..9de7a6a 100644
--- a/force-app/main/default/classes/LexOPDSupplementaryController.cls
+++ b/force-app/main/default/classes/LexOPDSupplementaryController.cls
@@ -96,4 +96,34 @@
}
return res;
}
+ //鏂板缓OPD璁″垝锛堢瀹わ級 瀹㈡埛涓婄殑鎸夐挳
+ @AuraEnabled
+ public static Account initNewOPDButton(String recordId){
+ Account res = new Account();
+ try{
+ res = [SELECT Id,Is_Active__c
+ FROM Account
+ WHERE Id=:recordId];
+ return res;
+ }
+ catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ return null;
+ }
+ }
+ //鏂板缓OPD璁″垝锛堣浠凤級 璇环涓婄殑鎸夐挳
+ @AuraEnabled
+ public static Opportunity initNewOPDButton2(String recordId){
+ Opportunity res = new Opportunity();
+ try{
+ res = [SELECT Id,AccountId,Name ,StageName
+ FROM Opportunity
+ WHERE Id=:recordId];
+ return res;
+ }
+ catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** e: ' + e);
+ return null;
+ }
+ }
}
\ No newline at end of file
diff --git a/force-app/main/default/classes/LexSubmitCampaignController.cls b/force-app/main/default/classes/LexSubmitCampaignController.cls
index a63c04f..8b97e05 100644
--- a/force-app/main/default/classes/LexSubmitCampaignController.cls
+++ b/force-app/main/default/classes/LexSubmitCampaignController.cls
@@ -15,15 +15,17 @@
}
@AuraEnabled
- public static void newAndUpddateCampaign(String Id,String Status){
+ public static String newAndUpddateCampaign(String Id,String Status){
try{
Campaign res = new Campaign();
res.Id = Id;
res.Status=Status;
update res;
+ return 'success';
}
catch(Exception e){
System.debug('lexSubmitCampaign,method:newAndUpddateCampaign error: '+e.getMessage());
+ return e.getMessage();
}
@@ -203,8 +205,85 @@
System.debug('lexSubmitCampaign,method:addCampaignEvent error: '+e.getMessage());
return e.getMessage();
}
-
-
}
+ //浼氳鍙樻洿鐢宠鍒楄〃鎸夐挳
+ @AuraEnabled
+ public static Campaign initMeetingDelayApply(String recordId){
+ Campaign res = new Campaign();
+ try {
+ res = [SELECT Id,PlanBackData__c,Meeting_Cooperate__c,Meeting_Cooperate2__c,
+ Meeting_Cooperate3__c,Meeting_Cooperate4__c,Meeting_Type__c,HostName__c,
+ cooperatorCompany__c,StartDate,EndDate,IF_Approved__c,Status,CampaignStatus__c,IF_Submit__c,
+ Meeting_Approved_No__c
+ FROM Campaign
+ WHERE Id = :recordId];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:initMeetingDelayApply error: '+e.getMessage());
+ return null;
+ }
+ }
+
+ @AuraEnabled
+ public static List<meeting_delay_apply__c> findQualified1(String CampaignId){
+ List<meeting_delay_apply__c> res = new List<meeting_delay_apply__c>();
+ try {
+ res = [SELECT Id FROM meeting_delay_apply__c
+ WHERE Status__c = '瀹℃壒涓�' And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static List<Consum_Apply__c> findQualified2(String CampaignId){
+ List<Consum_Apply__c> res = new List<Consum_Apply__c>();
+ try {
+ res = [SELECT Id FROM Consum_Apply__c
+ WHERE Status__c Not in ('鑽夋涓�','鍙栨秷') And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static List<Rental_Apply__c> findQualified3(String CampaignId){
+ List<Rental_Apply__c> res = new List<Rental_Apply__c>();
+ try {
+ res = [SELECT Id FROM Rental_Apply__c
+ WHERE Status__c Not in ('鑽夋涓�','鍙栨秷') And Campaign__c =:CampaignId ];
+ return res;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:findQualified error: '+e.getMessage());
+ return res;
+ }
+
+ }
+
+ @AuraEnabled
+ public static String getRecordIdByName(String Name){
+ try {
+ List<RecordType> res = [Select Id, Name From RecordType Where Name LIKE :Name limit 1];
+ String needId = res[0].Id;
+ return needId;
+ }
+ catch (Exception e) {
+ System.debug('lexSubmitCampaign,method:getRecordIdByName error: '+e.getMessage());
+ return '';
+ }
+
+ }
+
+
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.html b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.html
new file mode 100644
index 0000000..c444cc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Attachment" 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/lexAgenceCopyPI/lexAgenceCopyPI.js b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js
new file mode 100644
index 0000000..cdacba3
--- /dev/null
+++ b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js
@@ -0,0 +1,31 @@
+import { LightningElement, track, wire,api } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+export default class lexAgenceCopyPI extends LightningElement {
+
+ @api recordId;
+ IsLoading=true;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+
+ connectedCallback(){
+ this.CopyPI().then(result => {
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+
+
+ async CopyPI(){
+ window.location.href = "/"+this.recordId+"/e?newclone=1";
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js-meta.xml b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js-meta.xml
new file mode 100644
index 0000000..0d273fe
--- /dev/null
+++ b/force-app/main/default/lwc/lexAgenceCopyPI/lexAgenceCopyPI.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexAgenceCopyPI">
+ <apiVersion>51.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/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.css b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.css
new file mode 100644
index 0000000..95c1c55
--- /dev/null
+++ b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.css
@@ -0,0 +1,22 @@
+.holder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
+.toast{
+ border: 1px solid #c9c9c9;
+ border-radius: 10px;
+ width: 50%;
+ margin: 0 auto;
+ font-size: 18px;
+ font-weight: bold;
+ padding: 10px 20px;
+ background: #feb75d;
+ display: flex;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.html b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.html
new file mode 100644
index 0000000..b690487
--- /dev/null
+++ b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.html
@@ -0,0 +1,29 @@
+<template>
+ <div class="holder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+ <div if:false={IsLoading} class="toast">
+ <span style="padding: 10px;">{msg}</span>
+ <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+ <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+ title="Close" style="color: black;"></lightning-icon>
+ <span class="slds-assistive-text">Close</span>
+ </button>
+ <!-- <lightning:icon iconName="utility:warning" alternativeText="Warning!" title="Warning" /> -->
+ </div>
+ <!-- <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" if:false={IsLoading}>
+ <div class="slds-modal__container">
+ <header class="slds-modal__header" style="color: black;">
+ <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">璇烽�夋嫨鍊熷嚭澶囧搧涓�瑙堣褰�</h2>
+ </header>
+
+ <div style="height: 100px;">
+ <div class="rewardDetailsTitle">Details</div>
+ </div>
+
+ <footer class="slds-modal__footer">
+ <lightning-button variant="brand" label="纭畾" class="slds-var-m-left_x-small" onclick={handleSubmit}></lightning-button>
+ </footer>
+ </div>
+ </section> -->
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js
new file mode 100644
index 0000000..e4ae3be
--- /dev/null
+++ b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js
@@ -0,0 +1,43 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/LexGuaranteeStatuAchievements.init';
+export default class lexGuaranteePeriodAlterationApplication extends LightningElement {
+ @api recordId;
+
+ @api rentalApplyIds;
+ IsLoading=true;
+ //鎻愮ず淇℃伅
+ msg;
+ hasError;
+ rentalApplyIds;
+ Statu_Achievements__c;
+
+ connectedCallback(){
+ init({recordId:this.recordId}).then(res=>{
+ this.Statu_Achievements__c=res;
+ this.guaranteePeriodAlterationApplication().then(res=>{
+ this.IsLoading=false;
+
+ if(this.msg==""){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this.closeAction();
+ }
+
+ })
+ })
+ }
+
+ async guaranteePeriodAlterationApplication(){
+ let hasError ='0';
+ console.log(this.Statu_Achievements__c.InstallDate__c );
+ if (this.Statu_Achievements__c.InstallDate__c != '' && this.Statu_Achievements__c.InstallDate__c !=undefined) {
+ window.open('/apex/AssetGuaranteePeriodAlteration?Statu_AchievementsId='+this.recordId)
+ } else {
+ this.msg='璇ユ敞娈�"瀹夎鏃ユ湡"涓虹┖锛屼笉鑳借繘琛屼繚淇湡鍙樻洿';
+ hasError='1';
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js-meta.xml b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js-meta.xml
new file mode 100644
index 0000000..9befdc9
--- /dev/null
+++ b/force-app/main/default/lwc/lexGuaranteePeriodAlterationApplication/lexGuaranteePeriodAlterationApplication.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSIAbortBtn">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.html b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.html
new file mode 100644
index 0000000..c444cc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Attachment" 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/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js
new file mode 100644
index 0000000..4f4f61c
--- /dev/null
+++ b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js
@@ -0,0 +1,177 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+
+
+import init from '@salesforce/apex/LexSubmitCampaignController.initMeetingDelayApply';
+import findQualified1 from '@salesforce/apex/LexSubmitCampaignController.findQualified1';
+import findQualified2 from '@salesforce/apex/LexSubmitCampaignController.findQualified2';
+import findQualified3 from '@salesforce/apex/LexSubmitCampaignController.findQualified3';
+import getRecordIdByName from '@salesforce/apex/LexSubmitCampaignController.getRecordIdByName';
+import changeCampaign from '@salesforce/apex/OpdPlanWebService.changeCampaign';
+const event1 = new ShowToastEvent({
+ message:
+ "瀛樺湪瀹℃壒涓殑浼氳寤舵湡鐢宠锛屾棤娉曞啀娆℃彁浜ゅ欢鏈熺敵璇枫��!",
+ variant : "warning"
+});
+const event2 = new ShowToastEvent({
+ message:
+ "鑰楁潗鍊熷嚭鐢宠鐨勭姸鎬佹湭澶勪簬`鑽夋涓璥鎴朻鍙栨秷`锛岃浼氳鍙兘鍙栨秷,鏃犳硶寤舵湡銆�",
+ variant : "warning"
+});
+const event3 = new ShowToastEvent({
+ message:
+ "澶囧搧鍊熷嚭鐢宠鐨勭姸鎬佹湭澶勪簬`鑽夋涓璥鎴朻鍙栨秷`锛岃浼氳鍙兘鍙栨秷,鏃犳硶寤舵湡銆�",
+ variant : "warning"
+});
+const event4 = new ShowToastEvent({
+ message:
+ "璇ユ椿鍔ㄤ俊鎭凡鍙戦�佸埌鏅烘収鍖荤枟锛岃纭鍚庡啀鎿嶄綔",
+ variant : "warning"
+});
+const event5 = new ShowToastEvent({
+ message:
+ "璇ヤ細璁笉鍦ㄥ叕寮�涓垨鐢宠涓紝鍙兘鍙栨秷锛屾棤娉曞欢鏈熴��",
+ variant : "warning"
+});
+export default class lexMeetingDelayApplyCampaign extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading=true;
+ Campaign;
+
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ console.log(this.recordId);
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({recordId:this.recordId}).then(res=>{
+ console.log(res);
+ this.Campaign=res;
+ this.meetingDelayApply().then(res=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+
+ })
+ })
+ }
+
+
+ async meetingDelayApply(){
+ var hasError='0';
+ var CampaignId = this.Campaign.Id;
+ var PlanBackData= this.Campaign.PlanBackData__c;
+ var Meeting_Cooperate = this.Campaign.Meeting_Cooperate__c;
+ var Meeting_Cooperate2 = this.Campaign.Meeting_Cooperate2__c;
+ var Meeting_Cooperate3 = this.Campaign.Meeting_Cooperate3__c;
+ var Meeting_Cooperate4 = this.Campaign.Meeting_Cooperate4__c;
+ var MeetingType = this.Campaign.Meeting_Type__c;
+ var HostName = this.Campaign.HostName__c;
+ var cooperatorCompany = this.Campaign.cooperatorCompany__c;
+ var meetingStartDate = this.Campaign.StartDate;
+ var meetingEndDate = this.Campaign.EndDate;
+ //OBPM LY 20211221 start
+ var IFApproved = this.Campaign.IF_Approved__c;
+ //OBPM LY 20211221 end
+ var status = this.Campaign.Status;
+ var CampaignStatus = this.Campaign.CampaignStatus__c; // 20221201 ljh DB202211527935 add
+ var IF_Submit__c = this.Campaign.IF_Submit__c;
+ var MeetingApprovedNoId = this.Campaign.Meeting_Approved_No__c;
+
+
+ var meetingSize = await findQualified1();
+ if(meetingSize.length>0){
+ this.dispatchEvent(event1);
+ return;
+ }
+
+ var consumSize = await findQualified2();
+ if(consumSize.length>0){
+ this.dispatchEvent(event2);
+ return;
+ }
+
+ var rentalSize = await findQualified3();
+ if(rentalSize.length>0){
+ this.dispatchEvent(event3);
+ return;
+ }
+ //娲诲姩淇℃伅宸茬粡鍙戦�佺粰鏅烘収鍖荤枟
+ if(IF_Submit__c != 0){
+ this.dispatchEvent(event4);
+ }
+
+ // 浼氳寤舵湡妫�鏌� SWAG-BVH3Q7 20201120
+ var rtn = await changeCampaign({campaignId:CampaignId});
+ if (rtn != 'OK') {
+ const event5 = new ShowToastEvent({
+ message:
+ rtn,
+ variant : "warning"
+ });
+ this.dispatchEvent(event5);
+ return;
+ }
+ // 20221201 ljh DB202211527935 add start
+ // 瀵逛簬1 瀛︿細/浼氳鍜�6 钀ヤ笟閮ㄤ笓鐢ㄤ細璁繖涓ょ浼氳绫诲瀷锛岃灏嗗叕寮�涓垨鐢宠涓笉鍏佽鎻愪氦鍙樻洿鐢宠鐨勭害鏉燂紝鏀瑰埌浼氳鐘舵�佸瓧娈点��
+ var recordTypeId1= await getRecordIdByName({Name : '%瀛︿細/浼氳%'});
+ var recordTypeId2= await getRecordIdByName({Name : '%钀ヤ笟閮ㄤ笓鐢ㄤ細璁�%'});
+ //寮�鍙戠幆澧冩病鏈夋recordType
+ var recordTypeId3= await getRecordIdByName({Name : '%浼氳寤舵湡%'});
+ var canDelayFlag = false;
+ if((this.Campaign.RecordTypeId == recordTypeId1 || this.Campaign.RecordTypeId == recordTypeId2)&&(CampaignStatus == '鍏紑涓�' || CampaignStatus == '鐢宠涓�')){
+ canDelayFlag = true;
+ }else if(!(this.Campaign.RecordTypeId == recordTypeId1 || this.Campaign.RecordTypeId == recordTypeId2)&& (status == '鍏紑涓�' || status == '鐢宠涓�')){
+ canDelayFlag = true;
+ }
+ if(!canDelayFlag){
+ const defaultValues = encodeDefaultFieldValues({
+ campaign__c: CampaignId,
+ HostName__c: HostName,
+ cooperatorCompany__c: cooperatorCompany,
+ meetingStartDate: meetingStartDate,
+ meeting_end_date__c: meetingEndDate,
+ Meeting_Type__c: MeetingType,
+ IF_Approved__c: IFApproved,
+ dismantling_date__c: PlanBackData,
+ Meeting_Cooperate1__c:Meeting_Cooperate,
+ Meeting_Cooperate2__c: Meeting_Cooperate2,
+ Meeting_Cooperate3__c: Meeting_Cooperate3,
+ Meeting_Cooperate4__c:Meeting_Cooperate4,
+ MeetingApproved__c: MeetingApprovedNoId,
+ retURL : CampaignId
+ });
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'meeting_delay_apply__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId : recordTypeId3
+ }
+ });
+ }else{
+ this.dispatchEvent(event5);
+ return;
+ }
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js-meta.xml b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js-meta.xml
new file mode 100644
index 0000000..53eafe6
--- /dev/null
+++ b/force-app/main/default/lwc/lexMeetingDelayApplyCampaign/lexMeetingDelayApplyCampaign.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign">
+ <apiVersion>51.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/lexNewInsReport/lexNewInsReport.css b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.css
new file mode 100644
index 0000000..95c1c55
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.css
@@ -0,0 +1,22 @@
+.holder{
+ position: relative;
+ display: inline-block;
+ width: 80px;
+ height: 80px;
+ text-align: center;
+}
+
+.container .uiContainerManager{
+ display : none !important;
+}
+.toast{
+ border: 1px solid #c9c9c9;
+ border-radius: 10px;
+ width: 50%;
+ margin: 0 auto;
+ font-size: 18px;
+ font-weight: bold;
+ padding: 10px 20px;
+ background: #feb75d;
+ display: flex;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.html b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.html
new file mode 100644
index 0000000..b690487
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.html
@@ -0,0 +1,29 @@
+<template>
+ <div class="holder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+ <div if:false={IsLoading} class="toast">
+ <span style="padding: 10px;">{msg}</span>
+ <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+ <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+ title="Close" style="color: black;"></lightning-icon>
+ <span class="slds-assistive-text">Close</span>
+ </button>
+ <!-- <lightning:icon iconName="utility:warning" alternativeText="Warning!" title="Warning" /> -->
+ </div>
+ <!-- <section role="dialog" tabindex="-1" class="slds-modal slds-fade-in-open" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" if:false={IsLoading}>
+ <div class="slds-modal__container">
+ <header class="slds-modal__header" style="color: black;">
+ <h2 id="modal-heading-01" class="slds-modal__title slds-hyphenate">璇烽�夋嫨鍊熷嚭澶囧搧涓�瑙堣褰�</h2>
+ </header>
+
+ <div style="height: 100px;">
+ <div class="rewardDetailsTitle">Details</div>
+ </div>
+
+ <footer class="slds-modal__footer">
+ <lightning-button variant="brand" label="纭畾" class="slds-var-m-left_x-small" onclick={handleSubmit}></lightning-button>
+ </footer>
+ </div>
+ </section> -->
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js
new file mode 100644
index 0000000..508bacb
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js
@@ -0,0 +1,29 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexNewInsReport extends LightningElement {
+ @api recordId;
+
+ @api rentalApplyIds;
+ IsLoading=true;
+ //鎻愮ず淇℃伅
+ msg;
+ hasError;
+ rentalApplyIds;
+
+ connectedCallback(){
+ this.newInsReport().then(res=>{
+ this.IsLoading=false;
+ if(this.msg==""){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this.closeAction();
+ }
+
+ });
+ }
+
+ async newInsReport(){
+ window.open("/apex/OFSInsReportLayout?hpid"+this.recordId+"&rt=EndoscopeSystem", "_blank");
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js-meta.xml b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js-meta.xml
new file mode 100644
index 0000000..9befdc9
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewInsReport/lexNewInsReport.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSIAbortBtn">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ <target>lightning__FlowScreen</target>
+ </targets>
+ <targetConfigs>
+ <targetConfig targets="lightning__FlowScreen">
+ <property name="recordId" type="String" label="recordId"/>
+ <property name="rentalApplyIds" type="String[]" label="rentalApplyIds"/>
+ </targetConfig>
+ </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.html b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.html
new file mode 100644
index 0000000..c444cc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Attachment" 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/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js
new file mode 100644
index 0000000..de32fcf
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js
@@ -0,0 +1,82 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+const event1 = new ShowToastEvent({
+ message:
+ "绉戝鐘舵�佷负鏃犳晥锛屼笉鍏佽鏂板缓OPD璁″垝",
+ variant : "warning"
+});
+import init from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton';
+export default class lexNewOPDButtonAccount extends NavigationMixin(LightningElement) {
+
+ @api recordId;
+ IsLoading=true;
+ Account;
+
+
+ @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(res=>{
+ if (res!=null) {
+ console.log(res);
+ this.Account=res;
+ this.newOPDButtonAccount().then(res=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+ else{
+ const eventInItError = new dispatchEvent({
+ message : '椤甸潰鍒濆鍖栭敊璇紝璇疯仈绯荤鐞嗗憳',
+ variant : 'error'
+ });
+ this.dispatchEvent(eventInItError);
+ return;
+ }
+
+ });
+ }
+
+
+ async newOPDButtonAccount(){
+ var AccLab_active=this.Account.Is_Active__c;
+ if(AccLab_active =="鐒″姽"){
+ this.dispatchEvent(event1);
+ return;
+ }
+ const defaultValues = encodeDefaultFieldValues({
+ Account_Laboratory__c: this.recordId,
+ OPDType__c: '绉戝',
+ Name : '*',
+ retURL : '%2F' + this.recordId
+ });
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'OPDPlan__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ }
+ });
+
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js-meta.xml b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js-meta.xml
new file mode 100644
index 0000000..53eafe6
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonAccount/lexNewOPDButtonAccount.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign">
+ <apiVersion>51.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/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.html b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.html
new file mode 100644
index 0000000..c444cc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Attachment" 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/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js
new file mode 100644
index 0000000..fac96cc
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js
@@ -0,0 +1,82 @@
+import { LightningElement,api, track, wire } from 'lwc';
+import {CurrentPageReference} from 'lightning/navigation';
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+const event1 = new ShowToastEvent({
+ message:
+ "璇环鐘舵�佷负锛氬け鍗曘�佸彇娑堛�佹敞娈嬨�佸彂璐с�佸畬姣曪紝涓嶅厑璁稿垱寤篛PD璁″垝",
+ variant : "warning"
+});
+import init from '@salesforce/apex/LexOPDSupplementaryController.initNewOPDButton2';
+export default class lexNewOPDButtonOpportunity extends NavigationMixin(LightningElement) {
+ @api recordId;
+ IsLoading=true;
+ Opportunity;
+
+
+ @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(res=>{
+ if (res!=null) {
+ console.log(res);
+ this.Opportunity=res;
+ this.newOPDButtonOpportunity().then(res=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+ else{
+ const eventInItError = new dispatchEvent({
+ message : '椤甸潰鍒濆鍖栭敊璇紝璇疯仈绯荤鐞嗗憳',
+ variant : 'error'
+ });
+ this.dispatchEvent(eventInItError);
+ return;
+ }
+
+ });
+ }
+
+
+ async newOPDButtonOpportunity(){
+ var oppstagename =this.Opportunity.StageName;
+ if(oppstagename=='鏁楁垿' || oppstagename=='鍓婇櫎' || oppstagename=='娉ㄦ畫' || oppstagename=='鍑鸿嵎' || oppstagename=='瀹屼簡'){
+ this.dispatchEvent(event1);
+ return;
+ }
+ const defaultValues = encodeDefaultFieldValues({
+ Related_Opportunity1_ID__c: this.recordId,
+ Account_Laboratory__c: this.Opportunity.AccountId,
+ Related_Opportunity1__c : this.Opportunity.Name,
+ OPDType__c : '璇环',
+ Name : '*',
+ retURL : '%2F' + this.recordId
+ });
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'OPDPlan__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ }
+ });
+
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js-meta.xml b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js-meta.xml
new file mode 100644
index 0000000..53eafe6
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOPDButtonOpportunity/lexNewOPDButtonOpportunity.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign">
+ <apiVersion>51.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/lexSubmitCampaign/lexSubmitCampaign.html b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.html
new file mode 100644
index 0000000..c444cc3
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.html
@@ -0,0 +1,5 @@
+<template>
+ <div class="Attachment" 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/lexSubmitCampaign/lexSubmitCampaign.js b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js
new file mode 100644
index 0000000..7276d48
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js
@@ -0,0 +1,146 @@
+import { LightningElement, track, wire,api } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+const event1 = new ShowToastEvent({
+ message:
+ "璇峰~鍐欐槸鍚﹂渶瑕佸嚭鍊熷鍝�!",
+ variant : "warning"
+});
+const event2 = new ShowToastEvent({
+ message:
+ "濡傛灉浼氳鍙戠敓璐圭敤锛岃濉啓浼氳璐圭敤銆�!",
+ variant : "warning"
+});
+const event3 = new ShowToastEvent({
+ message:
+ "浼氳鏈粨鏉燂紝涓嶅厑璁告彁浜や細璁姤鍛娿��!",
+ variant : "warning"
+});
+const event4 = new ShowToastEvent({
+ message:
+ "涓嶈兘鎻愪氦瀹℃壒锛岃纭浼氳鐘舵��!",
+ variant : "warning"
+});
+
+import init from '@salesforce/apex/LexSubmitCampaignController.initSubmit';
+import newAndUpddateCampaign from '@salesforce/apex/LexSubmitCampaignController.newAndUpddateCampaign';
+import submitApprovalRequest from '@salesforce/apex/LexSubmitCampaignController.submitApprovalRequest';
+export default class lexSubmitCampaign extends LightningElement {
+
+ @api recordId;
+ IsLoading=true;
+ Campaign;
+
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ console.log(this.recordId);
+ }
+ }
+ }
+
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ if (result != null) {
+ this.Campaign = result;
+ console.log(this.Campaign);
+ this.submit().then(result=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+ }).catch(error => {
+ const eventInItError = new ShowToastEvent({
+ message:
+ error.message,
+ variant : 'error'
+ });
+ this.dispatchEvent(eventInItError);
+ });
+
+ }
+
+
+ async submit(){
+ var checkUpdate =0;
+ var status = this.Campaign.Status;
+ var statusnext = '';
+ var isLend = this.Campaign.Is_LendProduct__c;
+ // CHAN-C4E8GM Start
+ var EndDate = new Date(this.Campaign.EndDate);
+ // CHAN-C4E8GM End
+ if (status =='鑽夋涓�' || status =='璁″垝鎻愪氦'){
+ if(isLend == '' || isLend == undefined){
+ this.dispatchEvent(event1);
+ return;
+ }
+ statusnext = "璁″垝鎻愪氦";
+
+ } else if ((status =='鍏紑涓�' || status =='鎶ュ憡鎻愪氦') && (new Date()>= EndDate)) {
+ this.dispatchEvent(event2);
+ statusnext = "鎶ュ憡鎻愪氦";
+ // CHAN-C4E8GM Start
+ } else if ((status =='鍏紑涓�' || status =='鎶ュ憡鎻愪氦') && (new Date()< EndDate)) {
+ this.dispatchEvent(event3);
+ return;
+ // CHAN-C4E8GM End
+ } else {
+ this.dispatchEvent(event4);
+ return;
+ }
+ console.log(statusnext);
+ await newAndUpddateCampaign({Id : this.recordId , Status : statusnext }).then(result=>{
+ if(result !='success'){
+ const eventErroe1 = new ShowToastEvent({
+ message:
+ result,
+ variant : 'error'
+ });
+ checkUpdate +=1;
+ this.dispatchEvent(eventErroe1);
+ }
+ });
+ if(checkUpdate!=0){
+ return;
+ }
+ await submitApprovalRequest({recordId : this.recordId}).then(result=>{
+ console.log(result);
+ if(result!=null){
+ //鏇存柊鐘舵��
+ newAndUpddateCampaign({Id : this.recordId , Status : status}).then(result=>{
+ if(result!='success'){
+ const eventErroe3 = new ShowToastEvent({
+ message:
+ result,
+ variant : 'error'
+ });
+ checkUpdate +=1;
+ this.dispatchEvent(eventErroe3);
+ }
+ });
+ if(checkUpdate!=0){
+ return;
+ }
+ const eventFail = new ShowToastEvent({
+ message:
+ result,
+ variant : 'error'
+ });
+ this.dispatchEvent(eventFail);
+ alert('2222');
+ return;
+ }
+ });
+ window.location.reload();
+
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js-meta.xml b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js-meta.xml
new file mode 100644
index 0000000..53eafe6
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaign/lexSubmitCampaign.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaign">
+ <apiVersion>51.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/lexSubmitCampaignService/lexSubmitCampaignService.html b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.html
new file mode 100644
index 0000000..af9fa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.html
@@ -0,0 +1,3 @@
+<template>
+
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js
new file mode 100644
index 0000000..0b452fb
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js
@@ -0,0 +1,86 @@
+import { LightningElement, track, wire,api } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+const event1 = new ShowToastEvent({
+ message:
+ "涓嶈兘鎻愪氦瀹℃壒锛岃纭浼氳鐘舵��!",
+ variant : "warning"
+});
+import init from '@salesforce/apex/LexSubmitCampaignController.initSubmit';
+import newAndUpddateCampaign from '@salesforce/apex/LexSubmitCampaignController.newAndUpddateCampaign';
+import submitApprovalRequest from '@salesforce/apex/LexSubmitCampaignController.submitApprovalRequest';
+export default class lexSubmitCampaignService extends LightningElement {
+ @api recordId;
+ IsLoading=true;
+ Campaign;
+
+ @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.Campaign = result;
+ this.submitCampaignService().then(result=>{
+ this.IsLoading=false;
+ this.dispatchEvent(new CloseActionScreenEvent());
+ });
+ }
+ });
+
+ }
+
+
+ async submitCampaignService(){
+ var checkUpdate=0;
+ var status = this.Campaign.Status;
+ var statusnext = "";
+ if (status =='鑽夋涓�'){
+ } else {
+ this.dispatchEvent(event1);
+ return;
+ }
+ await submitApprovalRequest({recordId : this.recordId}).then(result=>{
+ console.log(result);
+ if(result!=null){
+ //鏇存柊鐘舵��
+ newAndUpddateCampaign({Id : this.recordId , Status : status}).then(result=>{
+ if(result!='success'){
+ const eventErroe3 = new ShowToastEvent({
+ message:
+ result,
+ variant : 'error'
+ });
+ checkUpdate +=1;
+ this.dispatchEvent(eventErroe3);
+ }
+ });
+ if(checkUpdate!=0){
+ return;
+ }
+ const eventFail = new ShowToastEvent({
+ message:
+ result,
+ variant : 'error'
+ });
+ this.dispatchEvent(eventFail);
+ return;
+ }
+ });
+
+ window.location.reload();
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js-meta.xml b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js-meta.xml
new file mode 100644
index 0000000..beedb52
--- /dev/null
+++ b/force-app/main/default/lwc/lexSubmitCampaignService/lexSubmitCampaignService.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSubmitCampaignService">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
--
Gitblit v1.9.1