unknown
2023-07-06 0cdd1fb35ea9838060388285888ba85e6d1a597c
出库指示

出库指示-备品借出申请 更新
2个文件已修改
35 ■■■■ 已修改文件
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.html
@@ -1,5 +1,2 @@
<template>
    <div class="EquipmentRentalPDF" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexLoanerArrangedEmail/lexLoanerArrangedEmail.js
@@ -4,10 +4,10 @@
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import { updateRecord } from 'lightning/uiRecordApi';
import init from '@salesforce/apex/loanerArrangedEmailController.init';
import getRentalApplyEquipmentSet from '@salesforce/apex/loanerArrangedEmailController.getRentalApplyEquipmentSet';
import init from '@salesforce/apex/LoanerArrangedEmailController.init';
import getRentalApplyEquipmentSet from '@salesforce/apex/LoanerArrangedEmailController.getRentalApplyEquipmentSet';
import approvalCheck from '@salesforce/apex/RentalApplyWebService.approvalCheck';
import setShipment_request from '@salesforce/apex/RentalApplyWebService.approvalCheck';
import setShipment_request from '@salesforce/apex/RentalApplyWebService.setShipment_request';
export default class lexLoanerArrangedEmail extends LightningElement {
    @api recordId;
    IsLoading = true;
@@ -24,9 +24,11 @@
    }
    connectedCallback() {
        init({
            recordId: this.recordId
        }).then(result => {
            let id = result.id;
            let statusArr = result.statusList;
            console.log('result==='+JSON.stringify(result));
            if(result != null) {
@@ -58,19 +60,24 @@
                            //bp2 alert(rs2);
                            //bp2 } else {
                            //var rs1 = sforce.apex.execute("RentalApplyWebService", "setShipment_request", {raid : "{!Rental_Apply__c.Id}"}); 
                            console.log('setShipment_request==');
                            setShipment_request({
                                raid: this.recordId
                            }).then(res=>{
                                console.log('res==',res);
                                if (res == "状态更新到已出库指示") {
                                    this.showToast("状态更新到已出库指示",'success');
                                if (res == '状态更新到已出库指示') {
                                    this.showToast('状态更新到已出库指示','success');
                                    print();
                                    // setTimeout(function() {
                                    //     location.href = "/{!Rental_Apply__c.Id}";
                                    // },100);
                                    this.updateRecordView(this.recordId);
                                    return;
                                }else {
                                    this.showToast(res,'error');
                                    console.log('else==',res);
                                     const evt = new ShowToastEvent({
                                        title: 'Error',
                                        message:res,
                                        variant: 'error'
                                    });
                                    this.dispatchEvent(evt);
                                    this.dispatchEvent(new CloseActionScreenEvent());
                                }
                            }).catch(e=>{
                                console.log('approvalCheck==='+e);
@@ -80,7 +87,6 @@
                        console.log('setShipment_request==='+e);
                    })                
                }
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        })
    }
@@ -89,7 +95,7 @@
        getRentalApplyEquipmentSet({
            recordId: this.recordId
        }).then(result => {
            window.open("https://ocsm--partial.sandbox.lightning.force.com/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result);
            window.open("/apex/FixtureRentalPDF?raid=" + this.recordId + "&page=" + result);
        })
    }
@@ -109,7 +115,7 @@
            variant: type
        });
        if(type == 'success'){
            this.updateRecordView();
            this.updateRecordView(this.recordId);
        }
        this.dispatchEvent(event);
        this.dispatchEvent(new CloseActionScreenEvent());