From 75915dc490276eff029702863493e4935dcc9c94 Mon Sep 17 00:00:00 2001
From: 黄千龙 <huangqianlong@prec-tech.com>
Date: 星期二, 04 四月 2023 14:46:22 +0800
Subject: [PATCH] Merge branch 'LEX_dev' of http://47.92.229.245:8089/r/lightningupdate into LEX_dev

---
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js-meta.xml               |   11 
 force-app/main/default/lwc/lexCancel/lexCancel.js                                            |   95 +++++
 force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js          |  101 +++++
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html                      |    6 
 force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js                                      |   84 ++++
 force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js          |   84 ++++
 force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js                                |   88 ++++
 force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js-meta.xml                               |   11 
 force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js-meta.xml                             |   11 
 force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js-meta.xml |   11 
 force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.css                                       |   10 
 force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.xml         |   11 
 force-app/main/default/lwc/lexCancel/lexCancel.css                                           |   10 
 force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.html        |    5 
 force-app/main/default/lwc/lexCancel/lexCancel.html                                          |    6 
 force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js                                        |   96 +++++
 force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js          |   82 ++++
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js                        |   59 +++
 force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js-meta.xml |   11 
 force-app/main/default/lwc/lexCancel/lexCancel.js-meta.xml                                   |   11 
 force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.css                               |   10 
 force-app/main/default/classes/ReportController.cls                                          |   61 +-
 force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.css                                     |   10 
 force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js-meta.xml                       |   11 
 force-app/main/default/classes/ApplicationButtonController.cls                               |   99 +++++
 force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css                       |   10 
 force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.html        |    5 
 force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html                                    |    7 
 force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html        |    6 
 force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html                                      |    6 
 force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html                              |    6 
 31 files changed, 1,008 insertions(+), 26 deletions(-)

diff --git a/force-app/main/default/classes/ApplicationButtonController.cls b/force-app/main/default/classes/ApplicationButtonController.cls
new file mode 100644
index 0000000..4dadb0d
--- /dev/null
+++ b/force-app/main/default/classes/ApplicationButtonController.cls
@@ -0,0 +1,99 @@
+public class OppSubmitController {
+    @AuraEnabled
+    public static InitData initSubmitButton (String recordId){
+        InitData res = new initData();
+        try{
+            // Request_tedner_doc__c report = [SELECT 	OwnerId,Id,Product_discription__c,Status__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
+            Request_tedner_doc__c report = [SELECT 	OwnerId,Id FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
+            res.OwnerId = report.OwnerId;
+            res.Id = report.Id;
+            System.debug(LoggingLevel.INFO, '*** res: ' + res);
+        }catch(Exception e){
+            System.debug(LoggingLevel.INFO, '*** e: ' + e);
+        }
+        return res;
+    }
+
+    //鎺堟潈鐢宠鐨勬彁浜ゆ寜閽�
+    @AuraEnabled
+    public static String submit(String recordId) {
+       try {
+        // Request_tedner_doc__c rac = [SELECT 	Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c,Request_target__c,Document_format__c,Bid_distributor__c,Product_discription__c,Tedner_date__c,Tender_active_day__c,tender_inactive_date__c,Tender_request_reason__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
+        Request_tedner_doc__c rac = [SELECT 	Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
+        rac.Status__c = '宸叉彁浜�';
+        rac.RecordTypeId = '01210000000RNXn';
+        rac.Submit_check_flag__c = true;
+        rac.Submit_time__c = Datetime.now();
+        update rac;
+        return '1';
+       } catch (Exception ex) {
+        System.debug(LoggingLevel.INFO, '*** xu: ' + ex);
+        return ex.getMessage();
+        // return ex.getMessage().split(',')[1];
+       } finally {
+
+       }
+    }
+
+    //鎺堟潈鐢宠鐨勫彇娑堟彁浜ゆ寜閽�
+    @AuraEnabled
+    public static String submitCancel(String recordId) {
+       try {
+        Request_tedner_doc__c report = [SELECT 	Id,Status__c,Submit_check_flag__c,RecordTypeId,Submit_time__c FROM Request_tedner_doc__c WHERE Id = :recordId LIMIT 1];
+        report.Status__c = '鑽夋涓�';
+        report.RecordTypeId = '01210000000RNXi';
+        report.Submit_check_flag__c = false;
+        report.Submit_time__c = null;
+        update report;
+        return '1';
+       } catch (Exception ex) {
+        System.debug(LoggingLevel.INFO, '*** cancelXu: ' + ex);
+        return ex.getMessage();
+       } finally {
+
+       }
+    }
+
+    //鑾峰彇褰撳墠鐧诲綍浜虹殑 id
+    @AuraEnabled
+    public static UserResult UserInfo_Owner() {
+        UserResult result = new UserResult();
+        ID myUserID = UserInfo.getUserId();
+        
+        try { 
+            User tempUser =
+                [select id from user where id = : myUserID ];
+            result.id = tempUser.id;
+        } catch (exception e) {
+            
+            result.result = e.getMessage();
+        }
+        return result;
+    }
+    
+    public class InitData{
+        @AuraEnabled
+        public String Id;
+        @AuraEnabled
+        public String OwnerId;
+    }
+    public class UserResult {
+        @AuraEnabled
+        public string result;
+        public UserResult( ) {
+            result = 'Success';
+        }
+        @AuraEnabled
+        public string id;
+        //20210105 CHAN-BWX3YU you end
+    }
+}
+
+    // if("{!Request_tedner_doc__c.OwnerId}" == "{!$User.Id}") {
+    //     var rac = new sforce.SObject("Request_tedner_doc__c");
+    //     rac.Id = "{!Request_tedner_doc__c.Id}";
+    //     rac.Status__c = "宸叉彁浜�";
+    //     rac.Submit_check_flag__c = "true";
+    //     rac.RecordTypeId = "01210000000RNXn";
+    //     var serverTimestamp = sforce.connection.getServerTimestamp();
+    //     rac.Submit_time__c = serverTimestamp.timestamp;
\ No newline at end of file
diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index de418fe..19c9e79 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -1,4 +1,8 @@
+/* 
+鐢ㄤ簬缁檒wc鐨刯s鍒濆鍖栨暟鎹拰瀵硅褰曡繘琛宒ml鎿嶄綔锛屾controller灞炰簬鎶ュ憡涔�
+*/
 public with sharing class ReportController {
+    //缁橵OC瀹屾瘯鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForVOCFinishButton (String recordId) {
         InitData res = new initData();
@@ -12,6 +16,7 @@
         } 
         return res;
     }
+    //缁橵OC鍒ゅ畾鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForVOCCheckButton (String recordId) {
         InitData res = new initData();
@@ -27,7 +32,7 @@
         } 
         return res;
     }
