From 5427cedd5273420d04f83e21fd3f37f3d4ebd8b4 Mon Sep 17 00:00:00 2001
From: zz <1842059105@qq.com>
Date: 星期一, 29 五月 2023 17:26:38 +0800
Subject: [PATCH] 产品咨询单 “营业跟进”、“服务跟进”、“不需要”、“新建意向” 按钮提交
---
force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.html | 4
force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js | 200 ++++++++++++++++++++
force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js-meta.xml | 11 +
force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.html | 4
force-app/main/default/classes/InquiryFormController.cls | 124 ++++++++++++
force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.html | 4
force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js | 65 ++++++
force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js-meta.xml | 11 +
force-app/main/default/classes/InquiryFormController.cls-meta.xml | 5
force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.html | 4
force-app/main/default/classes/LightingButtonConstant.cls | 1
force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js-meta.xml | 11 +
force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js | 69 ++++++
force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js | 62 ++++++
force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js-meta.xml | 11 +
15 files changed, 586 insertions(+), 0 deletions(-)
diff --git a/force-app/main/default/classes/InquiryFormController.cls b/force-app/main/default/classes/InquiryFormController.cls
new file mode 100644
index 0000000..9b46e45
--- /dev/null
+++ b/force-app/main/default/classes/InquiryFormController.cls
@@ -0,0 +1,124 @@
+public class InquiryFormController {
+ @AuraEnabled
+ public static InitData init(String recordId){
+ InitData res = new initData();
+ try{
+ Inquiry_form__c report = [SELECT Id,Name,Service_Status__c,FSE_Owner__c,FSE_Owner_id__c,Status__c,Lead_link__c,Opp_Name_Search__c,Contact_Name__c,Contact_Id__c,Hospital_Name__c,Hospital_ID__c,Department_Class__c,Department_ID__c,Opp_Name_Search_ID__c,Campaign__c,Campaign_ID__c,Cancel_Reason__c,Product_Owner__c,Phone__c,Email__c,Last_Name__c,LeadSource__c,Opportunity_Division__c,Request1__c,Urgent__c,Family_Name__c FROM Inquiry_form__c WHERE Id = :recordId LIMIT 1];
+ res.Id = report.Id;
+ res.Name = report.Name;
+ res.ServiceStatus = report.Service_Status__c;
+ res.Status = report.Status__c;
+ res.profileId = UserInfo.getProfileId();
+ res.userId = UserInfo.getUserId();
+ res.LeadLink= report.Lead_link__c;
+ res.OppNameSearch= report.Opp_Name_Search__c;
+ res.ContactName= report.Contact_Name__c;
+ res.ContactId = report.Contact_Id__c;
+ res.HospitalName = report.Hospital_Name__c;
+ res.HospitalID = report.Hospital_ID__c;
+ res.DepartmentClass= report.Department_Class__c;
+ res.DepartmentID = report.Department_ID__c;
+ res.OppNameSearchID= report.Opp_Name_Search_ID__c;
+ res.Campaign= report.Campaign__c;
+ res.CampaignID = report.Campaign_ID__c;
+ res.CancelReason= report.Cancel_Reason__c;
+ res.Phone = report.Phone__c;
+ res.Email= report.Email__c;
+ res.LastName = report.Last_Name__c;
+ res.LeadSource = report.LeadSource__c;
+ res.OpportunityDivision = report.Opportunity_Division__c;
+ res.Request1 = report.Request1__c;
+ res.Urgent = report.Urgent__c;
+ res.FSEOwner = report.FSE_Owner__c;
+ res.FSEOwnerId = report.FSE_Owner_id__c;
+ res.FamilyName = report.Family_Name__c;
+ res.JINGZHUOJISHU = getUserName(LightingButtonConstant.JINGZHUO_JISHU);
+ System.debug(LoggingLevel.INFO, '*** xu: ' + res);
+ }catch(Exception e){
+ System.debug(LoggingLevel.INFO, '*** exu: ' + e);
+ }
+ return res;
+ }
+ //鏂板缓涓�椤�
+ @AuraEnabled
+ public static List<Inquiry_form__c> sqlResult (String id) {
+ try {
+ List<Inquiry_form__c> records = [SELECT id,Request_Detail__c FROM Inquiry_form__c WHERE id = :id];
+ System.debug(LoggingLevel.INFO, '*** xu1: ' + records);
+ return records;
+ } catch (exception e) {
+ System.debug(LoggingLevel.INFO, '*** xu1111111: ' + e);
+ throw new AuraHandledException(e.getMessage());
+ }
+ }
+ @AuraEnabled
+ public static string getUserName(String name){
+ User user = null;
+ try {
+ user = [select Id from user where Name =:name];
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return user.Id;
+ }
+ public class InitData{
+ @AuraEnabled
+ public String Id;
+ @AuraEnabled
+ public String ServiceStatus;
+ @AuraEnabled
+ public String profileId;
+ @AuraEnabled
+ public String userId;
+ @AuraEnabled
+ public String Status;
+ @AuraEnabled
+ public String LeadLink;
+ @AuraEnabled
+ public String OppNameSearch;
+ @AuraEnabled
+ public String ContactName;
+ @AuraEnabled
+ public String ContactId;
+ @AuraEnabled
+ public String HospitalName;
+ @AuraEnabled
+ public String HospitalID;
+ @AuraEnabled
+ public String DepartmentClass;
+ @AuraEnabled
+ public String DepartmentID;
+ @AuraEnabled
+ public String OppNameSearchID;
+ @AuraEnabled
+ public String Campaign;
+ @AuraEnabled
+ public String CampaignID;
+ @AuraEnabled
+ public String Name;
+ @AuraEnabled
+ public String CancelReason;
+ @AuraEnabled
+ public String Phone;
+ @AuraEnabled
+ public String Email;
+ @AuraEnabled
+ public String LastName;
+ @AuraEnabled
+ public String LeadSource;
+ @AuraEnabled
+ public String OpportunityDivision;
+ @AuraEnabled
+ public String Request1;
+ @AuraEnabled
+ public Boolean Urgent;
+ @AuraEnabled
+ public String FSEOwner;
+ @AuraEnabled
+ public String FSEOwnerId;
+ @AuraEnabled
+ public String FamilyName;
+ @AuraEnabled
+ public String JINGZHUOJISHU;
+ }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/InquiryFormController.cls-meta.xml b/force-app/main/default/classes/InquiryFormController.cls-meta.xml
new file mode 100644
index 0000000..fbbad0a
--- /dev/null
+++ b/force-app/main/default/classes/InquiryFormController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+ <apiVersion>56.0</apiVersion>
+ <status>Active</status>
+</ApexClass>
diff --git a/force-app/main/default/classes/LightingButtonConstant.cls b/force-app/main/default/classes/LightingButtonConstant.cls
index 0fe95d4..1aa96de 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -90,6 +90,7 @@
public static final String CN_NO = '鍚�';
public static final String VOC_NAME = 'VOC';
public static final String OK = 'OK';
+ public static final String JINGZHUO_JISHU = '绮剧悽 鎶�鏈�';
public static final String LU_SHENG_NAME = '闄� 鑳�';
public static final String HU_DI_AN_NAME = '鑳� 杩畨';
public static final String SYSTEM_PROFILE_NAME = '绯荤粺绠$悊鍛�';
diff --git a/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.html b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.html
new file mode 100644
index 0000000..e9c9349
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.html
@@ -0,0 +1,4 @@
+<template>
+ <div class="lexESignAcceptanceHospital" if:true={IsLoding}>
+ <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/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js
new file mode 100644
index 0000000..160dd90
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js
@@ -0,0 +1,200 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/InquiryFormController.init';
+import sqlResult from '@salesforce/apex/InquiryFormController.sqlResult';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexInquiryFormCustomLink1 extends LightningElement {
+ @api recordId;//OwnerId
+ IsLoading = true;
+ Id= "";
+ ServiceStatus= "";
+ profileId= "";
+ userId= "";
+ Status= "";
+ LeadLink= "";
+ OppNameSearch= "";
+ ContactName= "";
+ ContactId = "";
+ HospitalName= "";
+ HospitalID= "";
+ DepartmentClass= "";
+ DepartmentID = "";
+ OppNameSearchID= "";
+ Campaign= "";
+ CampaignID= "";
+ Name= "";
+ CancelReason= "";
+ Phone= "";
+ Email= "";
+ LastName= "";
+ LeadSource= "";
+ OpportunityDivision= "";
+ Request1= "";
+ Urgent = false;
+ FSEOwner= "";
+ FamilyName= "";
+ @wire(CurrentPageReference)
+ getStateParameters(currentPageReference) {
+ if (currentPageReference) {
+ const urlValue = currentPageReference.state.recordId;
+ if (urlValue) {
+ let str = `${urlValue}`;
+ this.recordId = str;
+ }
+ }
+ }
+ connectedCallback(){
+ init({
+ recordId: this.recordId
+ }).then(result => {
+ this.IsLoading = false;
+ this.Id = result.Id != undefined ? result.Id : "";
+ this.ServiceStatus = result.ServiceStatus != undefined ? result.ServiceStatus : "";
+ this.profileId = result.profileId != undefined ? result.profileId : "";
+ this.userId = result.userId != undefined ? result.userId : "";
+ this.Status = result.Status != undefined ? result.Status : "";
+ this.LeadLink = result.LeadLink != undefined ? result.LeadLink : "";
+ this.OppNameSearch = result.OppNameSearch != undefined ? result.OppNameSearch : "";
+ this.ContactName = result.ContactName != undefined ? result.ContactName : "";
+ this.ContactId = result.ContactId != undefined ? result.ContactId : "";
+ this.HospitalName = result.HospitalName != undefined ? result.HospitalName : "";
+ this.HospitalID = result.HospitalID != undefined ? result.HospitalID : "";
+ this.DepartmentClass = result.DepartmentClass != undefined ? result.DepartmentClass : "";
+ this.DepartmentID = result.DepartmentID != undefined ? result.DepartmentID : "";
+ this.OppNameSearchID = result.OppNameSearchID != undefined ? result.OppNameSearchID : "";
+ this.Campaign = result.Campaign != undefined ? result.Campaign : "";
+ this.CampaignID = result.CampaignID != undefined ? result.CampaignID : "";
+ this.Name = result.Name != undefined ? result.Name : "";
+ this.CancelReason = result.CancelReason != undefined ? result.CancelReason : "";
+ this.Phone = result.Phone != undefined ? result.Phone : "";
+ this.Email = result.Email != undefined ? result.Email : "";
+ this.LastName = result.LastName != undefined ? result.LastName : "";
+ this.LeadSource = result.LeadSource != undefined ? result.LeadSource : "";
+ this.OpportunityDivision = result.OpportunityDivision != undefined ? result.OpportunityDivision : "";
+ this.Request1 = result.Request1 != undefined ? result.Request1 : "";
+ this.FSEOwner = result.FSEOwner != undefined ? result.FSEOwner : "";
+ this.FamilyName = result.FamilyName != undefined ? result.FamilyName : "";
+ this.Urgent = result.Urgent == 0 ? 0 :1;
+ this.CustomLink1();
+ })
+ }
+ // 浜у搧鍜ㄨ鍗� 鏂板缓鎰忓悜
+ CustomLink1(){
+ var lead = "";
+ var search = "";
+ sqlResult({id:this.recordId}).then(records=>{
+ var Request = '';
+ if(records[0].Request_Detail__c != null){
+ Request = records[0].Request_Detail__c.toString();
+ }
+ var lead = this.LeadLink;
+ var search = this.OppNameSearch;
+ // this.CustomLink1();
+ if(lead){
+ alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳藉啀鍒涘缓鏂扮殑鎰忓悜銆�');
+ return;
+ }else{
+ //var urlStr ='/00Q/e?RecordType=01210000000QiRa&ent=Lead';
+ //window.open(urlStr);
+ var urlStr ='/apex/NewAndEditLead?RecordType=01210000000QiRa&ent=Lead'+
+ '&CF00N10000006ps6f='+encodeURI(this.ContactName)+
+ '&CF00N10000006ps6f_lkid='+encodeURI(this.ContactId)+
+ '&CF00N10000002CvC5='+encodeURI(this.HospitalName)+
+ '&CF00N10000002CvC5_lkid='+encodeURI(this.HospitalID)+
+ '&CF00N10000006qNtt='+encodeURI(this.DepartmentClass)+
+ '&CF00N10000006qNtt_lkid='+encodeURI(this.DepartmentID)+
+ '&CF00N10000006qNty='+encodeURI(this.OppNameSearch)+
+ '&CF00N10000006qNty_lkid='+encodeURI(this.OppNameSearchID)+
+ '&CF00N10000004oN28='+encodeURI(this.Campaign)+
+ '&CF00N10000004oN28_lkid='+encodeURI(this.CampaignID)+
+ '&CF00N1000000962np='+encodeURI(this.Name)+
+ '&CF00N1000000962np_lkid='+encodeURI(this.Id)+
+ '&00N10000006qBYk='+encodeURI(this.CancelReason)+
+ // '&00N10000006qGvj='+result.ProductOwner+
+ '&00N10000002CvBM=' + encodeURI(Request) +
+ '&lea13=鏈窡杩�'+
+ '&lea3='+encodeURI(this.HospitalName)+
+ '&lea8='+encodeURI(this.Phone.trim())+
+ '&lea11='+encodeURI(this.Email.trim())+
+ '&name_lastlea2=' + encodeURI(this.FamilyName) +
+ '&name_firstlea2='+encodeURI(this.LastName)+
+ '&lea5='+encodeURI(this.LeadSource)+
+ '&00N10000002CvBR='+encodeURI(this.Request1)+
+ '&00N10000002CvBC='+encodeURI(this.OpportunityDivision)+
+ //'&00N10000002EjE1={!Inquiry_form__c.Opp_Name_Search__c}'+
+ '&00N10000002CvB7='+encodeURI(this.Urgent);
+ if(search != "" && search != null){
+ urlStr += '&00N10000002EjE1='+this.OppNameSearch;
+ }
+ window.open(urlStr);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ })
+ }
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
+
+// var foo = function() {
+// var lead = '{!Inquiry_form__c.Lead_link__c}';
+// var status = '{!Inquiry_form__c.Status__c}';
+// //gzw add
+// var search = '{!Inquiry_form__c.Opp_Name_Search__c}';
+// //zyh add-search
+// var name = '{!Inquiry_form__c.Contact_Name__c}';
+// name = name.replace(" ", "");
+// var sql = "select id,Request_Detail__c from Inquiry_form__c where id = '{!Inquiry_form__c.Id}'";
+// var sqlResult = sforce.connection.query(sql);
+// var records = sqlResult.getArray("records");
+// var Request = '';
+// if(records[0].Request_Detail__c != null){
+// Request = records[0].Request_Detail__c.toString();
+// }
+// //gzw add
+// if(lead){
+// alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳藉啀鍒涘缓鏂扮殑鎰忓悜銆�');
+// return;
+// }else{
+// //var urlStr ='/00Q/e?RecordType=01210000000QiRa&ent=Lead';
+// //window.open(urlStr);
+// var urlStr ='/00Q/e?RecordType=01210000000QiRa&ent=Lead'+
+// '&CF00N10000006ps6f={!HTMLENCODE(Inquiry_form__c.Contact_Name__c)}'+
+// '&CF00N10000006ps6f_lkid={!Inquiry_form__c.Contact_Id__c}'+
+// '&CF00N10000002CvC5={!HTMLENCODE(Inquiry_form__c.Hospital_Name__c)}'+
+// '&CF00N10000002CvC5_lkid={!Inquiry_form__c.Hospital_ID__c}'+
+// '&CF00N10000006qNtt={!HTMLENCODE(Inquiry_form__c.Department_Class__c)}'+
+// '&CF00N10000006qNtt_lkid={!Inquiry_form__c.Department_ID__c}'+
+// '&CF00N10000006qNty={!HTMLENCODE(Inquiry_form__c.Opp_Name_Search__c)}'+
+// '&CF00N10000006qNty_lkid={!Inquiry_form__c.Opp_Name_Search_ID__c}'+
+// '&CF00N10000004oN28={!HTMLENCODE(Inquiry_form__c.Campaign__c)}'+
+// '&CF00N10000004oN28_lkid={!Inquiry_form__c.Campaign_ID__c}'+
+// '&CF00N1000000962np={!HTMLENCODE(Inquiry_form__c.Name)}'+
+// '&CF00N1000000962np_lkid={!Inquiry_form__c.Id}'+
+// '&00N10000006qBYk={!HTMLENCODE(Inquiry_form__c.Cancel_Reason__c)}'+
+// '&00N10000006qGvj={!Inquiry_form__c.Product_Owner__c}'+
+// '&00N10000002CvBM=' + Request +
+// '&lea13=鏈窡杩�'+
+// '&lea3={!HTMLENCODE(Inquiry_form__c.Hospital_Name__c)}'+
+// '&lea8={!HTMLENCODE(Inquiry_form__c.Phone__c)}'+
+// '&lea11={!HTMLENCODE(Inquiry_form__c.Email__c)}'+
+// '&name_lastlea2=' + name +
+// '&name_firstlea2={!HTMLENCODE(Inquiry_form__c.Last_Name__c)}'+
+// '&lea5={!HTMLENCODE( TEXT(Inquiry_form__c.LeadSource__c))}'+
+// '&00N10000002CvBC={!HTMLENCODE(TEXT(Inquiry_form__c.Opportunity_Division__c))}'+
+// '&00N10000002CvBR={!Inquiry_form__c.Request1__c}'+
+// //'&00N10000002EjE1={!Inquiry_form__c.Opp_Name_Search__c}'+
+// '&00N10000002CvB7={!Inquiry_form__c.Urgent__c}';
+// if(search != "" && search != null){
+// urlStr += '&00N10000002EjE1={!Inquiry_form__c.Opp_Name_Search__c}';
+// }
+// window.open(urlStr);
+// }
+// }
+// foo();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js-meta.xml b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js-meta.xml
new file mode 100644
index 0000000..8b422cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink1/lexInquiryFormCustomLink1.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentSetRental_Order">
+ <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/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.html b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.html
new file mode 100644
index 0000000..e9c9349
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.html
@@ -0,0 +1,4 @@
+<template>
+ <div class="lexESignAcceptanceHospital" if:true={IsLoding}>
+ <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/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js
new file mode 100644
index 0000000..6d992ac
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js
@@ -0,0 +1,62 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/InquiryFormController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexInquiryFormCustomLink2 extends LightningElement {
+ @api recordId;//OwnerId
+ IsLoading = true;
+ Status;
+ @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.Status = result.Statusl;
+ this.IsLoading = false;
+ this.CustomLink2();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+ // 浜у搧鍜ㄨ鍗� 钀ヤ笟璺熻繘
+ CustomLink2(){
+ if(this.Status != '04.宸插缓鎰忓悜'){
+ window.open ('/apex/FollowPage?id='+this.recordId, '涓嶉渶瑕佺殑鐞嗙敱',
+ 'height=400, width=800, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+ }else {
+ // alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�');
+ this.showToast("宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�","error")
+ }
+ }
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
+
+// //2021-10-21 gwy 鐗堟湰鏇存敼涓�51.0
+// var foo = function() {
+// var Status = "{!Inquiry_form__c.Status__c}";
+// if(Status != '04.宸插缓鎰忓悜'){
+// window.open ('/apex/FollowPage?id='+"{!Inquiry_form__c.Id}", '涓嶉渶瑕佺殑鐞嗙敱',
+// 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+// }else {
+// alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�');
+// }
+
+// }
+
+// foo();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js-meta.xml b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js-meta.xml
new file mode 100644
index 0000000..8b422cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormCustomLink2/lexInquiryFormCustomLink2.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentSetRental_Order">
+ <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/lexInquiryFormNoStatus/lexInquiryFormNoStatus.html b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.html
new file mode 100644
index 0000000..e9c9349
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.html
@@ -0,0 +1,4 @@
+<template>
+ <div class="lexESignAcceptanceHospital" if:true={IsLoding}>
+ <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/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js
new file mode 100644
index 0000000..e1cfa97
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js
@@ -0,0 +1,65 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/InquiryFormController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexInquiryFormNoStatus extends LightningElement {
+ @api recordId;//OwnerId
+ IsLoading = true;
+ Status;
+
+ @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.Status = result.Statusl;
+ this.IsLoading = false;
+ this.NoStatus();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+ // 浜у搧鍜ㄨ鍗� 涓嶉渶瑕�
+ NoStatus(){
+ if(this.Status != '04.宸插缓鎰忓悜'){
+ window.open ('/apex/StatusPage?id='+this.recordId , '涓嶉渶瑕佺殑鐞嗙敱',
+ 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+ }else {
+ // alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�');
+ this.showToast("宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�","error")
+ }
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
+
+//2021-10-21 gwy 鐗堟湰鏇存敼涓�51.0
+// var foo = function() {
+// var Status = "{!Inquiry_form__c.Status__c}";
+// if(Status != '04.宸插缓鎰忓悜'){
+// window.open ('/apex/StatusPage?id='+"{!Inquiry_form__c.Id}", '涓嶉渶瑕佺殑鐞嗙敱',
+// 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+// }else {
+// alert('宸茬粡鏈夋剰鍚戜簡锛屼笉鑳芥墽琛屾鎿嶄綔銆�');
+// }
+
+// }
+
+// foo();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js-meta.xml b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js-meta.xml
new file mode 100644
index 0000000..8b422cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormNoStatus/lexInquiryFormNoStatus.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentSetRental_Order">
+ <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/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.html b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.html
new file mode 100644
index 0000000..e9c9349
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.html
@@ -0,0 +1,4 @@
+<template>
+ <div class="lexESignAcceptanceHospital" if:true={IsLoding}>
+ <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/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js
new file mode 100644
index 0000000..cc6f894
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js
@@ -0,0 +1,69 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init from '@salesforce/apex/InquiryFormController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class lexInquiryFormServiceFollow extends LightningElement {
+ @api recordId;//OwnerId
+ IsLoading = true;
+ FSEOwnerId;
+ ServiceStatus;
+ JINGZHUOJISHU;
+
+ @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.ServiceStatus = result.ServiceStatus;
+ this.FSEOwnerId = result.FSEOwnerId;
+ this.userId = result.userId;
+ this.JINGZHUOJISHU = result.JINGZHUOJISHU;
+ this.IsLoading = false;
+ this.ServiceFollow ();
+ this.dispatchEvent(new CloseActionScreenEvent());
+ })
+ }
+ // 浜у搧鍜ㄨ鍗� 鏈嶅姟璺熻繘
+ ServiceFollow (){
+ if(null != this.FSEOwnerId && this.FSEOwnerId== this.userId || this.userId == this.JINGZHUOJISHU){
+ window.open ('/apex/ServiceFollowPage?id='+this.recordId, '鏈嶅姟璺熻繘',
+ 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+ }else{
+ // alert("姝ゆ寜閽彧鏈塅SE鍙互鐐瑰嚮!");
+ this.showToast("姝ゆ寜閽彧鏈塅SE鍙互鐐瑰嚮!","error")
+ }
+ }
+
+ showToast(msg,type) {
+ const event = new ShowToastEvent({
+ message: msg,
+ variant: type
+ });
+ this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+}
+
+// var foo = function() {
+// var Status = "{!Inquiry_form__c.Service_Status__c}";
+// var FSEOwner = "{!Inquiry_form__c.FSE_OwnerId__c}";
+// //alert( FSEOwner+'==='+"{!$User.Id}");
+// if(null!=FSEOwner && (FSEOwner=="{!$User.Id}" || "{!$User.Id}" == "00510000005sEEM")){
+// window.open ('/apex/ServiceFollowPage?id='+"{!Inquiry_form__c.Id}", '鏈嶅姟璺熻繘',
+// 'height=400, width=700, top=200, left=400, toolbar=no, menubar=no, scrollbars=no, location=no, status=no');
+// }else{
+// alert("姝ゆ寜閽彧鏈塅SE鍙互鐐瑰嚮!");
+// }
+// }
+// foo();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js-meta.xml b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js-meta.xml
new file mode 100644
index 0000000..8b422cd
--- /dev/null
+++ b/force-app/main/default/lwc/lexInquiryFormServiceFollow/lexInquiryFormServiceFollow.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexEquipmentSetRental_Order">
+ <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