From be8ca3316a9afeec26434b5eb359012aa0633d06 Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期四, 11 五月 2023 17:39:21 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/pages/NewOnCall.page | 2
force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js | 30 ---
force-app/main/default/pages/NewPaymentPlanLoad.page | 41 +++--
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js | 58 +------
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js | 42 -----
force-app/main/default/pages/PAEDecisionRecord.page | 21 --
force-app/main/default/classes/QISReportController.cls | 8
force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js | 46 +-----
force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js | 30 ---
force-app/main/default/classes/TenderingButtonController.cls | 19 ++
force-app/main/default/classes/LightingButtonConstant.cls | 5
force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js | 42 +----
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js | 23 --
force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js | 2
force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js | 49 +-----
15 files changed, 106 insertions(+), 312 deletions(-)
diff --git a/force-app/main/default/classes/LightingButtonConstant.cls b/force-app/main/default/classes/LightingButtonConstant.cls
index 32e127b..f29bf2c 100644
--- a/force-app/main/default/classes/LightingButtonConstant.cls
+++ b/force-app/main/default/classes/LightingButtonConstant.cls
@@ -86,6 +86,11 @@
public static final String CN_NO = '鍚�';
public static final String VOC_NAME = 'VOC';
public static final String OK = 'OK';
+ public static final String LU_SHENG_NAME = '闄� 鑳�';
+ public static final String HU_DI_AN_NAME = '鑳� 杩畨';
+ public static final String SYSTEM_PROFILE_NAME = '绯荤粺绠$悊鍛�';
+ public static final String TwoS1_Sales_Hospital = '2S1_閿�鍞尰闄㈡媴褰�';
+ public static final String TwoS4_Sales_Manager = '2S4_閿�鍞鐞嗚��';
public static final String SOBJECT_NAME_OF_REPORT_SHARE ='Report__Share';
public static final String SOBJECT_NAME_OF_VOC_SHARE = 'VOCShare__c';
public static final String REPAIR_FIELD_DOJ_STATUS_NOT_OBJECT = '闈炲璞�';
diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index 296a17c..1344bd0 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/force-app/main/default/classes/QISReportController.cls
@@ -19,8 +19,8 @@
String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASAC_DECISION;
try{
- PAE_DecisionRecord__c RCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId limit 1];
- res.pAEid = RCPAEDIdList.id;
+ PAE_DecisionRecord__c rCPAEDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId limit 1];
+ res.pAEid = rCPAEDIdList.id;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
@@ -48,8 +48,8 @@
String recordTypeId = LightingButtonConstant.DEVELOPER_NAME_ASRC_DECISION;
try{
- PAE_DecisionRecord__c ASRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId Limit 1];
- res.pAEid = ASRCDIdList.id;
+ PAE_DecisionRecord__c aSRCDIdList = [SELECT LastModifiedDate, Id, Name, LastModifiedById,RecordType.DeveloperName FROM PAE_DecisionRecord__c where PAE_QIS__c = :qisReportId And RecordType.DeveloperName = :recordTypeId Limit 1];
+ res.pAEid = aSRCDIdList.id;
System.debug(LoggingLevel.INFO, '*** res: ' + res);
}catch(Exception e){
System.debug(LoggingLevel.INFO, '*** e: ' + e);
diff --git a/force-app/main/default/classes/TenderingButtonController.cls b/force-app/main/default/classes/TenderingButtonController.cls
index 47b080d..5e01974 100644
--- a/force-app/main/default/classes/TenderingButtonController.cls
+++ b/force-app/main/default/classes/TenderingButtonController.cls
@@ -11,6 +11,9 @@
res.opportunityNum = String.valueOf(report.OpportunityNum__c);
res.isRelateProject = report.IsRelateProject__c;
res.profileId = UserInfo.getProfileId();
+ res.systemProfileId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.SalesManagerId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
+ res.SalesHospitalId = getProfileIdByName(LightingButtonConstant.SYSTEM_PROFILE_NAME);
res.Environment_Url = System.Label.Environment_Url;
System.debug(LoggingLevel.INFO, '*** xu: ' + res);
}catch(Exception e){
@@ -19,6 +22,16 @@
return res;
}
+ @AuraEnabled
+ public static string getProfileIdByName(String name){
+ Profile profile = null;
+ try {
+ profile = [select Id from Profile where Name =:name];
+ } catch (Exception e) {
+ throw new AuraHandledException(e.getMessage());
+ }
+ return profile.Id;
+ }
// var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
// var sqlResult = sforce.connection.query(sql);
@AuraEnabled
@@ -49,6 +62,12 @@
@AuraEnabled
public String profileId;
@AuraEnabled
+ public String systemProfileId;
+ @AuraEnabled
+ public String SalesManagerId;
+ @AuraEnabled
+ public String SalesHospitalId;
+ @AuraEnabled
public String Environment_Url;
}
}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
index cbf87b9..f368b27 100644
--- a/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
+++ b/force-app/main/default/lwc/lexQisUniversalFailureCode/lexQisUniversalFailureCode.js
@@ -1,5 +1,5 @@
import { LightningElement,wire,track,api} from 'lwc';
-import { CurrentPageReference } from "lightning/navigation";
+import { CurrentPageReference } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
diff --git a/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
index 5df0406..68543ee 100644
--- a/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
+++ b/force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js
@@ -1,9 +1,7 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
import ContraryLogicalDel from '@salesforce/apex/TenderWebService.ContraryLogicalDel';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class LexTenderingAntiLogicButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
@@ -19,47 +17,11 @@
}
}
}
-
+ //鎷涙爣椤圭洰鍙嶉�昏緫鍒犻櫎
connectedCallback(){
- init({
- recordId: this.recordId
- }).then(result => {
- this.IsLoading = false;
- this.id = result.Id;
- this.AntiLogicButton();
- this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(() => {
-
- }).finally(() => {
-
- });
- }
-
- //鍙嶉�昏緫鍒犻櫎
- AntiLogicButton(){
- ContraryLogicalDel({DTenId : this.id}).then(result =>{
- console.log(result,'鎴愬姛涓庡惁');
- if(result == 'OK'){
- this.showToast("鍙嶉�昏緫鍒犻櫎鎴愬姛","success");
- }
+ ContraryLogicalDel({DTenId : this.recordId}).then(result =>{
this.dispatchEvent(new CloseActionScreenEvent());
})
}
- showToast(msg,type) {
- const event = new ShowToastEvent({
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
- }
}
-
-
-// /var ContraryL = function(){
-// var DTenId = "{!Tender_information__c.Id}";//鍒犻櫎鐨勬嫑鎶曟爣
-// var rtn = sforce.apex.execute("TenderWebService", "ContraryLogicalDel", {DTenId : DTenId } );
-// //閲嶆柊鍔犺浇椤甸潰
-// window.location.reload();
-// }
-// ContraryL();
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
index 3c58a8d..f32c741 100644
--- a/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
+++ b/force-app/main/default/lwc/lexTenderingAttachmentButton/lexTenderingAttachmentButton.js
@@ -2,7 +2,6 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingAttachmentButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
@@ -18,37 +17,16 @@
}
}
}
-
+ //鎷涙爣椤圭洰鏌ョ湅闄勪欢
connectedCallback(){
init({
recordId: this.recordId
}).then(result => {
this.IsLoading = false;
this.id = result.Id;
- this.AttachmentButton();
+ window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
- //鏌ョ湅闄勪欢
- AttachmentButton(){
- window.open(`/apex/TenderInformationUploadPdf?id=${this.id}`);
- }
-
- showToast(msg,type) {
- const event = new ShowToastEvent({
- message: msg,
- variant: type
- });
- this.dispatchEvent(event);
- }
-}
-
-// var From= function(){
-// window.open( "/apex/TenderInformationUploadPdf?id={!URLENCODE(Tender_information__c.Id)}");
-// }
-// From();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
index 90dbf6a..a16d066 100644
--- a/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
+++ b/force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js
@@ -1,7 +1,6 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
import updateOpportunityInformation from '@salesforce/apex/UpdateTenderInformationBatch.updateOpportunityInformation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
@@ -26,35 +25,29 @@
init({
recordId: this.recordId
}).then(result => {
- if (result != null) {
- this.IsLoading = false;
- this.id = result.Id;
- this.isRelateProject = result.isRelateProject;
- this.EnquiryButton();
- this.dispatchEvent(new CloseActionScreenEvent());
- }
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ console.log(result);
+ this.IsLoading = false;
+ this.id = result.Id;
+ this.isRelateProject = result.isRelateProject;
+ this.EnquiryButton();
+ })
}
//鎷涙爣椤圭洰 鍙嶅簲璇环鐘舵��
EnquiryButton(){
if(this.isRelateProject == "鍚�"){
this.showToast('鎷涙姇鏍囬」鐩笉鐩稿叧鍚庝笉鑳藉弽搴旇浠风姸鎬�!','error');
+ this.dispatchEvent(new CloseActionScreenEvent());
return;
}
var listss = [];
listss.push(this.id);
updateOpportunityInformation({TenderIdList : listss}).then(result=>{
- console.log(result,'璧板紑浜嗗悧锛�')
if(result != 'OK'){
this.showToast(result,'error');
+ this.dispatchEvent(new CloseActionScreenEvent());
}else {
- console.log('鐑�')
- // alert('鍙嶆槧瀹屼簡');
this.showToast('鍙嶆槧瀹屼簡','success');
+ this.dispatchEvent(new CloseActionScreenEvent());
}
})
}
@@ -65,28 +58,6 @@
message: msg,
variant: type
});
- console.log('鎻愮ず妗嗕笉鑳界敤浜嗗悧锛�');
this.dispatchEvent(event);
- this.dispatchEvent(new CloseActionScreenEvent());
}
-}
-
-// var foo = function(){
-// if('{!Tender_information__c.IsRelateProject__c}'== "鍚�"){
-// alert('鎷涙姇鏍囬」鐩笉鐩稿叧鍚庝笉鑳藉弽搴旇浠风姸鎬�!');
-// return;
-// }
-// var listss = [];
-// listss.push('{!Tender_information__c.Id}');
-// var rtn = sforce.apex.execute("UpdateTenderInformationBatch", "updateOpportunityInformation", {TenderIdList : listss } );
-
-// if(rtn != 'OK'){
-// alert(rtn);
-// }else {
-// alert('鍙嶆槧瀹屼簡');
-// }
-// //閲嶆柊鍔犺浇椤甸潰
-// window.location.reload();
-// }
-
-// foo();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
index 6999b54..46b2353 100644
--- a/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
+++ b/force-app/main/default/lwc/lexTenderingHospitalButton/lexTenderingHospitalButton.js
@@ -24,46 +24,22 @@
init({
recordId: this.recordId
}).then(result => {
- console.log(result)
this.IsLoading = false;
this.id = result.Id;
this.name = result.name;
this.Environment_Url = result.Environment_Url
this.HospitalButton();
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
- //鏂板缓鍖婚櫌
+ //鎷涙爣椤圭洰鏂板缓鍖婚櫌
HospitalButton(){
var url = this.Environment_Url+'001/e?CF00N10000009I0o7='+encodeURIComponent(this.name)
+'&CF00N10000009I0o7_lkid='+encodeURIComponent(this.id)
+'&00N10000009HFQT='+encodeURIComponent('鎷涙爣椤圭洰')
+'&RecordType=01210000000QemG'
+'&retURL='+ encodeURIComponent(this.id);
- console.log('url',url)
window.location.href = url;
}
-}
-
-
-// var foo = function() {
-
-// var TenderId = '{!Tender_information__c.Id}';
-// var Tendername = '{!Tender_information__c.Name}';
-// var HospitalSource= '鎷涙爣椤圭洰';
-
-// var url = '{!$Label.Environment_Url}'+'001/e?CF00N10000009I0o7='+encodeURIComponent(Tendername)
-// +'&CF00N10000009I0o7_lkid='+encodeURIComponent(TenderId)
-// +'&00N10000009HFQT='+encodeURIComponent(HospitalSource)
-
-// +'&RecordType=01210000000QemG'
-// +'&retURL='+ encodeURIComponent(TenderId);
-// window.top.location.href = url;
-
-// }
-// foo();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
index 49140bd..a322e7d 100644
--- a/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
+++ b/force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js
@@ -1,15 +1,12 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingIntentionButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
IsLoading = true;
-
@wire(CurrentPageReference)
getStateParameters(currentPageReference) {
if (currentPageReference) {
@@ -21,8 +18,7 @@
}
}
}
-
-
+ //鎷涙爣椤圭洰鏂板缓鎰忓悜
connectedCallback(){
init({
recordId: this.recordId
@@ -30,46 +26,20 @@
if (result != null) {
this.IsLoading = false;
this.id = result.Id;
- this.IntentionButton();
+ alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
+ // this.showToast('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�','success');
+ var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + this.id
+ + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.id ;
+ window.open(url);
this.dispatchEvent(new CloseActionScreenEvent());
}
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
-
- //鎷涙爣椤圭洰鏂板缓鎰忓悜
- IntentionButton(){
- // alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
- this.showToast('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�','success');
- var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + this.id
- + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + this.id ;
- window.open(url);
- }
-
-
- updateRecordView() {
- updateRecord({fields: { Id: this.recordId }});
- }
-
showToast(msg,type) {
- console.log(msg,type);
const event = new ShowToastEvent({
- // title: title,
message: msg,
variant: type
});
this.dispatchEvent(event);
}
-}
-
-
-// var foo = function(){
-// alert('濉啓澶卞崟鎶ュ憡璇风洿鎺ョ偣鍑绘嫑鏍囬〉闈€�愬け鍗曘�戞寜閽�');
-// var url = '/apex/NewAndEditLead?' + '00N10000009HKS5=' + '{!Tender_information__c.Id}'
-// + '&LeadSource=鎷涙爣缃�' + '&RecordTypeId=01210000000QiRf' + '&retURL=%2F' + '{!Tender_information__c.Id}' ;
-// window.open(url);
-// }
-// foo();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
index 8bc074b..38d5fe8 100644
--- a/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
+++ b/force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js
@@ -18,7 +18,7 @@
}
}
-
+ //鎷涙爣椤圭洰閫昏緫鍒犻櫎
connectedCallback(){
init({
recordId: this.recordId
@@ -26,24 +26,9 @@
if (result != null) {
this.IsLoading = false;
this.id = result.Id;
- this.LogicButton();
+ window.open (`/apex/TenderDeletePagelwc?id=${this.id}`, '', 'height=350, width=600, top=200, left=350');
this.dispatchEvent(new CloseActionScreenEvent());
}
- }).catch(() => {
-
- }).finally(() => {
-
- });
+ })
}
-
- //閫昏緫鍒犻櫎
- LogicButton(){
- window.open (`/apex/TenderDeletePagelwc?id=${this.id}`, '', 'height=350, width=600, top=200, left=350');
- }
-}
-
-
-// function IfResponse(){
-// window.open ('/apex/TenderDeletePagelwc?id={!Tender_information__c.Id}', '', 'height=350, width=600, top=200, left=350');
-// }
-// IfResponse();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
index a4576e1..1d901d0 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -6,9 +6,11 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingLostButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
- id;//杩斿洖鍊肩殑id Tender_information__c鎷涙爣椤圭洰鐨刬d
status;//鐘舵��
profileId;//profileId id
+ systemProfileId;
+ SalesManagerId;
+ SalesHospitalId;
IsLoading = true;
@wire(CurrentPageReference)
@@ -28,29 +30,26 @@
recordId: this.recordId
}).then(result => {
this.IsLoading = false;
- this.id = result.Id;
this.status = result.status;
- this.profileId = result.profileId.slice(0,15);
+ this.profileId = result.profileId;
+ this.systemProfileId = result.systemProfileId;
+ this.SalesManagerId = result.SalesManagerId;
+ this.SalesHospitalId = result.SalesHospitalId;
this.LoseButton();
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
-
- });
+ })
}
- //澶卞崟
+ //鎷涙爣椤圭洰 澶卞崟
LoseButton(){
- sqlResult({id: this.id}).then(result=>{
+ sqlResult({id: this.recordId}).then(result=>{
//绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
- if (this.profileId != '00e10000000xnp2' && this.profileId != '00e10000000xnpH' && this.profileId != '00e10000000Y3o5') {
+ if (this.profileId != this.SalesManagerId && this.profileId != this.SalesHospitalId && this.profileId != this.systemProfileId) {
this.showToast("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�","error");
return;
}
// 鍒ゆ柇鍐呴儴纭鐘舵��
if(this.status == '01.寰呯‘璁�'|| this.status == '02.涓嶇浉鍏�'){
- console.log('娌¤蛋鍚�');
this.showToast("鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�","error");
return;
}
@@ -62,7 +61,7 @@
return;
}
}
- window.open(`/apex/TenderLostPage?id=${this.id}`,'','height=500,width=800,top=200,left=250,location=no');
+ window.open(`/apex/TenderLostPage?id=${this.recordId}`,'','height=500,width=800,top=200,left=250,location=no');
})
}
showToast(msg,type) {
@@ -73,36 +72,3 @@
this.dispatchEvent(event);
}
}
-
-
-// var sql = "select id from Tender_Opportunity_Link__c where Tender_information__c='" + '{!Tender_information__c.Id}'+ "'";
-// var sqlResult = sforce.connection.query(sql);
-
-
-// //绠�妗f潈闄� 2S1_閿�鍞尰闄㈡媴褰� 2S4_閿�鍞鐞嗚�� 绯荤粺绠$悊鍛�
-// if ('{!$Profile.Id}' != '00e10000000xnp2' && '{!$Profile.Id}' != '00e10000000xnpH' && '{!$Profile.Id}' != '00e10000000Y3o5') {
-// alert("鎮ㄦ病鏈夋潈闄愶紝鏃犳硶鍒涘缓璇环鎻愪氦澶卞崟銆�");
-// return;
-// }
-
-// // 鍒ゆ柇鍐呴儴纭鐘舵��
-// if({!Tender_information__c.status__c == '01.寰呯‘璁�'|| Tender_information__c.status__c == '02.涓嶇浉鍏�'}){
-// alert('鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�');
-// return;
-// }
-
-// // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
-// if({!Tender_information__c.status__c == '05.璇环涓�'|| Tender_information__c.status__c == '06.鎴愪氦' || Tender_information__c.status__c == '07.閮ㄥ垎鎴愪氦' || Tender_information__c.status__c == '08.澶卞崟'} || sqlResult.size > 0){
-// if(!confirm('姝ら」鐩凡鍏宠仈璇环锛岃纭疄鏄惁鏂板缓璇环鎻愪氦澶卞崟銆�')) {
-// return;
-// }
-// }
-
-// // 鍒ゆ柇鏄惁闇�瑕佹柊寤鸿浠�
-// //if(sqlResult.size > 0){
-// //if(!confirm('宸叉湁鍏宠仈璇环锛屾槸鍚﹀垱寤烘柊鐨勮浠枫��')) {
-// //return;
-// //}
-// //}
-
-// window.open('/apex/TenderLostPage?id={!Tender_information__c.Id}','','height=500,width=800,top=200,left=250,location=no');
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
index 67e16ce..2282417 100644
--- a/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
+++ b/force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js
@@ -1,9 +1,7 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import init from '@salesforce/apex/TenderingButtonController.initTenderingController';
-import { updateRecord } from 'lightning/uiRecordApi';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
export default class lexTenderingNoStandardButton extends LightningElement {
@api recordId;//褰撳墠杩欐潯鏁版嵁鐨刬d
@@ -22,7 +20,7 @@
}
}
-
+ //鎷涙爣椤圭洰涓嶅簲鏍囩敵璇�
connectedCallback(){
init({
recordId: this.recordId
@@ -30,21 +28,13 @@
this.IsLoading = false;
this.id = result.Id;
this.opportunityNum = result.opportunityNum;
- this.NoStandardButton();
+ if(this.opportunityNum > 0) {
+ this.showToast('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠','error');
+ return;
+ }
+ window.open ('/apex/Bidding?id='+this.id, '', 'height=350, width=600, top=200, left=350,location=no');
this.dispatchEvent(new CloseActionScreenEvent());
- }).catch(error => {
- console.log("error"+error);
- }).finally(() => {
- });
- }
-
- //鎷涙爣椤圭洰涓嶅簲鏍囩敵璇�
- NoStandardButton(){
- if(Number(this.opportunityNum) > 0) {
- this.showToast('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠','error');
- return;
- }
- window.open ('/apex/Bidding?id='+this.id, '', 'height=350, width=600, top=200, left=350,location=no');
+ })
}
showToast(msg,type) {
@@ -53,20 +43,6 @@
variant: type
});
this.dispatchEvent(event);
+ this.dispatchEvent(new CloseActionScreenEvent());
}
-}
-
-
-// function IfResponse(){
-
-// // 鍏宠仈璇环涔嬪悗涓嶈兘鍦ㄦ嫑鏍囬噷鐢宠涓嶅簲鏍�
-// if('{!Tender_information__c.OpportunityNum__c}' > 0) {
-// alert('椤圭洰宸插叧鑱旇繃璇环锛岃鍒拌浠烽噷鍋氫笉搴旀爣鐢宠');
-// return;
-// }
-
-
-// window.open ('/apex/Bidding?id={!Tender_information__c.Id}', '', 'height=350, width=600, top=200, left=350,location=no');
-
-// }
-// IfResponse();
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/force-app/main/default/pages/NewOnCall.page b/force-app/main/default/pages/NewOnCall.page
index 11b0441..d39d945 100644
--- a/force-app/main/default/pages/NewOnCall.page
+++ b/force-app/main/default/pages/NewOnCall.page
@@ -234,7 +234,7 @@
//Alert Error Message
function alertErrorMessage(errorMsg) {
let errorMsgNode = document.getElementById("page:form:block:msgContent");
- errorMsg = '閿欒锛氭棤鏁堟暟鎹��' + '\n' + errorMsg;
+ // errorMsg = '閿欒锛氭棤鏁堟暟鎹��' + '\n' + errorMsg;
errorMsgNode.innerText = errorMsg;
errorMsgNode.className = 'pbError';
unblockUI();
diff --git a/force-app/main/default/pages/NewPaymentPlanLoad.page b/force-app/main/default/pages/NewPaymentPlanLoad.page
index 44e540e..135f02b 100644
--- a/force-app/main/default/pages/NewPaymentPlanLoad.page
+++ b/force-app/main/default/pages/NewPaymentPlanLoad.page
@@ -21,8 +21,8 @@
</style>
<script type="text/javascript">
j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Contract_Limit_Times__c')).attr('disabled',true);
- function init() {
-
+ window.onload = function init() {
+ console.log('鎵ц浜唅nit');
Convert_All_Amount();
// 鏂板鐐规鎬绘鏁帮紙鍙湪椤甸潰涓樉绀猴級fxk 2021/9/2 Star
AllChecktime();
@@ -43,6 +43,7 @@
}
function Initdisabled() {
+
var Status = '{!PageMCEElement.Status__c}';
if(Status != '寮曞悎涓�'){
j$(escapeVfId('allPage:allForm:allBlock:Is_Standard_Contract')).attr("disabled", true);
@@ -66,28 +67,30 @@
j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Payment_Plan_Sum_6')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Small_Repair_Time__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Live_Technical_Support_Time__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Tour_Check__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Engineer_Name__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Phone_Number__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Inspection_Time__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Small_Repair_Time__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Big_Repair_Time__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Live_Technical_Support_Time__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Tour_Check__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Engineer_Name__c')).attr("disabled", true);
+ console.log('disabled');
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Phone_Number__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Inspection_Time__c')).attr("disabled", true);
// 鏂板鐐规鎬绘鏁帮紙鍙湪椤甸潰涓樉绀猴級fxk 2021/9/2 Star
- j$(escapeVfId('allPage:allForm:allBlock:Contract_Limit_Times__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Contract_Limit_Times__c')).attr("disabled", true);
// 鏂板鐐规鎬绘鏁帮紙鍙湪椤甸潰涓樉绀猴級fxk 2021/9/2 End
- j$(escapeVfId('allPage:allForm:allBlock:Dedust__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:First_Party_Contract_Number__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Second_Party_Contract_Number__c')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:Negotiate_Mean__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Dedust__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:First_Party_Contract_Number__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Second_Party_Contract_Number__c')).attr("disabled", true);
+ j$(escapeVfId('allPage:allForm:allBlock:TextInformation:Negotiate_Mean__c')).attr("disabled", true);
}
//XLIU-CEP8WW LY 20220905 start
var saveBT = '{!PageMCEElement.old_Is_RecognitionModel__c}';
var payment = j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Term_Of_Payment__c')).val();
if (saveBT =='true' && payment=='澶氭浠樻'){
j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", 'btnDisabled');
j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", 'btnDisabled');
}
//XLIU-CEP8WW LY 20220905 end
@@ -226,15 +229,15 @@
var payment = j$(escapeVfId('allPage:allForm:allBlock:paymentPlan:Term_Of_Payment__c')).val();
if (saveBT =='true' && payment=='澶氭浠樻'){
j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", true);
j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", true);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", true);
}
if (saveBT =='true' && payment=='涓�娆℃�т粯娆�') {
j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("disabled", false);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", false);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:bottom:PrintButton')).attr("class", false);
j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("disabled", false);
- j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", false);
+ // j$(escapeVfId('allPage:allForm:allBlock:allButtons:PrintButton')).attr("class", false);
}
//XLIU-CEP8WW LY 20220905 end
ChangeTermofPaymentPlan();
diff --git a/force-app/main/default/pages/PAEDecisionRecord.page b/force-app/main/default/pages/PAEDecisionRecord.page
index 0660da2..4f8b749 100644
--- a/force-app/main/default/pages/PAEDecisionRecord.page
+++ b/force-app/main/default/pages/PAEDecisionRecord.page
@@ -1,4 +1,4 @@
-<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE鍒ゅ畾璁板綍" lightningStylesheets="true">
+<apex:page action="{!init}" extensions="PAEDecisionRecordController" id="allPage" showheader="false" sidebar="false" standardcontroller="PAE_DecisionRecord__c" title="PAE鍒ゅ畾璁板綍" lightningStylesheets="true" >
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}">
</apex:stylesheet>
<apex:includescript value="{!URLFOR($Resource.jquery183minjs)}">
@@ -70,23 +70,6 @@
blockme();
InsertRow();
- }
- var selectedSize = 0;
- var pageLimit = {!pageLimit};
- function CheckSize(j){
- var a = j.id;
- var productCount = j$(escapeVfId(a)).attr('checked');
- if (productCount == 'checked') {
- if(selectedSize >= pageLimit){
- window.alert("椤甸潰鎵�閫夋暟鎹笉鑳借秴杩�500鏉�");
- j$(escapeVfId(a)).attr('checked',false);
- return;
- }
- selectedSize ++;
- } else {
- selectedSize --;
- }
- //alert(selectedSize);
}
// 淇濆瓨骞跺叧闂�
function SaveAndCloses(onlySave) {
@@ -424,7 +407,7 @@
<!-- 20200810 Gzw 淇敼淇濆瓨骞跺叧闂寜閽紝Final鏃舵樉绀�
<apex:commandButton value="淇濆瓨骞跺叧闂�" disabled="{!editFlag}" rendered="{!IF(((repa != null && !((repa.Repair_Determine__c = '瑕�' && isOSH)||repa.Repair_Determine__c != '瑕�')) || (RecordTypeName = 'ASACDecision')),true,false)}" style="margin-left:30px;width:80px;float:left" onclick="SaveAndCloses(2);return false;" rerender="unEditable,message" oncomplete="unblockUI();" /> -->
<td>
- <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:80px;float:left" value="淇濆瓨骞跺叧闂�">
+ <apex:commandbutton disabled="{!editFlag}" onclick="SaveAndCloses(2);return false;" oncomplete="unblockUI();" rendered="{!IF(repa != null && RecordTypeName = 'ASACDecision',true,false)}" rerender="unEditable,message" style="margin-left:30px;width:100px;float:left" value="淇濆瓨骞跺叧闂�">
</apex:commandbutton>
</td>
<!-- When 瑕佷笉瑕佽繘琛屼慨鐞嗙殑鍒ゅ畾=瑕� -->
--
Gitblit v1.9.1