buli
2023-05-22 71b93327e8f3fb3bffffc7c033c1f782e7b6ab32
force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
@@ -6,6 +6,9 @@
import searchOrderInstatus from '@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus';
import searchConsumableorderdetails from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails';
import searchConsumableorFinish from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish';
//table css
import { loadStyle } from "lightning/platformResourceLoader";
import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
const columns = [
    { 
@@ -176,6 +179,7 @@
    @track userWorkLocation = '';
    @track showTable = false;
    @track hidecheckboxcolumn = true;
    stylesLoaded = false;
    //排序
    defaultSortDirection = 'asc';
@@ -198,6 +202,7 @@
                console.log('this.data = ' + JSON.stringify(this.data));
                this.isShowSpinner = false;
                this.showTable = true;
            } else {
                console.log('r = ' + JSON.stringify(r))
                this.showToast('Error', r.msg);
@@ -205,6 +210,20 @@
        }).catch((error) => {
            console.log('error = ' + JSON.stringify(error))
        })
    }
    renderedCallback() {
        debugger
        if (!this.stylesLoaded) {
            Promise.all([loadStyle(this, WrappedHeaderTable)])
                .then(() => {
                    console.log("Custom styles loaded");
                    this.stylesLoaded = true;
                })
                .catch((error) => {
                    console.error("Error loading custom styles");
                });
        }
    }
    //新建出库单
@@ -245,6 +264,7 @@
                    this.showToast('Success', this.message);
                }
                this.isShowSpinner = false;
                //this.isCssLoaded = true
                this.showTable = true;
            } else {
                this.showToast('Error', r.msg);