From 45e4876c811c861adc5744d06b5bba840fae397a Mon Sep 17 00:00:00 2001
From: 19626 <1962676589@qq.com>
Date: 星期四, 29 六月 2023 17:59:09 +0800
Subject: [PATCH] 优化失单画面以及修改按钮

---
 force-app/main/default/lwc/lexOTHCreate/__tests__/lexOTHCreate.test.js                               |   25 +
 force-app/main/default/classes/OpportunityLightingButtonController.cls                               |   17 
 force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js                |   71 ++
 force-app/main/default/classes/lexRentalApplyController.cls-meta.xml                                 |    5 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js                              |   56 +
 force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js-meta.xml       |   11 
 force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml                                     |    5 
 force-app/main/default/classes/lexLastbuyProductController.cls-meta.xml                              |    5 
 force-app/main/default/classes/lexRentalApplyController.cls                                          |   32 +
 force-app/main/default/lwc/lexCBLBPNew/__tests__/lexCBLBPNew.test.js                                 |   25 +
 force-app/main/default/classes/lexLightingButtonConstant.cls                                         |    2 
 force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js-meta.xml                                       |   22 
 force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.html                                            |    3 
 force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js-meta.xml                         |   11 
 force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js-meta.xml                   |   11 
 force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js                                              |    3 
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css                             |   10 
 force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.html                          |    6 
 force-app/main/default/lwc/lexNewOpportunityFile/__tests__/lexNewOpportunityFile.test.js             |   25 +
 force-app/main/default/lwc/lexCreateVOCFromCIC/__tests__/lexCreateVOCFromCIC.test.js                 |   25 +
 force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js                                                |   29 +
 force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.html              |   14 
 force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html                                            |    8 
 force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.css                                               |   22 
 force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js-meta.xml                       |   11 
 force-app/main/default/classes/lexCaseController.cls                                                 |   28 +
 force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js                            |   73 +++
 force-app/main/default/lwc/lexNewOnLineSurvey/__tests__/lexNewOnLineSurvey.test.js                   |   25 +
 force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js                                |   62 ++
 force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.html                                |   23 
 force-app/main/default/classes/ReportController.cls                                                  |   23 
 force-app/main/default/classes/lexCaseController.cls-meta.xml                                        |    5 
 force-app/main/default/lwc/lexCreateOPDFromRentalApply/__tests__/lexCreateOPDFromRentalApply.test.js |   25 +
 force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js                                  |   92 +++
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html                            |  542 +++++++++++++---------
 force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.html                              |    6 
 force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html                              |    6 
 force-app/main/default/classes/lexLastbuyProductController.cls                                       |   21 
 force-app/main/default/classes/lexPCLLostReportLwcController.cls                                     |   32 +
 force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.html                                              |   13 
 40 files changed, 1,180 insertions(+), 250 deletions(-)

diff --git a/force-app/main/default/classes/OpportunityLightingButtonController.cls b/force-app/main/default/classes/OpportunityLightingButtonController.cls
index b7d7a02..c6848a8 100644
--- a/force-app/main/default/classes/OpportunityLightingButtonController.cls
+++ b/force-app/main/default/classes/OpportunityLightingButtonController.cls
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-12 11:16:07
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-25 13:10:39
+ * @LastEditTime: 2023-06-29 16:53:17
  */
 public with sharing class OpportunityLightingButtonController {
     @AuraEnabled
@@ -495,6 +495,21 @@
         return res;
     }
     @AuraEnabled
