From 626f3c3bb25e204568019e8d568e2d7547d1037a Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期三, 09 八月 2023 10:54:08 +0800
Subject: [PATCH] 20230809修改伟意按钮同步
---
force-app/main/default/lwc/lexSendQIS/lexSendQIS.js | 62 +++++++++++++++----------------
1 files changed, 30 insertions(+), 32 deletions(-)
diff --git a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
index f1ca368..63636f4 100644
--- a/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
+++ b/force-app/main/default/lwc/lexSendQIS/lexSendQIS.js
@@ -1,15 +1,18 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
-import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init from '@salesforce/apex/QISReportController.initForlexSendQISButton';
import sendSPO from '@salesforce/apex/QISReportController.updateQisForSendQIS';
-import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
-import { updateRecord } from 'lightning/uiRecordApi';
-
+/*
+ * @Description: 鍙戦�丵IS鍒癝PO
+ * @Author: hql
+ * @Date: 2023-07-12 09:45:19
+ * @LastEditTime: 2023-07-12 15:44:33
+ * @LastEditors:
+ */
export default class lexSendQIS extends LightningElement {
- @api recordId;
+ @api recordId;
str;
err;
IsLoading = true;
@@ -42,9 +45,9 @@
this.ProfileName = result.profileName;
this.IsSendQIS = result.isSendQIS;
if (this.qisRecordName == '2.OCSM') {
- const evt = new ShowToastEvent({
- title : '涓嶈兘鎻愪氦鍒癝PO',
- message: '璁板綍绫诲瀷涓�'+this.qisRecordName,
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '涓嶈兘鎻愪氦鍒癝PO璁板綍绫诲瀷涓�'+this.qisRecordName,
variant: 'error'
});
this.dispatchEvent(evt);
@@ -53,9 +56,9 @@
}
if (!(this.ProfileName == '绯荤粺绠$悊鍛�' || this.ProfileName == '2F4_鎶�鏈帹杩涢儴' || this.ProfileName == '2F1_鏈嶅姟绐楀彛')) {
- const evt = new ShowToastEvent({
- title : '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '娌℃湁鏉冮檺鎻愪氦锛岃鑱旂郴绯荤粺绠$悊鍛�',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -64,9 +67,9 @@
}
if (this.IsSendQIS) {
- const evt = new ShowToastEvent({
- title : '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '宸叉彁浜ゅ埌SPO锛岃涓嶈閲嶅鎻愪氦',
variant: 'error'
});
this.dispatchEvent(evt);
@@ -80,38 +83,33 @@
});
}
- updateRecordView(recordId) {
- updateRecord({fields: { Id: recordId }});
- }
-
send2SPO(){
- sendSPO({
- recordId: this.recordId
- }).then(result =>{
- console.log('result'+result);
+ sendSPO({
+ recordId: this.recordId
+ }).then(result =>{
+ console.log('result'+result);
this.err = result;
- if (result!='鎴愬姛') {
+ if (result!='鎴愬姛') {
const evt = new ShowToastEvent({
- title : '鏇存柊澶辫触',
- message: this.err,
+ title : '',
+ message: '鏇存柊澶辫触'+this.err,
variant: 'error'
});
this.dispatchEvent(evt);
this.dispatchEvent(new CloseActionScreenEvent());
return;
}else{
- const evt = new ShowToastEvent({
- title : '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
- message: '',
+ const evt = new ShowToastEvent({
+ title : '',
+ message: '鎻愪氦鎴愬姛锛佽鍦⊿PO绯荤粺涓畬鎴愰��鎹㈣揣鐢宠',
variant: 'success'
});
- this.dispatchEvent(evt);
- this.dispatchEvent(new CloseActionScreenEvent());
- this.updateRecordView(this.recordId);
+ this.dispatchEvent(evt);
+ this.dispatchEvent(new CloseActionScreenEvent());
window.location.replace("https://olympus.sharepoint.cn/sites/GSPWF/SitePages/HomePage.aspx");
}
- }).catch(error => {
+ }).catch(error => {
console.log('error='+error);
}).finally(() => {
--
Gitblit v1.9.1