From 5b5c1e16deaa3a9d6d0ed1ffca390655ed103df7 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 14 七月 2023 14:56:14 +0800
Subject: [PATCH] lex community

---
 force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js |   63 +++++++++++--------------------
 1 files changed, 22 insertions(+), 41 deletions(-)

diff --git a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
index a81d360..270892f 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
@@ -361,7 +361,7 @@
                                 : r.entity.obj.Parent.Name;
                         console.log(
                             'this.accountDataInfo = ' +
-                                JSON.stringify(this.accountDataInfo)
+                            JSON.stringify(this.accountDataInfo)
                         );
                         this.printUrl =
                             '/lexconsumableaccountinfoprint?AccId=' +
@@ -397,7 +397,7 @@
                         this.recordEnd = r.entity.paginatedAccounts.recordEnd;
                         this.totalPages = Math.ceil(
                             r.entity.paginatedAccounts.totalRecords /
-                                this.pageSize
+                            this.pageSize
                         );
                         console.log('this.totalPages = ' + this.totalPages);
                         this.paginationVisibility =
@@ -432,12 +432,12 @@
                         }
                         console.log(
                             'this.listViewOptions = ' +
-                                JSON.stringify(this.listViewOptions)
+                            JSON.stringify(this.listViewOptions)
                         );
 
                         console.log(
                             'r.entity.topInfo = ' +
-                                JSON.stringify(r.entity.topInfo)
+                            JSON.stringify(r.entity.topInfo)
                         );
                         //top10瀹㈡埛
                         this.topInfo = r.entity.topInfo;
@@ -447,13 +447,13 @@
                         this.topAccountData = this.topInfo.acList;
                         console.log(
                             'this.topAccountData = ' +
-                                JSON.stringify(this.topAccountData)
+                            JSON.stringify(this.topAccountData)
                         );
                         console.log(
                             '9/3 = ' +
-                                this.keepTwoDecimalStr(
-                                    this.amend(9, 3, '/').toFixed(2)
-                                )
+                            this.keepTwoDecimalStr(
+                                this.amend(9, 3, '/').toFixed(2)
+                            )
                         );
                         let total = 100;
                         try {
@@ -485,15 +485,7 @@
                                         ) * 100
                                     ).toFixed(2)
                                 );
-                                console.log(
-                                    'this.amend = ' +
-                                        this.amend(
-                                            this.topInfo.deList[i],
-                                            this.topInfo.saleAmount,
-                                            '/'
-                                        ) *
-                                            100
-                                );
+                                console.log('this.amend = ' +  this.amend(this.topInfo.deList[i],this.topInfo.saleAmount,'/') * 100);
                                 total -= number;
                                 this.topAccountData[i]['proportion'] =
                                     number + '%';
@@ -501,25 +493,17 @@
 
                             console.log(
                                 'this.topAccountData = ' +
-                                    JSON.stringify(this.topAccountData)
+                                JSON.stringify(this.topAccountData)
                             );
 
                             //鍏朵粬
-                            console.log(
-                                '(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = ' +
-                                    (total.toFixed(2) > 0.0
-                                        ? total.toFixed(2)
-                                        : '0.00')
-                            );
+                            console.log('(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = ' + (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00'))
                             if (total != 100) {
                                 this.topAccountData.push({
                                     accountName: '...',
                                     accountUrl: '/s/lexconsumableaccount',
                                     isDisable: true,
-                                    proportion:
-                                        (total.toFixed(2) > 0.0
-                                            ? total.toFixed(2)
-                                            : '0.00') + '%',
+                                    proportion: (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00') + '%',
                                     CityMasterName: '...',
                                     CityMasterNameUrl: '/lexconsumableaccount',
                                     Town__c: '...',
@@ -645,7 +629,7 @@
                     this.topAccountData = this.topInfo.acList;
                     console.log(
                         'this.topAccountData = ' +
-                            JSON.stringify(this.topAccountData)
+                        JSON.stringify(this.topAccountData)
                     );
                     let total = 100;
                     for (var i in this.topAccountData) {
@@ -686,10 +670,7 @@
                             accountName: '...',
                             accountUrl: '/s/lexconsumableaccount',
                             isDisable: true,
-                            proportion:
-                                (total.toFixed(2) > 0.0
-                                    ? total.toFixed(2)
-                                    : '0.00') + '%',
+                            proportion: (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00') + '%',
                             CityMasterName: '...',
                             CityMasterNameUrl: '/lexconsumableaccount',
                             Town__c: '...',
@@ -807,11 +788,11 @@
     sortByMethod(field, reverse, primer) {
         const key = primer
             ? function (x) {
-                  return primer(x[field]);
-              }
+                return primer(x[field]);
+            }
             : function (x) {
-                  return x[field];
-              };
+                return x[field];
+            };
 
         return function (a, b) {
             a = key(a);
@@ -821,7 +802,7 @@
     }
 
     onHandleSort(event) {
-        console.log('event.detail.fieldName = ' + event.detail.fieldName);
+        console.log('event.detail.fieldName = ' + event.detail.fieldName)
         this.sortBy = event.detail.fieldName;
         switch (this.sortBy) {
             case 'NameUrl':
@@ -883,4 +864,4 @@
     get nextButtonDisabled() {
         return this.nextPageToken === undefined;
     }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1