FUYU
2023-12-13 4488f711dbc01a8db6753907cae2ef4021dede68
force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
@@ -228,7 +228,7 @@
    //分页start
    @track sortBy = '';
    @track pageSize = 10;
    @track pageSize = 200;
    error;
    records;
    currentPageToken = 0;
@@ -238,7 +238,7 @@
    @track pageNumber = 1;
    @track paginationVisibility = false;
    @track totalPages = 1;
    pageSizeOptions = [10, 25, 50, 100];
    pageSizeOptions = [100, 200, 300];
    @track recordStart = 0;
    @track recordEnd = 0;
    //end
@@ -458,7 +458,6 @@
                        let total = 100;
                        try {
                            for (var i in this.topAccountData) {
                                console.log('i = ' + i);
                                this.topAccountData[i]['accountName'] =
                                    this.topAccountData[i].Name;
                                this.topAccountData[i]['accountUrl'] =
@@ -486,6 +485,15 @@
                                        ) * 100
                                    ).toFixed(2)
                                );
                                console.log(
                                    'this.amend = ' +
                                        this.amend(
                                            this.topInfo.deList[i],
                                            this.topInfo.saleAmount,
                                            '/'
                                        ) *
                                            100
                                );
                                total -= number;
                                this.topAccountData[i]['proportion'] =
                                    number + '%';
@@ -497,12 +505,21 @@
                            );
                            //其他
                            console.log(
                                '(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = ' +
                                    (total.toFixed(2) > 0.0
                                        ? total.toFixed(2)
                                        : '0.00')
                            );
                            if (total != 100) {
                                this.topAccountData.push({
                                    accountName: '...',
                                    accountUrl: '/s/lexconsumableaccount',
                                    isDisable: true,
                                    proportion: total.toFixed(2) + '%',
                                    proportion:
                                        (total.toFixed(2) > 0.0
                                            ? total.toFixed(2)
                                            : '0.00') + '%',
                                    CityMasterName: '...',
                                    CityMasterNameUrl: '/lexconsumableaccount',
                                    Town__c: '...',
@@ -669,7 +686,10 @@
                            accountName: '...',
                            accountUrl: '/s/lexconsumableaccount',
                            isDisable: true,
                            proportion: total.toFixed(2) + '%',
                            proportion:
                                (total.toFixed(2) > 0.0
                                    ? total.toFixed(2)
                                    : '0.00') + '%',
                            CityMasterName: '...',
                            CityMasterNameUrl: '/lexconsumableaccount',
                            Town__c: '...',
@@ -801,18 +821,19 @@
    }
    onHandleSort(event) {
        console.log('event.detail.fieldName = ' + event.detail.fieldName);
        this.sortBy = event.detail.fieldName;
        switch (this.sortBy) {
            case 'NameUrl':
                this.sortBy = 'Name';
                break;
            case 'StateMasterUrl':
            case 'StateMasterName':
                this.sortBy = 'State_Master__r.Name';
                break;
            case 'RecordTypeName':
                this.sortBy = 'RecordType.Name';
                break;
            case 'CityMasterNameUrl':
            case 'CityMasterName':
                this.sortBy = 'City_Master__r.Name';
                break;
        }
@@ -862,4 +883,4 @@
    get nextButtonDisabled() {
        return this.nextPageToken === undefined;
    }
}
}