From 7687b7bd101f0fb43342e95344d143a12d3e6d3d Mon Sep 17 00:00:00 2001
From: unknown <sunxia@prec-tech.com>
Date: 星期三, 19 七月 2023 17:55:08 +0800
Subject: [PATCH] button-lexEquipmentRentalPicturePDF
---
force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js | 21 +++++++++++++--------
1 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
index 2d24bf8..30c6e36 100644
--- a/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
+++ b/force-app/main/default/lwc/lexEquipmentRentalPicturePDF/lexEquipmentRentalPicturePDF.js
@@ -4,7 +4,7 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
-import init from '@salesforce/apex/EquipmentRentalPicturePDFController.init';
+import init from '@salesforce/apex/LexEquipmentRentalPicturePDFController.init';
export default class lexEquipmentRentalPicturePDF extends LightningElement {
@api recordId;
IsLoading = true;
@@ -25,15 +25,20 @@
init({
recordId: this.recordId
}).then(result=>{
- //console.log('result.shipmentRequestedCnt===' + result.shipmentRequestedCnt)
- if( result.shipmentRequestedCnt > 0){
- console.log(result.pagelength);
- for(var i =0; i<result.pagelength; i++){
- this.dispatchEvent(new CloseActionScreenEvent());
- window.open('/apex/FixtureRentalPicturePDF?raid='+ this.recordId +'&page=' + i);
+ console.log('result==='+JSON.stringify(result));
+ if(result){
+ //console.log('result.shipmentRequestedCnt===' + result.shipmentRequestedCnt)
+ if( result.shipmentRequestedCnt > 0){
+ console.log(result.pagelength);
+ for(var i =0; i<result.pagelength; i++){
+ this.dispatchEvent(new CloseActionScreenEvent());
+ window.open('/apex/FixtureRentalPicturePDF?raid='+ this.recordId +'&page=' + i);
+ }
+ }else{
+ this.showToast('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��','error');
}
}else{
- this.showToast('褰撳墠鐨勭敵璇峰崟涓病鏈夊凡鍑哄簱鎸囩ず鐨勯厤濂椼��','error');
+ this.showToast("鏈煡鍒版暟鎹�", 'error');
}
}).catch(err=>{
this.dispatchEvent(new CloseActionScreenEvent());
--
Gitblit v1.9.1