| | |
| | | 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'; |
| | |
| | | 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(() => { |
| | |
| | | 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.initForlexOCSMNoToReportLightingButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisForlexOCSMNoToReportLighting'; |
| | |
| | | this.OCSMAdministrativeReportDate = result.oCSMAdministrativeReportDate; |
| | | this.qisReportId = result.Id; |
| | | this.Awaredate = result.awaredate; |
| | | if (!confirm("不要报告后无法撤回,是否继续?")) { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (this.OCSMAdministrativeReportDate != null || this.OCSMAdministrativeReportNumber != null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '已经报告的QIS,不可以点击OCSM不要报告', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | LightningConfirm.open({ |
| | | message: '不要报告后无法撤回,是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | if (this.OCSMAdministrativeReportDate != null || this.OCSMAdministrativeReportNumber != null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '已经报告的QIS,不可以点击OCSM不要报告', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (this.Awaredate!=null) { |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | const evt = new ShowToastEvent({ |
| | | title : '没有AwareDate或已经OCSM行政报告,请确认', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (this.Awaredate!=null) { |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | const evt = new ShowToastEvent({ |
| | | title : '没有AwareDate或已经OCSM行政报告,请确认', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |
| | |
| | | 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.initForlexOCSMToReportLightingButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisForlexOCSMToReportLighting'; |
| | |
| | | this.OCSMAdministrativeReportStatus = result.oCSMAdministrativeReportStatus; |
| | | this.qisReportId = result.Id; |
| | | this.Awaredate = result.awaredate; |
| | | if (!confirm("不要报告后无法撤回,是否继续?")) { |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (this.OCSMAdministrativeReportStatus == null && this.Awaredate!=null) { |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | const evt = new ShowToastEvent({ |
| | | title : '没有AwareDate或已经OCSM行政报告,请确认', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | LightningConfirm.open({ |
| | | message: '报告后无法撤回,是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | if (this.OCSMAdministrativeReportStatus == null && this.Awaredate!=null) { |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | const evt = new ShowToastEvent({ |
| | | title : '没有AwareDate或已经OCSM行政报告,请确认', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | } |
| | | |
| | | }); |
| | | }).catch(error => { |
| | | console.log(error); |
| | | }).finally(() => { |
| | |
| | | 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'; |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (!confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | return; |
| | | } |
| | | if (this.OSHstaff==null||this.OSHstaffEmail==null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : 'OSH担当必须填写', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | try{ |
| | | this.updateQisSubmit(); |
| | | }catch(err){ |
| | | if(err.faultstring !=undefined && err.faultstring.indexOf('INVALID_SESSION_ID') != -1) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '当前网页已登出,请您重新登录后刷新该网页!', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | const evt = new ShowToastEvent({ |
| | | title : err.faultstring, |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | 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担当必须填写', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | try{ |
| | | this.updateQisSubmit(); |
| | | }catch(err){ |
| | | if(err.faultstring !=undefined && err.faultstring.indexOf('INVALID_SESSION_ID') != -1) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '当前网页已登出,请您重新登录后刷新该网页!', |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } else { |
| | | const evt = new ShowToastEvent({ |
| | | title : err.faultstring, |
| | | message: '', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | return; |
| | | } |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | |
| | | 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.initForRCSubmitButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisWithRC'; |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | console.log('this.RCproblemnotfound='+(this.QISReplyDay!=null && this.RCproblemnotfound)); |
| | | if (this.CancelQISReason!=null) { |
| | | if (this.qisStatus == 'RC检测申请') { |
| | | const evt = new ShowToastEvent({ |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | if (this.QISReplyDay!=null && this.RCproblemnotfound) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '最终判定时,请取消[故障未发现留下继续观察]并选择[对应方法]', |
| | |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | if (confirm("一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | this.type = '1'; |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | LightningConfirm.open({ |
| | | message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | this.type = '1'; |
| | | console.log('this.type='+this.type); |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | }else{ |
| | | if (confirm("一旦提交关闭此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) { |
| | | this.type = '2'; |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | LightningConfirm.open({ |
| | | message: '一旦提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?', |
| | | variant: 'headerless', |
| | | label: 'this is the aria-label value', |
| | | }).then(res=>{ |
| | | if(res) { |
| | | this.type = '2'; |
| | | console.log('this.type='+this.type); |
| | | this.updateQisSubmit(); |
| | | }else{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | return; |
| | | } |
| | | |
| | | }); |
| | | } |
| | | console.log('this.type='+this.type); |
| | | |
| | | // this.dispatchEvent(new CloseActionScreenEvent()); |
| | | this.updateQisSubmit(); |
| | | |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |