import { LightningElement,wire,api } from 'lwc'; import getConsumOrderItem from '@salesforce/apex/lexBatchApprovalRecordsController.getConsumOrderItem'; const columns = [ { label: '名称', fieldName: 'Name', type: 'text' }, { label: '产品型号', fieldName: 'Asset_Model_No__c', type: 'text' }, { label: 'OT Code', fieldName: 'OT_Code__c', type: 'text' }, { label: '采购单价', fieldName: 'Intra_Trade_List_RMB__c', type: 'number' }, { label: '采购数量', fieldName: 'Consumable_count__c', type: 'number' }, ]; export default class LexShowdetail extends LightningElement { @api consumId; columns = columns; data; @wire(getConsumOrderItem,{ recordId: "$consumId" }) getConsumOrderItem(result) { console.log('****ddd',result); if (result.data != undefined) { this.data = result.data; } } hideModalBox(event){ const openPageEvent = new CustomEvent('cancel', { detail: {}, }); this.dispatchEvent(openPageEvent); } }