From 35910c355f74e736e2068a0ffb7f39ae9615d8e1 Mon Sep 17 00:00:00 2001
From: chenjingwu <chenjingwu@prec-tech.com>
Date: 星期五, 24 五月 2024 16:29:00 +0800
Subject: [PATCH] 1

---
 force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html |  996 ++++++++++++++++++++++++++++++++++++++++++----------------
 1 files changed, 723 insertions(+), 273 deletions(-)

diff --git a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
index baa2d12..62e94da 100644
--- a/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
+++ b/force-app/main/default/lwc/lexPCLLostReportPage/lexPCLLostReportPage.html
@@ -2,295 +2,526 @@
  * @Description: 
  * @version: 
  * @Author: chen jing wu
+ * @Date: 2023-09-09 13:27:59
+ * @LastEditors: chen jing wu
+ * @LastEditTime: 2023-10-13 11:40:41
+-->
+<!--
+ * @Description: 
+ * @version: 
+ * @Author: chen jing wu
  * @Date: 2023-04-20 17:16:48
  * @LastEditors: chen jing wu
- * @LastEditTime: 2023-06-25 17:28:26
+ * @LastEditTime: 2023-10-07 15:50:52
 -->
 <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 if:true={IsLoading}>
+        <div class="spinner-overlay">
+            <lightning-spinner alternative-text="Loading" size="medium"></lightning-spinner>
+        </div>
+    </div>
+    <template if:true={visible}>
+        <template if:true={isSuccess}>
+            <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                <div class="slds-notify slds-notify_toast slds-theme_success" role="status" style="top: 130px;">
+                    <lightning-icon class="white" icon-name="utility:success" alternative-text="success"  variant="inverse" size="small" ></lightning-icon>
+                  <div class="slds-notify__content"  style="padding-left: 20px;">
+                    <span style="font-size: 16px;" class="toastMessage forceActionsText">{message}</span>
+                  </div>
+                  <div class="slds-notify__close">
+                    <lightning-button-icon icon-name="utility:close"  variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                  </div>
+                </div>
+              </div>
+            <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                <div class="slds-notify_container slds-is-relative">
+                    <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(46, 132, 74);" role="success">
+                    <div class="slds-align_absolute-center">
+                        
+                        
                     </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>
