黄千龙
2023-05-24 ac49e658cf9674065476431a5deb81a93d1bc25a
force-app/main/default/lwc/lexOSHSubmit/lexOSHSubmit.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.initForOSHSubmitButton';
import updateQis  from '@salesforce/apex/QISReportController.updateQis1';
@@ -64,9 +65,13 @@
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
            }
            if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
            return;
         }
            LightningConfirm.open({
            message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?',
            variant: 'headerless',
            label: 'this is the aria-label value',
            }).then(res=>{
                if(res) {
         if (this.OSHstaff==null||this.OSHstaffEmail==null) {
                const evt = new ShowToastEvent({
                            title : 'OSH担当必须填写',
@@ -101,6 +106,12 @@
                }
                return;
            }
                }else{
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
            });
         
        }).catch(error => {
            console.log('error='+error);