+    public static InitData initForNewOpportunityFileButton(String recordId){
+        InitData res = new InitData();
+        try {
+            Opportunity opp = [
+                select
+                Stock_apply_status__c
+                from Opportunity where Id =: recordId
+            ];
+            res.stockApplyStatus = opp.Stock_apply_status__c;
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return res;
+    }
+    @AuraEnabled
     public static string updateForAgencyAuthorizeButton(String recordId){
         try {
             Opportunity opp = new Opportunity();
diff --git a/force-app/main/default/classes/ReportController.cls b/force-app/main/default/classes/ReportController.cls
index 76a56d9..d84c234 100644
--- a/force-app/main/default/classes/ReportController.cls
+++ b/force-app/main/default/classes/ReportController.cls
@@ -261,6 +261,25 @@
         }
         return res;
     }
+    @AuraEnabled
+    public static InitData initForNewOnLineSurveyButton(String recordId){
+        InitData res = new InitData();
+        try {
+            Report__c re = [
+                select
+                Date__c,
+                Practitioner1__c,
+                OwnerId
+                from Report__c where Id =: recordId
+            ];
+            res.ownerId = re.OwnerId;
+            res.datec = re.Date__c;
+            res.practitioner1 = re.Practitioner1__c;
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return res;
+    }
 
     //缁欐彁浜ょ浉搴旂殑js鎻愪緵鍒濆鍖栨暟鎹�
     @AuraEnabled
@@ -682,5 +701,9 @@
         public String demoPurpose2;
         @AuraEnabled
         public String opdPlan;
+        @AuraEnabled
+        public Date datec;
+        @AuraEnabled
+        public String practitioner1;
     }
 }
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCaseController.cls b/force-app/main/default/classes/lexCaseController.cls
new file mode 100644
index 0000000..3a5e0ac
--- /dev/null
+++ b/force-app/main/default/classes/lexCaseController.cls
@@ -0,0 +1,28 @@
+public with sharing class lexCaseController {
+    @AuraEnabled
+    public static InitData initForCreateVOCFromCIC(String recordId){
+        InitData res = new InitData();
+        try {
+            Case ca = [
+                select
+                Department__c,
+                Account__c
+                from Case where Id =: recordId
+            ];
+            res.department = ca.Department__c;
+            res.accountId = ca.Account__c;
+            res.recordTypeId = Schema.SObjectType.Case.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_VOC).getRecordTypeId();
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return res;
+    }
+    class InitData{
+        @AuraEnabled
+        public String department;
+        @AuraEnabled
+        public String accountId;
+        @AuraEnabled
+        public String recordTypeId;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexCaseController.cls-meta.xml b/force-app/main/default/classes/lexCaseController.cls-meta.xml
new file mode 100644
index 0000000..45cccbd
--- /dev/null
+++ b/force-app/main/default/classes/lexCaseController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLastbuyProductController.cls b/force-app/main/default/classes/lexLastbuyProductController.cls
new file mode 100644
index 0000000..a925501
--- /dev/null
+++ b/force-app/main/default/classes/lexLastbuyProductController.cls
@@ -0,0 +1,21 @@
+public with sharing class lexLastbuyProductController {
+    @AuraEnabled
+    public static InitData initForCBLBPNew(String recordId){
+        InitData res = new InitData();
+        try {
+            Product2 pro = [
+                select
+                Name
+                from Product2 where Id =: recordId  
+            ];
+            res.name = pro.Name;
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return res;
+    }
+    class InitData{
+        @AuraEnabled
+        public String name;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLastbuyProductController.cls-meta.xml b/force-app/main/default/classes/lexLastbuyProductController.cls-meta.xml
new file mode 100644
index 0000000..45cccbd
--- /dev/null
+++ b/force-app/main/default/classes/lexLastbuyProductController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexLightingButtonConstant.cls b/force-app/main/default/classes/lexLightingButtonConstant.cls
index ba0f1f2..11a380c 100644
--- a/force-app/main/default/classes/lexLightingButtonConstant.cls
+++ b/force-app/main/default/classes/lexLightingButtonConstant.cls
@@ -93,6 +93,8 @@
       public static final String RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE = '璇环鐗规畩瀵瑰簲';
       //52 璇环娉ㄦ畫鐗规畩瀵瑰簲鐨勮褰曠被鍨嬧�樻敞娈嬬壒娈婂搴斺��
       public static final String RECORD_TYPE_NAME_BY_SPECIL_APPLY_CREATE_ACH = '娉ㄦ畫鐗规畩瀵瑰簲';
+      //Case瀵瑰簲鐨勮褰曠被鍨嬧�榁OC鈥�
+       public static final String RECORD_TYPE_NAME_BY_VOC = 'VOC';
       //鎶ヨ〃鍚嶁�樻姤浠蜂骇鍝佲��
       public static final String REPORT_NAME_FOR_CNY = '鎶ヤ环浜у搧';
       //鎶ヨ〃鍚嶁�樹骇鍝佺殑璇环鈥�
diff --git a/force-app/main/default/classes/lexPCLLostReportLwcController.cls b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
index 9ec6918..fb16ace 100644
--- a/force-app/main/default/classes/lexPCLLostReportLwcController.cls
+++ b/force-app/main/default/classes/lexPCLLostReportLwcController.cls
@@ -434,6 +434,22 @@
 			objs.put('Id', reportId);
 			objs.put('pageStatus', 'View');
 			objs.put('submitFlag', '1');
+			ProcessInstance pro = [
+				SELECT 
+				ProcessDefinition.Name,
+				 (
+					SELECT StepStatus,
+					Comments,
+					CreatedDate,
+					Actor.Name,  
+					OriginalActor.Name, 
+					ProcessNode.Name FROM StepsAndWorkitems order by IsPending DESC, CreatedDate DESC 
+				)
+				FROM ProcessInstance where TargetObjectId =:reportId order by CreatedDate DESC
+			];
+			List<ProcessInstanceHistory> items = new List<ProcessInstanceHistory>();
+			items.addall(pro.StepsAndWorkitems);
+			objs.put('approvalHistorys',items);
 			return objs;
 		}catch(exception ex) {
 			Database.rollback(sp);
@@ -454,6 +470,17 @@
 		return lostBrand;
 	}
 
+	@AuraEnabled
+	public static PCLLostProducts getNewLostProduct(Integer lineNo2){
+		PCLLostProducts pro = null;
+		try {
+			pro = new PCLLostProducts(lineNo2);
+		} catch (Exception e) {
+			System.debug(e.getMessage());
+		}
+		return pro;
+	}
+
 	// update tcm 20211125 娣诲姞鍨嬪彿鏃惰嚜鍔ㄥ甫鍑哄搧鐗� end
 	// 椤甸潰鐨勬暟鎹粨鏋�
 	public class LostReport {
@@ -461,17 +488,22 @@
 		public Lost_cancel_report__c lostReport { get; set; }
 		@AuraEnabled
 		public list<LostBrand> LostBrands { get; set; }
+		@AuraEnabled
+		public list<ProcessInstanceHistory> approvalHistorys { get; set; }
 		public LostReport(){
 			lostReport = new Lost_cancel_report__c();
 			LostBrands = new list<LostBrand> {new LostBrand(0)};
+			approvalHistorys = new list<ProcessInstanceHistory>();
 		}
 		public LostReport(Lost_cancel_report__c lostReport){
 			this.lostReport = lostReport;
 			LostBrands = new list<LostBrand> {new LostBrand(0)};
+			approvalHistorys = new list<ProcessInstanceHistory>();
 		}
 		public LostReport(Lost_cancel_report__c lostReport,  list<LostBrand> LostBrands){
 			this.lostReport = lostReport;
 			this.LostBrands = LostBrands;
+			approvalHistorys = new list<ProcessInstanceHistory>();
 		}
 	}
 
diff --git a/force-app/main/default/classes/lexRentalApplyController.cls b/force-app/main/default/classes/lexRentalApplyController.cls
new file mode 100644
index 0000000..533fc4b
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyController.cls
@@ -0,0 +1,32 @@
+public with sharing class lexRentalApplyController {
+    @AuraEnabled
+    public static InitData initForCreateOPDFromRentalApply(String recordId){
+        InitData res = new InitData();
+        try {
+            Rental_Apply__c re = [
+                select
+                Hospital__c,
+                Strategic_dept__c,
+                Account__c
+                from Rental_Apply__c where Id =: recordId
+            ];
+            res.hospitalId = re.Hospital__c;
+            res.strategicDeptId = re.Strategic_dept__c;
+            res.accountId = re.Account__c;
+            res.recordTypeId = Schema.SObjectType.Report__c.getRecordTypeInfosByName().get(lexLightingButtonConstant.RECORD_TYPE_NAME_BY_FOLLOW_THE_STAGE).getRecordTypeId();
+        } catch (Exception e) {
+            throw new AuraHandledException(e.getMessage());
+        }
+        return res;
+    }
+    class InitData{
+        @AuraEnabled
+        public String hospitalId;
+        @AuraEnabled
+        public String strategicDeptId;
+        @AuraEnabled
+        public String accountId;
+        @AuraEnabled
+        public String recordTypeId;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/classes/lexRentalApplyController.cls-meta.xml b/force-app/main/default/classes/lexRentalApplyController.cls-meta.xml
new file mode 100644
index 0000000..45cccbd
--- /dev/null
+++ b/force-app/main/default/classes/lexRentalApplyController.cls-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <status>Active</status>
+</ApexClass>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCBLBPNew/__tests__/lexCBLBPNew.test.js b/force-app/main/default/lwc/lexCBLBPNew/__tests__/lexCBLBPNew.test.js
new file mode 100644
index 0000000..578b778
--- /dev/null
+++ b/force-app/main/default/lwc/lexCBLBPNew/__tests__/lexCBLBPNew.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCBLBPNew from 'c/lexCBLBPNew';
+
+describe('c-lex-cblbp-new', () => {
+    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-cblbp-new', {
+            is: LexCBLBPNew
+        });
+
+        // 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/lexCBLBPNew/lexCBLBPNew.css b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.css
new file mode 100644
index 0000000..95c1c55
--- /dev/null
+++ b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.css
@@ -0,0 +1,22 @@
+.holder{
+	position: relative;
+	display: inline-block;
+	width: 80px;
+	height: 80px;
+	text-align: center;
+}
+
+.container .uiContainerManager{
+	display : none !important;
+}
+.toast{
+	border: 1px solid #c9c9c9;
+	border-radius: 10px; 
+	width: 50%;
+	margin: 0 auto;
+	font-size: 18px;
+	font-weight: bold;
+	padding: 10px 20px;
+	background: #feb75d;
+	display: flex;
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.html b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.html
new file mode 100644
index 0000000..fc31dc4
--- /dev/null
+++ b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.html
@@ -0,0 +1,13 @@
+<template>
+    <div class="holder" if:true={IsLoading}>
+	    <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+	</div>
+    <div if:false={IsLoading} class="toast">
+		<span style="padding: 10px;">{msg}</span>
+		<button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" onclick={closeAction} title="Close" style="background-color: #e5e4e2;margin-top: 15px;">
+                <lightning-icon class="greyIcon" icon-name="utility:close" alternative-text="Connected" variant="inverse" size="small"
+                    title="Close"  style="color: black;"></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+        </button>
+	</div> 
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js
new file mode 100644
index 0000000..ccae31b
--- /dev/null
+++ b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js
@@ -0,0 +1,29 @@
+import init from '@salesforce/apex/lexLastbuyProductController.initForCBLBPNew';
+import { api, wire,LightningElement } from 'lwc';
+
+export default class LexCBLBPNew extends LightningElement {
+    @api recordId;
+    name;
+    IsLoading = true;
+    connectedCallback(){
+       init({
+            recordId: this.recordId
+       }).then(result=>{
+            this.name = result.name;
+            this.CBLBPNew();
+       });
+    }
+    CBLBPNew(){
+        var url = '/apex/StandardFieldDefaults?';
+        var product = this.recordId;
+        if (product != undefined && product != '') {
+        url = url + 'SObjId=' + this.recordId + '&SObjName=' + this.name + '&linkId=00N10000009HD8q' + '&Pagefrom=Product';
+        }
+        url = url + '&Pageto=LastbuyProduct';
+        window.open(url);
+        this.closeAction();
+    }
+    closeAction(){
+        window.open("/"+this.recordId,'_self');
+    } 
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js-meta.xml b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js-meta.xml
new file mode 100644
index 0000000..bc12eec
--- /dev/null
+++ b/force-app/main/default/lwc/lexCBLBPNew/lexCBLBPNew.js-meta.xml
@@ -0,0 +1,22 @@
+<?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__AppPage</target> 
+        <target>lightning__RecordPage</target> 
+        <target>lightning__HomePage</target> 
+        <target>lightning__RecordAction</target> 
+        <!-- 灞忓箷娴侀厤缃� --> 
+        <target>lightning__FlowScreen</target> 
+    </targets> 
+
+    <!-- 瀹氫箟鍙橀噺 --> 
+
+    <targetConfigs> 
+        <targetConfig targets="lightning__FlowScreen"> 
+            <!-- name js涓娇鐢ㄧ殑鍙橀噺锛屼粠灞忓箷娴佷腑鑾峰彇鍙傛暟  label 鍦ㄥ睆骞曟祦鐨勮LWC鐨勮缃腑鏄剧ず --> 
+            <property name="recordId" type="String" label="recordId"/> 
+        </targetConfig> 
+    </targetConfigs>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateOPDFromRentalApply/__tests__/lexCreateOPDFromRentalApply.test.js b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/__tests__/lexCreateOPDFromRentalApply.test.js
new file mode 100644
index 0000000..fc6d801
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/__tests__/lexCreateOPDFromRentalApply.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCreateOPDFromRentalApply from 'c/lexCreateOPDFromRentalApply';
+
+describe('c-lex-create-opd-from-rental-apply', () => {
+    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-opd-from-rental-apply', {
+            is: LexCreateOPDFromRentalApply
+        });
+
+        // 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/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.html b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.html
new file mode 100644
index 0000000..5b35562
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.html
@@ -0,0 +1,14 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 14:59:56
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 15:01:48
+-->
+<template>
+    <div class="baseHolder" 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/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js
new file mode 100644
index 0000000..1ba2822
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js
@@ -0,0 +1,71 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 14:59:56
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 15:39:17
+ */
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexRentalApplyController.initForCreateOPDFromRentalApply';
+
+export default class LexCreateOPDFromRentalApply extends NavigationMixin(LightningElement) {
+    @api recordId;
+    hospitalId;
+    strategicDeptId;
+    accountId;
+    recordTypeId;
+    @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.hospitalId = result.hospitalId;
+            this.strategicDeptId = result.strategicDeptId;
+            this.accountId = result.accountId;
+            this.recordTypeId = result.recordTypeId;
+            this.createOPDFromRentalApply();
+        });
+    }
+    createOPDFromRentalApply(){
+        const defaultValues = encodeDefaultFieldValues({
+            Loaner_request_no1__c: this.recordId,
+            Hospital_Reference__c: this.hospitalId,
+            Department_Class_Ref__c: this.strategicDeptId,
+            Hospital_Department__c: this.accountId 
+        });
+        this[NavigationMixin.Navigate]({
+            type: 'standard__objectPage',
+            attributes: {
+                objectApiName: 'Report__c',
+                actionName: 'new'
+            },
+            state: {
+                nooverride: '1',
+                defaultFieldValues: defaultValues,
+                recordTypeId: this.recordTypeId
+            }
+        });
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js-meta.xml b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.js-meta.xml
new file mode 100644
index 0000000..329e839
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateOPDFromRentalApply/lexCreateOPDFromRentalApply.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/lexCreateVOCFromCIC/__tests__/lexCreateVOCFromCIC.test.js b/force-app/main/default/lwc/lexCreateVOCFromCIC/__tests__/lexCreateVOCFromCIC.test.js
new file mode 100644
index 0000000..2e117b6
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateVOCFromCIC/__tests__/lexCreateVOCFromCIC.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexCreateVOCFromCIC from 'c/lexCreateVOCFromCIC';
+
+describe('c-lex-create-voc-from-cic', () => {
+    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-voc-from-cic', {
+            is: LexCreateVOCFromCIC
+        });
+
+        // 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/lexCreateVOCFromCIC/lexCreateVOCFromCIC.html b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.html
new file mode 100644
index 0000000..9608e80
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.html
@@ -0,0 +1,6 @@
+<template>
+    <div class="baseHolder" 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/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js
new file mode 100644
index 0000000..d94df66
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js
@@ -0,0 +1,62 @@
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/lexCaseController.initForCreateVOCFromCIC';
+
+export default class LexCreateVOCFromCIC extends NavigationMixin(LightningElement) {
+    @api recordId;
+    caseNumber;
+    recordTypeId;
+    department;
+    accountId;
+    @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.caseNumber = result.caseNumber;
+            this.recordTypeId = result.recordTypeId;
+            this.department = result.department;
+            this.accountId = result.accountId;
+            this.createVOCFromCIC();
+        });
+    }
+    createVOCFromCIC(){
+        const defaultValues = encodeDefaultFieldValues({
+            CIC_Number__c: this.recordId,
+            Manual_Name__c: this.department,
+            Hospital_Reference__c: this.accountId
+        });
+        this[NavigationMixin.Navigate]({
+            type: 'standard__objectPage',
+            attributes: {
+                objectApiName: 'Case',
+                actionName: 'new'
+            },
+            state: {
+                nooverride: '1',
+                defaultFieldValues: defaultValues,
+                recordTypeId: this.recordTypeId
+            }
+        });
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js-meta.xml b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.js-meta.xml
new file mode 100644
index 0000000..952a036
--- /dev/null
+++ b/force-app/main/default/lwc/lexCreateVOCFromCIC/lexCreateVOCFromCIC.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/lexLookupLwc/lexLookupLwc.html b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
index dd18724..e4e58ef 100644
--- a/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
+++ b/force-app/main/default/lwc/lexLookupLwc/lexLookupLwc.html
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-05-25 13:59:44
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-30 10:21:50
+ * @LastEditTime: 2023-06-27 16:49:27
 -->
 <template>
     <div>
@@ -19,10 +19,10 @@
                        </template>
                        <template if:true={recordselected}>
                           <span class="slds-pill slds-pill_link fullWidth slds-input slds-combobox__input"> 
-                             <a href="javascript:void(0);" 
-                                class="slds-pill__action slds-p-left_x-small" title={selectedValue}>
+                             <a href="javascript:void(0);"
+                                class="slds-pill__action slds-p-left_x-small" title={selectedValue} style="height: 32px;">
                                 <lightning-icon icon-name={iconname} size="x-small"></lightning-icon>
-                                <span class="slds-pill__label slds-p-left_x-small">{selectedValue}</span>
+                                <span class="slds-pill__label slds-p-left_x-small" style="display: inline-flex;width: 50px">{selectedValue}</span>
                              </a>
                              <button onclick={clearSelection}
                              class="slds-button slds-button_icon slds-button_icon slds-pill__remove" 
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey/__tests__/lexNewOnLineSurvey.test.js b/force-app/main/default/lwc/lexNewOnLineSurvey/__tests__/lexNewOnLineSurvey.test.js
new file mode 100644
index 0000000..6e6f95f
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey/__tests__/lexNewOnLineSurvey.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexNewOnLineSurvey from 'c/lexNewOnLineSurvey';
+
+describe('c-lex-new-on-line-survey', () => {
+    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-new-on-line-survey', {
+            is: LexNewOnLineSurvey
+        });
+
+        // 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/lexNewOnLineSurvey/lexNewOnLineSurvey.html b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.html
new file mode 100644
index 0000000..2274ff5
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.html
@@ -0,0 +1,23 @@
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 13:45:26
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 14:24:14
+-->
+<template>
+    <div class="reportHolder" if:true={IsLoading}>
+        <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+    </div>
+    <div if:false={IsLoading}>
+        <lightning-card title="閫夋嫨璁板綍绫诲瀷">
+            <lightning-combobox
+              label="閫夋嫨璁板綍绫诲瀷"
+              options={recordTypeOptions}
+              value={selectedRecordTypeId}
+              onchange={handleRecordTypeChange}
+            ></lightning-combobox>
+          </lightning-card>
+    </div>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js
new file mode 100644
index 0000000..915e1a1
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js
@@ -0,0 +1,92 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 13:45:26
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 16:43:33
+ */
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 13:45:26
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 14:29:53
+ */
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/ReportController.initForNewOnLineSurveyButton';
+import { getObjectInfo } from 'lightning/uiObjectInfoApi';
+export default class LexNewOnLineSurvey extends NavigationMixin(LightningElement) {
+    @api recordId;
+    date;
+    practitioner1;
+    ownerId;
+    selectedRecordTypeId;
+    IsLoading = true;
+    @wire(getObjectInfo, { objectApiName: 'On_Line_Survey__c' })
+    objectInfo({ error, data }) {
+      if (data) {
+        this.recordTypeOptions = Object.values(data.recordTypeInfos).map((rt) => ({
+          label: rt.name,
+          value: rt.recordTypeId
+        }));
+      } else if (error) {
+        // 澶勭悊鎿嶄綔澶辫触鐨勯敊璇�
+      }
+    }
+    @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.date = result.datec;
+            this.practitioner1 = result.practitioner1;
+            this.ownerId = result.ownerId;
+            this.IsLoading = false;
+        });
+    }
+    handleRecordTypeChange(event) {
+        this.selectedRecordTypeId = event.target.value;
+        const defaultValues = encodeDefaultFieldValues({
+            OPD_number__c: this.recordId,
+            Report_day__c: this.date,
+            Medical_staff__c: this.practitioner1,
+            Reporter__c: this.ownerId
+        });
+        this[NavigationMixin.Navigate]({
+            type: 'standard__objectPage',
+            attributes: {
+                objectApiName: 'On_Line_Survey__c',
+                actionName: 'new'
+            },
+            state: {
+                nooverride: '1',
+                defaultFieldValues: defaultValues,
+                recordTypeId: this.selectedRecordTypeId
+            }
+        });
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+    
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js-meta.xml b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOnLineSurvey/lexNewOnLineSurvey.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/lexNewOpportunityFile/__tests__/lexNewOpportunityFile.test.js b/force-app/main/default/lwc/lexNewOpportunityFile/__tests__/lexNewOpportunityFile.test.js
new file mode 100644
index 0000000..8e9d9dd
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityFile/__tests__/lexNewOpportunityFile.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexNewOpportunityFile from 'c/lexNewOpportunityFile';
+
+describe('c-lex-new-opportunity-file', () => {
+    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-new-opportunity-file', {
+            is: LexNewOpportunityFile
+        });
+
+        // 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/lexNewOpportunityFile/lexNewOpportunityFile.html b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.html
new file mode 100644
index 0000000..38c9114
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.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/lexNewOpportunityFile/lexNewOpportunityFile.js b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js
new file mode 100644
index 0000000..a67b440
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js
@@ -0,0 +1,73 @@
+/*
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
+ * @Date: 2023-06-29 16:43:08
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-06-29 17:07:54
+ */
+import { api, wire,LightningElement } from 'lwc';
+import { CurrentPageReference } from "lightning/navigation";
+import { CloseActionScreenEvent } from 'lightning/actions';
+import { updateRecord } from 'lightning/uiRecordApi';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import { encodeDefaultFieldValues } from 'lightning/pageReferenceUtils';
+import init from '@salesforce/apex/OpportunityLightingButtonController.initForNewOpportunityFileButton';
+export default class LexNewOpportunityFile extends NavigationMixin(LightningElement) {
+    @api recordId;
+    stockApplyStatus;
+    @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;
+          }
+        }
+    }
+    showToast(msg,type) {
+        const event = new ShowToastEvent({
+            title: '',
+            message: msg,
+            variant: type
+        });
+        this.dispatchEvent(event);
+    }
+    connectedCallback(){
+        init({
+            recordId: this.recordId
+        }).then(result=>{
+            this.stockApplyStatus = result.stockApplyStatus;
+            this.newOpportunityFile();
+        });
+    }
+    newOpportunityFile(){
+        var status = this.stockApplyStatus;
+        if (status == '鎵瑰噯') {
+            this.showToast('澶囪揣瀹℃壒宸茬粡鎵瑰噯锛屼笉鑳芥坊鍔犳柊璇环鏂囦欢銆�','error');
+        } else {
+            const defaultValues = encodeDefaultFieldValues({
+                Opportunity__c: this.recordId
+            });
+            this[NavigationMixin.Navigate]({
+                type: 'standard__objectPage',
+                attributes: {
+                    objectApiName: 'Opportunity_File__c',
+                    actionName: 'new'
+                },
+                state: {
+                    nooverride: '1',
+                    defaultFieldValues: defaultValues
+                }
+            });
+        }
+        this.dispatchEvent(new CloseActionScreenEvent());
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js-meta.xml b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.js-meta.xml
new file mode 100644
index 0000000..3392981
--- /dev/null
+++ b/force-app/main/default/lwc/lexNewOpportunityFile/lexNewOpportunityFile.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/lexOTHCreate/__tests__/lexOTHCreate.test.js b/force-app/main/default/lwc/lexOTHCreate/__tests__/lexOTHCreate.test.js
new file mode 100644
index 0000000..14ff7c2
--- /dev/null
+++ b/force-app/main/default/lwc/lexOTHCreate/__tests__/lexOTHCreate.test.js
@@ -0,0 +1,25 @@
+import { createElement } from 'lwc';
+import LexOTHCreate from 'c/lexOTHCreate';
+
+describe('c-lex-oth-create', () => {
+    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-oth-create', {
+            is: LexOTHCreate
+        });
+
+        // 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/lexOTHCreate/lexOTHCreate.html b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.html
new file mode 100644
index 0000000..27e0f69
--- /dev/null
+++ b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.html
@@ -0,0 +1,3 @@
+<template>
+    
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js
new file mode 100644
index 0000000..20aef43
--- /dev/null
+++ b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js
@@ -0,0 +1,3 @@
+import { LightningElement } from 'lwc';
+
+export default class LexOTHCreate extends LightningElement {}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml
new file mode 100644
index 0000000..3fe0e73
--- /dev/null
+++ b/force-app/main/default/lwc/lexOTHCreate/lexOTHCreate.js-meta.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
+    <apiVersion>57.0</apiVersion>
+    <isExposed>false</isExposed>
+</LightningComponentBundle>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
index 8e59af1..d944675 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.css
@@ -41,7 +41,7 @@
     border: 0;
 }
 
-.container {
+    .container {
     display: flex;
     justify-content: space-between; /* 璁剧疆瀛愬厓绱犻棿鐨勯棿璺� */
     }
@@ -53,4 +53,10 @@
 
     .text-container p:first-line {
         background-color: rgb(243, 243, 243);
-      }
\ No newline at end of file
+      }
+
+    .slds-accordion__summary-heading{
+        background-color: rgb(243, 243, 243);
+    }
+
+    
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index baa2d12..d922074 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -4,226 +4,230 @@
  * @Author: chen jing wu
  * @Date: 2023-04-20 17:16:48
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-25 17:28:26
+ * @LastEditTime: 2023-06-28 17:53:19
 -->
 <template>
-    
-    <template if:true={isCreateOrEdit}>
-        <lightning-card id="my-element1" class="card"  variant="Narrow" data-id="my-card">
-            <div style="padding: 0 20px">
-                <lightning-layout>
-                    <lightning-layout-item>
-                        <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;">澶卞崟鎶ュ憡缂栬緫椤甸潰</div>
-                    </lightning-layout-item>
-                    <div style="margin-left: 550px;">
-                        <lightning-layout-item  size="12">
-                            <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
-                            <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
-                            <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
-                        </lightning-layout-item>
-                    </div>
-                </lightning-layout>
-                <div style="margin-top: 5px">
-                    <lightning-layout>
-                        <lightning-layout-item size="3" padding="around-small">
-                            <div class="slds-form_horizontal my-combobox">
-                                <label class="slds-form-element__label">澶卞崟绫诲瀷锛�</label>
-                                <lightning-combobox name="progress" value={LostReport.lostReport.LostType__c} options={RecordTypeOptions} 
-                                    onchange={handleLostTypeChange} class="searchField" required>
-                                </lightning-combobox>
-                            </div>   
-                        </lightning-layout-item>
-                        <lightning-layout-item size="4" padding="around-small">
-                            <div style="padding: 10px 3px;font: 16px;">澶卞崟鎬婚噾棰濓紙鍏冿級:{LostReport.lostReport.LostTotalAmount__c}</div>
-                        </lightning-layout-item>
-                        <lightning-layout-item size="3" padding="around-small">
-                            <div style="padding: 10px 3px;font: 16px;">鍖呭惈瓒呭0:{LostReport.lostReport.InclusionUltrasound__c}</div>
-                        </lightning-layout-item>
-                        <lightning-layout-item size="3" padding="around-small">
-                            <div style="padding: 10px 3px;font: 16px;">鐘舵��:{LostReport.lostReport.Report_Status__c}</div>
-                        </lightning-layout-item>
-                    </lightning-layout>
-                        <lightning-accordion allow-multiple-sections-open class="myAccordion">
-                                <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
-                                    <li key={brand}>
-                                        <lightning-accordion-section class="" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
-                                            <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
-                                            <lightning-button name={i} label="鍒犻櫎" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
-                                            <lightning-layout>
-                                                <lightning-layout-item size="4" padding="around-small">
-                                                    <template if:true={isEdit}>
-                                                        <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="澶卞崟鍝佺墝: " placeholder={brand.lostBrand.Lost_By_Company__c} required></c-multi-select-combobox>
-                                                    </template>
-                                                    <template if:false={isEdit}>
-                                                        <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="澶卞崟鍝佺墝: " required></c-multi-select-combobox>
-                                                    </template> 
-                                                </lightning-layout-item>
-                                                <lightning-layout-item flexibility="auto" padding="around-small">
-                                                    <lightning-combobox name={i} label="澶卞崟鍘熷洜锛堜富锛�:" value={brand.lostBrand.Lost_reason_main__c} options={columns2} 
-                                                    onchange={handleLostReasonMainChange} class="searchField" required></lightning-combobox>
-                                                </lightning-layout-item>
-                                                <lightning-layout-item flexibility="auto" padding="around-small">
-                                                    <lightning-combobox name={i} label="澶卞崟鍘熷洜锛堟锛�:" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2} 
-                                                    onchange={handleLostReasonSubChange} class="searchField"></lightning-combobox>
-                                                </lightning-layout-item>
-                                            </lightning-layout>
-                                            <lightning-layout> 
-                                                <lightning-layout-item size="4" padding="horizontal-small">
-                                                    <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="澶卞崟鍝佺墝锛堟墜鍔級: " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
-                                                </lightning-layout-item>
-                                                <lightning-layout-item size="4" padding="horizontal-small">
-                                                    <lightning-input data-id="TotalAmount" name={i} value={brand.lostBrand.LostPrice__c} type="number" label="澶卞崟閲戦锛堝厓锛�: " class="searchField" onchange={handleLostPriceOutChange} required></lightning-input>
-                                                </lightning-layout-item>
-                                                <lightning-layout-item size="4" padding="horizontal-small">
-                                                    <lightning-record-edit-form
-                                                        object-api-name='PCLLostBrand__c'
-                                                        record-id=''
-                                                    >
-                                                        <lightning-input-field value={brand.lostBrand.Agency__c} name={i} field-name='Agency__c' onchange={handleAgencyOutChange} required> </lightning-input-field>
-                                                    </lightning-record-edit-form>
-                                                </lightning-layout-item>
-                                            </lightning-layout>
-                                            <lightning-layout>
-                                                <lightning-layout-item size="4" padding="horizontal-small">
-                                                    <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="涓爣缁忛攢鍟嗭紙鎵嬪姩锛�:" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input>                                                         
-                                                </lightning-layout-item>
-                                    
-                                            </lightning-layout>
-                                            <lightning-layout>
-                                                <lightning-layout-item flexibility="auto" padding="around-small">
-                                                    <template if:true={isInit}>
-                                                        <div class="slds-card__body slds-card__body_inner">
-                                                            <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
-                                                                <thead>
-                                                                    <tr class="slds-text-title_caps">
-                                                                            <th><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
-                                                                            <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
-                                                                            <th><div class="slds-truncate"><span style="color:red;font-size: 18px;">*</span>澶卞崟鏁伴噺</div></th>
-                                                                            <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
-                                                                            <th><div class="slds-truncate"><span style="color:red;font-size: 18px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
-                                                                            <th><div class="slds-truncate"><span style="color:red;font-size: 18px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
-                                                                            <th></th>
-                                                                    </tr>
-                                                                </thead>
-                                                                <tbody>
-                                                                    <template for:each={brand.LostProducts} for:item="product" for:index="j">
-                                                                        <tr class="inputRows" key={product}>
-                                                                            <td>
-                                                                               <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} data-id={i} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true"></lightning-combobox> 
-                                                                            </td>
-                                                                            <td>
-                                                                                <!-- <lightning-record-edit-form
-                                                                                object-api-name='PCLLostProduct__c'
-                                                                                >
-                                                                                    <lightning-input-field class="LostProduct" data-id={i} title={i} value={product.LostProductss.LostProduct__c} name={j} field-name='LostProduct__c' onchange={handleLostProductChange} variant="label-hidden"> </lightning-input-field>
-                                                                                </lightning-record-edit-form>  -->
-                                                                                <template if:true={isEdit}>
-                                                                                    <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} init-value={product.productName}></c-lex-lookup-lwc>
-                                                                                </template>
-                                                                                <template if:false={isEdit}>
-                                                                                    <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected}></c-lex-lookup-lwc>
-                                                                                </template>
-                                                                            </td>
-                                                                            <td>
-                                                                               <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange}></lightning-input>
-                                                                            </td>
-                                                                            <td>
-                                                                                <lightning-input class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange}></lightning-input>
-                                                                            </td>
-                                                                            <td>
-                                                                                <lightning-combobox class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
-                                                                            </td>
-                                                                            <td>
-                                                                                <lightning-combobox class="ProductCategory" data-id={i} placeholder="--鏃�--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true"></lightning-combobox> 
-                                                                            </td>
-                            
-                                                                            <td>
-                                                                                <lightning-button-icon name={i} icon-name="utility:add" value={j} variant="bare" onclick={addRow}></lightning-button-icon>
-                                                                            </td>
-                                                                            <td>
-                                                                                <lightning-button-icon class="deleteButton" data-id={i} name={i} icon-name="utility:delete" value={j} variant="bare" onclick={removeRow}></lightning-button-icon>
-                                                                            </td>
-                                                                        </tr>
-                                                                    </template>
-                                                                </tbody>
-                                                            </table>
-                                                        </div>
-                                                    </template>
-                                                </lightning-layout-item>
-                                            </lightning-layout>
-                                        </lightning-accordion-section>
-                                    </li>
-                                </template>
-                        </lightning-accordion>
-                        <lightning-layout style="margin-top: 20px;">
-                            <div class="slds-align_absolute-center">
-                                <lightning-layout-item size="12">
+    <template if:true={isInit}>
+        <template if:true={isCreateOrEdit}>
+            <lightning-card id="my-element1" class="card"  variant="Narrow" data-id="my-card">
+                <div style="padding: 0 20px">
+                    <div class="slds-box slds-p-around_medium slds-text-align_center">
+                        <lightning-layout>
+                            <lightning-layout-item>
+                                <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">澶卞崟鎶ュ憡缂栬緫椤甸潰</div>
+                            </lightning-layout-item>
+                                <lightning-layout-item alignment-bump="left">
                                     <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
                                     <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
                                     <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
                                 </lightning-layout-item>