+                    </div>
+                </div>
+            </div> -->
+        </template>
+        <template if:false={isSuccess}>
+            <!-- <div style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                <div class="slds-notify_container slds-is-relative">
+                    <div class="slds-notify slds-notify_toast slds-theme_default slds-box slds-box_small"  style="background-color:rgb(234, 0, 30);" role="success">
+                    <div class="slds-align_right">
+                       
+                       
+                        
+                    </div>
+                    </div>
+                </div>
+            </div> -->
+            <div class="slds-notify_container slds-is-relative" style="position:absolute;top:1rem;left:1rem;right:1rem;position: fixed;z-index: 9999;">
+                <div class="slds-notify slds-notify_toast slds-theme_error" role="status" style="background-color: #BA0517;top: 130px;">
+                    <lightning-icon class="white" icon-name="utility:error"  size="small" variant="inverse"></lightning-icon>
+                  <div class="slds-notify__content" style="padding-left: 20px;">
+                    <span style="font-size: 16px;" class="toastMessage forceActionsText">{message}</span>
+                  </div>
+                  <div class="slds-notify__close"> 
+                    <lightning-button-icon icon-name="utility:close" variant="bare-inverse" size="large" onclick={closeAction}></lightning-button-icon>
+                  </div>
+                </div>
+              </div>
+        </template>
+    </template>
+    <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>
+                            <div class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">澶卞崟鎶ュ憡缂栬緫椤甸潰</div>
+                            
+                                <lightning-layout-item class="slds-align_absolute-center" style="padding-right: 143px;">
+                                    <lightning-button class="slds-button "  label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
+                                    <lightning-button class="slds-button  "  name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
+                                    <lightning-button class="slds-button "  label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                </lightning-layout-item>
+                        </lightning-layout>
+                    </div>
+                    <div class="slds-box slds-p-around_medium">
+                        <lightning-layout>
+                            <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="padding-top: 4px;" variant="label-hidden">
+                                        </lightning-combobox> 
+                                    </div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="4" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;">澶卞崟鎬婚噾棰�(鍏�):
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostTotalAmount__c}</span>
+                                        <!-- {LostReport.lostReport.LostTotalAmount__c} -->
+                                    </div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">      
+                                    <div style="padding: 10px 3px;font: 16px;">鍖呭惈瓒呭0:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.InclusionUltrasound__c}</span>
+                                        <!-- {LostReport.lostReport.InclusionUltrasound__c} -->
+                                    </div>    
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="padding: 10px 3px;font: 16px;">鐘舵��:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.Report_Status__c}</span>
+                                        <!-- {LostReport.lostReport.Report_Status__c} -->
+                                    </div>
+                                </lightning-layout-item>
+                            </template>
+                        </lightning-layout>
+                                <template if:true={LostReport.LostBrands}>
+                                    <lightning-accordion active-section-name={brandTitle} allow-multiple-sections-open="true" class="example-accordion">
+                                        <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
+                                            <li key={brand.lineNo}>
+                                                <div class= "x-accordion-heading">
+                                                    <lightning-accordion-section  class="" data-id={i} name={brand.brandTitle} label={brand.brandTitle} active>
+                                                        <lightning-layout>
+                                                            <lightning-layout-item alignment-bump="left">
+                                                                <lightning-button style="margin-top: 10px;" class="slds-button "  name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
+                                                                <lightning-button  class="slds-button " name={i} label="鍒犻櫎" onclick={deleteBrandJs} disabled={isBrandCount2}></lightning-button>
+                                                            </lightning-layout-item>
+                                                        </lightning-layout>
+                                                        <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={brand.lostBrand.Lost_By_Company__c} label="澶卞崟鍝佺墝: "  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 size="4"  padding="around-small">
+                                                                <lightning-combobox name={i} label="澶卞崟鍘熷洜(涓�):" value={brand.lostBrand.Lost_reason_main__c} options={columns2s} 
+                                                                onchange={handleLostReasonMainChange} class="searchField" placeholder="--鏃�--" required></lightning-combobox>
+                                                            </lightning-layout-item>
+                                                            <lightning-layout-item size="4"  padding="around-small">
+                                                                <lightning-combobox name={i} label="澶卞崟鍘熷洜(娆�):" value={brand.lostBrand.Lost_Reason_Sub__c} options={columns2s} 
+                                                                onchange={handleLostReasonSubChange} class="searchField" placeholder="--鏃�--"></lightning-combobox>
+                                                            </lightning-layout-item>
+                                                        </lightning-layout>
+                                                        <lightning-layout> 
+                                                            <template if:true={isEdit}>
+                                                                <!-- <template if:true={brand.lostBrand.Lost_By_Company_Mannual__c}>
+                                                                    <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>
+                                                                </template>
+                                                                <template if:false={brand.lostBrand.Lost_By_Company_Mannual__c}>
+                                                                    <lightning-layout-item size="4" padding="horizontal-small">
+                                                                        <lightning-input disabled="true" 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>
+                                                                </template> -->
+                                                                <lightning-layout-item size="4" padding="horizontal-small">
+                                                                    <lightning-input disabled="true" 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>
+                                                            </template>
+                                                            <template if:false={isEdit}>
+                                                                <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>
+                                                            </template>
+                                                            
+                                                            <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>
+                                                            <template if:true={brand.reasonFlag}>
+                                                                <lightning-layout-item size="4" padding="horizontal-small">
+                                                                    <lightning-combobox name={i} label="娓犻亾鍏蜂綋鍘熷洜:" value={brand.lostBrand.ChannelSpecificReasons__c} options={reasonOptions} 
+                                                                    onchange={handleChannelSpecificReasonChange} placeholder="--鏃�--" required></lightning-combobox>               
+                                                                </lightning-layout-item>
+                                                            </template>
+                                                        </lightning-layout>
+                                                        <lightning-layout>
+                                                            <lightning-layout-item flexibility="auto" padding="around-small">
+                                                                <template if:true={isInit}>
+                                                                    <div class=" table-container">
+                                                                        <table class="custom-table slds-table slds-table_bordered slds-table_cell-buffer slds-var-m-bottom_large" style="max-width: 99%;"> 
+                                                                            <thead>
+                                                                                <tr class="slds-text-title_caps">
+                                                                                        <!-- <th style="width: 13%;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                                        <th style="width: 21%;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                                        <th style="width: 5%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
+                                                                                        <th style="width: 10%;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
+                                                                                        <th style="width: 10%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
+                                                                                        <th style="width: 15%;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
+                                                                                        <th></th> -->
+
+                                                                                        <th style="width: 161px;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                                        <th style="width: 250px;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                                        <th style="width: 60px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟鏁伴噺</div></th>
+                                                                                        <th><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿(鎵嬪姩)</div></th>
+                                                                                        <th style="width: 105px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧绫诲埆</div></th>
+                                                                                        <th style="width: 166px;"><div class="slds-truncate"><span style="color:red;font-size: 10px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
+                                                                                        <th style="width: 80px;"></th>
+                                                                                </tr>
+                                                                            </thead>
+                                                                            <tbody>
+                                                                                <template for:each={brand.LostProducts} for:item="product" for:index="j">
+                                                                                    <tr class="inputRows" key={product.lineNo2}>
+                                                                                        <td style="padding-left: 8px;">
+                                                                                           <lightning-combobox variant="label-hidden" 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>
+                                                                                            <template if:true={isEdit}>
+                                                                                                <div>
+                                                                                                    <template if:false={product.LostProductss.LostProduct__r}>
+                                                                                                        <c-lex-lookup-lwc onbuttonclick={handleCustomButtonClick} class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onchange={handleClear} onselected={handleSelected} init-value={product.productName} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
+                                                                                                    </template>
+                                                                                                    <template if:true={product.LostProductss.LostProduct__r}>
+                                                                                                        <c-lex-lookup-lwc onbuttonclick={handleCustomButtonClick} class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onchange={handleClear} onselected={handleSelected} init-value={product.LostProductss.LostProduct__r.Name} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
+                                                                                                    </template>
+                                                                                                </div> 
+                                                                                            </template>
+                                                                                            <template if:false={isEdit}>
+                                                                                                <div>
+                                                                                                    <c-lex-lookup-lwc onbuttonclick={handleCustomButtonClick} class="Product" data-id={i} title={i} name={j} iconname="standard:product_item" query-brand={product.LostProductss.LostBrandName__c} objectname="Product2" onchange={handleClear} onselected={handleSelected} style="margin-bottom: 17px;"></c-lex-lookup-lwc>
+                                                                                                </div>
+                                                                                            </template>
+                                                                                        </td>
+                                                                                        <td style="width: 5%;">
+                                                                                           <lightning-input variant="label-hidden" class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange} style=""></lightning-input>
+                                                                                        </td>
+                                                                                        <td>
+                                                                                            <lightning-input variant="label-hidden" class="LostProductMannual" title={i} name={j} value={product.LostProductss.LostProductMannual__c} onchange={handleLostProductMannualChange} style=""></lightning-input>
+                                                                                        </td>
+                                                                                        <td>
+                                                                                            <template if:true={isEdit}>
+                                                                                                <template if:true={product.LostProductss.ProductClass__c}>
+                                                                                                    
+                                                                                                    <template if:true={product.LostProductss.LostProduct__c}>
+                                                                                                        <template if:true={product.LostProductss.isSpec__c}>
+                                                                                                            <lightning-combobox variant="label-hidden"  class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={masterValues} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                        </template>
+                                                                                                        <template if:false={product.LostProductss.isSpec__c}>
+                                                                                                            <lightning-combobox variant="label-hidden" read-only="true" class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={masterValues} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                        </template>
+                                                                                                        
+                                                                                                    </template>
+                                                                                                    <template if:false={product.LostProductss.LostProduct__c}>
+                                                                                                        <lightning-combobox variant="label-hidden"  class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={masterValues} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                    </template>
+                                                                                                </template>
+                                                                                                <template if:false={product.LostProductss.ProductClass__c}>
+                                                                                                    <lightning-combobox variant="label-hidden"  class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={masterValues} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                </template>
+                                                                                                <!-- <template if:true={product.LostProductss.ProductClass__c}>
+                                                                                                    <lightning-combobox read-only="true" class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                </template>
+                                                                                                <template if:false={product.LostProductss.ProductClass__c}>
+                                                                                                    <lightning-combobox class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={productClassOptions} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                                </template> -->
+                                                                                            </template>
+                                                                                            
+                                                                                            <template if:false={isEdit}>
+                                                                                                <lightning-combobox variant="label-hidden" class="ProductClass" data-id={i} placeholder="--鏃�--" title={i} name={j} options={masterValues} value={product.LostProductss.ProductClass__c} onchange={handleProductClassChange}></lightning-combobox> 
+                                                                                            </template>
+                                                                                        </td>
+                                                                                        <td>
+                                                                                           
+                                                                                            <template if:true={isEdit}>
+                                                                                                
+                                                                                                <lightning-combobox variant="label-hidden" 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> 
+                                                                                            </template>
+                                                                                            <template if:false={isEdit}>
+                                                                                                <lightning-combobox variant="label-hidden" 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> 
+                                                                                            </template>
+                                                                                        </td>
+                                        
+                                                                                        <td>
+                                                                                            
+                                                                                                <lightning-button-icon name={i} icon-name="utility:add" value={j} variant="bare" onclick={addRow}></lightning-button-icon> 
+                                                                                    
+                                                                                                <lightning-button-icon style="padding-left: 15px;" class="iconButton" 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>
+                                                </div>
+                                                
+                                            </li>
+                                        </template>                               
+                            </lightning-accordion>
+                                </template>
+                                
+                    </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  class="slds-button " label="杩藉姞鍝佺墝" onclick={addBrandJs}></lightning-button>
+                                        <lightning-button  class="slds-button " name="save" label="淇濆瓨" onclick={saveBrandJs}></lightning-button>
+                                        <lightning-button  class="slds-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>
+                                
+                                <h2 class="mainTitle" style="padding: 10px 3px;font-weight: bold;font-size: large">澶卞崟鎶ュ憡鏌ョ湅椤甸潰</h2>
+                                    <lightning-layout-item class="slds-align_absolute-center" style="padding-right: 143px;">
+                                        <template if:true={isCanSubmit}>
+                                            <lightning-button class="slds-button " label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                            
+                                        </template>
+                                        <template if:true={isCanEdit}>
+                                            <lightning-button  class="slds-button " name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                        </template>
+                                        <lightning-button  class="slds-button " label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                    </lightning-layout-item>
+                            </lightning-layout>
+                            <lightning-layout>
+                                
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="float: left;padding-top: 17px;">澶卞崟绫诲瀷:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostType__c}</span>
+                                    </div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <div style="float: left;padding-top: 17px;">澶卞崟鎬婚噾棰�(鍏�):
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.LostTotalAmount__c}</span>
+                                        <!-- {LostReport.lostReport.LostTotalAmount__c} -->
+                                    </div>
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">      
+                                    <div style="float: left;padding-top: 17px;">鍖呭惈瓒呭0:
+                                        <span style="margin-left: 5px;">{LostReport.lostReport.InclusionUltrasound__c}</span>
+                                        <!-- {LostReport.lostReport.InclusionUltrasound__c} -->
+                                    </div>    
+                                </lightning-layout-item>
+                                <lightning-layout-item size="3" padding="around-small">
+                                    <template if:true={editStatus}>
+                                        <div style="float: left;padding-top: 17px;">鐘舵��:
+                                            <span style="margin-left: 5px;">{editStatus}</span>
+                                            <!-- {LostReport.lostReport.Report_Status__c} -->
+                                        </div>
+                                    </template>
+                                    <template if:false={editStatus}>
+                                        <div style="float: left;padding-top: 17px;">鐘舵��:
+                                            <span style="margin-left: 5px;">{LostReport.lostReport.Report_Status__c}</span>
+                                            <!-- {LostReport.lostReport.Report_Status__c} -->
+                                        </div>
+                                    </template>
                                     
