| | |
| | | import { ShowToastEvent } from 'lightning/platformShowToastEvent'; |
| | | import { updateRecord } from 'lightning/uiRecordApi'; |
| | | |
| | | import init from '@salesforce/apex/ReturnDeliverySlipController.init'; |
| | | import init from '@salesforce/apex/LexReturnDeliverySlipController.init'; |
| | | export default class lexReturnDeliverySlip extends LightningElement { |
| | | |
| | | @api recordId; |
| | |
| | | init({ |
| | | recordId: this.recordId |
| | | }).then(result =>{ |
| | | console.log(JSON.stringify(result.raeSet)); |
| | | console.log('result==='+JSON.stringify(result)); |
| | | if(result){ |
| | | var check = result.raeSet && result.raeSet.length>0; |
| | | if((check || result.rentalApplyEquipmentSetCnt - result.loanerReceivedNgNum > 0) && result.rentalApplyEquipmentSetCnt > 0){ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | |
| | | }else{ |
| | | this.showToast("没有申请者收到确认的借出备品", 'error'); |
| | | } |
| | | }else{ |
| | | this.showToast("未查到数据", 'error'); |
| | | } |
| | | }).catch(err=>{ |
| | | this.dispatchEvent(new CloseActionScreenEvent()); |
| | | console.log('err=='+err); |