binxie
2023-06-26 dd004276162a2bf9d042ff0aaa569dc30a95d827
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
import LightningDatatable from 'lightning/datatable';
import customUnitTemplate from './customUnit.html';
import customShipmentNumberTemplate from './customShipmentNumber.html';
import customShippingUnitPriceTemplate from './customShippingUnitPrice.html';
import customShipmentAmountTemplate from './customShipmentAmount.html';
import customDiffReasonTemplate from './lexCustomDiffReason.html';
import attachmentTypeTemplate from './customAttachmentType.html';
import customTableInputTemplate from './customTableInput.html';
import customOutputGoodsTemplate from './customOutputGoods.html';
import customReturnGoodInputTemplate from './customReturnGoodInput.html';
import customInventoryColorTemplate from './customInventoryColor.html';
import customTableCellIconTemplate from './customTableCellIcon.html';
import customOutboundCountTemplate from './customOutboundCount.html';
import customWeeklyReportTemplate from './customWeeklyReport.html';
import customAgencyOppInputTemplate from './customAgencyOppInput.html';
import customMyDrCheckBoxTemplate from './customMyDrCheckBox.html';
import customdeleteReasonTemplate from './customdeleteReason.html';
import customAccountUrlTemplate from './customaccountUrl.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',
                'isDisabled'
            ]
        },
        customShipment: {
            template: customShipmentNumberTemplate,
            typeAttributes: [
                'shipmentNumber',
                'recordId',
                'isConinvoice',
                'esdInvoiceProNotCount'
            ]
        },
        customShipmentUnitPrice: {
            template: customShippingUnitPriceTemplate,
            typeAttributes: ['shippingUnitPrice', 'recordId']
        },
        customShipmentAmount: {
            template: customShipmentAmountTemplate,
            typeAttributes: ['shipmentAmount', 'recordId']
        },
        customDiffReason: {
            template: customDiffReasonTemplate,
            typeAttributes: ['ProdId', 'boxPiece']
        },
        customAttachmentType: {
            template: attachmentTypeTemplate,
            typeAttributes: [
                'typeValue',
                'typeOptions',
                'recordId',
                'isDisabledAttachment'
            ]
        },
        customTableInput: {
            template: customTableInputTemplate,
            typeAttributes: [
                'inputValue',
                'recordId',
                'valueType',
                'upperLimit',
                'lowerLimit',
                'allnumber'
            ]
        },
        customOutputGood: {
            template: customOutputGoodsTemplate,
            typeAttributes: ['outputValue', 'type', 'recordId']
        },
        customReturnGoodInput: {
            template: customReturnGoodInputTemplate,
            typeAttributes: ['inputValue', 'boxPrice', 'recordId']
        },
        customInventoryColor: {
            template: customInventoryColorTemplate,
            typeAttributes: ['value', 'upperlimit', 'lowerlimit', 'boxPrice']
        },
        tableCellIcon: {
            template: customTableCellIconTemplate,
            typeAttributes: ['iconName', 'recordId']
        },
        outboundCount: {
            template: customOutboundCountTemplate,
            typeAttributes: ['isDisable', 'recordId', 'Count']
        },
        weeklyReport: {
            template: customWeeklyReportTemplate,
            typeAttributes: ['recordId', 'hospitalName', 'isShowButton']
        },
        agencyOppInput: {
            template: customAgencyOppInputTemplate,
            typeAttributes: ['inputValue', 'recordId', 'fieldName', 'showType']
        },
        MyDrCheckBox: {
            template: customMyDrCheckBoxTemplate,
            typeAttributes: ['recordId', 'isCheckedMyDr']
        },
        deleteReason: {
            template: customdeleteReasonTemplate,
            typeAttributes: ['recordId']
        },
        customShowAccountUrl: {
            template: customAccountUrlTemplate,
            typeAttributes: ['accountName', 'accountUrl', 'isDisable']
        }
    };
    constructor() {
        super();
        Promise.all([loadStyle(this, LexCustomDataTable)]).then(() => {});
    }
}