-                                            </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"> 
+                                </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" active-section-name={brandTitle}>
+                                    <template for:each={LostReport.LostBrands} for:item="brand" for:index="i">
+                                        <li key={brand.lostBrand.Id}>
+                                            <lightning-accordion-section  class="text-container" data-id={i} name={brand.brandTitle} label={brand.brandTitle} active>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;"></lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟鍝佺墝锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="Lost_By_Company__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>澶卞崟鍝佺墝(鎵嬪姩)锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="Lost_By_Company_Mannual__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟鍘熷洜(涓�)锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="Lost_reason_main__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>澶卞崟鍘熷洜(娆�)锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="Lost_Reason_Sub__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form>
+                                                        </lightning-layout-item>
+                                                        
+                                                    </lightning-layout>
+                                                    <lightning-layout> 
+                                                        
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>涓爣缁忛攢鍟嗭細</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="Agency__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <lightning-layout-item style="width: 135px;">
+                                                            <label>涓爣缁忛攢鍟�(鎵嬪姩)锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="AgencyMannual__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                    </lightning-layout>
+                                                    <lightning-layout>
+                                                        <lightning-layout-item style="width: 135px;height: 30px;">
+                                                            <label>澶卞崟閲戦(鍏�)锛�</label>
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="LostPrice__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                        </lightning-layout-item>
+                                                        <lightning-layout-item size="3"></lightning-layout-item>
+                                                        <template if:true={brand.lostBrand.ChannelSpecificReasons__c}>
+                                                            <lightning-layout-item style="width: 135px;">
+                                                                <label>娓犻亾鍏蜂綋鍘熷洜锛�</label>
+                                                            </lightning-layout-item>
+                                                            <lightning-layout-item size="3">
+                                                            <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
+                                                                <lightning-output-field field-name="ChannelSpecificReasons__c" variant="label-hidden"></lightning-output-field>
+                                                            </lightning-record-view-form> 
+                                                            </lightning-layout-item>
+                                                        </template>
+                                                    </lightning-layout>
+                                                
+                                                <lightning-layout>
+                                                    <lightning-layout-item flexibility="auto" padding="around-small" style="padding-left: 0px;">
+                                                        <!-- <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="custom-table 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 style="width: 145px;"><div class="slds-truncate">澶卞崟鍝佺墝</div></th>
+                                                                            <th style="width: 370px;"><div class="slds-truncate">澶卞崟瀵规墜鍨嬪彿</div></th>
+                                                                            <th style="width: 60px;"><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"><span style="color:red;font-size: 18px;">*</span>澶卞崟浜у搧鍖哄垎</div></th>
-                                                                            <th></th>
+                                                                            <th style="width: 100px;"><div class="slds-truncate">澶卞崟浜у搧绫诲埆</div></th>
+                                                                            <th style="width: 145px;"><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}>
+                                                                        <tr class="inputRows" key={product.lineNo2}>
+                                                                            <td style="padding-left: 8px;">
+                                                                                <div>{product.LostProductss.LostBrandName__c}</div>
+                                                                            </td>
+                                                                            <template if:false={product.LostProductss.LostProduct__r}>
+                                                                                <td>
+                                                                                    <div>{product.productName}</div>
+                                                                                </td>
+                                                                            </template>
+                                                                            <template if:true={product.LostProductss.LostProduct__r}>
+                                                                                <td>
+                                                                                    <div>{product.LostProductss.LostProduct__r.Name}</div>
+                                                                                </td>
+                                                                            </template>
                                                                             <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> 
