黄千龙
2023-08-08 1363fbac72b3c291821917fc883587c1928f1651
20230808上传修改伟意代码
8个文件已修改
1个文件已添加
143 ■■■■ 已修改文件
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexDiscountRequest/lexDiscountRequest.js
@@ -46,7 +46,6 @@
                this.RepairC = result.RepairC;
                this.DiscountRequest();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -63,10 +62,12 @@
                console.log(rp);
                if (rp.Return_Without_Repair_IF__c == true) {
                    this.ShowToastEvent("未修理归还的修理不允许减价申请", "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                } else {
                    if (rp.Return_Without_Repair__c == true) {
                        this.ShowToastEvent("已经申请未修理返回,如果需要继续修理请取消\"未修理归还申请\"的勾选后再进行减价申请操作", "error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }
                }
@@ -77,9 +78,13 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
                }else{
                        this.ShowToastEvent("更新成功!", "success");
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
            })
            updateRepairQuotation04({
                recordId: this.Id
@@ -87,9 +92,13 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }
                }else{
                        this.ShowToastEvent("更新成功!", "success");
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
            })
        })
    }
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.css
New file
@@ -0,0 +1,22 @@
.outerBorderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    border-top : 3px solid #565959;
}
.borderCss{
    border: 1px solid #D4D4D4;
    border-radius : 5px;
    margin-bottom : 7px;
    border-top : 3px solid #565959;
}
.headerDorderCss{
    border-top: 1px solid #565959;
    border-bottom: 1px solid #D4D4D4;
    padding:3px;
}
.centerCss{
    text-align: center;
}
.centerCss .left{
    margin-left: 100px;
}/* sample css file */
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.html
@@ -1,5 +1,6 @@
<template>
    <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexOCSMNogoods/lexOCSMNogoods.js
