buli
2023-06-05 cb95755fe8496d8af6d40b05c4bbd4b6df2e77ab
force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
@@ -133,7 +133,7 @@
         label: "CFDA状态",
         fieldName: "SFDA_Status__c",
         cellAttributes: { alignment: "left" },
         initialWidth: 80,
         initialWidth: 95,
         wrapText: true,
         hideDefaultActions: true,
      },
@@ -142,11 +142,12 @@
         fieldName: "guaranteeperiod",
         cellAttributes: { alignment: "left" },
         hideDefaultActions: true,
         initialWidth: 95
         initialWidth: 105
      },
      {
         label:'有效期内库存',
         type: "customInventoryColor",
         // sortable: true,
         cellAttributes: {alignment: "right" },
         typeAttributes: {
         value: { fieldName:"limitCount"},
@@ -155,8 +156,7 @@
         boxPrice:{ fieldName: "BoxPiece" },
         },
         hideDefaultActions: true,
         initialWidth:95
         initialWidth:150
      },
      {
@@ -164,7 +164,7 @@
         fieldName: "overlimitCount",
         hideDefaultActions: true,
         cellAttributes: { alignment: "right" },
         initialWidth:75
         initialWidth:80
      }
   ];
   defaultSortDirection = "asc";
@@ -272,7 +272,7 @@
                        hideDefaultActions: true,
                  type:'boolean',
                  cellAttributes: { alignment: "left" },
                  initialWidth:75
                  initialWidth:80
                    };
                    this.columns.push(object1);
@@ -290,23 +290,13 @@
            this.showSpinner = false;
         } else {
            // this.showToast("Error",'Error', result.msg);
            this.showMyToast('初始化失败','result.msg','error');
            this.showMyToast('初始化失败',result.msg,'error');
         }
      }).catch((error) => {
         this.loader = false;
         this.showSpinner = false;
         console.log("error = " + JSON.stringify(error));
      });
   }
   handlePaginatorChange(event) {
      this.recordsToDisplay = event.detail.recordsToDisplay;
      this.preSelected = event.detail.preSelected;
      if (this.recordsToDisplay && this.recordsToDisplay > 0) {
         this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
      } else {
         this.rowNumberOffset = 0;
      }
   }
   handleChange(event) {
@@ -441,7 +431,7 @@
               this.showTable = true;
            } else {
               // this.showToast("Error",'Error', result.msg);
               this.showMyToast('搜索失败','result.msg','error');
               this.showMyToast('搜索失败',result.msg,'error');
            }
         })
         .catch((error) => {
@@ -452,7 +442,7 @@
      this[NavigationMixin.Navigate]({
         type: 'standard__webPage',
         attributes: {
            url: '/lexInventory'
            url: '/lexinventory'
         }
      });
   }
@@ -462,7 +452,7 @@
      this[NavigationMixin.Navigate]({
         type: 'standard__webPage',
         attributes: {
            url: '/lexoverdueStock'
            url: '/lexoverduestock'
         }
      });
@@ -480,7 +470,7 @@
      this[NavigationMixin.Navigate]({
         type: 'standard__webPage',
         attributes: {
            url: '/lexCancelRemoveBox'
            url: '/lexcancelremovebox'
         }
      });
@@ -539,7 +529,7 @@
               this.showSpinner = false;
            } else {
               // this.showToast("Error", 'Error',result.msg);
               this.showMyToast('搜索失败','result.msg','error');
               this.showMyToast('搜索失败',result.msg,'error');
            }
         })
         .catch((error) => {
@@ -587,6 +577,15 @@
      this.sortDirection = sortDirection;
      this.sortedBy = sortedBy;
   }
   handlePaginatorChange(event) {
      this.recordsToDisplay = event.detail.recordsToDisplay;
      this.preSelected = event.detail.preSelected;
      if (this.recordsToDisplay && this.recordsToDisplay > 0) {
         this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
      } else {
         this.rowNumberOffset = 0;
      }
   }
   handlePrevious() {
      this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);