-                            </div>
                         </lightning-layout>
-                </div>
-            </div>   
-        </lightning-card>
-    </template>
-    <template if:true={isView}>
-            <lightning-card id="my-element2" class="card"  variant="Narrow" data-id="my-card">
-                <div style="padding: 0 20px">
-                    <lightning-layout>
-                        <lightning-layout-item>
-                            <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;">澶卞崟鎶ュ憡鏌ョ湅椤甸潰</div>
-                        </lightning-layout-item>
-                        <div style="margin-left: 550px;">
-                            <lightning-layout-item  size="12">
-                                <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
-                                <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
-                                <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
-                            </lightning-layout-item>
-                        </div>
-                    </lightning-layout>
-                    <div style="margin-top: 5px">
+                    </div>
+                    <div class="slds-box slds-p-around_medium">
                         <lightning-layout>
-                            <lightning-layout-item size="1">
-                                <label>澶卞崟绫诲瀷:</label>
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                    <lightning-output-field field-name="LostType__c" variant="label-hidden"></lightning-output-field>
-                                </lightning-record-view-form> 
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1"></lightning-layout-item>
-                            <lightning-layout-item size="2">
-                                <label>澶卞崟鎬婚噾棰濓紙鍏冿級:</label>
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                    <lightning-output-field field-name="LostTotalAmount__c" variant="label-hidden"></lightning-output-field>
-                                </lightning-record-view-form> 
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1"></lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <label>鍖呭惈瓒呭0:</label>
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                    <lightning-output-field field-name="InclusionUltrasound__c" variant="label-hidden"></lightning-output-field>
-                                </lightning-record-view-form> 
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1"></lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <label>鐘舵��:</label>
-                            </lightning-layout-item>
-                            <lightning-layout-item size="1">
-                                <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
-                                    <lightning-output-field field-name="Report_Status__c" variant="label-hidden"></lightning-output-field>
-                                </lightning-record-view-form> 
-                            </lightning-layout-item> 
+                            <template if:true={LostReport.lostReport}>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;float: left">
+                                        <span style="color:red;font-size: 10px;">*</span>
+                                        澶卞崟绫诲瀷锛�</div>
+                                    <div style="float: left;">
+                                        <lightning-combobox name="progress" value={LostReport.lostReport.LostType__c} options={RecordTypeOptions} 
+                                        onchange={handleLostTypeChange} class="searchField" style="bottom: 16px;">
+                                        </lightning-combobox> 
+                                    </div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="4" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;">澶卞崟鎬婚噾棰濓紙鍏冿級:{LostReport.lostReport.LostTotalAmount__c}</div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;">鍖呭惈瓒呭0:{LostReport.lostReport.InclusionUltrasound__c}</div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;">鐘舵��:{LostReport.lostReport.Report_Status__c}</div>
+                                </lightning-layout-item>
+                            </template>
                         </lightning-layout>
