From c69e36a64e4954b0b7e818843e8a833b3201ec29 Mon Sep 17 00:00:00 2001
From: liangxiaozhen <liangxiaozhen>
Date: 星期二, 08 八月 2023 18:23:15 +0800
Subject: [PATCH] 页面加lightning样式,开始询价LWC组件修改,补充controller
---
force-app/main/default/pages/SpecialDiscount.page | 2
force-app/main/default/classes/AccountUrlRecordTypeIdController.cls-meta.xml | 5 ++
force-app/main/default/pages/AgencyHospitalLink.page | 2
force-app/main/default/pages/ProcessInstance.page | 2
force-app/main/default/pages/XinDailyReport.page | 1
force-app/main/default/classes/AccountUrlRecordTypeIdController.cls | 33 ++++++++++++++++
force-app/main/default/pages/eSignFormQR.page | 4 +-
force-app/main/default/lwc/lexStartTrading/lexStartTrading.js | 25 ++++++------
force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page | 2
9 files changed, 57 insertions(+), 19 deletions(-)
diff --git a/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls b/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls
new file mode 100644
index 0000000..72b6535
--- /dev/null
+++ b/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls
@@ -0,0 +1,33 @@
+public with sharing class AccountUrlRecordTypeIdController {
+ @AuraEnabled
+ public static string CreateAccountGYN(){
+ return Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('Department_Class_GYN').getRecordTypeId();
+ }
+ @AuraEnabled
+ public static string ReportId(String TypeName){
+ try {
+ String reportId = [select Id from Report where DeveloperName = :TypeName].Id;
+ return reportId;
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+ @AuraEnabled
+ public static RepairContactData RepairContact(String recordId){
+ RepairContactData result = new RepairContactData();
+ try {
+ Account report = [select Department_Class_Label__c from Account where Id = :recordId];
+ result.DepartmentClassLabel = report.Department_Class_Label__c;
+ result.typeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContact').getRecordTypeId();
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return result;
+ }
+ public class RepairContactData{
+ @AuraEnabled
+ public string typeId;
+ @AuraEnabled
+ public string DepartmentClassLabel;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls-meta.xml b/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls-meta.xml
new file mode 100644
index 0000000..754ecb1
--- /dev/null
+++ b/force-app/main/default/classes/AccountUrlRecordTypeIdController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>57.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js b/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
index 8c0de44..fbb3301 100644
--- a/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
+++ b/force-app/main/default/lwc/lexStartTrading/lexStartTrading.js
@@ -7,7 +7,7 @@
import start from '@salesforce/apex/StartTradingController2.start';
-export default class LexStartTrading extends LightningElement {
+export default class LexStartTrading extends NavigationMixin(LightningElement) {
@api recordId;
IsLoading=true;
Hospital_Name__c;
@@ -65,17 +65,15 @@
console.log('start result==========',result);
if(result!=null){
this.showToast('宸叉垚鍔熻浆鍖栬浠�','success');
- window.open('/lightning/r/Opportunity/'+result+'/view','_parent');
- // this[NavigationMixin.GenerateUrl]({
- // type: "standard_recordPage",
- // attributes: {
- // recordId: result,
- // objectApiName:"Opportunity",
- // actionName:"edit"
- // }
- // }).then(url => {
- // window.open(url,"_blank");
- // });
+ // window.open('/lightning/r/Opportunity/'+result+'/view','_parent');
+ this[NavigationMixin.GenerateUrl]({
+ type: "standard__recordPage",
+ attributes: {
+ recordId: result,
+ objectApiName:"Opportunity",
+ actionName:"edit"
+ }
+ })
}
});
// .catch(err=>{
@@ -83,6 +81,7 @@
// console.log(err);
// }).finally(()=>{});
}
+
}
comparDate(dateValue) {
return new Date().getTime() >= new Date(dateValue).getTime() + 3600 * 1000 * 24;
@@ -90,11 +89,11 @@
showToast(msg,type) {
const event = new ShowToastEvent({
- title: '',
message: msg,
variant: type
});
this.IsLoading = false;
this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
}
}
\ No newline at end of file
diff --git a/force-app/main/default/pages/AgencyHospitalLink.page b/force-app/main/default/pages/AgencyHospitalLink.page
index bb39b25..12a15c4 100644
--- a/force-app/main/default/pages/AgencyHospitalLink.page
+++ b/force-app/main/default/pages/AgencyHospitalLink.page
@@ -1,4 +1,4 @@
-<apex:page Controller="AgencyHospitalLinkController" sidebar="false" id="allPage" action="{!init}">
+<apex:page Controller="AgencyHospitalLinkController" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
diff --git a/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page b/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
index ac64f96..a260cd0 100644
--- a/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
+++ b/force-app/main/default/pages/Create_Opportunity_by_Agency_Opportunity.page
@@ -1,4 +1,4 @@
-<apex:page id="Page" standardController="Agency_Opportunity__c" sidebar="false">
+<apex:page id="Page" standardController="Agency_Opportunity__c" sidebar="false" lightningStylesheets="true">
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
diff --git a/force-app/main/default/pages/ProcessInstance.page b/force-app/main/default/pages/ProcessInstance.page
index 1b8d0be..f733ed4 100644
--- a/force-app/main/default/pages/ProcessInstance.page
+++ b/force-app/main/default/pages/ProcessInstance.page
@@ -1,4 +1,4 @@
-<apex:page controller="ProcessInstanceSolController" tabStyle="Solution_Programme__c" lightningStylesheets="true">
+<apex:page controller="ProcessInstanceSolController" tabStyle="Solution_Programme__c" >
<script type="text/javascript">
function checkapp() {
// body...
diff --git a/force-app/main/default/pages/SpecialDiscount.page b/force-app/main/default/pages/SpecialDiscount.page
index f5c2f94..fa94a41 100644
--- a/force-app/main/default/pages/SpecialDiscount.page
+++ b/force-app/main/default/pages/SpecialDiscount.page
@@ -1,4 +1,4 @@
-<apex:page Controller="SpecialDiscountController" sidebar="false" id="allPage" action="{!init}">
+<apex:page Controller="SpecialDiscountController" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
diff --git a/force-app/main/default/pages/XinDailyReport.page b/force-app/main/default/pages/XinDailyReport.page
index 1149c5b..82da0a5 100644
--- a/force-app/main/default/pages/XinDailyReport.page
+++ b/force-app/main/default/pages/XinDailyReport.page
@@ -718,6 +718,7 @@
font-weight: bold;
text-align: right;
vertical-align: middle;
+ white-space: nowrap;
}
.formtable td {
vertical-align: middle;
diff --git a/force-app/main/default/pages/eSignFormQR.page b/force-app/main/default/pages/eSignFormQR.page
index 50397be..a31c083 100644
--- a/force-app/main/default/pages/eSignFormQR.page
+++ b/force-app/main/default/pages/eSignFormQR.page
@@ -1,4 +1,4 @@
-<apex:page standardController="eSignForm__c">
+<apex:page standardController="eSignForm__c" lightningStylesheets="true">
<apex:includeScript value="{!URLFOR($Resource.qrcode)}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
@@ -23,7 +23,7 @@
var profileID = '{!$Profile.Id}';
console.log('profileID:'+profileID);
//姝e紡鐜
- var url = "https://ocm.force.com/eSignSystem/s/EsignDataEntry?";
+ var url = "{!$Label.eSignFormQRUrl}/s/EsignDataEntry?";
//娴嬭瘯鐜
// var url = "https://stagefull-ocm.cs117.force.com/eSignSystem/s/EsignDataEntry?";
--
Gitblit v1.9.1