From abeb7143bb1326fb922e49cdb4a90ed4e9a3f2af Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期四, 11 五月 2023 16:05:27 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
---
force-app/main/default/lwc/lexTenderingNoStandardButton/lexTenderingNoStandardButton.js | 42 ++--------
force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js | 1
force-app/main/default/lwc/lexTenderingAntiLogicButton/lexTenderingAntiLogicButton.js | 42 ----------
force-app/main/default/lwc/lexTenderingLogicButton/lexTenderingLogicButton.js | 23 +----
force-app/main/default/lwc/lexTenderingEnquiryButton/lexTenderingEnquiryButton.js | 49 ++---------
force-app/main/default/lwc/lexTenderingIntentionButton/lexTenderingIntentionButton.js | 46 ++---------
6 files changed, 33 insertions(+), 170 deletions(-)
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/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/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 680d893..1d901d0 100644
--- a/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
+++ b/force-app/main/default/lwc/lexTenderingLostButton/lexTenderingLostButton.js
@@ -50,7 +50,6 @@
}
// 鍒ゆ柇鍐呴儴纭鐘舵��
if(this.status == '01.寰呯‘璁�'|| this.status == '02.涓嶇浉鍏�'){
- console.log('娌¤蛋鍚�');
this.showToast("鐘舵�佷负寰呯‘璁ゆ垨涓嶇浉鍏筹紝涓嶅彲浠ュ仛澶卞崟銆�","error");
return;
}
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
--
Gitblit v1.9.1