-                            <lightning-accordion allow-multiple-sections-open class="myAccordion">
+                                <lightning-accordion allow-multiple-sections-open class="myAccordion">
+                                        <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
+                                            <li key={brand.lineNo}>
+                                                <lightning-accordion-section class="" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
+                                                    <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
+                                                    <lightning-button name={i} label="鍒犻櫎" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item size="4" padding="around-small">
+                                                            <template if:true={isEdit}>
+                                                                <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="澶卞崟鍝佺墝: " placeholder={brand.lostBrand.Lost_By_Company__c} required></c-multi-select-combobox>
+                                                            </template>
+                                                            <template if:false={isEdit}>
+                                                                <c-multi-select-combobox name={i} onselect={setBrandMannualName} data-id="Lost_By_Company" class="mycombobox" options={brandOptions} selected-value={reasonValue} label="澶卞崟鍝佺墝: " required></c-multi-select-combobox>
+                                                            </template> 
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item flexibility="auto" padding="around-small">
+                                                            <lightning-combobox name={i} label="澶卞崟鍘熷洜锛堜富锛�:" value={brand.lostBrand.Lost_reason_main__c} options={columns2} 
+                                                            onchange={handleLostReasonMainChange} class="searchField" required></lightning-combobox>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item flexibility="auto" padding="around-small">
+                                                            <lightning-combobox name={i} label="澶卞崟鍘熷洜锛堟锛�:" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2} 
+                                                            onchange={handleLostReasonSubChange} class="searchField"></lightning-combobox>
+                                                        </lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout> 
+                                                        <lightning-layout-item size="4" padding="horizontal-small">
+                                                            <lightning-input name={i} data-id="Lost_By_Company_Mannual" value={brand.lostBrand.Lost_By_Company_Mannual__c} type="text" label="澶卞崟鍝佺墝锛堟墜鍔級: " class="searchField" onchange={handleLostByCompanyMannualChange}></lightning-input>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="4" padding="horizontal-small">
+                                                            <lightning-input data-id="TotalAmount" name={i} value={brand.lostBrand.LostPrice__c} type="number" label="澶卞崟閲戦锛堝厓锛�: " class="searchField" onchange={handleLostPriceOutChange} required></lightning-input>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="4" padding="horizontal-small">
+                                                            <lightning-record-edit-form
+                                                                object-api-name='PCLLostBrand__c'
+                                                                record-id=''
+                                                            >
+                                                                <lightning-input-field value={brand.lostBrand.Agency__c} name={i} field-name='Agency__c' onchange={handleAgencyOutChange} required> </lightning-input-field>
+                                                            </lightning-record-edit-form>
+                                                        </lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item size="4" padding="horizontal-small">
+                                                            <lightning-input name={i} value={brand.lostBrand.AgencyMannual__c} type="text" label="涓爣缁忛攢鍟嗭紙鎵嬪姩锛�:" class="searchField" onchange={handleAgencyMannualOutChange}></lightning-input>                                                         
+                                                        </lightning-layout-item>
+                                            
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item flexibility="auto" padding="around-small">
+                                                            <template if:true={isInit}>
+                                                                <div class="slds-card__body slds-card__body_inner">
+                                                                    <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                                                        <thead>
+                                                                            <tr class="slds-text-title_caps">
+                                                                                    <th><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                                    <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                                    <th><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
+                                                                                    <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
+                                                                                    <th><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
+                                                                                    <th><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
+                                                                                    <th></th>
+                                                                            </tr>
+                                                                        </thead>
+                                                                        <tbody>
+                                                                            <template for:each={brand.LostProducts} for:item="product" for:index="j">
+                                                                                <tr class="inputRows" key={product.lineNo2}>
+                                                                                    <td>
+                                                                                       <lightning-combobox placeholder={product.LostProductss.LostBrandName__c} data-id={i} class="BrandName" name={j} title={i} options={brandOptions} value={product.LostProductss.LostBrandName__c} onchange={handleLostBrandNameChange} read-only="true" style="margin-bottom: 20px; width: 70px"></lightning-combobox> 
+                                                                                    </td>
+                                                                                    <td>
+                                                                                        <template if:true={isEdit}>
+                                                                                            <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} init-value={product.productName}></c-lex-lookup-lwc>
+                                                                                        </template>
+                                                                                        <template if:false={isEdit}>
+                                                                                            <c-lex-lookup-lwc class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onselected={handleSelected} style="margin-bottom: 20px;"></c-lex-lookup-lwc>
+                                                                                        </template>
+                                                                                    </td>
+                                                                                    <td>
+                                                                                       <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange} style="margin-bottom: 20px;"></lightning-input>
+                                                                                    </td>
+                                                                                    <td>
+                                                                                        <lightning-input class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange} style="margin-bottom: 20px;"></lightning-input>
+                                                                                    </td>
+                                                                                    <td>
+                                                                                        <lightning-combobox class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange} style="margin-bottom: 20px; width: 87px"></lightning-combobox> 
+                                                                                    </td>
+                                                                                    <td>
+                                                                                        <lightning-combobox class="ProductCategory" data-id={i} placeholder="--鏃�--" title={i} name={j} options={product.productOptions} value={product.LostProductss.ProductCategory__c} onchange={handleProductCategoryChange} read-only="true" style="margin-bottom: 20px; width: 87px"></lightning-combobox> 
+                                                                                    </td>
+                                    
+                                                                                    <td>
+                                                                                        <lightning-button-icon name={i} icon-name="utility:add" value={j} variant="bare" onclick={addRow}></lightning-button-icon>
+                                                                                    </td>
+                                                                                    <td>
+                                                                                        <lightning-button-icon class="deleteButton" data-id={i} name={i} icon-name="utility:delete" value={j} variant="bare" onclick={removeRow}></lightning-button-icon>
+                                                                                    </td>
+                                                                                </tr>
+                                                                            </template>
+                                                                        </tbody>
+                                                                    </table>
+                                                                </div>
+                                                            </template>
+                                                        </lightning-layout-item>
+                                                    </lightning-layout>
+                                                </lightning-accordion-section>
+                                            </li>
+                                        </template>                               
+                            </lightning-accordion>
+                    </div> 
+                    <div style="margin-top: 5px">
+                        <div class="slds-box slds-p-around_medium slds-text-align_center">
+                            <lightning-layout style="margin-top: 20px;">
+                                <div class="slds-align_absolute-center">
+                                    <lightning-layout-item size="12">
+                                        <lightning-button label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
+                                        <lightning-button name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
+                                        <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                    </lightning-layout-item>
+                                </div>
+                            </lightning-layout>
+                        </div>      
+                    </div>
+                </div>   
+            </lightning-card>
+        </template>
+        <template if:true={isView}>
+                <lightning-card id="my-element2" class="card"  variant="Narrow" data-id="my-card">
+                    <div style="padding: 0 20px">
+                        <div class="slds-box slds-p-around_medium slds-text-align_center">
+                            <lightning-layout>
+                                <lightning-layout-item>
+                                    <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">澶卞崟鎶ュ憡鏌ョ湅椤甸潰</div>
+                                </lightning-layout-item>
+                                    <lightning-layout-item alignment-bump="left">
+                                        <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                        <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                        <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                    </lightning-layout-item>
+                            </lightning-layout>
+                            <lightning-layout>
+                                <lightning-layout-item size="1">
+                                    <label>澶卞崟绫诲瀷:</label>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
+                                        <lightning-output-field field-name="LostType__c" variant="label-hidden"></lightning-output-field>
+                                    </lightning-record-view-form> 
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1"></lightning-layout-item>
+                                <lightning-layout-item size="2">
+                                    <label>澶卞崟鎬婚噾棰濓紙鍏冿級:</label>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
+                                        <lightning-output-field field-name="LostTotalAmount__c" variant="label-hidden"></lightning-output-field>
+                                    </lightning-record-view-form> 
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1"></lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <label>鍖呭惈瓒呭0:</label>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
+                                        <lightning-output-field field-name="InclusionUltrasound__c" variant="label-hidden"></lightning-output-field>
+                                    </lightning-record-view-form> 
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1"></lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <label>鐘舵��:</label>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="1">
+                                    <lightning-record-view-form object-api-name="Lost_cancel_report__c" record-id={LostReport.lostReport.Id} density="comfy">
+                                        <lightning-output-field field-name="Report_Status__c" variant="label-hidden"></lightning-output-field>
+                                    </lightning-record-view-form> 
+                                </lightning-layout-item> 
+                            </lightning-layout>
+                        </div>
+                        <div style="margin-top: 5px">
+                            <div class="slds-box slds-p-around_medium">
+                                <lightning-accordion allow-multiple-sections-open class="myAccordion">
                                     <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
