From 4488f711dbc01a8db6753907cae2ef4021dede68 Mon Sep 17 00:00:00 2001 From: FUYU <fuyu@prec-tech.com> Date: 星期三, 13 十二月 2023 16:30:27 +0800 Subject: [PATCH] 修改前备份 --- force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js | 37 +++++++++++++++++++++++++++++-------- 1 files changed, 29 insertions(+), 8 deletions(-) diff --git a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js index 0585f10..cb6c4e2 100644 --- a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js +++ b/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; } -} \ No newline at end of file +} -- Gitblit v1.9.1