unknown
2023-07-06 21b0eacc4f61c753fcdd2d6fd60ec1c5a837cebd
现场统一收货

现场统一收货 备品借出申请 更新
2个文件已修改
40 ■■■■ 已修改文件
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.html
@@ -1,5 +1,2 @@
<template>
    <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexAllReceivedFse/lexAllReceivedFse.js
@@ -2,6 +2,7 @@
import { CurrentPageReference,NavigationMixin } from 'lightning/navigation';
import { CloseActionScreenEvent } from 'lightning/actions';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/AllReceivedFseController.init';
import getRaeSet from '@salesforce/apex/AllReceivedFseController.getRaeSet';
@@ -39,23 +40,11 @@
                    recordId: this.recordId
                }).then(res=>{
                    if(res == 'SUCCESS'){
                        const evt = new ShowToastEvent({
                            title : '现场已全部收货',
                            message: '',
                            variant: 'success'
                        });
                        this.dispatchEvent(new CloseActionScreenEvent());
                        this.dispatchEvent(evt);
                        this.showToast('现场已全部收货','success');
                        return;
                    }else{
                        const errToast = new ShowToastEvent({
                            title : res,
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(new CloseActionScreenEvent());
                        this.dispatchEvent(errToast);
                        console.log(res);
                        this.showToast(res,'warning');
                        return;
                    }
                    
                })
@@ -67,4 +56,20 @@
            console.log('init==='+err);
        })
    }
    showToast(msg,type) {
        const event = new ShowToastEvent({
            message: msg,
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());
    }
    updateRecordView(recordId) {
        updateRecord({fields: { Id: recordId }});
    }
}