-                                        <li key={brand}>
+                                        <li key={brand.lostBrand.Id}>
                                             <lightning-accordion-section class="text-container" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
                                                 <lightning-layout>
                                                     <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
@@ -289,8 +293,46 @@
                                                 </lightning-layout>
                                                 <lightning-layout>
                                                     <lightning-layout-item flexibility="auto" padding="around-small">
-                                                        <template if:true={isInit}>
+                                                        <!-- <template if:true={isInit}>
                                                             <lightning-datatable hide-checkbox-column="true" key-field="is" columns={columns3} data={getData}></lightning-datatable>
+                                                        </template> -->
+                                                        <template if:true={isInit}>
+                                                            <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                                                <thead>
+                                                                    <tr class="slds-text-title_caps">
+                                                                            <th><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                            <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                            <th><div class="slds-truncate">澶卞崟鏁伴噺</div></th>
+                                                                            <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
+                                                                            <th><div class="slds-truncate">澶卞崟浜у搧绫诲埆</div></th>
+                                                                            <th><div class="slds-truncate">澶卞崟浜у搧鍖哄垎</div></th>
+                                                                    </tr>
+                                                                </thead>
+                                                                <tbody>
+                                                                    <template for:each={brand.LostProducts} for:item="product" for:index="j">
+                                                                        <tr class="inputRows" key={product.lineNo2}>
+                                                                            <td>
+                                                                                <div>{product.LostProductss.LostBrandName__c}</div>
+                                                                            </td>
+                                                                            <td>
+                                                                                <div>{product.productName}</div>
+                                                                            </td>
+                                                                            <td>
+                                                                                <div>{product.LostProductss.Quantity__c}</div>
+                                                                            </td>
+                                                                            <td>
+                                                                                <div>{product.LostProductss.LostProductMannual__c}</div>
+                                                                            </td>
+                                                                            <td>
+                                                                                <div>{product.LostProductss.ProductClass__c}</div>
+                                                                            </td>
+                                                                            <td>
+                                                                                <div>{product.LostProductss.ProductCategory__c}</div>
+                                                                            </td>
+                                                                        </tr>
+                                                                    </template>
+                                                                </tbody>
+                                                            </table>
                                                         </template>
                                                     </lightning-layout-item>
                                                 </lightning-layout>
