From 363e5095829f4c557948923fb2df653912c244bb Mon Sep 17 00:00:00 2001
From: liwentao <1376563863@qq.com>
Date: 星期四, 20 七月 2023 17:55:11 +0800
Subject: [PATCH] 营业 SI业务文件按钮: 新建SI业务文件 询价按钮: 新規引合 新建询价 联系人按钮: 新規担当者 新建客户人员 新建社内员工 新建产品/功能评价表
---
force-app/main/default/classes/lexSICreateBTNController.cls | 18 +
force-app/main/default/lwc/lexCreateContact/lexCreateContact.js | 68 ++++
force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js-meta.xml | 11
force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js-meta.xml | 11
force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.html | 16 +
force-app/main/default/lwc/lexCreateContact/lexCreateContact.html | 6
force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js | 73 ++++
force-app/main/default/classes/lexCreateInternalStaffController.cls-meta.xml | 5
force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls | 40 ++
force-app/main/default/classes/lexCreateJxsController.cls | 23 +
force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js-meta.xml | 18 +
force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.html | 6
force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js | 72 ++++
force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.html | 6
force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js | 70 ++++
force-app/main/default/classes/lexNewOpportunityController.cls-meta.xml | 5
force-app/main/default/classes/lexCreateJxsController.cls-meta.xml | 5
force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js | 58 +++
force-app/main/default/classes/lexSICreateBTNController.cls-meta.xml | 5
force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js | 68 ++++
force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js-meta.xml | 11
force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.html | 6
force-app/main/default/classes/lexNewOpportunityController.cls | 32 ++
force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js | 167 ++++++++++
force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js-meta.xml | 11
force-app/main/default/classes/lexCreateInternalStaffController.cls | 22 +
force-app/main/default/lwc/lexCreateContact/lexCreateContact.js-meta.xml | 18 +
force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.html | 6
force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.html | 6
force-app/main/default/classes/lexCreateContactController.cls-meta.xml | 5
force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls-meta.xml | 5
force-app/main/default/classes/lexCreateContactController.cls | 22 +
force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js-meta.xml | 11
33 files changed, 906 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/lexCreateContactController.cls b/force-app/main/default/classes/lexCreateContactController.cls
new file mode 100644
index 0000000..34cedb2
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateContactController.cls
@@ -0,0 +1,22 @@
+public with sharing class lexCreateContactController {
+ public lexCreateContactController() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ List<RecordType> rL=[SELECT id from recordType where name='鍖诲斧' and SObjectType='Contact'];
+ res.recordTypeId=rL.get(0).Id;
+ List<Account> aL=[SELECT Department_Class__c from account where id=:recordId ];
+ res.StrategicDeptClassC=aL.get(0).Department_Class__c;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ class InitData{
+ @AuraEnabled public String recordTypeId;
+ @AuraEnabled public String StrategicDeptClassC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCreateContactController.cls-meta.xml b/force-app/main/default/classes/lexCreateContactController.cls-meta.xml
new file mode 100644
index 0000000..d75b058
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateContactController.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>
diff --git a/force-app/main/default/classes/lexCreateInternalStaffController.cls b/force-app/main/default/classes/lexCreateInternalStaffController.cls
new file mode 100644
index 0000000..e351f4b
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateInternalStaffController.cls
@@ -0,0 +1,22 @@
+public with sharing class lexCreateInternalStaffController {
+ public lexCreateInternalStaffController() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ List<RecordType> rL=[SELECT id from recordType where name='绀惧唴鍛樺伐' and SObjectType='Contact'];
+ res.recordTypeId=rL.get(0).Id;
+ List<Account> aL=[SELECT Department_Class__c from account where id=:recordId ];
+ res.StrategicDeptClassC=aL.get(0).Department_Class__c;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ class InitData{
+ @AuraEnabled public String recordTypeId;
+ @AuraEnabled public String StrategicDeptClassC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCreateInternalStaffController.cls-meta.xml b/force-app/main/default/classes/lexCreateInternalStaffController.cls-meta.xml
new file mode 100644
index 0000000..70f89f4
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateInternalStaffController.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/lexCreateJxsController.cls b/force-app/main/default/classes/lexCreateJxsController.cls
new file mode 100644
index 0000000..800c7dc
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateJxsController.cls
@@ -0,0 +1,23 @@
+public with sharing class lexCreateJxsController {
+ public lexCreateJxsController() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ List<RecordType> rL=[SELECT id from recordType where name='璨╁2搴�' and SObjectType='Contact'];
+ res.recordTypeId=rL.get(0).Id;
+ res.recordTypeId=res.recordTypeId.substring(0,15);
+ List<Account> aL=[SELECT Department_Class__c from account where id=:recordId ];
+ res.StrategicDeptClassC=aL.get(0).Department_Class__c;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ class InitData{
+ @AuraEnabled public String recordTypeId;
+ @AuraEnabled public String StrategicDeptClassC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCreateJxsController.cls-meta.xml b/force-app/main/default/classes/lexCreateJxsController.cls-meta.xml
new file mode 100644
index 0000000..70f89f4
--- /dev/null
+++ b/force-app/main/default/classes/lexCreateJxsController.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/lexNewOnLineSurvey2Controller.cls b/force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls
new file mode 100644
index 0000000..3521ec0
--- /dev/null
+++ b/force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls
@@ -0,0 +1,40 @@
+public with sharing class lexNewOnLineSurvey2Controller {
+ public lexNewOnLineSurvey2Controller() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ List<Contact> r= [SELECT CreatedById from Contact where id=:recordId];
+ res.CreatedById=r.get(0).CreatedById;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ // @AuraEnabled
+ // public static InitData initForNewOnLineSurveyButton(String recordId){
+ // InitData res = new InitData();
+ // try {
+ // Report__c re = [
+ // select
+ // Date__c,
+ // Practitioner1__c,
+ // OwnerId
+ // from Report__c where Id =: recordId
+ // ];
+ // res.ownerId = re.OwnerId;
+ // res.datec = re.Date__c;
+ // res.practitioner1 = re.Practitioner1__c;
+ // } catch (Exception e) {
+ // throw new AuraHandledException(e.getMessage());
+ // }
+ // return res;
+ // }
+ class InitData{
+ @AuraEnabled public String Name;
+ @AuraEnabled public String CreatedByNameC;
+ @AuraEnabled public String CreatedById;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls-meta.xml b/force-app/main/default/classes/lexNewOnLineSurvey2Controller.cls-meta.xml
new file mode 100644
index 0000000..d75b058
--- /dev/null
+++ b/force-app/main/default/classes/lexNewOnLineSurvey2Controller.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>
diff --git a/force-app/main/default/classes/lexNewOpportunityController.cls b/force-app/main/default/classes/lexNewOpportunityController.cls
new file mode 100644
index 0000000..da7ebfc
--- /dev/null
+++ b/force-app/main/default/classes/lexNewOpportunityController.cls
@@ -0,0 +1,32 @@
+public with sharing class lexNewOpportunityController {
+ public lexNewOpportunityController() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ // String i=Schema.SObjectType.Opportunity.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
+ List<recordType> r=[SELECT Id from recordType where name='寮曞悎'];
+ res.recordTypeId=r.get(0).Id;
+ List<Account> accl=[SELECT Hospital__c,Department_Class__c,Department_Class_Wd__c from Account where id=:recordId];
+ res.hospitalC=accl.get(0).Hospital__c;
+ res.departmentClassC=accl.get(0).Department_Class__c;
+ res.departmentClassWdC=accl.get(0).Department_Class_Wd__c;
+ String userId=UserInfo.getUserId();
+ List<User> ul=[SELECT Province_Text__c from user where id=:userId];
+ res.provinceTextC=ul.get(0).Province_Text__c;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ class InitData{
+ @AuraEnabled public String recordTypeId;
+ @AuraEnabled public String recordTypeId2;
+ @AuraEnabled public String hospitalC;
+ @AuraEnabled public String departmentClassC;
+ @AuraEnabled public String departmentClassWdC;
+ @AuraEnabled public String provinceTextC;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexNewOpportunityController.cls-meta.xml b/force-app/main/default/classes/lexNewOpportunityController.cls-meta.xml
new file mode 100644
index 0000000..d75b058
--- /dev/null
+++ b/force-app/main/default/classes/lexNewOpportunityController.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>
diff --git a/force-app/main/default/classes/lexSICreateBTNController.cls b/force-app/main/default/classes/lexSICreateBTNController.cls
new file mode 100644
index 0000000..6d3dd99
--- /dev/null
+++ b/force-app/main/default/classes/lexSICreateBTNController.cls
@@ -0,0 +1,18 @@
+public with sharing class lexSICreateBTNController {
+ public lexSICreateBTNController() {
+
+ }
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new InitData();
+ try {
+ // res.recordTypeId = Schema.SObjectType.SI_Attachment__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return res;
+ }
+ class InitData{
+ @AuraEnabled public String recordTypeId;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexSICreateBTNController.cls-meta.xml b/force-app/main/default/classes/lexSICreateBTNController.cls-meta.xml
new file mode 100644
index 0000000..d75b058
--- /dev/null
+++ b/force-app/main/default/classes/lexSICreateBTNController.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>
diff --git a/force-app/main/default/lwc/lexCreateContact/lexCreateContact.html b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.html
new file mode 100644
index 0000000..b62fe53
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="lexNewOpportunityAgencyHolder" 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/lexCreateContact/lexCreateContact.js b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.js
new file mode 100644
index 0000000..cef51dc6
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.js
@@ -0,0 +1,68 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexCreateContactController.init';
+
+export default class lexCreateContact extends NavigationMixin(LightningElement) {
+ @api recordId;
+ @api rentalApplyIds;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ this.recordTypeId=result.recordTypeId;
+ this.Strategic_dept_Class__c=result.StrategicDeptClassC;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ const defaultValues = encodeDefaultFieldValues({
+ retURL:'%2F'+this.recordId,
+ con4_lkid:this.recordId,
+ Strategic_dept_Class__c: this.Strategic_dept_Class__c,
+ RecordType:this.recordTypeId,
+ ent:'Contact',
+ });
+ console.log("ddd");
+ console.log(defaultValues)
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Contact',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId: this.recordTypeId
+ }
+ });
+ // let url='/lightning/o/Contact/new?Strategic_dept_Class__c='+this.Strategic_dept_Class__c+'&retURL=%2F'+this.recordId+
+ // '&con4_lkid='+this.recordId+
+ // '&RecordType='+this.recordTypeId+
+ // '&ent=Contact';
+ // this[NavigationMixin.Navigate]({
+ // type: 'standard__webPage',
+ // attributes: {
+ // url:url
+ // }
+ // });
+ // window.open(url,'dji');
+ // console.log("dddd:"+url);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateContact/lexCreateContact.js-meta.xml b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.js-meta.xml
new file mode 100644
index 0000000..f6c0f60
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateContact/lexCreateContact.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateContact">
+ <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/lexCreateInternalStaff/lexCreateInternalStaff.html b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.html
new file mode 100644
index 0000000..b62fe53
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="lexNewOpportunityAgencyHolder" 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/lexCreateInternalStaff/lexCreateInternalStaff.js b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js
new file mode 100644
index 0000000..e6fbfff
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js
@@ -0,0 +1,68 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexCreateInternalStaffController.init';
+
+export default class lexCreateInternalStaff extends NavigationMixin(LightningElement) {
+ @api recordId;
+ @api rentalApplyIds;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ this.recordTypeId=result.recordTypeId;
+ this.Strategic_dept_Class__c=result.StrategicDeptClassC;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ const defaultValues = encodeDefaultFieldValues({
+ retURL:'%2F'+this.recordId,
+ con4_lkid:this.recordId,
+ Strategic_dept_Class__c: this.Strategic_dept_Class__c,
+ RecordType:this.recordTypeId,
+ ent:'Contact',
+ });
+ console.log("ddd");
+ console.log(defaultValues)
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Contact',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId: this.recordTypeId
+ }
+ });
+ // let url='/lightning/o/Contact/new?Strategic_dept_Class__c='+this.Strategic_dept_Class__c+'&retURL=%2F'+this.recordId+
+ // '&con4_lkid='+this.recordId+
+ // '&RecordType='+this.recordTypeId+
+ // '&ent=Contact';
+ // this[NavigationMixin.Navigate]({
+ // type: 'standard__webPage',
+ // attributes: {
+ // url:url
+ // }
+ // });
+ // window.open(url,'dji');
+ // console.log("dddd:"+url);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js-meta.xml b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js-meta.xml
new file mode 100644
index 0000000..f949e77
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInternalStaff/lexCreateInternalStaff.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateInternalStaff">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.html b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.html
new file mode 100644
index 0000000..b62fe53
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="lexNewOpportunityAgencyHolder" 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/lexCreateJxs/lexCreateJxs.js b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js
new file mode 100644
index 0000000..86372a3
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js
@@ -0,0 +1,70 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexCreateJxsController.init';
+
+export default class lexCreateJxs extends NavigationMixin(LightningElement) {
+ @api recordId;
+ @api rentalApplyIds;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ this.recordTypeId=result.recordTypeId;
+ this.Strategic_dept_Class__c=result.StrategicDeptClassC;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ const defaultValues = encodeDefaultFieldValues({
+ retURL:'%2F'+this.recordId,
+ con4_lkid:this.recordId,
+ Strategic_dept_Class__c: this.Strategic_dept_Class__c,
+ RecordType:this.recordTypeId,
+ ent:'Contact',
+ accid:this.recordId
+ });
+ console.log("ddd");
+ console.log(defaultValues)
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Contact',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId: this.recordTypeId
+ // recordTypeId:'01210000000QfWi'
+ }
+ });
+ // let url='/lightning/o/Contact/new?Strategic_dept_Class__c='+this.Strategic_dept_Class__c+'&retURL=%2F'+this.recordId+
+ // '&con4_lkid='+this.recordId+
+ // '&RecordType='+this.recordTypeId+
+ // '&ent=Contact';
+ // this[NavigationMixin.Navigate]({
+ // type: 'standard__webPage',
+ // attributes: {
+ // url:url
+ // }
+ // });
+ // window.open(url,'dji');
+ // console.log("dddd:"+url);
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js-meta.xml b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js-meta.xml
new file mode 100644
index 0000000..9cfe58b
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateJxs/lexCreateJxs.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexCreateJxs">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.html b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.html
new file mode 100644
index 0000000..dff11a5
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.html
@@ -0,0 +1,16 @@
+
+<template>
+ <div class="reportHolder" if:true={IsLoading}>
+ <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+ </div>
+ <div if:false={IsLoading}>
+ <lightning-card title="閫夋嫨璁板綍绫诲瀷">
+ <lightning-combobox
+ label="閫夋嫨璁板綍绫诲瀷"
+ options={recordTypeOptions}
+ value={selectedRecordTypeId}
+ onchange={handleRecordTypeChange}
+ ></lightning-combobox>
+ </lightning-card>
+ </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js
new file mode 100644
index 0000000..e3766d6
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js
@@ -0,0 +1,167 @@
+// import { api, wire,LightningElement } from 'lwc';
+// import { CurrentPageReference } from "lightning/navigation";
+// import { CloseActionScreenEvent } from 'lightning/actions';
+// import { updateRecord } from 'lightning/uiRecordApi';
+// import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+// import { NavigationMixin } from 'lightning/navigation';
+// import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+// import init from '@salesforce/apex/lexNewOnLineSurvey2Controller.init';
+
+// export default class lexNewOnLineSurvey2 extends NavigationMixin(LightningElement) {
+// @api recordId;
+// id;
+// reportId;
+// CreatedById;
+// CreatedBy_Name__c;
+// Name
+// @wire(CurrentPageReference)
+// getStateParameters(currentPageReference) {
+// if (currentPageReference) {
+// const urlValue = currentPageReference.state.recordId;
+// if (urlValue) {
+// let str = `${urlValue}`;
+// this.recordId = str;
+// }
+// }
+// }
+// connectedCallback(){
+// init({
+// recordId: this.recordId
+// }).then(result=>{
+// this.Name = result.Id;
+// this.CreatedBy_Name__c=result.CreatedByNameC;
+// this.CreatedById=result.CreatedById
+// this.createOPDFromRentalApply();
+// });
+// }
+// createOPDFromRentalApply(){
+// var today = new Date();
+// var year = today.getFullYear();
+// var month = today.getMonth() + 1;
+// var day = today.getDate();
+// var hours = today.getHours();
+// var minutes = today.getMinutes();
+// var seconds = today.getSeconds();
+// let time=year + '%2F' + month + '%2F' + day;
+ // let url='/setup/ui/recordtypeselect.jsp?ent=01I10000000u0VA&retURL=%2F'+this.recordId+
+ // '&save_new_url=%2Fa1E%2Fe%3FretURL%3D%252F'+this.recordId+
+ // '%26Report_day__c%3D'+time+
+ // '%26Medical_staff__c%3D'+this.name+
+ // '%26Medical_staff__c_lkid%3D'+this.recordId+
+ // '%26Reporter__c%3D'+this.CreatedBy_Name__c+
+ // '%26Reporter__c_lkid%3D'+this.CreatedById;
+// // let url='/setup/ui/recordtypeselect.jsp?ent=On_Line_Survey';
+// this[NavigationMixin.Navigate]({
+// type: 'standard__webPage',
+// attributes: {
+// url:url
+// }
+// });
+// // let url = '/setup/ui/recordtypeselect.jsp';
+// // let params = new URLSearchParams();
+// // params.append('ent', '%2F'+this.recordId);
+// // params.append('save_new_url', '%2Fa1E%2Fe%3FretURL%3D%252F'+this.recordId+
+// // '%26Report_day__c%3D'+time+
+// // '%26Medical_staff__c%3D'+this.name+
+// // '%26Medical_staff__c_lkid%3D'+this.recordId+
+// // '%26Reporter__c%3D'+this.CreatedBy_Name__c+
+// // '%26Reporter__c_lkid%3D'+this.CreatedById);
+// // console.log(url + '?' + params.toString());
+// // url=url + '?' + params.toString()
+// // this[NavigationMixin.Navigate]({
+// // type: 'tandard__webPage',
+// // attributes: {
+// // url: url
+// // }
+// // });
+// // window.open();
+// this.dispatchEvent(new CloseActionScreenEvent());
+// }
+// }
+
+import { api, wire,LightningElement, track } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexNewOnLineSurvey2Controller.init';
+import { getObjectInfo } from 'lightning/uiObjectInfoApi';
+export default class LexNewOnLineSurvey2 extends NavigationMixin(LightningElement) {
+ @api recordId;
+ date;
+ practitioner1;
+ ownerId;
+ selectedRecordTypeId;
+ IsLoading = true;
+ @track recordTypeOptions;
+ @wire(getObjectInfo, { objectApiName: 'On_Line_Survey__c' })
+ objectInfo({ error, data }) {
+ if (data) {
+ this.recordTypeOptions = Object.values(data.recordTypeInfos).map((rt) => ({
+ label: rt.name,
+ value: rt.recordTypeId
+ }));
+ } else if (error) {
+ // 澶勭悊鎿嶄綔澶辫触鐨勯敊璇�
+ }
+ }
+ @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("res:"+result);
+ this.ownerId = result.CreatedById;
+
+ this.IsLoading = false;
+ });
+ }
+ handleRecordTypeChange(event) {
+ this.selectedRecordTypeId = event.target.value;
+
+ var today = new Date();
+ var year = today.getFullYear();
+ var month = today.getMonth() + 1;
+ var day = today.getDate();
+ var hours = today.getHours();
+ var minutes = today.getMinutes();
+ var seconds = today.getSeconds();
+ let time=year + '-' + month + '-' + day;
+ const defaultValues = encodeDefaultFieldValues({
+ // OPD_number__c: this.recordId,
+ Report_day__c: time,
+ Medical_staff__c: this.recordId,
+ Reporter__c: this.ownerId
+ });
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'On_Line_Survey__c',
+ actionName: 'new'
+ },
+ state: {
+ nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId: this.selectedRecordTypeId
+ }
+ });
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js-meta.xml b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js-meta.xml
new file mode 100644
index 0000000..f622fde
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey2/lexNewOnLineSurvey2.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexNewOnLineSurvey2">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.html b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.html
new file mode 100644
index 0000000..9608e80
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="baseHolder" 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/lexNewOpportunity/lexNewOpportunity.js b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js
new file mode 100644
index 0000000..1fd488d
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js
@@ -0,0 +1,72 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexNewOpportunityController.init';
+
+export default class lexNewOpportunity extends NavigationMixin(LightningElement) {
+ @api recordId;
+ @api rentalApplyIds;
+ hospitalId;
+ strategicDeptId;
+ accountId;
+ recordTypeId;
+ recordTypeId2;
+ HospitalId__c;
+ Department_ClassId__c;
+ Department_Class_Wd__c;
+ Province_Text__c;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ this.recordTypeId2 = result.recordTypeId2;
+ this.recordTypeId = result.recordTypeId;
+ this.HospitalId__c = result.hospitalC;
+ this.Department_ClassId__c = result.departmentClassC;
+ this.Department_Class_Wd__c = result.departmentClassWdC;
+ this.Province_Text__c = result.provinceTextC;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ const defaultValues = encodeDefaultFieldValues({
+ retURL:'%2F'+this.recordId,
+ accid: this.recordId,
+ RecordType: this.recordTypeId,
+ Hospital__c:this.HospitalId__c,
+ Department_Class__c:this.Department_ClassId__c,
+ ent:'Opportunity',
+ Opportunity_Category__c:this.Department_Class_Wd__c,
+ SAP_Province__c:this.Province_Text__c,
+ opp11:'%e5%bc%95%e5%90%88'
+ });
+ console.log("de:"+defaultValues);
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Opportunity',
+ actionName: 'new'
+ },
+ state: {
+ // nooverride: '1',
+ defaultFieldValues: defaultValues
+ // recordTypeId: '012100000006KW7AAM'
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js-meta.xml b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js-meta.xml
new file mode 100644
index 0000000..674304c
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunity/lexNewOpportunity.js-meta.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexNewOpportunity">
+ <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/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.html b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.html
new file mode 100644
index 0000000..9608e80
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="baseHolder" 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/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js
new file mode 100644
index 0000000..df9317a
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js
@@ -0,0 +1,73 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexNewOpportunityController.init';
+
+export default class lexNewOpportunityAgencyLWC extends NavigationMixin(LightningElement) {
+ @api recordId;
+ @api rentalApplyIds;
+ hospitalId;
+ strategicDeptId;
+ accountId;
+ recordTypeId;
+ recordTypeId2;
+ HospitalId__c;
+ Department_ClassId__c;
+ Department_Class_Wd__c;
+ Province_Text__c;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ this.recordTypeId2 = result.recordTypeId2;
+ this.recordTypeId = result.recordTypeId;
+ this.HospitalId__c = result.hospitalC;
+ this.Department_ClassId__c = result.departmentClassC;
+ this.Department_Class_Wd__c = result.departmentClassWdC;
+ this.Province_Text__c = result.provinceTextC;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ const defaultValues = encodeDefaultFieldValues({
+ retURL:'%2F'+this.recordId,
+ accid: this.recordId,
+ RecordType: this.recordTypeId,
+ Opportunity_Category__c:'ET',
+ Hospital__c:this.recordId,
+ Sales_Root__c:'OCM%e7%9b%b4%e6%8e%a5%e8%b2%a9%e5%a3%b2',
+ Opportunity_Category__c:this.Department_Class_Wd__c,
+ ent:'Opportunity',
+ SAP_Province__c:this.Province_Text__c,
+ opp11:'%e5%bc%95%e5%90%88'
+ });
+ console.log("de:"+defaultValues);
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'Opportunity',
+ actionName: 'new'
+ },
+ state: {
+ // nooverride: '1',
+ defaultFieldValues: defaultValues,
+ recordTypeId: this.recordTypeId
+ }
+ });
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js-meta.xml b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js-meta.xml
new file mode 100644
index 0000000..d3f810e
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityAgencyLWC/lexNewOpportunityAgencyLWC.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexNewOpportunityAgencyLWC">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.html b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.html
new file mode 100644
index 0000000..9608e80
--- /dev/null
+++ b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.html
@@ -0,0 +1,6 @@
+<template>
+ <div class="baseHolder" 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/lexSICreateBTNLWC/lexSICreateBTNLWC.js b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js
new file mode 100644
index 0000000..efd2a2b
--- /dev/null
+++ b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js
@@ -0,0 +1,58 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexSICreateBTNController.init';
+
+export default class lexSICreateBTNLWC extends NavigationMixin(LightningElement) {
+ @api recordId;
+ hospitalId;
+ strategicDeptId;
+ accountId;
+ recordTypeId;
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ console.log("dd1");
+ console.log(this.recordId);
+ init({
+ recordId: this.recordId
+ }).then(result=>{
+ console.log(result);
+ // this.recordTypeId = result.recordTypeId;
+ this.createOPDFromRentalApply();
+ });
+ }
+ createOPDFromRentalApply(){
+ console.log("ddd");
+ const defaultValues = encodeDefaultFieldValues({
+ Name__c: '*',
+ Name: '*',
+ Opportunity_ID__c: this.recordId
+ });
+ console.log("ddd");
+ this[NavigationMixin.Navigate]({
+ type: 'standard__objectPage',
+ attributes: {
+ objectApiName: 'SI_Attachment__c',
+ actionName: 'new'
+ },
+ state: {
+ defaultFieldValues: defaultValues
+ }
+ });
+ console.log("ddd");
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js-meta.xml b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js-meta.xml
new file mode 100644
index 0000000..33d2db9
--- /dev/null
+++ b/force-app/main/default/lwc/lexSICreateBTNLWC/lexSICreateBTNLWC.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexSICreateBTNLWC">
+ <apiVersion>51.0</apiVersion>
+ <isExposed>true</isExposed>
+ <targets>
+ <target>lightning__AppPage</target>
+ <target>lightning__RecordPage</target>
+ <target>lightning__HomePage</target>
+ <target>lightning__RecordAction</target>
+ </targets>
+</LightningComponentBundle>
\ No newline at end of file
--
Gitblit v1.9.1