-
+    //缁橵OC鎻愬嚭鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static Initdata initForVOCSubmitButton(String recordId){
         InitData res = new InitData();
@@ -44,7 +49,7 @@
     }
 
 
-
+    //缁橵OC鍥炵瓟鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static Initdata initForVOCAnswerButton(String recordId){
         InitData res = new InitData();
@@ -73,7 +78,7 @@
         return res;
     }
 
-
+    //缁欏彇娑堢浉搴旂殑js鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForCancelButton(String recordId){
         InitData res = new InitData();
@@ -86,7 +91,7 @@
         return res;
     }
 
-
+    //缁橭CSM涓嶈鎶ュ憡鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForOCSMNoToReportButton(String recordId){
         InitData res = new InitData();
@@ -100,8 +105,7 @@
         }
         return res;
     }
-
-
+    //缁橲IStoOPD鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForSIStoOPDButton(String recordId){
         InitData res = new InitData();
@@ -116,7 +120,7 @@
         return res;
     }
 
-
+    //缁橭CSM瑕佹姤鍛婄浉搴旂殑js鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForOCSMToReportButton(String recordId){
         InitData res = new InitData();
@@ -200,7 +204,7 @@
         return res;
     }
 
-
+    //缁欐彁浜�(瀵规墜娲诲姩鎶ュ憡)鐩稿簲鐨刯s鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static InitData initForSubmitCompetitorReportButton(String recordId){
         InitData res = null;
@@ -212,7 +216,7 @@
         return res;
     }
 