@@ -298,17 +340,73 @@
                                         </li>
                                     </template>
                             </lightning-accordion>
-                            <lightning-layout style="margin-top: 20px;">
-                                <div class="slds-align_absolute-center">
-                                    <lightning-layout-item size="12">
-                                        <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
-                                        <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
-                                        <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                            </div>
+                            <div class="slds-box slds-p-around_medium slds-text-align_center">
+                                <lightning-layout style="margin-top: 20px;">
+                                    <div class="slds-align_absolute-center">
+                                        <lightning-layout-item size="12">
+                                            <lightning-button label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                            <lightning-button name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                            <lightning-button label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                        </lightning-layout-item>
+                                    </div>
+                                </lightning-layout>
+                            </div> 
+                        </div>
+                        <template if:true={submitFlag}>
+                            <div class="slds-box slds-p-around_medium slds-text-align_center">
+                                <lightning-layout>
+                                    <lightning-layout-item>
+                                        <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">鎵瑰噯鍘嗗彶</div>
                                     </lightning-layout-item>
-                                </div>
-                            </lightning-layout>
-                    </div>
-                </div>   
-            </lightning-card>
+                                    <lightning-layout-item alignment-bump="left">
+                                        <lightning-button label="鎾ゅ洖鎵瑰噯璇锋眰"></lightning-button>
+                                    </lightning-layout-item>
+                                </lightning-layout>
+                                <lightning-layout>
+                                    <table class="slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large"> 
+                                        <thead>
+                                            <tr class="slds-text-title_caps">
+                                                    <th><div class="slds-truncate">鎿嶄綔</div></th>
+                                                    <th><div class="slds-truncate">鏃ユ湡</div></th>
+                                                    <th><div class="slds-truncate">鐘舵��</div></th>
+                                                    <th><div class="slds-truncate">琚垎閰嶄汉</div></th>
+                                                    <th><div class="slds-truncate">瀹為檯鎵瑰噯浜�</div></th>
+                                                    <th><div class="slds-truncate">璇勮</div></th>
+                                            </tr>
+                                        </thead>
+                                        <tbody>
+                                            <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
+                                                <tr class="inputRows" key={approvalHistory.Id}>
+                                                    <td>
+                                                        <a onclick={test}>閲嶆柊鍒嗛厤</a>
+                                                        <label>|</label>
+                                                        <a onclick={test}>鎵瑰噯/鎷掔粷</a>
+                                                    </td>
+                                                    <td>
+                                                        <div>{approvalHistory.CreatedDate}</div>
+                                                    </td>
+                                                    <td>
+                                                        <div>{approvalHistory.StepStatus}</div>
+                                                    </td>
+                                                    <td>
+                                                        <div>{approvalHistory.Actor.Name}</div>
+                                                    </td>
+                                                    <td>
+                                                        <div>{approvalHistory.OriginalActor.Name}</div>
+                                                    </td>
+                                                    <td>
+                                                        <div>{approvalHistory.Comments}</div>
+                                                    </td>
+                                                </tr>
+                                            </template>
+                                        </tbody>
+                                    </table>
+                                </lightning-layout>
+                            </div>
+                        </template>
+                    </div>   
+                </lightning-card>
+        </template>
     </template>
 </template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