+                                                                                <div style="float: right;">{product.LostProductss.Quantity__c}</div>
                                                                             </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>
+                                                                                <div>{product.LostProductss.LostProductMannual__c}</div>
                                                                             </td>
                                                                             <td>
-                                                                               <lightning-input class="Quantity" title={i} name={j} value={product.LostProductss.Quantity__c} onchange={handleQuantityChange}></lightning-input>
+                                                                                <div>{product.LostProductss.ProductClass__c}</div>
                                                                             </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>
+                                                                                <div>{product.LostProductss.ProductCategory__c}</div>
                                                                             </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">
-                                    <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">
-                        <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>
-                            <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="text-container" data-id={i} name="澶卞崟鍝佺墝" label="澶卞崟鍝佺墝">
-                                                <lightning-layout>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>澶卞崟鍝佺墝:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="Lost_By_Company__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>澶卞崟鍘熷洜锛堜富锛�:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="Lost_reason_main__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>澶卞崟鍘熷洜锛堟锛�:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="Lost_Reason_Sub__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form>
-                                                    </lightning-layout-item>
-                                                </lightning-layout>
-                                                <lightning-layout> 
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>澶卞崟鍝佺墝锛堟墜鍔級:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="Lost_By_Company_Mannual__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>澶卞崟閲戦锛堝厓锛�:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="LostPrice__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>涓爣缁忛攢鍟�:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="Agency__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                </lightning-layout>
-                                                <lightning-layout>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <label>涓爣缁忛攢鍟嗭紙鎵嬪姩锛�:</label>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" style="border-style:solid;border-width: 1px;">
-                                                        <lightning-record-view-form object-api-name="PCLLostBrand__c" record-id={brand.lostBrand.Id} density="comfy">
-                                                            <lightning-output-field field-name="AgencyMannual__c" variant="label-hidden"></lightning-output-field>
-                                                        </lightning-record-view-form> 
-                                                    </lightning-layout-item>
-                                                </lightning-layout>
-                                                <lightning-layout>
-                                                    <lightning-layout-item flexibility="auto" padding="around-small">
-                                                        <template if:true={isInit}>
-                                                            <lightning-datatable hide-checkbox-column="true" key-field="is" columns={columns3} data={getData}></lightning-datatable>
                                                         </template>
                                                     </lightning-layout-item>
                                                 </lightning-layout>