-
+    //缁欐彁浜ょ浉搴旂殑js鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
     public static void updateForSubmitButton(String reocrdId){
         try {
@@ -228,18 +232,18 @@
     }
 
     @AuraEnabled
-    public static void updateForOPDtoSISButton(String recordId){
+    public static void updateForOPDtoSISButton(String recordId,String recordTypeId){
         try {
             Report__c rac = new Report__c();
             rac.Id = recordId;
-            rac.RecordTypeId = '01210000000RLTi';
+            rac.RecordTypeId = recordTypeId;
             update rac;
         } catch (Exception e) {
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
     }
 
-
+    //鍙栨秷鎻愪氦鎿嶄綔鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static void updateForCancelSubmitReportButton(String recordId){
         try {
@@ -255,18 +259,18 @@
     }
 
     @AuraEnabled
-    public static void updateForCompleteButton(String recordId){
+    public static void updateForCompleteButton(String recordId,String recordTypeId){
         Report__c rac = new Report__c();
         try {
             rac.Id = recordId;
             rac.Status__c = '瀹屾瘯';
-            rac.RecordTypeId = '01210000000Qeky';
+            rac.RecordTypeId = recordTypeId;
             update rac;
         } catch (Exception e) {
             throw new AuraHandledException(e.getMessage());
         }
     }
-
+    //OCSM瑕佹姤鍛婃搷浣滄洿鏂扮浉搴旀暟鎹�
     @AuraEnabled
     public static void updateForOCSMToReportButton(String recordId){
         try {
@@ -279,19 +283,20 @@
         }
     }
 
-
+    //SIStoOPD鎿嶄綔鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
-    public static void updateForSIStoOPDButton(String recordId){
+    public static String updateForSIStoOPDButton(String recordId,String recordTypeId){
         Report__c rac = new Report__c();
         try {
             rac.Id = recordId;
-            rac.RecordTypeId = '01210000000Qekj';
+            rac.RecordTypeId = recordTypeId;
             update rac;
+            return null;
         } catch (Exception e) {
-            throw new AuraHandledException(e.getMessage());
+            return e.getMessage();
         }
     }
-
+    //DispatchOCSMQARA鎿嶄綔鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static void updateForDispatchOCSMQARAButton(String recordId){
         try {
@@ -303,7 +308,7 @@
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
     }
-
+    //OCSM涓嶈鎶ュ憡鎿嶄綔鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static void updateForOCSMNoToReportButton(String recordId){
         try {
@@ -316,7 +321,7 @@
         }
     }
 
-
+    //鍙栨秷鎿嶄綔鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static void updateForCancelButton(String recordId){
         try {
@@ -361,7 +366,7 @@
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
     }
-
+    //VOC鍥炵瓟鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static String updateForVOCAnswerButton(String recordId){
         try {
@@ -372,8 +377,12 @@
         } catch (Exception e) {
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
             String exc = '' + e.getMessage();
-            
-            return exc;
+            Integer left = exc.indexOf(':') + 1;
+            Integer right = exc.lastIndexOf(':');
+            String str = exc.substring(left,right);
+            left = str.indexOf(',') +  1;
+            String newStr = str.substring(left);
+            return newStr;
         }
     }
 
@@ -392,7 +401,7 @@
             System.debug(LoggingLevel.INFO, '*** e: ' + e);
         }
     }
-
+    //VOC鍥炵瓟鏇存柊鐩稿簲鏁版嵁
     @AuraEnabled
     public static void updateForVOCSubmitButton(String recordId ,String createdById){
         try {
diff --git a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.html b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.html
new file mode 100644
index 0000000..6a7e8a2
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="CancelSubmitHolder" 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/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
new file mode 100644
index 0000000..c75f6c5
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js
@@ -0,0 +1,84 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import submitCancel from '@salesforce/apex/ApplicationButtonController.submitCancel';
+import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
+export default class Submit extends LightningElement {
+    @api recordId;//OwnerId
+    ownerId;
+    monthlyReportId;
+    IsLoading = true;
+
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             console.log("str:"+str);
+             this.recordId = str;
+           }
+         }
+     }
+    
+
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            if (result != null) {
+                this.IsLoading = false;
+                this.ownerId = result.OwnerId;
+                this.monthlyReportId = result.Id;
+                this.cancelSubmit();
+            }
+        }).catch(error => {
+            console.log("error"+error);
+        }).finally(() => {
+            
+        });        
+    }
+
+    cancelSubmit(){
+        UserInfo_Owner({}).then(result=>{
+            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
+            if(this.ownerId == result.id){
+                submitCancel({
+                    recordId: this.recordId
+                }).then(requst=>{
+                    if(requst == '1'){
+                        this.showToast("鍙栨秷鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
+                    }
+                    if(requst != "1"){
+                        var messageage = "";
+                        messageage = requst.split(',')[1];
+                        this.showToast(messageage,"error");
+                    }
+                })
+            }else{
+                this.showToast("鍙巿鏉冪敵璇蜂功鎵�鏈変汉鍙互鍙栨秷鎻愪氦","error");
+            }
+        })
+    }
+
+
+    updateRecordView() {
+        updateRecord({fields: { Id: this.recordId }});
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            message: msg,
+            variant: type
+        });
+        if(type == 'success'){
+            this.updateRecordView();
+        }
+        this.dispatchEvent(event);
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js-meta.xml b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js-meta.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationCancelSubmit/lexApplicationCancelSubmit.js-meta.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexApplicationSubmitButton/lexApplicationSubmitButton.html b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.html
new file mode 100644
index 0000000..6a7e8a2
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.html
@@ -0,0 +1,5 @@
+<template>
+    <div class="CancelSubmitHolder" 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/lexApplicationSubmitButton/lexApplicationSubmitButton.js b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
new file mode 100644
index 0000000..ae57fdf
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.js
@@ -0,0 +1,101 @@
+import { LightningElement,wire,track,api} from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { NavigationMixin } from 'lightning/navigation';
+import  init  from '@salesforce/apex/ApplicationButtonController.initSubmitButton';
+import UserInfo_Owner from '@salesforce/apex/ApplicationButtonController.UserInfo_Owner';
+import submit  from '@salesforce/apex/ApplicationButtonController.submit';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class Submit extends LightningElement {
+    @api recordId;//OwnerId
+    ownerId;//鎵�鏈変汉id
+    id;//杩斿洖鍊肩殑id
+    IsLoading = true;
+    arrMessage = [];
+
+    @wire(CurrentPageReference)
+     getStateParameters(currentPageReference) {
+        console.log(currentPageReference,'666666666666');
+         if (currentPageReference) {
+           const urlValue = currentPageReference.state.recordId;
+           if (urlValue) {
+             let str = `${urlValue}`;
+             console.log("str:"+str);
+             this.recordId = str;
+           }
+         }
+     }
+    
+
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result,"璇锋眰鎴愬姛浜嗗悧")
+            if (result != null) {
+                this.IsLoading = false;
+                this.ownerId = result.OwnerId;
+                this.id = result.Id;
+                this.Submit();
+            }
+        }).catch(error => {
+            console.log("error"+error);
+        }).finally(() => {
+            
+        });        
+    }
+
+    Submit(){
+        this.arrMessage = [];
+        //鑾峰彇鑾峰彇褰撳墠鐧婚檰浜�
+        UserInfo_Owner({}).then(result=>{
+            console.log(result,'鑾峰彇褰撳墠鐧婚檰浜篿d')
+            if(this.ownerId == result.id){
+                submit({
+                    recordId: this.recordId
+                }).then(requst=>{
+                    if(requst == '1'){
+                        this.showToast("鎻愪氦鎺堟潈淇℃伅鎴愬姛","success");
+                    }
+                    if(requst != "1"){
+                        var messageage = "";
+                        for(let i=0;i<this.arrMessage.length;i++){ 
+                            if(this.arrMessage.length-1 == i){
+                                break;
+                            }
+                            messageage += this.arrMessage[i+1];
+                        }
+                        // if(requst.split(',')[1].slice(-1) == '寮�'){
+                        //     messageage = requst.split(',')[1] + "," + requst.split(',')[2] + "," +  requst.split(',')[3] + "," +  requst.split(',')[4] + "," +  requst.split(',')[5] + "," + requst.split(',')[6];
+                        // }else{
+                        //     messageage = requst.split(',')[1];
+                        // }
+                        this.showToast(messageage,"error");
+                    }
+                })
+            }else{
+                this.showToast("鍙巿鏉冪敵璇蜂功鎵�鏈変汉鍙互鎻愪氦","error");
+            }
+        })
+    }
+
+
+    updateRecordView() {
+        updateRecord({fields: { Id: this.recordId }});
+    }
+
+    showToast(msg,type) {
+        console.log(msg,type);
+        const event = new ShowToastEvent({
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+        console.log('璧板埌杩欓噷浜嗗悧');
+        if(type == 'success'){
+            this.updateRecordView();
+        }
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.xml b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.xml
new file mode 100644
index 0000000..2b7649d
--- /dev/null
+++ b/force-app/main/default/lwc/lexApplicationSubmitButton/lexApplicationSubmitButton.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<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/lexCancel/lexCancel.css b/force-app/main/default/lwc/lexCancel/lexCancel.css
new file mode 100644
index 0000000..6e1b0a2
--- /dev/null
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.css
@@ -0,0 +1,10 @@
+.cancelHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.html b/force-app/main/default/lwc/lexCancel/lexCancel.html
new file mode 100644
index 0000000..61b5906
--- /dev/null
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="cancelHolder" 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/lexCancel/lexCancel.js b/force-app/main/default/lwc/lexCancel/lexCancel.js
new file mode 100644
index 0000000..18c6654
--- /dev/null
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.js
@@ -0,0 +1,95 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init  from '@salesforce/apex/ReportController.initForCancelButton';
+import updateForCancelButton  from '@salesforce/apex/ReportController.updateForCancelButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexCancel extends LightningElement {
+    @api recordId;
+    status;
+    IsLoading = true;
+    @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(){
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.status = result.status;
+                console.log(this.status);
+                this.cancel();
+
+            }
+        }).catch(error => {
+            console.log("error");
+            console.log(error);
+        }).finally(() => {
+            
+        });
+
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    cancel () {
+        if (this.status == "鍙栨秷") {
+            ShowToastEvent("宸茬粡鍙栨秷锛�","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+            }
+        if (this.status == "鎵瑰噯") {
+            ShowToastEvent("宸茬粡鎵瑰噯锛屼笉鑳藉垹闄わ紒","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        if (this.status == "瀹屾瘯") {
+            ShowToastEvent("宸茬粡瀹屾瘯锛屼笉鑳藉垹闄わ紒","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        if (this.status == "鎻愪氦") {
+            ShowToastEvent("宸茬粡鎻愪氦锛屼笉鑳藉垹闄わ紒","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        updateForCancelButton({
+            recordId: this.recordId
+        }).then(result =>{
+            this.showToast("鍙栨秷鎴愬姛锛�","success");
+            this.updateRecordView(this.recordId);
+            this.dispatchEvent(new CloseActionScreenEvent());
+        });
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCancel/lexCancel.js-meta.xml b/force-app/main/default/lwc/lexCancel/lexCancel.js-meta.xml
new file mode 100644
index 0000000..329e839
--- /dev/null
+++ b/force-app/main/default/lwc/lexCancel/lexCancel.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/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css
new file mode 100644
index 0000000..3d14772
--- /dev/null
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.css
@@ -0,0 +1,10 @@
+.dispatchOCSMQARAHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html
new file mode 100644
index 0000000..894569c
--- /dev/null
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="dispatchOCSMQARAHolder" 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/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
new file mode 100644
index 0000000..6436e0b
--- /dev/null
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js
@@ -0,0 +1,59 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import updateForDispatchOCSMQARAButton  from '@salesforce/apex/ReportController.updateForDispatchOCSMQARAButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexDispatchOCSMQARA extends LightningElement {
+    @api recordId;
+    IsLoading = true;
+    
+
+    @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(){
+        console.log(this.recordId);
+        this.IsLoading = false;
+        this.DispatchOCSMQARA();
+
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    DispatchOCSMQARA () {
+            updateForDispatchOCSMQARAButton({
+                recordId: this.recordId
+            }).then(result =>{
+                this.showToast("鎴愬姛","success");
+                this.updateRecordView(this.recordId);
+                this.dispatchEvent(new CloseActionScreenEvent());
+                });
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js-meta.xml b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexDispatchOCSMQARA/lexDispatchOCSMQARA.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/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html
new file mode 100644
index 0000000..38c9114
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="reportHolder" 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/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
new file mode 100644
index 0000000..c52ad47
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js
@@ -0,0 +1,82 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init  from '@salesforce/apex/ReportController.initForOCSMNoToReportButton';
+import updateForOCSMNoToReportButton  from '@salesforce/apex/ReportController.updateForOCSMNoToReportButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexOCSMNoToReportForReport extends LightningElement {
+    @api recordId;
+    IsLoading = true;
+    OCSMAdministrativeReportNumber;
+    OCSMAdministrativeReportDate;
+    AwareDate;
+
+
+    @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.OCSMAdministrativeReportDate = result.OCSMAdministrativeReportDate;
+            this.OCSMAdministrativeReportNumber = result.OCSMAdministrativeReportNumber;
+            this.AwareDate = result.awareDate;
+            this.noToReport();
+        });
+    }
+
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+    noToReport(){
+        if (!confirm("涓嶈鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        if(this.OCSMAdministrativeReportNumber != undefined || this.OCSMAdministrativeReportDate != undefined ){
+            this.showToast("宸茬粡鎶ュ憡鐨凲IS锛屼笉鍙互鐐瑰嚮OCSM涓嶈鎶ュ憡銆�","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+        if(this.AwareDate != undefined ){
+           updateForOCSMNoToReportButton({
+                recordId: this.recordId
+           }).then(result=>{
+                this.showToast("OCSM涓嶈鎶ュ憡鎴愬姛","success");
+                this.updateRecordView(this.recordId);
+                this.dispatchEvent(new CloseActionScreenEvent());
+           });
+        }else{
+            this.showToast("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js-meta.xml b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMNoToReportForReport/lexOCSMNoToReportForReport.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/lexOCSMToReport/lexOCSMToReport.css b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.css
new file mode 100644
index 0000000..ecc934d
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.css
@@ -0,0 +1,10 @@
+.toReportHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html
new file mode 100644
index 0000000..aaa4cbd
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="toReportHolder" 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/lexOCSMToReport/lexOCSMToReport.js b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
new file mode 100644
index 0000000..91b2722
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js
@@ -0,0 +1,88 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import init  from '@salesforce/apex/ReportController.initForOCSMToReportButton';
+import updateForOCSMToReportButton  from '@salesforce/apex/ReportController.updateForOCSMToReportButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexOCSMToReport extends LightningElement {
+    @api recordId;
+    IsLoading = true;
+    OCSMAdministrativeReportStatus;
+    awareDate;
+
+    @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(){
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.OCSMAdministrativeReportStatus = result.OCSMAdministrativeReportStatus;
+                this.awareDate = result.awareDate;
+                this.toReport();
+            }
+        }).catch(error => {
+            console.log("error");
+            console.log(error);
+        }).finally(() => {
+            
+        });
+
+    }
+
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    toReport () {
+        if (!confirm("鎶ュ憡鍚庢棤娉曟挙鍥烇紝鏄惁缁х画锛�")) {
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+            }
+
+        if(this.OCSMAdministrativeReportStatus == undefined && this.awareDate != undefined ){
+            updateForOCSMToReportButton({
+                recordId: this.recordId
+            }).then(result =>{
+                this.showToast("鎴愬姛","success");
+                this.updateRecordView(this.recordId);
+                this.dispatchEvent(new CloseActionScreenEvent());
+                });
+        }else{
+            this.showToast("娌℃湁AwareDate鎴栧凡缁廜CSM琛屾斂鎶ュ憡锛岃纭銆�","error");
+            this.dispatchEvent(new CloseActionScreenEvent());
+            return;
+        }
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js-meta.xml b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexOCSMToReport/lexOCSMToReport.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/lexSIStoOPD/lexSIStoOPD.css b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.css
new file mode 100644
index 0000000..eb667c5
--- /dev/null
+++ b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.css
@@ -0,0 +1,10 @@
+.sisToOPDHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html
new file mode 100644
index 0000000..48f29e0
--- /dev/null
+++ b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.html
@@ -0,0 +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>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
new file mode 100644
index 0000000..b612e13
--- /dev/null
+++ b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js
@@ -0,0 +1,96 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import updateForSIStoOPDButton  from '@salesforce/apex/ReportController.updateForSIStoOPDButton';
+import init  from '@salesforce/apex/ReportController.initForSIStoOPDButton';
+import { updateRecord } from 'lightning/uiRecordApi';
+import UserInfo_Owner from '@salesforce/apex/TaskFeedbackController.UserInfo_Owner';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+export default class LexSIStoOPD extends LightningElement {
+    @api recordId;
+    IsLoading = true;
+    ownerId;
+    status;
+    userId;
+    recordTypeId = '01210000000Qekj';
+    errorMsg;
+    @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(){
+        console.log(this.recordId);
+        init({
+            recordId: this.recordId
+        }).then(result => {
+            console.log(result);
+            if (result != null) {
+                this.IsLoading = false;
+                this.ownerId = result.ownerId;
+                this.status = result.status;
+                this.userId = result.userId;
+                this.SIStoOPD();
+            }
+        }).catch(error => {
+            console.log("error");
+            console.log(error);
+        }).finally(() => {
+            console.log(this.errorMsg);
+            if(this.errorMsg){
+                this.showToast(this.errorMsg,"error");
+            }  
+        });
+
+    }
+
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+
+
+    updateRecordView(recordId) {
+        updateRecord({fields: { Id: recordId }});
+    }
+
+    SIStoOPD () {
+        if(this.ownerId == this.userId && this.status == "鑽夋涓�") {
+            updateForSIStoOPDButton({
+                recordId: this.recordId,
+                recordTypeId: this.recordTypeId
+            }).then(result=>{
+                if(result){
+                    this.showToast(result,"error");
+                }else{
+                    this.updateRecordView(this.recordId);
+                } 
+                this.dispatchEvent(new CloseActionScreenEvent());
+            });              
+    }
+    
+}
+        // ifError(result){
+        //     console.log(result);
+        //     if(result){
+        //         this.showToast(result,"error");
+        //     }
+            
+        // }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js-meta.xml b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.js-meta.xml
new file mode 100644
index 0000000..c307012
--- /dev/null
+++ b/force-app/main/default/lwc/lexSIStoOPD/lexSIStoOPD.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/lexVOCAnswer/lexVOCAnswer.css b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.css
new file mode 100644
index 0000000..f2237d1
--- /dev/null
+++ b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.css
@@ -0,0 +1,10 @@
+.answerHolder{
+    position: relative;
+    display: inline-block;
+    width: 80px;
+    height: 80px;
+    text-align: center;
+}
+.container .uiContainerManager{
+	display: none !important;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html
new file mode 100644
index 0000000..c79d866
--- /dev/null
+++ b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.html
@@ -0,0 +1,7 @@
+<template>
+    <div class="answerHolder" 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/lexVOCAnswer/lexVOCAnswer.js b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
new file mode 100644
index 0000000..8ae7088
--- /dev/null
+++ b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js
@@ -0,0 +1,84 @@
+import { LightningElement, wire, track, api } from "lwc";
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from "lightning/actions";
+import { NavigationMixin } from "lightning/navigation";
+import init from "@salesforce/apex/ReportController.initForVOCAnswerButton";
+import updateForVOCAnswerButton from "@salesforce/apex/ReportController.updateForVOCAnswerButton";
+import { updateRecord } from "lightning/uiRecordApi";
+import { ShowToastEvent } from "lightning/platformShowToastEvent";
+export default class LexVOCAnswer extends LightningElement {
+  @api recordId;
+  status;
+  Isloading = true;
+
+  @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() {
+    console.log(this.recordId);
+    init({
+      recordId: this.recordId,
+    })
+      .then((result) => {
+        console.log(result);
+        if (result != null) {
+          this.Isloading = false;
+          this.status = result.status;
+          this.update();
+        }
+      })
+      .catch((error) => {
+        console.log("error");
+        console.log(error);
+      })
+      .finally(() => {});
+    //window.location.replace("https://ocsm--partial.sandbox.lightning.force.com/lightning/r/Report__c/" + this.recordId + "/view");
+  }
+
+  showToast(msg, type) {
+    const event = new ShowToastEvent({
+      title: "",
+      message: msg,
+      variant: type
+    });
+    this.dispatchEvent(event);
+  }
+
+  updateRecordView(recordId) {
+    updateRecord({ fields: { Id: recordId } });
+  }
+
+  update() {
+    if (this.status != "宸插垎閰�") {
+      this.showToast("涓嶆槸宸插垎閰嶄笉鑳界偣鍑�", "error");
+      return;
+    }
+    updateForVOCAnswerButton({
+      recordId: this.recordId
+    }).then(result => {
+      if (result == null) {
+        this.showToast("鎴愬姛", "success");
+      } else {
+        console.log(result);
+        this.showToast(result,"error");
+      }
+      this.updateRecordView(this.recordId);
+      this.dispatchEvent(new CloseActionScreenEvent());
+    }).catch(error=>{
+      console.log(error);
+    });
+  }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js-meta.xml b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexVOCAnswer/lexVOCAnswer.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