index 165b16c..e9d4712 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.js
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-20 15:04:03
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-06 13:27:33
+ * @LastEditTime: 2023-06-28 17:29:47
  */
 const columns2=[
     { label: '--鏃�--', value: '' },
@@ -51,6 +51,7 @@
 import multiSelectCombobox from 'c/multiSelectCombobox'
 import searchBrands from '@salesforce/apex/lexPCLLostReportLwcController.searchBrands';
 import getNewLostBrand from '@salesforce/apex/lexPCLLostReportLwcController.getNewLostBrand';
+import getNewLostProduct from '@salesforce/apex/lexPCLLostReportLwcController.getNewLostProduct';
 import getPickList from '@salesforce/apex/lexPCLLostReportLwcController.getPickList';
 import { NavigationMixin } from 'lightning/navigation';
 import submit from '@salesforce/apex/lexPCLLostReportLwcController.submit';
@@ -71,6 +72,7 @@
         lostReport: {}
     }
     @track brandOptions = [];
+    @track isInit = false;
     lostType = '澶卞崟';
     submitFlag = '';
     flag;
@@ -107,6 +109,8 @@
                 this.LostReport.lostReport.LostTotalAmount__c = 0.0;
                 this.LostReport.lostReport.InclusionUltrasound__c = '0';
                 this.newProduct = JSON.parse(JSON.stringify(this.LostReport.LostBrands[0].LostProducts[0]));
