19626
2023-04-14 9feac84d311674e779d11c3c0a660f7204319b0a
Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev
8个文件已添加
1个文件已修改
329 ■■■■■ 已修改文件
force-app/main/default/classes/QISReportController.cls 110 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.css 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.html 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.js 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/QISReportController.cls
@@ -502,8 +502,42 @@
        }
         return re;
    }
     // QIS市场部意见
    @AuraEnabled
    public static InitData initForlexQISSCButton (String recordId){
        InitData res = new initData();
        ID myUserID = UserInfo.getUserId();
        User userinfo = [SELECT id,Profile.name FROM User WHERE Id = :myUserID LIMIT 1];
        try{
            QIS_Report__c report = [SELECT  id,name,QIS_SC_Report__c,QIS_SC_Id__c,next_action__c,QIS_Market_Category__c FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            res.name = report.name;
            res.profileName = userinfo.Profile.name;
            res.qISSCId = report.QIS_SC_Id__c;
            res.qISSCReport = report.QIS_SC_Report__c;
            res.nextaction = report.next_action__c;
            res.qISMarketCategory = report.QIS_Market_Category__c;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
     // PDF(QIS申请书)
    @AuraEnabled
    public static InitData initForlexPDFQISrequestButton (String recordId){
        InitData res = new initData();
        try{
            QIS_Report__c report = [SELECT  id FROM QIS_Report__c WHERE Id = :recordId LIMIT 1];
            res.Id = report.Id;
            System.debug(LoggingLevel.INFO, '*** res: ' + res);
        }catch(Exception e){
            System.debug(LoggingLevel.INFO, '*** e: ' + e);
        }
        return res;
    }
    public class InitData{
        @AuraEnabled
       @AuraEnabled
        public String Id;
        @AuraEnabled
        public String qISSCReport;
@@ -512,7 +546,75 @@
        @AuraEnabled
        public String qISSCId;
        @AuraEnabled
        public String accParentId;
        @AuraEnabled
        public String accParentRecordTypeId;
        @AuraEnabled
        public String accParentParentFSEGIMainLeader;
        @AuraEnabled
        public String accParentParentFSEGIMainLeaderWorkLocation;
        @AuraEnabled
        public String accParentParentFSESPMainLeader;
        @AuraEnabled
        public String accParentParentFSESPMainLeaderWorkLocation;
        @AuraEnabled
        public String oCMjudgement;
        @AuraEnabled
        public String comment;
        @AuraEnabled
        public String isUsedForTheOpera;
        @AuraEnabled
        public String failuerSituation;
        @AuraEnabled
        public String sourceOnCall;
        @AuraEnabled
        public String sourceOnCallname;
        @AuraEnabled
        public String hospitalId;
        @AuraEnabled
        public String hospitalname;
        @AuraEnabled
        public String departmentClassId;
        @AuraEnabled
        public String departmentClassname;
        @AuraEnabled
        public String hospitalDepartment;
        @AuraEnabled
        public String hospitalDepartmentname;
        @AuraEnabled
        public String nonyushohinId;
        @AuraEnabled
        public String nonyushohinIdname;
        @AuraEnabled
        public String sourceforrepair;
        @AuraEnabled
        public String repairSalesPointProvinceChina;
        @AuraEnabled
        public String damageForDocOrPat;
        @AuraEnabled
        public String relationWithTheProblem;
        @AuraEnabled
        public String reportForGoz;
        @AuraEnabled
        public String whichProject;
        @AuraEnabled
        public String operaName;
        @AuraEnabled
        public String breakORFallOff;
        @AuraEnabled
        public String setusageproduct;
        @AuraEnabled
        public String afterFailureInformation;
        @AuraEnabled
        public String delay15Min;
        @AuraEnabled
        public String informationFrom;
        @AuraEnabled
        public String failureQInHospital;
        @AuraEnabled
        public String ownerId;
        @AuraEnabled
        public String ownername;
        @AuraEnabled
        public String qisRecordTypeId;
        @AuraEnabled
@@ -556,6 +658,10 @@
        @AuraEnabled
        public Date oSHInspectionDate;
        @AuraEnabled
        public Date faliourdate;
        @AuraEnabled
        public Date trableoccurdaYcollect;
        @AuraEnabled
        public Date cdsdate;
        @AuraEnabled
        public Date awaredate;
@@ -567,6 +673,8 @@
        public Boolean isaohuiproduct;
        @AuraEnabled
        public Boolean isSendQIS;
        @AuraEnabled
        public Boolean specialfollow;
    }
}
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.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 *//* sample css file */
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html
New file
@@ -0,0 +1,5 @@
<template>
   <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
New file
@@ -0,0 +1,47 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexPDFQISrequestButton';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { updateRecord } from 'lightning/uiRecordApi';
export default class lexPDFQISrequest extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    err;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
    }
    connectedCallback () {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            window.open('/apex/QISPDF?id='+this.qisReportId, 'QISPDF');
            this.dispatchEvent(new CloseActionScreenEvent());
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
}
force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexPDFQISrequest">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>
force-app/main/default/lwc/lexQISSC/lexQISSC.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 *//* sample css file */
force-app/main/default/lwc/lexQISSC/lexQISSC.html
New file
@@ -0,0 +1,5 @@
<template>
   <div class="sisToOPDHolder" if:true={IsLoading}>
        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
    </div>
</template>
force-app/main/default/lwc/lexQISSC/lexQISSC.js
New file
@@ -0,0 +1,96 @@
import { LightningElement,wire,track,api} from 'lwc';
import { CurrentPageReference } from "lightning/navigation";
import { CloseActionScreenEvent } from 'lightning/actions';
import { NavigationMixin } from 'lightning/navigation';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import init  from '@salesforce/apex/QISReportController.initForlexQISSCButton';
import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
import { updateRecord } from 'lightning/uiRecordApi';
export default class lexQISSC extends LightningElement {
    @api recordId;
    IsLoading = true;
    qisReportId;
    name;
    profileName;
    qISSCId;
    qISSCReport;
    nextaction;
    qISMarketCategory;
    err;
    @wire(CurrentPageReference)
     getStateParameters(currentPageReference) {
             console.log(111);
             console.log(currentPageReference);
         if (currentPageReference) {
           const urlValue = currentPageReference.state.recordId;
           if (urlValue) {
             let str = `${urlValue}`;
             console.log("str");
             console.log(str);
             this.recordId = str;
           }
         }
    }
    connectedCallback () {
        init({
            recordId: this.recordId
        }).then(result => {
            this.IsLoading = false;
            this.qisReportId = result.Id;
            this.name = result.name;
            this.qISSCId = result.qISSCId;
            this.qISSCReport = result.qISSCReport;
            this.nextaction = result.nextaction;
            this.qISMarketCategory = result.qISMarketCategory;
            this.profileName = result.profileName;
            console.log('profileName='+this.profileName);
            console.log('qISSCReport='+this.qISSCReport);
            console.log('nextaction='+this.nextaction);
            console.log('qISMarketCategory='+this.qISMarketCategory);
            if (this.profileName == '2F4_技术推进部' || this.profileName == '2F4_技术推进部_OSH 非单点') {
                const evt = new ShowToastEvent({
                            title : '您没有新建QIS市场部权限。',
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(evt);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
            }
            if (this.qISSCReport!=null) {
                var url = 'https://ocsm.my.salesforce.com/'+this.qISSCId;
                window.open(url);
                this.dispatchEvent(new CloseActionScreenEvent());
                return;
            }else{
                if (this.nextaction == '送回' && (this.qISMarketCategory == 'ET' || this.qISMarketCategory == 'ENG' || this.qISMarketCategory == 'EndoRapid')) {
                    var urlStr ='/a3w/e?CF00N100000095xFJ='+this.name+
                            '&CF00N100000095xFJ_lkid='+this.qisReportId+
                            '&retURL='+this.qisReportId+
                            '&Name='+this.name;
                        window.open(urlStr);
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                }else{
                    const evt = new ShowToastEvent({
                            title : '对应方法为返回且对应主机/消耗品为ET 或 ENG 或 EndoRapid 时,才可以新建。',
                            message: '',
                            variant: 'error'
                        });
                        this.dispatchEvent(new CloseActionScreenEvent());
                        return;
                }
            }
        }).catch(error => {
            console.log('error='+error);
        }).finally(() => {
        });
    }
}
force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml
New file
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata" fqn="lexQISSC">
    <apiVersion>54.0</apiVersion>
    <isExposed>true</isExposed>
    <targets>
        <target>lightning__RecordPage</target>
        <target>lightning__AppPage</target>
        <target>lightning__HomePage</target>
        <target>lightning__RecordAction</target>
    </targets>
</LightningComponentBundle>