buli
2023-04-20 44f866419cde0ff12a91d9c1d92daf9e36b063e1
force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
@@ -9,43 +9,45 @@
        fieldName: 'Name__c',
        type: 'Name',
        sortable: true,
        initialWidth: 250,
        cellAttributes: { alignment: 'left' }
    },
    {
        label: '第三分类',
        fieldName: 'Category3__c',
        hideDefaultActions: true,
        sortable: true
        sortable: true,
        initialWidth: 90
    },
    {
        label: '第四分类',
        fieldName: 'Category4__c',
        hideDefaultActions: true,
        sortable: true
        sortable: true,
        initialWidth: 90
    },
    {
        label: '第五分类',
        fieldName: 'Category5__c',
        hideDefaultActions: true
        hideDefaultActions: true,
        initialWidth: 90
    },
    {
        label: '规格',
        fieldName: 'packing_list',
        hideDefaultActions: true,
        initialWidth: 100
        hideDefaultActions: true
    },
    {
        label: '单位',
        fieldName: 'BoxPiece',
        hideDefaultActions: true,
        initialWidth: 100
        hideDefaultActions: true
    },
    {
        label: '注册证编码号',
        fieldName: 'approbation_No',
        hideDefaultActions: true,
        initialWidth: 100
        initialWidth: 180,
        hideDefaultActions: true
    },
    {
        label: '注册有效期',
@@ -56,27 +58,33 @@
    {
        label: 'CFDA状态',
        fieldName: 'SFDA_Status__c',
        hideDefaultActions: true
        hideDefaultActions: true,
        initialWidth: 100
    },
    {
        label: '使用期限',
        fieldName: 'guaranteeperiod',
        hideDefaultActions: true
        hideDefaultActions: true,
        initialWidth: 100
    },
    {
        label: '有效期内库存',
        fieldName: 'limitCount',
        hideDefaultActions: true,
        sortable: true
        sortable: true,
        initialWidth: 100
    },
    {
        label: '过期库存',
        fieldName: 'overlimitCount',
        hideDefaultActions: true
        hideDefaultActions: true,
        initialWidth: 100
    }
];
export default class LexinventoryViewLWC extends LightningElement {
export default class LexinventoryViewLWC extends NavigationMixin(
    LightningElement
) {
    @track pageRecords = [];
    @track data = [];
    @track message = '';
@@ -90,9 +98,11 @@
    @track userWorkLocation;
    @track value = '';
    @track showTable = false;
    @track optionscatone = [];
    @track options2 = [];
    @track options3 = [];
    @track hidecheckboxcolumn = true;
    @track check = false;
    // @track options1 = [];
    // @track options2 = [];
    // @track options3 = [];
    columns = columns;
    defaultSortDirection = 'asc';
@@ -150,7 +160,7 @@
                        object['value'] = key;
                        option1ValueTemp.push(object);
                    }
                    this.optionscatone = option1ValueTemp;
                    this.options1 = option1ValueTemp;
                    console.log(
                        ' this.optionscatone===>' +
                            JSON.stringify(this.optionscatone)
@@ -163,12 +173,14 @@
                        option2ValueTemp.push(object);
                    }
                    this.options2 = option2ValueTemp;
                    let option3ValueTemp = [];
                    for (var key in result.entity.category5OptionMap) {
                        let object = {};
                        object['label'] = result.entity.category5OptionMap[key];
                        object['value'] = key;
                        this.options3.push(object);
                        option3ValueTemp.push(object);
                    }
                    this.options3 = option3ValueTemp;
                    console.log(' this.data=====>' + this.data);
@@ -196,13 +208,6 @@
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error));
            });
    }
    get options2() {
        return this.options2;
    }
    get options3() {
        return this.options3;
    }
    sortBy(field, reverse, primer) {
        const key = primer
@@ -266,12 +271,13 @@
        this.showTable = false;
        console.log('进入搜索11111111111111');
        console.log('进入搜索');
        console.log('this.Name = ' + this.Name);
        console.log('this.CategoryThree = ' + this.CategoryThree);
        console.log('this.CategoryFive = ' + this.CategoryFive);
        searchOrder({
            category1: this.Name,
            Category3: this.CategoryThree,
            Category4: '',
            Category5: '',
            Category4: this.CategoryFour,
            Category5: this.CategoryFive,
            orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
            accountName: this.accountName,
            agencyProType: this.agencyProType,
@@ -280,6 +286,10 @@
            .then((result) => {
                result = JSON.parse(JSON.stringify(result));
                console.log('result搜索 = ' + JSON.stringify(result));
                console.log(
                    'result搜索列表= ' +
                        JSON.stringify(result.entity.pageRecords)
                );
                if (result.status == 'Success') {
                    const evt = new ShowToastEvent({
                        title: '搜索成功',
@@ -287,7 +297,7 @@
                        variant: 'Success'
                    });
                    this.dispatchEvent(evt);
                    this.pageRecords = result.entity.pageRecords;
                    this.data = result.entity.pageRecords;
                    this.showTable = true;
                } else {
                    const evt = new ShowToastEvent({
@@ -304,6 +314,7 @@
                console.log('error = ' + JSON.stringify(error));
            });
    }
    inventoryCount() {
        console.log('111库存盘点');
        this[NavigationMixin.Navigate]({
@@ -313,6 +324,16 @@
            }
        });
    }
    handleExpired() {
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            attributes: {
                url: '/lexOverdueStock'
            }
        });
    }
    clearAll() {
        this.Name = '';
        this.value = '无';