黄千龙
2023-05-24 ac49e658cf9674065476431a5deb81a93d1bc25a
force-app/main/default/lwc/lexOCMSubmit/lexOCMSubmit.js
@@ -2,6 +2,7 @@
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import LightningConfirm from 'lightning/confirm';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForOCMSubmitButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQisWithOCM';
@@ -86,18 +87,23 @@
               this.dispatchEvent(new CloseActionScreenEvent());
            return;
            }
            if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
               this.dispatchEvent(new CloseActionScreenEvent());
            return;
         }
         this.updateQisSubmit();
         if (this.isaohuiproduct) {
            this.dispatchEvent(new CloseActionScreenEvent());
                this.updateRecordView(this.recordId);
         }
         this.dispatchEvent(new CloseActionScreenEvent());
            this.updateRecordView(this.recordId);
                LightningConfirm.open({
                message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
                variant: 'headerless',
                label: 'this is the aria-label value',
                }).then(res=>{
                    if(res) {
                        this.updateQisSubmit();
                        if (this.isaohuiproduct) {
                            this.dispatchEvent(new CloseActionScreenEvent());
                            this.updateRecordView(this.recordId);
                        }
                    }else{
                        this.dispatchEvent(new CloseActionScreenEvent());
                        this.updateRecordView(this.recordId);
                        return;
                    }
                });
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {