From ccae2e57272d79bb29ab6d78cff74686780ea35b Mon Sep 17 00:00:00 2001
From: twysparks <twysparks@163.com>
Date: 星期一, 15 五月 2023 14:38:51 +0800
Subject: [PATCH] tt

---
 force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml   |   11 
 force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml                |   11 
 force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js              |   79 ++++++
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js               |   71 +++++
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html                 |    6 
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml          |   11 
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html             |    6 
 force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js          |   81 ++++++
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml                  |   11 
 force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js                         |   57 ++++
 force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html        |    5 
 force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml |   11 
 force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml      |   11 
 /dev/null                                                                                       |   25 --
 force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml     |   11 
 force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html          |    6 
 force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js            |   96 ++++++++
 force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html            |    6 
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js                           |   75 ++++++
 force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html                       |    5 
 force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js                   |   69 +++++
 force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html                         |    6 
 22 files changed, 645 insertions(+), 25 deletions(-)

diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
new file mode 100644
index 0000000..af00de6
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js
@@ -0,0 +1,71 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonCampaignCtl.init';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexCreateAssessmentReport extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    Status;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.Status = result.Status;
+
+                this.CreateAssessmentReport();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓鎺堣/鑰冩牳鎶ュ憡	
+    CreateAssessmentReport() {
+        var status = this.Status;
+        if (status == '鍏紑涓�') {
+            window.open("/apex/AssessmentReport?camid=" + this.Id, "_top");
+        } else {
+            this.ShowToastEvent("鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!", "error")
+        }
+    }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateAssessmentReport/lexCreateAssessmentReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexCreateInstructReport/lexCreateInstructReport.html b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
new file mode 100644
index 0000000..e9cea49
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js
@@ -0,0 +1,69 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonCampaignCtl.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+
+export default class LexCreateInstructReport extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    Status;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.Status = result.Status;
+
+                this.CreateInstructReport();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓甯︽暀鎶ュ憡	
+    CreateInstructReport() {
+        var status = this.Status;
+        if (status == '鍏紑涓�') {
+            window.open("/apex/InstructReport?camid="+this.Id, "_top");
+        } else {
+            this.ShowToastEvent("鍙湁鎵瑰噯鍚庢墠鑳藉垱寤烘姤鍛�!", "error")
+        }
+    }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateInstructReport/lexCreateInstructReport.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js b/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
deleted file mode 100644
index bdd855f..0000000
--- a/force-app/main/default/lwc/lexCreateNewServiceContract/__tests__/lexCreateNewServiceContract.test.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createElement } from 'lwc';
-import LexCreateNewServiceContract from 'c/lexCreateNewServiceContract';
-
-describe('c-lex-create-new-service-contract', () => {
-    afterEach(() => {
-        // The jsdom instance is shared across test cases in a single file so reset the DOM
-        while (document.body.firstChild) {
-            document.body.removeChild(document.body.firstChild);
-        }
-    });
-
-    it('TODO: test case generated by CLI command, please fill in test logic', () => {
-        // Arrange
-        const element = createElement('c-lex-create-new-service-contract', {
-            is: LexCreateNewServiceContract
-        });
-
-        // Act
-        document.body.appendChild(element);
-
-        // Assert
-        // const div = element.shadowRoot.querySelector('div');
-        expect(1).toBe(1);
-    });
-});
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js
new file mode 100644
index 0000000..45665b5
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js
@@ -0,0 +1,96 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import selectMaintenanceContractEstimate from '@salesforce/apex/otherButtonMaintenanceContractCtl.selectMaintenanceContractEstimate';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexCustomAnewMaintenance extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    StatusC;
+    RecordTypeId;
+    URFContractC;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.RecordTypeId = result.RecordTypeId;
+                this.StatusC = result.StatusC;
+                this.URFContractC = result.URFContractC;
+
+                this.CustomAnew();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    //涓
+    CustomAnew() {
+        if (this.StatusC != "寮曞悎涓�") {
+            this.ShowToastEvent("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�", "error")
+            // alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鍐嶆姤浠�");
+        } else {
+            init().then(result => {
+                if (result.length == 1) {
+                    if (this.RecordTypeId == "01210000000gTYq") {
+                        //URF闄愭鍚堝悓2鏈� LY 20220902 start
+                        if (this.URFContractC == true) {
+                            window.open("/apex/SelectAssetEstimateURF?copyid=" + ids[0], "_top");
+                        } else {
+                            window.open("/apex/SelectAssetEstimateVM?copyid=" + ids[0], "_top");
+                        }
+                        //URF闄愭鍚堝悓2鏈� LY 20220902 end
+                    } else {
+                        window.open("/apex/SelectAssetEstimate?copyid=" + ids[0], "_top");
+                    }
+
+                } else {
+                    this.ShowToastEvent('璇烽�夋嫨涓�涓姤浠�', "error")
+                    // alert('璇烽�夋嫨涓�涓姤浠�');
+                }
+            })
+        }
+    }
+
+    // 寮圭獥
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomAnewMaintenance copy/lexCustomAnewMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="exampleHolder" 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/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js
new file mode 100644
index 0000000..9adcd42
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js
@@ -0,0 +1,81 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+
+export default class LexCustomNewMCMaintenance extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    StatusC;
+    IsRecognitionModelC;
+    RecordTypeId;
+    URFContractC;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.StatusC = result.StatusC;
+                this.IsRecognitionModelC = result.IsRecognitionModelC;
+                this.RecordTypeId = result.RecordTypeId;
+                this.URFContractC = result.URFContractC;
+
+                this.CustomNewMC();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓鏂版湇鍔″悎鍚屾姤浠�	
+    CustomNewMC() {
+        if ( this.StatusC != "寮曞悎涓�") {
+            alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+        } else {
+            //缁翠慨鍚堝悓鏂板缓鎶ヤ环鏃讹紝濡傛灉鏄厛娆惧璞★紝寮瑰嚭瀵硅瘽妗嗘彁绀� thh 20220304 start
+            if (this.IsRecognitionModelC == 1) {
+                if (!confirm("璇ョ粡閿�鍟嗕负鍏堟瀵硅薄锛屾槸鍚︾户缁柊寤烘姤浠凤紵")) {
+                    return;
+                }
+            }
+            //缁翠慨鍚堝悓鏂板缓鎶ヤ环鏃讹紝濡傛灉鏄厛娆惧璞★紝寮瑰嚭瀵硅瘽妗嗘彁绀� thh 20220304 end
+            if (this.RecordTypeId == "01210000000gTYq") {
+                if (this.URFContractC == "0") {
+                    window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
+                } else {
+                    window.open("/apex/SelectAssetEstimateURF?mcid=" + this.Id, "_top");
+                }
+            } else {
+                window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top");
+            }
+
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMCMaintenance copy/lexCustomNewMCMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js
new file mode 100644
index 0000000..5fd4900
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js
@@ -0,0 +1,79 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/otherButtonMaintenanceContractCtl.init';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexCustomNewMaintenance extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    StatusC;
+    RecordTypeId;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.StatusC = result.StatusC;
+                this.RecordTypeId = result.RecordTypeId;
+
+                this.CustomNew();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓缁翠慨鍚堝悓鎶ヤ环
+    CustomNew() {
+        if (this.StatusC != "寮曞悎涓�") {
+            this.ShowToastEvent("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环", "error");
+            // alert("缁翠慨鍚堝悓涓嶆槸璇环涓殑鐘舵�侊紝涓嶈兘鏂板缓鎶ヤ环");
+        } else {
+            if (this.RecordTypeId == "01210000000gTYq") {
+                window.open("/apex/SelectAssetEstimateVM?mcid=" + this.Id, "_top");
+            } else {
+                window.open("/apex/SelectAssetEstimate?mcid=" + this.Id, "_top");
+            }
+        }
+    }
+
+    // 寮圭獥
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexCustomNewMaintenance copy/lexCustomNewMaintenance.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexQISMBCrequestNew/lexQISMBCrequestNew.html b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
new file mode 100644
index 0000000..87f391a
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="exampleHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        <lightning-button label="Show Toast" onclick={ShowToastEvent}></lightning-button>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
new file mode 100644
index 0000000..e879bed
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js
@@ -0,0 +1,75 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonQISReportCtl.init';
+import {
+    ShowToastEvent
+} from 'lightning/platformShowToastEvent';
+
+export default class LexQISMBCrequestNew extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+    QISStatusC;
+    Name;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+                this.QISStatusC = result.QISStatusC;
+                this.Name = result.Name;
+
+                this.QISMBCRequestNew();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓QIS M-BC鐢宠.
+    QISMBCRequestNew() {
+        var status = this.QISStatusC;
+
+        if (status != '瀹屾瘯' && status != '宸插洖绛�' && status != '鍙栨秷') {
+            this.ShowToastEvent("QIS娌℃湁瀹℃壒瀹屾瘯鎴栧彇娑堬紝涓嶅彲浠ュ垱寤篞IS M-BC!", "error");
+            return;
+        }
+        var url = "a20/e?retURL=%2Fa20%2Fo&Name=" + this.Name + "&CF00N10000006Q4NP_lkid=" + this.Id;
+        window.top.location.href = url;
+    }
+
+    ShowToastEvent(msg, type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexQISMBCrequestNew/lexQISMBCrequestNew.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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/lexSelectProduct2CIC/lexSelectProduct2CIC.html b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html
new file mode 100644
index 0000000..d044dbb
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="exampleHolder" 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/lexSelectProduct2CIC/lexSelectProduct2CIC.js b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
new file mode 100644
index 0000000..8eec3a3
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js
@@ -0,0 +1,57 @@
+import {
+    LightningElement,
+    wire,
+    api
+} from 'lwc';
+import {
+    CurrentPageReference
+} from "lightning/navigation";
+import {
+    CloseActionScreenEvent
+} from 'lightning/actions';
+import init from '@salesforce/apex/buttonCaseCtl.init';
+
+export default class LexSelectProduct2CIC extends LightningElement {
+    @api recordId;
+    str;
+    IsLoading = true;
+    Id;
+
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        if (currentPageReference) {
+            const urlValue = currentPageReference.state.recordId;
+            if (urlValue) {
+                let str = `${urlValue}`;
+                this.recordId = str;
+            }
+        }
+    }
+
+    connectedCallback() {
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.Id = result.Id;
+
+                this.QuarterlyReport();
+                this.dispatchEvent(new CloseActionScreenEvent());
+            }
+        }).catch(error => {
+            console.log(error);
+        })
+    }
+
+    // 鏂板缓CIC/浜у搧	
+    SelectProduct2CIC() {
+        var pathnames = window.self.location.pathname.split('/');
+        if (pathnames[1] == "emptyHtmlDoc.html") {
+            window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_parent");
+        } else {
+            window.open("/apex/SelectProduct2CIC?cicid=" + this.Id, "_self");
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexSelectProduct2CIC/lexSelectProduct2CIC.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <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