buli
2023-05-23 07390e2fcb4adf27c928335bf27ae7939c5a80ad
force-app/main/default/lwc/lexSelectRental/lexSelectRental.js
@@ -9,15 +9,27 @@
import getRecords  from '@salesforce/apex/SelectRentalButtonController.getRecords';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import findIdArea   from '@salesforce/apex/SelectRentalButtonController.findIdArea';
import {CurrentPageReference} from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
 const event = new ShowToastEvent({
            title: 'Recheck Please',
            message:
                '请至少选择一个备品set明细。',
        });
export default class lexSelectRental extends LightningElement {
   @api recordId;
   IsLoading;
   Equipment_Set_Detail__c;
    @api
    esdids;
   @wire(CurrentPageReference)
    getStateParameters(currentPageReference){
@@ -73,13 +85,13 @@
            let esid = this.Equipment_Set_Detail__c.Equipment_Set__c;
            console.log(esid);
            //选择借出是一个复选框,这里就是找复选框勾上的数据Id,不知道这个怎么接受从前端穿参数。
            //所以我直接查数据库
            let esdids =new Array();
            esdids=await getRecords();
            console.log(esdids);
            //所以我直接查数据库false,屏幕流接受参数
            // let this.esdids =new Array();
            // this.esdids=await getRecords();
            console.log(this.this.esdids);
            let hasError = false;
            //更新数据
            if (esdids.length > 0) {
            if (this.esdids.length > 0) {
               console.log('进入第一个if方法');
                let sqlResult = await getEquipmentSet({esid:esid});
                console.log(sqlResult);
@@ -99,7 +111,7 @@
                    }
                }
                let EqObject = await findIdArea({id : esdids});
                let EqObject = await findIdArea({id : this.esdids});
                console.log(EqObject);
                for (let i = 0; i < EqObject.length; i++) {
                    let esd = EqObject[i];