黄千龙
2023-05-26 7986d6aaf7e235f2f5a7dac7345f97a76ac00b97
force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -1,11 +1,8 @@
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.initForlexQISSCButton';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { updateRecord } from 'lightning/uiRecordApi';
export default class lexQISSC extends LightningElement {
   @api recordId;
@@ -51,6 +48,7 @@
            console.log('qISSCReport='+this.qISSCReport);
            console.log('nextaction='+this.nextaction);
            console.log('qISMarketCategory='+this.qISMarketCategory);
            console.log('qISSCId='+this.qISSCId);
            if (this.profileName == '2F4_技术推进部' || this.profileName == '2F4_技术推进部_OSH 非单点') {
               const evt = new ShowToastEvent({
                            title : '您没有新建QIS市场部权限。',
@@ -62,8 +60,8 @@
                        return;
            }
            if (this.qISSCReport!=null) {
               var url = 'https://ocsm.my.salesforce.com/'+this.qISSCId;
               window.open(url);
                var urlPrefix = window.location.protocol + '//' + window.location.host+'/'+this.qISSCId;
                window.open(urlPrefix);
               this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }else{
@@ -77,6 +75,7 @@
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
               }else{
                    console.log('触发');
                  const evt = new ShowToastEvent({
                            title : '对应方法为返回且对应主机/消耗品为ET 或 ENG 或 EndoRapid 时,才可以新建。',
                            message: '',