+                console.log(this.LostReport);
+                this.isInit = true;
             }
             }).catch(error=>{
                 console.log("error");
@@ -127,6 +131,9 @@
             fieldName: 'ProductCategory__c'
         }).then(result=>{
             this.productOptionsList = JSON.parse(result);
+        }).catch(error=>{
+            console.log('error');
+            console.log(error);
         });
 
     }
@@ -159,19 +166,20 @@
         updateRecord({fields: { Id: recordId }});
     }
 
-    get isInit(){
-        if(this.LostReport.LostBrands[0].LostProducts[0].productOptions == undefined){
-            return false;
-        }else{
-            return true;
-        }
-    }
+    // get isInit(){
+    //     if(this.LostReport.LostBrands[0].LostProducts[0].productOptions == undefined){
+    //         return false;
+    //     }else{
+    //         return true;
+    //     }
+    // }
    
     get getData(){
-        var products = this.LostReport.LostBrands[this.tableflag].LostProducts;
+        var newLostReport = JSON.parse(JSON.stringify(this.LostReport));
+        var products = newLostReport.LostBrands[this.tableflag].LostProducts;
         var productList = [];
         products.forEach(product=>{
-            var newProduct = JSON.parse(JSON.stringify(product));
+            var newProduct = product;
             newProduct.LostProductss.productName = newProduct.productName;
             productList.push(newProduct.LostProductss);
         });
@@ -221,6 +229,15 @@
             this.LostReport.LostBrands.push(result);
         });
     }
+    addRow(event){
+        var index = event.target.name;
+        getNewLostProduct({
+            lineNo2: this.LostReport.LostBrands[index].LostProducts.length
+        }).then(result=>{
+            result.LostProductss.LostBrandName__c = this.LostReport.LostBrands[index].lostBrand.Lost_By_Company__c;
+            this.LostReport.LostBrands[index].LostProducts.push(result);
+        });
+    }
     submitJs() {
         console.log('1');
         submit({
@@ -230,7 +247,15 @@
             if(result.error){
                 this.showToast(result.error,"error");
             }else{
-                this.submitFlag = result.submitFlag;
+                console.log(result);
+                console.log(this.LostReport);
+                for(var i=0;i < result.approvalHistorys.length;i++){
+                    console.log('123');
+                    this.LostReport.approvalHistorys.push(JSON.parse(JSON.stringify(result.approvalHistorys[i])));
+                    console.log('321');
+                }
+                this.submitFlag = JSON.parse(JSON.stringify(result.submitFlag));
+                console.log(this.LostReport);
                 this.updateRecordView(this.reportId);
             }
         }).catch(error=>{
@@ -374,6 +399,7 @@
                 // console.log(this.LostReport);
                 this.status.pageStatus = 'View';
                 this.tableflag = 0;
+                this.showToast('淇濆瓨鎴愬姛','success');
                 console.log(this.LostReport);
             }
         }).catch(error=>{
@@ -470,14 +496,6 @@
     isBlank(str) {
         return /^\s*$/.test(str);
       }
-    addRow(event){
-        var index = event.target.name;
-        var product = JSON.parse(JSON.stringify(this.newProduct));
-        if(this.LostReport.LostBrands[index].LostProducts[0].LostProductss.LostBrandName__c != undefined){
-            product.LostProductss.LostBrandName__c =  JSON.parse(JSON.stringify(this.LostReport.LostBrands[index].LostProducts[0].LostProductss.LostBrandName__c));
-        }
-        this.LostReport.LostBrands[index].LostProducts.push(product);
-    }
     removeRow(event){
         var index1 = event.target.name;
         var index2 = event.target.value;
diff --git a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
index 4156541..15c9650 100644
--- a/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
+++ b/force-app/main/default/lwc/multiSelectCombobox/multiSelectCombobox.html
@@ -4,7 +4,7 @@
  * @Author: chen jing wu
  * @Date: 2023-04-25 17:41:26
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-05-30 15:07:43
+ * @LastEditTime: 2023-06-28 09:32:17
 -->
 
 <!-- Code by CafeForce || www.cafeforce.com || support@cafeforce.com || Mandatory Header -->
@@ -12,7 +12,9 @@
     
     <!-- Header Label -->
     <template if:true={label}>
-        <label class="slds-form-element__label">{label}</label>
+        <label class="slds-form-element__label">
+            <span style="color:red;font-size: 10px;">*</span>
+            {label}</label>
     </template>
     <div class="slds-combobox_container">
         <div class="slds-combobox slds-dropdown-trigger slds-dropdown-trigger_click slds-is-open" aria-expanded="true" aria-haspopup="listbox" role="combobox">

--
Gitblit v1.9.1