| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import init from '@salesforce/apex/QISReportController.initForOCMSubmitButton'; |
| | | import updateQis from '@salesforce/apex/QISReportController.updateQisWithOCM'; |
| | | |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | /* |
| | | * @Description: 提交 |
| | | * @Author: hql |
| | | * @Date: 2023-07-12 09:45:19 |
| | | * @LastEditTime: 2023-07-12 15:44:33 |
| | | * @LastEditors: |
| | | */ |
| | | export default class lexOCMSubmit extends LightningElement { |
| | | @api recordId; |
| | | IsLoading = true; |
| | |
| | | this.isaohuiproduct = result.isaohuiproduct; |
| | | if (this.qisStatus!='草案中' && this.qisStatus!='取消') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '已经提交', |
| | | message: '', |
| | | title : '', |
| | | message: '已经提交', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | }else{ |
| | | if (this.qisStatus == '取消') { |
| | | const evt = new ShowToastEvent({ |
| | | title : '取消后的QIS不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个QIS', |
| | | message: '', |
| | | title : '', |
| | | message: '取消后的QIS不允许再提交,如果需要提交请点击\"复制\"按钮重新生成一个QIS', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | |
| | | if (this.QISInstallDate == null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '【购买日期/安装日期】为空时不能提交申请', |
| | | message: '', |
| | | title : '', |
| | | message: '【购买日期/安装日期】为空时不能提交申请', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | |
| | | if (this.contractnumber == null) { |
| | | const evt = new ShowToastEvent({ |
| | | title : '【销售合同上订单号码】为空时不能提交申请', |
| | | message: '', |
| | | title : '', |
| | | message: '【销售合同上订单号码】为空时不能提交申请', |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | |
| | | if (result!='成功') { |
| | | this.err = result; |
| | | const evt = new ShowToastEvent({ |
| | | title : '更新失败', |
| | | message: this.err, |
| | | title : '', |
| | | message: '更新失败'+this.err, |
| | | variant: 'error' |
| | | }); |
| | | this.dispatchEvent(evt); |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | } |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | updateRecord({fields: { Id: this.recordId }}); |
| | | }).catch(error => { |
| | | console.log('error='+error); |
| | | }).finally(() => { |