@@ -298,17 +529,236 @@
                                         </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>
-                                    </lightning-layout-item>
+                            </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">
+                                            <template if:true={isCanSubmit}>
+                                                <lightning-button  class="slds-button " label="鎻愪氦" onclick={submitJs}></lightning-button>
+                                                
+                                            </template>
+                                            <template if:true={isCanEdit}>
+                                                <lightning-button  class="slds-button " name="缂栬緫" label="缂栬緫" onclick={editJs}></lightning-button>
+                                            </template>
+                                            <lightning-button  class="slds-button " label="杩斿洖璇环" onclick={cancel}></lightning-button>
+                                        </lightning-layout-item>
+                                    </div>
+                                </lightning-layout>
+                            </div> 
+                        </div>
+                        
+                    </div>   
+                </lightning-card>
+        </template>
+        <template if:true={haveApprovalHistorys}>
+            <div class="slds-box slds-p-around_medium slds-text-align_center" style="background-color: white;margin-top: 10px;">
+                <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">
+                        <template if:false={isCaoAn}>
+                            <template if:true={isAllowUser}>
+                                <lightning-button  class="slds-button " label="鎵瑰噯" onclick={handleSubmitApp}></lightning-button>
+                                <lightning-button  class="slds-button " label="鎷掔粷" onclick={handleNoApp}></lightning-button>
+                                <lightning-button  class="slds-button " label="閲嶆柊鍒嗛厤" onclick={handleReStartApp}></lightning-button>
+                            </template>
+                            <template if:true={isSubmitUser}>
+                                <lightning-button  class="slds-button " label="鎾ゅ洖鎵瑰噯璇锋眰" onclick={handleCancelApp}></lightning-button>
+                            </template>
+                            
+                        </template>
+                    </lightning-layout-item>
+                </lightning-layout>
+                <lightning-layout>
+                    <table class="custom-table 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>
+                                    <th><div class="slds-truncate">鏁翠綋鐘舵��</div></th>
+                            </tr>
+                        </thead>
+                        <tbody>
+                            <template for:each={LostReport.approvalHistorys} for:item="approvalHistory" for:index="j">
+                                <template if:true={approvalHistory.isRemoved}>
+                                    <tr class="inputRows" key={approvalHistory.Id}>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <div style="background-color: #C0BEBC;">
+                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:ban"></lightning-icon>
+                                                <span style="padding-left: 10px;">宸叉挙鍥�</span>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                </template>
+                                <template if:true={approvalHistory.isApproved}>
+                                    <tr class="inputRows" key={approvalHistory.Id}>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <div style="background-color: #A1F78D;">
+                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:success"></lightning-icon>
+                                                <span style="padding-left: 10px;">宸叉壒鍑�</span>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                </template>
+                                <template if:true={approvalHistory.isPending}>
+                                    <tr class="inputRows" key={approvalHistory.Id}>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <div style="background-color: #FFD74B;">
+                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:clock"></lightning-icon>
+                                                <span style="padding-left: 10px;">寰呭鐞�</span>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                </template>
+                                <template if:true={approvalHistory.isRejected}>
+                                    <tr class="inputRows" key={approvalHistory.Id}>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td></td>
+                                        <td>
+                                            <div style="background-color: #FB8A8C;">
+                                                <lightning-icon style="padding-left: 3px;" size="small" icon-name="utility:clear"></lightning-icon>
+                                                <span style="padding-left: 10px;">宸叉嫆缁�</span>
+                                            </div>
+                                        </td>
+                                    </tr>
+                                </template>
+                                <tr class="inputRows" key={approvalHistory.Id} style="height: 33px;">
+                                    <!-- <td>
+                                        <template if:true={approvalHistory.IsPending}>
+                                            <a onclick={onApproveChange}>閲嶆柊鍒嗛厤</a>
+                                            <label>&nbsp;</label>
+                                            <label>|</label>
+                                            <a onclick={onApproveChange}>鎵瑰噯/鎷掔粷</a>
+                                        </template>
+                                    </td> -->
+                                    <td>
+                                        <div>{approvalHistory.CreatedDate}</div>
+                                    </td>
+                                    <td>
+                                        <div>{approvalHistory.StepStatus}</div>
+                                    </td>
+                                    <td>
+                                        <!-- <a href='/lightning/r/User/{approvalHistory.OriginalActor.Id}/view'>
+                                            <div>{approvalHistory.OriginalActor.Name}</div>
+                                        </a> -->
+                                        <c-lex-lightning-link link-id={approvalHistory.OriginalActor.Id} link-name={approvalHistory.OriginalActor.Name}></c-lex-lightning-link>
+                                    </td>
+                                    <td>
+                                        <!-- <a href='/lightning/r/User/{approvalHistory.OriginalActor.Id}/view'>
+                                            <div>{approvalHistory.Actor.Name}</div>
+                                        </a> -->
+                                        <c-lex-lightning-link link-id={approvalHistory.Actor.Id} link-name={approvalHistory.Actor.Name}></c-lex-lightning-link>
+                                        
+                                    </td>
+                                    <td>
+                                        <div>{approvalHistory.Comments}</div>
+                                    </td>
+                                    <td></td>
+                                </tr>
+                            </template>
+                        </tbody>
+                    </table>
+                </lightning-layout>
+            </div>
+        </template>
+        <template if:true={isPop}>
+            <section role="dialog" tabindex="-1" aria-modal="true" aria-labelledby="modal-heading-01" class="slds-modal slds-fade-in-open">
+                <div class="slds-modal__container" data-aura-rendered-by="479:0">
+                        <!-- <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse">
+                            <svg  aria-hidden="true">
+                            <use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#close"></use>
+                            </svg>
+                            <span class="slds-assistive-text">Cancel and close</span>
+                        </button> -->
+                        <div style="height: 40px;">
+                            <lightning-button-icon style="float: right;" variant="bare" icon-class="slds-button__icon slds-button__icon_large slds-button_icon-inverse" icon-name="utility:close"  onclick={handleModalCancel}></lightning-button-icon>
+                        </div>
+                        
+                        <div class="slds-modal__header">
+                            <h1 id="modal-heading-01" class="slds-modal__title slds-hyphenate">{modalsubmitLabel}&nbsp;璇环澶卞崟/鍙栨秷鎶ュ憡</h1>
+                        </div>
+                        <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
+                            <template if:true={isLookup}>
+                           
+                                <lightning-record-edit-form
+                                object-api-name='Lost_Report__c'
+                                record-id=''
+                            >
+                                <div style="width: 95%;padding-left: 10px;">
+                                
+                                    <lightning-input-field  variant="label-hidden" value={newActorId} field-name='Manager__c' onchange={handleActorChange} required> </lightning-input-field>
                                 </div>