@@ -52,7 +52,6 @@
                this.isCNBuyC = result.isCNBuyC;
                this.OCSMNogoods();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -63,14 +62,18 @@
    OCSMNogoods() {
        if (this.QISStatusC != 'RC检测申请') {
            this.ShowToastEvent("OCM服务本部已经收到实物", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        } else {
            if ((this.isAEProfileC == undefined || this.isPAEProfileC == undefined) && this.isCNBuyC != 'true') {
                this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error");
                var btns = document.getElementsByName('rc_recieved');
                for (var i = 0; i < btns.length; i++) {
                    btns[i].disabled = true;
                    btns[i].className = 'btnDisabled';
                }
                this.ShowToastEvent("安全信息未判定,请联系质量法规部", "error");
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            } else {
                updateQisForRCRecieved({
                    QId: this.Id,
@@ -78,8 +81,14 @@
                }).then(result => {
                    console.log(result);
                    if (result.length > 0) {
                        alert(result);
                        this.ShowToastEvent(result, "error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }else{
                        this.ShowToastEvent('更新成功', "success");
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
                })
            }
        }
force-app/main/default/lwc/lexOSHNogoods/lexOSHNogoods.js
@@ -48,7 +48,6 @@
                this.email = result.email;
                this.OSHNogoods();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -59,6 +58,8 @@
    OSHNogoods() {
        if (this.QISStatusC != 'OSH检测申请' && this.QISStatusC != '完毕') {
            this.ShowToastEvent("OSH已经收到实物", "error")
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        } else {
            updateOSHNogoods({
                Id: this.Id,
@@ -68,7 +69,11 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }else{
                    this.ShowToastEvent('更新成功', "success");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
        }
force-app/main/default/lwc/lexRentalApplyDiscountApproval/lexRentalApplyDiscountApproval.js
@@ -61,7 +61,6 @@
                        this.RentalApplyDiscountApproval();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -74,16 +73,19 @@
        if (power != '2B2_备品中心检测&仓库管理') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        var status = this.RentalApplyDiscountStatusC;
        if (status == '审批中') {
            this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '批准') {
            this.ShowToastEvent("审批已批准,请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '草案中' || status == undefined || status == '驳回') {
@@ -94,12 +96,17 @@
                    console.log(result);
                    if (result.length > 0) {
                        var split = result.split(", ");
                        alert("提交失败 " + split[1]);
                        this.ShowToastEvent("提交失败 " + split[1], "error");
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                    }else{
                        this.ShowToastEvent("提交成功!", "success");
                        this.dispatchEvent(new CloseActionScreenEvent());
                    }
                })
            } else {
                this.ShowToastEvent("提交失败", "error");
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }
        }
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.html
@@ -2,5 +2,6 @@
    <div class="exampleHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
        <lightning-button onclick={handleConfirmClick} label="Open Confirm Modal"></lightning-button>
    </div>
</template>
force-app/main/default/lwc/lexSCSubmit/lexSCSubmit.js
@@ -14,6 +14,7 @@
import {
    ShowToastEvent
} from 'lightning/platformShowToastEvent';
import LightningConfirm from 'lightning/confirm';
export default class LexSCSubmit extends LightningElement {
    @api recordId;
@@ -39,12 +40,10 @@
        }).then(result => {
            console.log(result);
            if (result != null) {
                this.IsLoading = false;
                this.Id = result.Id;
                this.StatusC = result.StatusC;
                this.SCSubmit();
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -54,26 +53,12 @@
    // 提交待审批
    SCSubmit() {
        if (this.StatusC != '草案中') {
            this.ShowToastEvent("已经提交审批", "error")
            this.ShowToastEvent("已经提交审批", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (!confirm("一旦OCM提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?")) {
            return;
        }
        updateQISSCReport({
            QId: this.Id
        }).then(result => {
            console.log(result);
            if (result.length > 0) {
                var split = result.split(", ");
                alert(split[1]);
            } else {
                this.ShowToastEvent("已提交", "success")
                window.location.reload();
            }
        })
        this.handleConfirmClick("一旦OCM提交此记录以待批准,根据您的设置您可能不再能够编辑此记录或将他从批准过程中调回。是否继续?");
    }
    ShowToastEvent(msg, type) {
@@ -84,4 +69,32 @@
        });
        this.dispatchEvent(event);
    }
    async handleConfirmClick(msg) {
        const result = await LightningConfirm.open({
            message: msg,
            variant: 'headerless',
            label: 'this is the aria-label value'
        });
        if(result){
            updateQISSCReport({
                QId: this.Id
            }).then(result => {
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    // alert(split[1]);
                } else {
                    this.ShowToastEvent("已提交", "success");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    window.location.reload();
                }
            })
        }else{
            this.dispatchEvent(new CloseActionScreenEvent());
        }
    }
}
force-app/main/default/lwc/lexServiceCutPriceApply/lexServiceCutPriceApply.js
@@ -59,7 +59,6 @@
                        this.ServiceCutPriceApply();
                    }
                })
                this.dispatchEvent(new CloseActionScreenEvent());
            }
        }).catch(error => {
            console.log(error);
@@ -74,15 +73,18 @@
        if (power != '2F2A_RC' && power != '2F4_技术推进部' && power != '2F4_技术推进部_非SSO') {
            this.ShowToastEvent("对不起,您没有权限提交此申请!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        var status = this.CutPriceStatusServiceC;
        if (status == '审批中') {
            this.ShowToastEvent("审批提交成功,当前正在审批请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '批准') {
            this.ShowToastEvent("审批已批准,请勿再提交!", "error");
            this.dispatchEvent(new CloseActionScreenEvent());
            return;
        }
        if (status == '草案中' || status == undefined || status == '驳回') {
@@ -92,8 +94,12 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert(split[1]);
                    this.ShowToastEvent(split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                }else{
                    this.ShowToastEvent("更新成功!", "success");
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
            updateRepairQuotation02({
@@ -102,11 +108,13 @@
                console.log(result);
                if (result.length > 0) {
                    var split = result.split(", ");
                    alert("提交失败 " + split[1]);
                    this.ShowToastEvent("提交失败 " + split[1], "error");
                    this.dispatchEvent(new CloseActionScreenEvent());
                    return;
                } else {
                    this.ShowToastEvent("审批提交成功!", "success");
                    location.reload();
                    this.dispatchEvent(new CloseActionScreenEvent());
                }
            })
        }