buli
2023-05-04 d4a4ce824f3b2f3a335a3ad8e8c9efb3b37d630f
force-app/main/default/lwc/lexCustomLightningDatatable/lexCustomLightningDatatable.js
@@ -5,44 +5,58 @@
import customShipmentAmountTemplate from './customShipmentAmount.html';
import customDiffReasonTemplate from './lexCustomDiffReason.html';
import attachmentTypeTemplate from './customAttachmentType.html';
import { loadStyle} from 'lightning/platformResourceLoader';
import customTableInputTemplate from './customTableInput.html';
import customOutputGoodsTemplate from './customOutputGoods.html';
import customReturnGoodInputTemplate from './customReturnGoodInput.html';
import { loadStyle } from 'lightning/platformResourceLoader';
import LexCustomDataTable from '@salesforce/resourceUrl/LexCustomDataTable';
export default class LexCustomLightningDatatable extends LightningDatatable {
    static customTypes = {
        customUnit: {
            template: customUnitTemplate,
            typeAttributes: ['unitValue','unitOptions','recordId'],
            typeAttributes: ['unitValue', 'unitOptions', 'recordId']
        },
        customShipment: {
            template: customShipmentNumberTemplate,
            typeAttributes: ['shipmentNumber','recordId'],
            typeAttributes: ['shipmentNumber', 'recordId']
        },
        customShipmentUnitPrice: {
            template: customShippingUnitPriceTemplate,
            typeAttributes: ['shippingUnitPrice','recordId'],
            typeAttributes: ['shippingUnitPrice', 'recordId']
        },
        customShipmentAmount: {
            template: customShipmentAmountTemplate,
            typeAttributes: ['shipmentAmount','recordId'],
            typeAttributes: ['shipmentAmount', 'recordId']
        },
        customDiffReason : {
        customDiffReason: {
            template: customDiffReasonTemplate,
            typeAttributes: ['ProdId'],
            typeAttributes: ['ProdId']
        },
        customAttachmentType: {
            template: attachmentTypeTemplate,
            typeAttributes: ['typeValue','typeOptions','recordId','isDisabledAttachment'],
            typeAttributes: [
                'typeValue',
                'typeOptions',
                'recordId',
                'isDisabledAttachment'
            ]
        },
        customTableInput: {
            template: customTableInputTemplate,
            typeAttributes:['inputValue','recordId'],
            typeAttributes: ['inputValue', 'recordId']
        },
        customOutputGood: {
            template: customOutputGoodsTemplate,
            typeAttributes: ['outputValue', 'type', 'recordId']
        },
        customReturnGoodInput: {
            template: customReturnGoodInputTemplate,
            typeAttributes: ['inputValue', 'boxPrice', 'recordId']
        }
    };
    constructor() {
        super();
        Promise.all([
            loadStyle(this, LexCustomDataTable),
        ]).then(() => {})
        Promise.all([loadStyle(this, LexCustomDataTable)]).then(() => {});
    }
}
}