-                            </lightning-layout>
+                            </lightning-record-edit-form>
+                            
+                            </template>
+                            <template if:false={isLookup}>
+                                <div>
+                                    <lightning-textarea class="textAreaBody" style="width: 95%;padding-left: 10px;" data-id="comment" label="璇勮" value=""></lightning-textarea>
+                                    
+                                </div>
+                            </template>
+                        </div>
+                        <!-- <div style="align-self: center;font-size: large;padding-bottom: 10px" slot="header"></div> -->
+                        
+                        
+                    
+                    <!-- <template if:true={isLookup}>
+                        <div style="align-self: center;font-size: large;padding-bottom: 36px" slot="header">{modalsubmitLabel}椤甸潰</div>
+                        <lightning-layout-item size="10" style="align-self: center;">
+                            <div>
+                                
+                                <div style="height: 100px;">
+                                    <lightning-textarea class="comment" style="width: 95%;padding-left: 10px;" data-id="comment" label="璇勮" value=""></lightning-textarea>
+                                    
+                                </div>
+                              </div>  
+                        </lightning-layout-item>
+                          
+                    </template> -->
+                    <div class="slds-modal__footer">
+                        <lightning-button
+                            class="slds-button "
+                          data-id="Cancel"
+                          label="鍙栨秷"
+                          onclick={handleModalCancel}
+                        ></lightning-button>
+                        <lightning-button
+                            class="slds-button"
+                          data-id="Submit"
+                          label={modalsubmitLabel}
+                          variant="brand"
+                          onclick={handleModalSubmit}
+                        ></lightning-button>
                     </div>
                 </div>   
-            </lightning-card>
+            </section>
+            <div class="slds-backdrop slds-backdrop_open"></div>
+        </template>
+        
     </template>
+    
 </template>
\ No newline at end of file

--
Gitblit v1.9.1