From 9feac84d311674e779d11c3c0a660f7204319b0a Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期五, 14 四月 2023 17:59:02 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.css         |   22 +++
 force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml |   11 +
 force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js          |   47 +++++++
 force-app/main/default/lwc/lexQISSC/lexQISSC.html                        |    5 
 force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html        |    5 
 force-app/main/default/classes/QISReportController.cls                   |  110 ++++++++++++++++++
 force-app/main/default/lwc/lexQISSC/lexQISSC.js                          |   96 ++++++++++++++++
 force-app/main/default/lwc/lexQISSC/lexQISSC.css                         |   22 +++
 force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml                 |   11 +
 9 files changed, 328 insertions(+), 1 deletions(-)

diff --git a/force-app/main/default/classes/QISReportController.cls b/force-app/main/default/classes/QISReportController.cls
index 3d6a036..73cdda1 100644
--- a/force-app/main/default/classes/QISReportController.cls
+++ b/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;
     }
 
 }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.css b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.css
new file mode 100644
index 0000000..9acb129
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.css
@@ -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 */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.html
@@ -0,0 +1,5 @@
+<template>
+   <div class="sisToOPDHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
new file mode 100644
index 0000000..d442403
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js
@@ -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(() => {
+            
+        }); 
+    }
+
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml
new file mode 100644
index 0000000..0030007
--- /dev/null
+++ b/force-app/main/default/lwc/lexPDFQISrequest/lexPDFQISrequest.js-meta.xml
@@ -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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.css b/force-app/main/default/lwc/lexQISSC/lexQISSC.css
new file mode 100644
index 0000000..9acb129
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.css
@@ -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 */
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.html b/force-app/main/default/lwc/lexQISSC/lexQISSC.html
new file mode 100644
index 0000000..c8bdbfc
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.html
@@ -0,0 +1,5 @@
+<template>
+   <div class="sisToOPDHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.js b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
new file mode 100644
index 0000000..2917728
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.js
@@ -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 : '鎮ㄦ病鏈夋柊寤篞IS甯傚満閮ㄦ潈闄愩��',
+                            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 : '瀵瑰簲鏂规硶涓鸿繑鍥炰笖瀵瑰簲涓绘満/娑堣�楀搧涓篍T 鎴� ENG 鎴� EndoRapid 鏃讹紝鎵嶅彲浠ユ柊寤恒��',
+                            message: '',
+                            variant: 'error'
+                        });
+                        
+                        this.dispatchEvent(new CloseActionScreenEvent());
+                        return;
+            	}
+            }
+        }).catch(error => {
+            console.log('error='+error);
+        }).finally(() => {
+            
+        }); 
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml b/force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml
new file mode 100644
index 0000000..5701aa7
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISSC/lexQISSC.js-meta.xml
@@ -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>
\ No newline at end of file

--
Gitblit v1.9.1