From 988f9735377909b6310301e582c15804e004783f Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期六, 07 十月 2023 10:36:13 +0800
Subject: [PATCH] 近期修改cjw
---
force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++---------
1 files changed, 47 insertions(+), 9 deletions(-)
diff --git a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
index 0ab2880..2f53e5c 100644
--- a/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
+++ b/force-app/main/default/lwc/lexAgencyAuthorize/lexAgencyAuthorize.js
@@ -4,7 +4,7 @@
* @Author: chen jing wu
* @Date: 2023-04-12 14:51:44
* @LastEditors: chen jing wu
- * @LastEditTime: 2023-09-05 15:47:38
+ * @LastEditTime: 2023-10-04 12:28:54
*/
import { api, wire,LightningElement } from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
@@ -20,6 +20,10 @@
import TradeComplianceStatusFlag from '@salesforce/label/c.TradeComplianceStatusFlag';
import IFTradeComplianceAlert from '@salesforce/label/c.IFTradeComplianceAlert';
import LightningConfirm from 'lightning/confirm';
+import lwcCSS from '@salesforce/resourceUrl/lwcCSS';
+import {loadStyle} from 'lightning/platformResourceLoader';
+import queryQuote from '@salesforce/apex/OpportunityLightingButtonController.queryQuote';
+
export default class LexAgencyAuthorize extends LightningElement {
@api recordId;
agency1Id;
@@ -68,6 +72,9 @@
}
}
connectedCallback(){
+ Promise.all([
+ loadStyle(this, lwcCSS)
+ ]);
init({
recordId: this.recordId
}).then(result=>{
@@ -118,14 +125,20 @@
var oppid = this.recordId;
var angency = this.agency1Id;
var profileId = this.profileId;
- //娴嬭瘯宸查攣瀹氭巿鏉冨悎鍚岀敵璇蜂负鈥�1鈥�
- this.estimationId = 'test';
this.detailNum = 1;
if (profileId != this.systemProfileId && profileId != this.j3ProfileId && profileId != this.s61ProfileId && profileId != this.s62ProfileId && profileId != this.m4ProfileId) {
this.showToast("鎮ㄦ病鏈夋巿鏉冪敵璇风殑鏉冮檺銆傝鑱旂郴绯荤粺绠$悊鍛樸��","error");
return;
}
- //璐告槗鍚堣 you
+ queryQuote({
+ estimationId: this.estimationId
+ }).then(result=>{
+ console.log(result);
+ if(result == true){
+ this.showToast("鍖呭惈铏氭嫙浜у搧锛屼笉鑳芥巿鏉冿紝璇锋洿鏂版姤浠峰崟鍚庣敵璇�","error");
+ return;
+ }
+ //璐告槗鍚堣 you
var AccDealerBlacklist = this.AccDealerBlacklist;//鍒ゆ柇瀹㈡埛/缁忛攢鍟嗘槸鍚︿负榛戝悕鍗�
var angency1 = this.angency1;
var angency2 = this.angency2;
@@ -206,6 +219,10 @@
this.ss();
}
//璐告槗鍚堣 you
+ });
+
+
+
}
ss(){
if (this.stageName != '寮曞悎' && this.stageName != '璇环' ) {
@@ -221,10 +238,11 @@
this.showToast("鑰楁潗涓嶅彲涓庡ゥ杈変骇鍝佸悓鏃跺瓨鍦紒","error");
return;
} else if (this.cntLostCancelDraft > 0) {
- if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
- this.dispatchEvent(new CloseActionScreenEvent());
- return ;
- }
+ // if(!confirm('璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵')){
+ // this.dispatchEvent(new CloseActionScreenEvent());
+ // return ;
+ // }
+ this.handleConfirmClick1("璇环鏈夎崏妗堜腑鐨勫彇娑�/澶卞崟鎶ュ憡锛屾槸鍚︾户缁紵");
} else if (this.cntLostCancelReport - this.cntLostCancelDraft > 0) {
this.showToast('璇环鏈夊凡鎻愪氦鐨勫彇娑�/澶卞崟鎶ュ憡銆�',"error");
return;
@@ -240,7 +258,13 @@
}else if (this.ifSubmit == '1') {
this.showToast('涓婁紶澶辫触锛岃鑱旂郴绯荤粺绠$悊鍛�!',"error");
return;
+ }else{
+ this.dd();
}
+
+ }
+
+ dd(){
if (this.ifAuthorizingLock == true) {
this.showToast('璇环姝e湪鎺堟潈涓紝璇蜂笉瑕侀噸澶嶆彁浜ゃ��',"error");
return;
@@ -290,11 +314,25 @@
this.dispatchEvent(new CloseActionScreenEvent());
}
}
+
+ async handleConfirmClick1(msg) {
+ const result = await LightningConfirm.open({
+ message: msg,
+ variant: 'headerless',
+ label: 'this is the aria-label value'
+ });
+ if (result) {
+ this.dd();
+ } else {
+ this.dispatchEvent(new CloseActionScreenEvent());
+ }
+ }
showToast(msg,type) {
const event = new ShowToastEvent({
title: '',
message: msg,
- variant: type
+ variant: type,
+ mode: 'sticky'
});
this.dispatchEvent(event);
this.dispatchEvent(new CloseActionScreenEvent());
--
Gitblit v1.9.1