From f05bfc9a39bccc8afb928efe7555f21e0e69c5bd Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期一, 10 七月 2023 10:51:38 +0800
Subject: [PATCH] backupfixtablecolumn0710

---
 force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js           |   10 
 force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html |  414 
 force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js   |  782 +-
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js         | 5205 +++++++++--------
 force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js   |  926 +-
 force-app/main/default/lwc/lexTopPage/lexTopPage.js                   | 1390 ++--
 force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js |   20 
 force-app/main/default/lwc/lexConsumable/lexConsumable.js             |    2 
 force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js     | 3749 ++++++------
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html       | 2563 +++++---
 manifest/package.xml                                                  |    6 
 force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html   | 1800 +++--
 force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html |  326 
 force-app/main/default/lwc/lexTopPage/lexTopPage.html                 |  283 
 14 files changed, 9,685 insertions(+), 7,791 deletions(-)

diff --git a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
index 50cb5f6..99cbcb8 100644
--- a/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
+++ b/force-app/main/default/lwc/lexArriveGoods/lexArriveGoods.js
@@ -154,7 +154,7 @@
       },
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 180
+      initialWidth: 95
     });
     // cols.push({label:'鍑哄簱鍗�' , fieldName:'orderNo', hideDefaultActions: true});
     cols.push({
@@ -169,22 +169,22 @@
       fieldName: "prodName",
       wrapText: true,
       hideDefaultActions: true,
-      wrapText: true,
-      initialWidth: 190
+      wrapText: true
+      // initialWidth: 190
     });
     cols.push({
       label: "鍑哄簱鐩殑",
       fieldName: "summonsForDirctionDet",
       wrapText: true,
       hideDefaultActions: true,
-      initialWidth: 130
+      initialWidth: 85
     });
     cols.push({
       label: "瀹㈡埛鍚�",
       fieldName: "hospitalName",
       hideDefaultActions: true,
       wrapText: true,
-      initialWidth: 130
+      initialWidth: 85
     });
     cols.push({
       label: "缁忛攢鍟�",
diff --git a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
index 724c9c6..4d97524 100644
--- a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
+++ b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.html
@@ -1,109 +1,227 @@
 <template>
-    <template if:true={showSpinner}>
-        <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
-        <div class="slds-spinner_container">
-            <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
-                <span class="slds-assistive-text">Loading</span>
-                <div class="slds-spinner__dot-a"></div>
-                <div class="slds-spinner__dot-b"></div>
-            </div>
-        </div>
-    </template>
-    <c-common-toast></c-common-toast>
-    <template if:true={showPage}>
-        <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
-            <div style="padding:10px;">
-                <!-- 鎸夐挳 -->
-                <!-- <lightning-button style="margin: 5px;" label="鍏ュ簱" onclick={orderArrive}></lightning-button>
+  <template if:true={showSpinner}>
+    <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+    <div class="slds-spinner_container">
+      <div
+        role="status"
+        class="slds-spinner slds-spinner_medium slds-spinner_brand"
+      >
+        <span class="slds-assistive-text">Loading</span>
+        <div class="slds-spinner__dot-a"></div>
+        <div class="slds-spinner__dot-b"></div>
+      </div>
+    </div>
+  </template>
+  <c-common-toast></c-common-toast>
+  <template if:true={showPage}>
+    <div
+      style="
+        border: 1px solid #d4d4d4;
+        border-top: 3px solid #51606e;
+        border-radius: 5px;
+      "
+    >
+      <div style="padding: 10px">
+        <!-- 鎸夐挳 -->
+        <!-- <lightning-button style="margin: 5px;" label="鍏ュ簱" onclick={orderArrive}></lightning-button>
                 <lightning-button style="margin: 5px;" label="杩斿搧" onclick={orderReturn}></lightning-button> -->
-                <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;margin-right: 150px;" label="鍏ュ簱" onclick={orderArrive}>鍏ュ簱</button>
-                <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="margin: 5px;" label="杩斿搧" onclick={orderReturn}>杩斿搧</button>
-                <p style="height: 10px;"></p>
-                <!-- 妫�绱㈡潯浠� -->
-                <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                    <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>妫�绱㈡潯浠�</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                        <!-- <p style="font-size: 16px;"><strong>妫�绱㈡潯浠�</strong></p> -->
+        <button
+          class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+          style="margin: 5px; margin-right: 150px"
+          label="鍏ュ簱"
+          onclick={orderArrive}
+        >
+          鍏ュ簱
+        </button>
+        <button
+          class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+          style="margin: 5px"
+          label="杩斿搧"
+          onclick={orderReturn}
+        >
+          杩斿搧
+        </button>
+        <p style="height: 10px"></p>
+        <!-- 妫�绱㈡潯浠� -->
+        <div
+          style="
+            border: 1px solid #d4d4d4;
+            border-top: 3px solid #51606e;
+            border-radius: 5px;
+            margin-bottom: 7px;
+          "
+        >
+          <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>妫�绱㈡潯浠�</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+            <!-- <p style="font-size: 16px;"><strong>妫�绱㈡潯浠�</strong></p> -->
+          </div>
+          <div style="padding: 10px">
+            <table>
+              <tbody>
+                <tr>
+                  <td style="width: 10px"></td>
+                  <td style="width: 120px">
+                    <div
+                      style="color: #696969; font-size: 16px; text-align: left"
+                    >
+                      娑堣�楀搧璁㈠崟鍚嶇О
                     </div>
-                    <div style="padding:10px;">
-                        <table>
-                            <tbody>
-                                <tr>
-                                    <td style="width: 10px;"></td>
-                                    <td style="width: 120px;">
-                                        <div style="color:#696969;font-size:16px;text-align: left;">娑堣�楀搧璁㈠崟鍚嶇О</div>
-                                    </td>
-                                    <td>
-                                        <lightning-input class="inputFont" type="text" variant="label-hidden" label="娑堣�楀搧璁㈠崟鍚嶇О" value={category1} onchange={category1Change}></lightning-input>
-                                    </td>
-                                    <td style="width: 30px;"></td>
-                                    <td  style="width: 108px;">
-                                        <div style="color:#696969;font-size:16px;text-align: left;">鏈�鏂板彂璐ф棩鏈�</div>
-                                    </td>
-                                    <td>
-                                        <lightning-input class="inputFont" type="date" variant="label-hidden" label="鏈�鏂板彂璐ф棩鏈�" value={cate2} onchange={cate2Change}></lightning-input>
-                                    </td>
-                                    <td style="width: 30px;"></td>
-                                    <td>
-                                        <!-- <lightning-button style="margin-left: 10px;margin-right: 5px;" label="鎼滅储" onclick={search}></lightning-button>
+                  </td>
+                  <td>
+                    <lightning-input
+                      class="inputFont"
+                      type="text"
+                      variant="label-hidden"
+                      label="娑堣�楀搧璁㈠崟鍚嶇О"
+                      value={category1}
+                      onchange={category1Change}
+                    ></lightning-input>
+                  </td>
+                  <td style="width: 30px"></td>
+                  <td style="width: 108px">
+                    <div
+                      style="color: #696969; font-size: 16px; text-align: left"
+                    >
+                      鏈�鏂板彂璐ф棩鏈�
+                    </div>
+                  </td>
+                  <td>
+                    <lightning-input
+                      class="inputFont"
+                      type="date"
+                      variant="label-hidden"
+                      label="鏈�鏂板彂璐ф棩鏈�"
+                      value={cate2}
+                      onchange={cate2Change}
+                    ></lightning-input>
+                  </td>
+                  <td style="width: 30px"></td>
+                  <td>
+                    <!-- <lightning-button style="margin-left: 10px;margin-right: 5px;" label="鎼滅储" onclick={search}></lightning-button>
                                         <lightning-button style="margin-left: 5px;margin-right: 5px;" label="娓呯┖" onclick={clear}></lightning-button> -->
-                                        <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="height:32px;margin-right: 30px;" label="鎼滅储" onclick={search}>鎼滅储</button>
-                                        <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="height:32px;" label="娓呯┖" onclick={clear}>娓呯┖</button>
-                                    </td>
-                                </tr>
-                            </tbody>
-                        </table>
-                    </div>
-                </div>
-                <!-- 璁㈠崟鏄庣粏 -->
-                <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                    <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>璁㈠崟鏄庣粏</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                        <!-- <p style="font-size: 16px;"><strong>璁㈠崟鏄庣粏</strong></p> -->
-                    </div>
-                    <div style="padding:10px;">
-                        <!-- <lightning-datatable hide-checkbox-column key-field="id" columns={colms}  data={raesList}></lightning-datatable> -->
-                        <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable>
-                    </div>
-                </div>
-            </div>
-        </div>
-    </template>
-    <!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
-    <template if:true={showPop}>
-        <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
-            <div class="slds-modal__container">
-                <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                    <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}>
-                        <lightning-icon icon-name="utility:close"
-                            alternative-text="close"
-                            variant="inverse"
-                            size="small" ></lightning-icon>
-                        <span class="slds-assistive-text">Close</span>
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                      style="height: 32px; margin-right: 30px"
+                      label="鎼滅储"
+                      onclick={search}
+                    >
+                      鎼滅储
                     </button>
-                    <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2>
-                </header>
-                <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;">
-                    <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2}  data={recordList}></lightning-datatable>
-                </div>
-                <footer class="slds-modal__footer">
-                    <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
-                    <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}>鍏抽棴</button>
-                </footer>
-            </div>
-        </section>
-        <div class="slds-backdrop slds-backdrop_open"></div>
-    </template>
-</template>
\ No newline at end of file
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                      style="height: 32px"
+                      label="娓呯┖"
+                      onclick={clear}
+                    >
+                      娓呯┖
+                    </button>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </div>
+        <!-- 璁㈠崟鏄庣粏 -->
+        <div
+          style="
+            border: 1px solid #d4d4d4;
+            border-top: 3px solid #51606e;
+            border-radius: 5px;
+            margin-bottom: 7px;
+          "
+        >
+          <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>璁㈠崟鏄庣粏</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+            <!-- <p style="font-size: 16px;"><strong>璁㈠崟鏄庣粏</strong></p> -->
+          </div>
+          <div style="padding: 10px">
+            <!-- <lightning-datatable hide-checkbox-column key-field="id" columns={colms}  data={raesList}></lightning-datatable> -->
+            <c-lex-custom-lightning-datatable
+              class="wrapped-header-datatable"
+              hide-checkbox-column
+              key-field="Id"
+              data={raesList}
+              columns={colms}
+              onclicklink={clickLick}
+            ></c-lex-custom-lightning-datatable>
+          </div>
+        </div>
+      </div>
+    </div>
+  </template>
+  <!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
+  <template if:true={showPop}>
+    <section
+      role="dialog"
+      tabindex="-1"
+      aria-labelledby="modal-heading-01"
+      aria-modal="true"
+      aria-describedby="modal-content-id-1"
+      class="slds-modal slds-fade-in-open slds-modal_small"
+      style="border: 1px solid #d4d4d4"
+    >
+      <div class="slds-modal__container">
+        <header class="slds-modal__header" style="background-color: #f3f3f3">
+          <button
+            style=""
+            class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+            title="Close"
+            onclick={closePop}
+          >
+            <lightning-icon
+              icon-name="utility:close"
+              alternative-text="close"
+              variant="inverse"
+              size="small"
+            ></lightning-icon>
+            <span class="slds-assistive-text">Close</span>
+          </button>
+          <h2
+            id="modal-heading-01"
+            class="slds-text-heading_medium slds-hyphenate"
+          >
+            {popTitle}
+          </h2>
+        </header>
+        <div
+          class="slds-modal__content slds-p-around_medium"
+          id="modal-content-id-1"
+          style="border: 1px solid #f3f3f3"
+        >
+          <lightning-datatable
+            class="wrapped-header-datatable"
+            hide-checkbox-column
+            key-field="prodModel"
+            columns={colms2}
+            data={recordList}
+          ></lightning-datatable>
+        </div>
+        <footer class="slds-modal__footer">
+          <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
+          <button
+            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+            style="margin-left: 10px"
+            variant="neutral"
+            label="鍏抽棴"
+            onclick={closePop}
+          >
+            鍏抽棴
+          </button>
+        </footer>
+      </div>
+    </section>
+    <div class="slds-backdrop slds-backdrop_open"></div>
+  </template>
+</template>
diff --git a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
index 163a81f..03c8a53 100644
--- a/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
+++ b/force-app/main/default/lwc/lexArriveGoodsMain/lexArriveGoodsMain.js
@@ -1,417 +1,523 @@
-import { LightningElement,wire,api,track } from 'lwc';
-import { CurrentPageReference } from 'lightning/navigation';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import { NavigationMixin } from 'lightning/navigation';
-import init from '@salesforce/apex/LexArriveGoodsMainController.init';
-import searchConsumableorderdetails from '@salesforce/apex/LexArriveGoodsMainController.searchConsumableorderdetails';
-import initTotalNum from '@salesforce/apex/LexConsumableGoodsInfo.initTotalNum';
-import initArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initArrDet';
-import initArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll';
-import initDeliveryDet from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet';
-import initDeliveryDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll';
-import initNotArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet';
-import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll';
-import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7';
-import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All';
-//table css 
+import { LightningElement, wire, api, track } from "lwc";
+import { CurrentPageReference } from "lightning/navigation";
+import { ShowToastEvent } from "lightning/platformShowToastEvent";
+import { NavigationMixin } from "lightning/navigation";
+import init from "@salesforce/apex/LexArriveGoodsMainController.init";
+import searchConsumableorderdetails from "@salesforce/apex/LexArriveGoodsMainController.searchConsumableorderdetails";
+import initTotalNum from "@salesforce/apex/LexConsumableGoodsInfo.initTotalNum";
+import initArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initArrDet";
+import initArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll";
+import initDeliveryDet from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet";
+import initDeliveryDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll";
+import initNotArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet";
+import initNotArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll";
+import initMoreThan7 from "@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7";
+import initMoreThan7All from "@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All";
+//table css
 import { loadStyle } from "lightning/platformResourceLoader";
 import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
 
-export default class LexArriveGoodsMain extends NavigationMixin(LightningElement) {
-    //椤甸潰鍩虹鍙橀噺
-    @track agencyProType;
-    @track category1;
-    @track cate2;
-    // @track eSetId;
-    @track accountId;
-    @track title = [];
-    @track raesList = [];
-    @track recordList = [];
-    @track userWorkLocation;
-    @track totalNum;
-    @track orderNumberArrived;
-    @track deliveryDetailCount;
-    @track orderNumberNotarrive;
-    @track moreThanSevenDays;
-    @track showSpinner = true;
-    @track showPage = false;
-    @track showPop = false;
-    @track popTitle;
-    stylesLoaded = false;
-    //鏄惁涓�鐩存樉绀烘彁绀�
-    @track isNoteStay = true;
+export default class LexArriveGoodsMain extends NavigationMixin(
+  LightningElement
+) {
+  //椤甸潰鍩虹鍙橀噺
+  @track agencyProType;
+  @track category1;
+  @track cate2;
+  // @track eSetId;
+  @track accountId;
+  @track title = [];
+  @track raesList = [];
+  @track recordList = [];
+  @track userWorkLocation;
+  @track totalNum;
+  @track orderNumberArrived;
+  @track deliveryDetailCount;
+  @track orderNumberNotarrive;
+  @track moreThanSevenDays;
+  @track showSpinner = true;
+  @track showPage = false;
+  @track showPop = false;
+  @track popTitle;
+  stylesLoaded = false;
+  //鏄惁涓�鐩存樉绀烘彁绀�
+  @track isNoteStay = true;
 
-    @track colms = [
-        // {label:'娑堣�楀搧璁㈠崟鍚嶇О',fieldName:'Name'},
-        // {label:'璁㈠崟鎬绘暟',fieldName:'Total_num__c'},
-        // {label:'宸插埌璐ф暟閲�',fieldName:'OrderNumber_arrived__c'},
-        // {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',fieldName:'Delivery_detail_count__c'},
-        // {label:'杩樻病鍙戣揣鏁伴噺',fieldName:'OrderNumber_notarrive__c'},
-        // {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',fieldName:'More_than_seven_days__c'},
-        {label:'娑堣�楀搧璁㈠崟鍚嶇О',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Name" },
-                type: 'Title',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true,initialWidth:200,wrapText:true},
-        {label:'SAP鍚堝悓鍙�',fieldName:'ContractNo__c',hideDefaultActions: true,wrapText:true,initialWidth:180},
-        {label:'璁㈠崟鎬绘暟',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Total_num__c" },
-                type: 'TotalNum',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 100,cellAttributes: { alignment: "right" }},
-        {label:'宸插埌璐ф暟閲�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "OrderNumber_arrived__c" },
-                type: 'ArrDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 110,cellAttributes: { alignment: "right" }},
-        {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Delivery_detail_count__c" },
-                type: 'DeliveryDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }},
-        {label:'杩樻病鍙戣揣鏁伴噺',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "OrderNumber_notarrive__c" },
-                type: 'NotArrDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 120,cellAttributes: { alignment: "right" }},
-        {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "More_than_seven_days__c" },
-                type: 'MoreThan7',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 180,cellAttributes: { alignment: "right" }},
-        {label:'鏈�鏂板彂璐ф棩鏈�',fieldName:'Shipment_date__c',hideDefaultActions: true, initialWidth: 140},
-        {label:'棣栨鍙戣揣鏃ユ湡',fieldName:'First_Delivery__c',hideDefaultActions: true, initialWidth: 140}
-    ];
+  @track colms = [
+    // {label:'娑堣�楀搧璁㈠崟鍚嶇О',fieldName:'Name'},
+    // {label:'璁㈠崟鎬绘暟',fieldName:'Total_num__c'},
+    // {label:'宸插埌璐ф暟閲�',fieldName:'OrderNumber_arrived__c'},
+    // {label:'寰呯郴缁熸搷浣滃叆搴撴暟閲�',fieldName:'Delivery_detail_count__c'},
+    // {label:'杩樻病鍙戣揣鏁伴噺',fieldName:'OrderNumber_notarrive__c'},
+    // {label:'鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',fieldName:'More_than_seven_days__c'},
+    {
+      label: "娑堣�楀搧璁㈠崟鍚嶇О",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Name" },
+        type: "Title",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      // initialWidth: 200,
+      wrapText: true
+    },
+    {
+      label: "SAP鍚堝悓鍙�",
+      fieldName: "ContractNo__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 180
+    },
+    {
+      label: "璁㈠崟鎬绘暟",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Total_num__c" },
+        type: "TotalNum",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 100,
+      cellAttributes: { alignment: "right" }
+    },
+    {
+      label: "宸插埌璐ф暟閲�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "OrderNumber_arrived__c" },
+        type: "ArrDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 100,
+      cellAttributes: { alignment: "right" }
+    },
+    {
+      label: "寰呯郴缁熸搷浣滃叆搴撴暟閲�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Delivery_detail_count__c" },
+        type: "DeliveryDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 150,
+      cellAttributes: { alignment: "right" }
+    },
+    {
+      label: "杩樻病鍙戣揣鏁伴噺",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "OrderNumber_notarrive__c" },
+        type: "NotArrDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 120,
+      cellAttributes: { alignment: "right" }
+    },
+    {
+      label: "鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "More_than_seven_days__c" },
+        type: "MoreThan7",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 150,
+      cellAttributes: { alignment: "right" }
+    },
+    {
+      label: "鏈�鏂板彂璐ф棩鏈�",
+      fieldName: "Shipment_date__c",
+      hideDefaultActions: true,
+      initialWidth: 105
+    },
+    {
+      label: "棣栨鍙戣揣鏃ユ湡",
+      fieldName: "First_Delivery__c",
+      hideDefaultActions: true,
+      initialWidth: 105
+    }
+  ];
 
-    @track colms2 = [
-        {label:'浜у搧鍨嬪彿',fieldName:'prodModel',hideDefaultActions: true},
-        {label:'鏁伴噺',fieldName:'recordCount',hideDefaultActions: true,initialWidth: 100}
-    ];
+  @track colms2 = [
+    { label: "浜у搧鍨嬪彿", fieldName: "prodModel", hideDefaultActions: true },
+    {
+      label: "鏁伴噺",
+      fieldName: "recordCount",
+      hideDefaultActions: true,
+      initialWidth: 100
+    }
+  ];
 
-    //鑾峰彇鍙傛暟
-    // @wire(CurrentPageReference)
-    // getStateParameters(currentPageReference) {
-    //     console.log('CurrentPageReference');
-    //     if (currentPageReference) {
-    //         this.eSetId = currentPageReference.state?.ESetid;
-    //     }
+  //鑾峰彇鍙傛暟
+  // @wire(CurrentPageReference)
+  // getStateParameters(currentPageReference) {
+  //     console.log('CurrentPageReference');
+  //     if (currentPageReference) {
+  //         this.eSetId = currentPageReference.state?.ESetid;
+  //     }
+  // }
+
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
+        })
+        .catch((error) => {
+          console.error("Error loading custom styles");
+        });
+    }
+  }
+
+  //鍒濆鍖�
+  connectedCallback() {
+    init().then((result) => {
+      this.isNoteStay = result.isNoteStay;
+      if (result.result == "Success") {
+        this.agencyProType = result.agencyProType;
+        this.accountId = result.accountId;
+        this.title = result.title;
+        this.userWorkLocation = result.userWorkLocation;
+        this.totalNum = result.totalNum;
+        this.orderNumberArrived = result.orderNumberArrived;
+        this.deliveryDetailCount = result.deliveryDetailCount;
+        this.orderNumberNotarrive = result.orderNumberNotarrive;
+        this.moreThanSevenDays = result.moreThanSevenDays;
+        this.raesList = result.raesList;
+        this.raesList.push({
+          Id: "1",
+          Name: "璁㈠崟鏄庣粏姹囨��",
+          Total_num__c: this.totalNum,
+          OrderNumber_arrived__c: this.orderNumberArrived,
+          Delivery_detail_count__c: this.deliveryDetailCount,
+          OrderNumber_notarrive__c: this.orderNumberNotarrive,
+          More_than_seven_days__c: this.moreThanSevenDays
+        });
+        this.showSpinner = false;
+        this.showPage = true;
+      } else {
+        this.showSpinner = false;
+        console.log("Error:" + result.errorMsg);
+        this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", result.errorMsg, "error");
+      }
+    });
+  }
+
+  //鐐瑰嚮閾炬帴
+  clickLick(event) {
+    var outputValue = event.detail.data.value;
+    var outputType = event.detail.data.type;
+    var recordId = event.detail.data.recordId;
+    console.log("click:" + outputValue + "---" + outputType + "---" + recordId);
+    if (outputType == "Title") {
+      const config = {
+        type: "standard__webPage",
+        attributes: {
+          url: "/lexarrivegoods?ESetId=" + recordId
+        }
+      };
+      this[NavigationMixin.Navigate](config);
+    } else if (outputType == "TotalNum") {
+      this.popTitle = "鎵�鏈変骇鍝佷竴瑙�";
+      initTotalNum({ ordId: recordId, type: "all" }).then((result) => {
+        if (result.result == "Success") {
+          // this.recordList = result.recordList;
+          var dataStr = JSON.stringify(result.recordList);
+          this.recordList = JSON.parse(dataStr);
+          console.log("data:" + JSON.stringify(this.recordList));
+          this.showPop = true;
+        } else {
+          this.showMyToast(
+            "鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�",
+            result.errorMsg,
+            "error"
+          );
+        }
+      });
+    } else if (outputType == "ArrDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�";
+        initArrDetAll({ type: "all" }).then((result) => {
+          if (result.result == "Success") {
+            // this.recordList = result.recordList;
+            var dataStr = JSON.stringify(result.recordList);
+            this.recordList = JSON.parse(dataStr);
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "宸插埌璐т骇鍝佷竴瑙�";
+        initArrDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "DeliveryDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�";
+        initDeliveryDetAll({ type: "all" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "鏈埌璐т骇鍝佷竴瑙�";
+        initDeliveryDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "NotArrDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�";
+        initNotArrDetAll({ type: "all" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "杩樻病鍙戣揣鏁伴噺";
+        initNotArrDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "MoreThan7") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟";
+        initMoreThan7All({ type: "all" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�";
+        initMoreThan7({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    }
+  }
+
+  //鍏抽棴寮圭獥
+  closePop() {
+    this.showPop = false;
+  }
+
+  //娑堣�楀搧璁㈠崟鍚嶇О鍙樻洿
+  category1Change(event) {
+    this.category1 = event.detail.value;
+  }
+
+  //鏈�鏂板彂璐ф棩鏈熷彉鏇�
+  cate2Change(event) {
+    this.cate2 = event.detail.value;
+  }
+
+  //妫�绱�
+  search() {
+    this.showSpinner = true;
+    searchConsumableorderdetails({
+      category1Str: this.category1,
+      cate2Str: this.cate2,
+      accountidStr: this.accountId,
+      userWorkLocationStr: this.userWorkLocation,
+      agencyProTypeStr: this.agencyProType
+    }).then((result) => {
+      this.showSpinner = false;
+      if (result.result == "Success") {
+        this.raesList = result.raesList;
+        this.raesList.push({
+          Id: "1",
+          Name: "璁㈠崟鏄庣粏姹囨��",
+          Total_num__c: this.totalNum,
+          OrderNumber_arrived__c: this.orderNumberArrived,
+          Delivery_detail_count__c: this.deliveryDetailCount,
+          OrderNumber_notarrive__c: this.orderNumberNotarrive,
+          More_than_seven_days__c: this.moreThanSevenDays
+        });
+        if (this.raesList.length > 1) {
+          var count = this.raesList.length - 1;
+          this.showMyToast(
+            "鎼滅储鎴愬姛",
+            "鍏辨悳绱㈠埌" + count + "鏉℃暟鎹�",
+            "success"
+          );
+        } else {
+          this.showMyToast("鏈悳绱㈠埌鏁版嵁", "", "error");
+        }
+      } else {
+        this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
+      }
+    });
+  }
+
+  //娓呯┖鎼滅储妗�
+  clear() {
+    this.showSpinner = true;
+    this.category1 = "";
+    this.cate2 = null;
+    searchConsumableorderdetails({
+      category1Str: this.category1,
+      cate2Str: this.cate2,
+      accountidStr: this.accountId,
+      userWorkLocationStr: this.userWorkLocation,
+      agencyProTypeStr: this.agencyProType
+    }).then((result) => {
+      this.showSpinner = false;
+      if (result.result == "Success") {
+        this.raesList = result.raesList;
+        this.raesList.push({
+          Id: "1",
+          Name: "璁㈠崟鏄庣粏姹囨��",
+          Total_num__c: this.totalNum,
+          OrderNumber_arrived__c: this.orderNumberArrived,
+          Delivery_detail_count__c: this.deliveryDetailCount,
+          OrderNumber_notarrive__c: this.orderNumberNotarrive,
+          More_than_seven_days__c: this.moreThanSevenDays
+        });
+        if (this.raesList.length > 1) {
+          var count = this.raesList.length - 1;
+          this.showMyToast(
+            "鎼滅储鎴愬姛",
+            "鍏辨悳绱㈠埌" + count + "鏉℃暟鎹�",
+            "success"
+          );
+        } else {
+          this.showMyToast("鏈悳绱㈠埌鏁版嵁", "", "error");
+        }
+      } else {
+        this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
+      }
+    });
+  }
+
+  //鍏ュ簱
+  orderArrive() {
+    const config = {
+      type: "standard__webPage",
+      attributes: {
+        url: "/lexarrivegoods?ArrType=Arr"
+      }
+    };
+    this[NavigationMixin.Navigate](config);
+  }
+
+  //杩斿搧
+  orderReturn() {
+    const config = {
+      type: "standard__webPage",
+      attributes: {
+        url: "/lexarrivegoods?ArrType=ReG"
+      }
+    };
+    this[NavigationMixin.Navigate](config);
+  }
+
+  showMyToast(title, message, variant) {
+    console.log("show custom message");
+    var iconName = "";
+    var content = "";
+    if (variant == "success") {
+      iconName = "utility:check";
+    } else {
+      iconName = "utility:error";
+    }
+    if (message != "") {
+      content =
+        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
+    } else {
+      content = "<h2><strong>" + title + "<strong/></h2>";
+    }
+    this.template
+      .querySelector("c-common-toast")
+      .showToast(variant, content, iconName, 10000);
+    // var mode;
+    // if(this.isNoteStay){
+    //     mode ='sticky';
+    // }else{
+    //     mode = 'dismissable';
     // }
-
-    renderedCallback(){ 
-        if (!this.stylesLoaded) {
-            Promise.all([loadStyle(this, WrappedHeaderTable)])
-                .then(() => {
-                    console.log("Custom styles loaded");
-                    this.stylesLoaded = true;
-                })
-                .catch((error) => {
-                    console.error("Error loading custom styles");
-                });
-        }
-    }
-   
-    //鍒濆鍖�
-    connectedCallback(){
-        init()
-            .then(result=>{
-                this.isNoteStay = result.isNoteStay;
-                if(result.result == 'Success'){
-                    this.agencyProType = result.agencyProType;
-                    this.accountId = result.accountId;
-                    this.title = result.title;
-                    this.userWorkLocation = result.userWorkLocation;
-                    this.totalNum = result.totalNum;
-                    this.orderNumberArrived = result.orderNumberArrived;
-                    this.deliveryDetailCount = result.deliveryDetailCount;
-                    this.orderNumberNotarrive = result.orderNumberNotarrive;
-                    this.moreThanSevenDays = result.moreThanSevenDays;
-                    this.raesList = result.raesList;
-                    this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
-                    this.showSpinner = false;
-                    this.showPage = true;
-                }else{
-                    this.showSpinner = false;
-                    console.log("Error:"+result.errorMsg);
-                    this.showMyToast('鍒濆鍖栭〉闈㈠け璐�',result.errorMsg,'error');
-                }
-            })
-    }
-
-    //鐐瑰嚮閾炬帴
-    clickLick(event){
-        var outputValue = event.detail.data.value;
-        var outputType = event.detail.data.type;
-        var recordId = event.detail.data.recordId;
-        console.log("click:"+outputValue+"---"+outputType+"---"+recordId);
-        if(outputType == 'Title'){
-            const config = {
-                type: 'standard__webPage',
-                attributes: {
-                   url: '/lexarrivegoods?ESetId='+recordId
-                }
-            };
-            this[NavigationMixin.Navigate](config);
-        }else if(outputType == 'TotalNum'){
-            this.popTitle = '鎵�鏈変骇鍝佷竴瑙�';
-            initTotalNum({ordId:recordId, type:'all'})
-            .then(result=>{
-                if(result.result == 'Success'){
-                    // this.recordList = result.recordList;
-                    var dataStr = JSON.stringify(result.recordList);
-                    this.recordList = JSON.parse(dataStr);
-                    console.log('data:'+JSON.stringify(this.recordList));
-                    this.showPop = true;
-                }else{
-                    this.showMyToast('鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                }
-            })
-        }else if(outputType == 'ArrDet'){
-            if(recordId == '1'){
-                this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�';
-                initArrDetAll({type:'all'})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        // this.recordList = result.recordList;
-                        var dataStr = JSON.stringify(result.recordList);
-                        this.recordList = JSON.parse(dataStr);
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }else{
-                this.popTitle = '宸插埌璐т骇鍝佷竴瑙�';
-                initArrDet({orderId:recordId})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }
-        }else if(outputType == 'DeliveryDet'){
-            if(recordId == '1'){
-                this.popTitle = '鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�';
-                initDeliveryDetAll({type:'all'})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }else{
-                this.popTitle = '鏈埌璐т骇鍝佷竴瑙�';
-                initDeliveryDet({orderId:recordId})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }
-        }else if(outputType == 'NotArrDet'){
-            if(recordId == '1'){
-                this.popTitle = '鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�';
-                initNotArrDetAll({type:'all'})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }else{
-                this.popTitle = '杩樻病鍙戣揣鏁伴噺';
-                initNotArrDet({orderId:recordId})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触',result.errorMsg,'error');
-                    }
-                })
-            }
-
-        }else if(outputType == 'MoreThan7'){
-            if(recordId == '1'){
-                this.popTitle = '鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟';
-                initMoreThan7All({type:'all'})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触',result.errorMsg,'error');
-                    }
-                })
-            }else{
-                this.popTitle = '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�';
-                initMoreThan7({orderId:recordId})
-                .then(result=>{
-                    if(result.result == 'Success'){
-                        this.recordList = result.recordList;
-                        console.log('data:'+JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    }else{
-                        this.showMyToast('鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�',result.errorMsg,'error');
-                    }
-                })
-            }
-        }
-    }
-
-    //鍏抽棴寮圭獥
-    closePop(){
-        this.showPop = false;
-    }
-
-    //娑堣�楀搧璁㈠崟鍚嶇О鍙樻洿
-    category1Change(event){
-        this.category1 = event.detail.value;
-    }
-    
-    //鏈�鏂板彂璐ф棩鏈熷彉鏇�
-    cate2Change(event){
-        this.cate2 = event.detail.value;
-    }
-    
-    //妫�绱�
-    search(){
-        this.showSpinner = true;
-        searchConsumableorderdetails({
-            category1Str:this.category1,
-            cate2Str:this.cate2,
-            accountidStr:this.accountId,
-            userWorkLocationStr:this.userWorkLocation,
-            agencyProTypeStr:this.agencyProType})
-        .then(result=>{
-            this.showSpinner = false;
-            if(result.result == 'Success'){
-                this.raesList = result.raesList;
-                this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
-                if(this.raesList.length > 1){
-                    var count = this.raesList.length - 1;
-                    this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success');
-                }else{
-                    this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error');
-                }
-            }else{
-                this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
-            }
-        })
-    }
-    
-    //娓呯┖鎼滅储妗�
-    clear(){
-        this.showSpinner = true;
-        this.category1 = '';
-        this.cate2 = null;
-        searchConsumableorderdetails({
-            category1Str:this.category1,
-            cate2Str:this.cate2,
-            accountidStr:this.accountId,
-            userWorkLocationStr:this.userWorkLocation,
-            agencyProTypeStr:this.agencyProType})
-        .then(result=>{
-            this.showSpinner = false;
-            if(result.result == 'Success'){
-                this.raesList = result.raesList;
-                this.raesList.push({Id:'1',Name:'璁㈠崟鏄庣粏姹囨��',Total_num__c:this.totalNum,OrderNumber_arrived__c:this.orderNumberArrived,Delivery_detail_count__c:this.deliveryDetailCount,OrderNumber_notarrive__c:this.orderNumberNotarrive,More_than_seven_days__c:this.moreThanSevenDays});
-                if(this.raesList.length > 1){
-                    var count = this.raesList.length - 1;
-                    this.showMyToast('鎼滅储鎴愬姛','鍏辨悳绱㈠埌'+count+'鏉℃暟鎹�','success');
-                }else{
-                    this.showMyToast('鏈悳绱㈠埌鏁版嵁','','error');
-                }
-            }else{
-                this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
-            }
-        })
-    }
-
-    //鍏ュ簱
-    orderArrive(){
-        const config = {
-            type: 'standard__webPage',
-            attributes: {
-               url: '/lexarrivegoods?ArrType=Arr'
-            }
-        };
-        this[NavigationMixin.Navigate](config);
-    }
-    
-    //杩斿搧
-    orderReturn(){
-        const config = {
-            type: 'standard__webPage',
-            attributes: {
-               url: '/lexarrivegoods?ArrType=ReG'
-            }
-        };
-        this[NavigationMixin.Navigate](config);
-    }
-
-    showMyToast(title, message, variant) {
-        console.log('show custom message');
-        var iconName = '';
-        var content = '';
-        if(variant == 'success'){
-           iconName = 'utility:check';
-        }else{
-           iconName = 'utility:error';
-        }
-        if(message != ''){
-           content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
-        }else{
-           content = '<h2><strong>'+title+'<strong/></h2>';
-        }
-        this.template.querySelector('c-common-toast').
-        showToast(variant,content,iconName,10000);
-        // var mode;
-        // if(this.isNoteStay){
-        //     mode ='sticky';
-        // }else{
-        //     mode = 'dismissable';
-        // }
-        // const evt = new ShowToastEvent({
-        //     title: title,
-        //     message: message,
-        //     variant: variant,
-        //     mode: mode
-        // });
-        // this.dispatchEvent(evt);
-     }
-}
\ No newline at end of file
+    // const evt = new ShowToastEvent({
+    //     title: title,
+    //     message: message,
+    //     variant: variant,
+    //     mode: mode
+    // });
+    // this.dispatchEvent(evt);
+  }
+}
diff --git a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
index 4406470..48c8350 100644
--- a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
+++ b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.html
@@ -1,199 +1,350 @@
 <!-- sldsValidatorIgnore -->
 <!-- sldsValidatorIgnore -->
 <template>
-    <c-common-toast></c-common-toast>
-    <template if:true={isShowSpinner}>
-        <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
-聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span>
-聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-a"></div>
-聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-b"></div>
-聽 聽 聽 聽 </div>
-    </template>
+  <c-common-toast></c-common-toast>
+  <template if:true={isShowSpinner}>
+    <div
+      role="status"
+      class="slds-spinner slds-spinner_medium slds-spinner_brand"
+    >
+      聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span> 聽 聽 聽 聽 聽
+      聽 聽 聽
+      <div class="slds-spinner__dot-a"></div>
+      聽 聽 聽 聽 聽 聽 聽 聽
+      <div class="slds-spinner__dot-b"></div>
+      聽 聽 聽 聽
+    </div>
+  </template>
 
-
-    <template if:false={isDetailsShow}>
-        <template if:false={isConInvoiceList}>
-            <!-- 鎼滅储瀹㈡埛鍚� -->
-            <template if:true={isModalOpen}>
-                <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
-                    aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium"
-                    style="border: 1px solid #D4D4D4;">
-                    <div class="slds-modal__container">
-                        <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                            <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
-                                title="Close" onclick={closeModal}>
-                                <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
-                                    size="small"></lightning-icon>
-                                <span class="slds-assistive-text">Close</span>
-                            </button>
-                            <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">缁忛攢鍟嗗尰闄㈡绱�</h2>
-                        </header>
-                        <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1"
-                            style="border: 1px solid #F3F3F3;">
-                            <table style="width: 100%;">
-                                <tbody>
-                                    <tr>
-                                        <td style="width: 74px;">
-                                            <div style="color:#696969;font-size:16px;text-align: left;">鍖婚櫌鍚嶇О</div>
-                                        </td>
-                                        <td style="width: 60%;"><lightning-input class="inputFont" label="鍖婚櫌鍚嶇О"
-                                                variant="label-hidden" placeholder="璇疯緭鍏ュ尰闄㈠悕绉�" value={searchHospitalName}
-                                                data-field="searchHospitalName" onchange={dataChange}></lightning-input></td>
-                                        <td style="width: 10px;"></td>
-                                        <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-                                                style="height: 32px;" label="鎼滅储" onclick={searchHospital}>鎼滅储</button></td>
-                                    </tr>
-                                </tbody>
-                            </table>
-                            <p style="height: 20px;"></p>
-                            <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
-                            <div
-                                style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                                <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                                    <lightning-layout>
-                                        <lightning-layout-item padding="around-small">
-                                            <p style="font-size: 18px">
-                                                <strong>鎼滅储缁撴灉</strong>
-                                            </p>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-                                    <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
-                                </div>
-                                <div class="myTable" style="padding:10px;">
-                                    <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
+  <template if:false={isDetailsShow}>
+    <template if:false={isConInvoiceList}>
+      <!-- 鎼滅储瀹㈡埛鍚� -->
+      <template if:true={isModalOpen}>
+        <section
+          role="dialog"
+          tabindex="-1"
+          aria-labelledby="modal-heading-01"
+          aria-modal="true"
+          aria-describedby="modal-content-id-1"
+          class="slds-modal slds-fade-in-open slds-modal_medium"
+          style="border: 1px solid #d4d4d4"
+        >
+          <div class="slds-modal__container">
+            <header
+              class="slds-modal__header"
+              style="background-color: #f3f3f3"
+            >
+              <button
+                style=""
+                class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+                title="Close"
+                onclick={closeModal}
+              >
+                <lightning-icon
+                  icon-name="utility:close"
+                  alternative-text="close"
+                  variant="inverse"
+                  size="small"
+                ></lightning-icon>
+                <span class="slds-assistive-text">Close</span>
+              </button>
+              <h2
+                id="modal-heading-01"
+                class="slds-text-heading_medium slds-hyphenate"
+              >
+                缁忛攢鍟嗗尰闄㈡绱�
+              </h2>
+            </header>
+            <div
+              class="slds-modal__content slds-p-around_medium"
+              id="modal-content-id-1"
+              style="border: 1px solid #f3f3f3"
+            >
+              <table style="width: 100%">
+                <tbody>
+                  <tr>
+                    <td style="width: 74px">
+                      <div
+                        style="
+                          color: #696969;
+                          font-size: 16px;
+                          text-align: left;
+                        "
+                      >
+                        鍖婚櫌鍚嶇О
+                      </div>
+                    </td>
+                    <td style="width: 60%">
+                      <lightning-input
+                        class="inputFont"
+                        label="鍖婚櫌鍚嶇О"
+                        variant="label-hidden"
+                        placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+                        value={searchHospitalName}
+                        data-field="searchHospitalName"
+                        onchange={dataChange}
+                      ></lightning-input>
+                    </td>
+                    <td style="width: 10px"></td>
+                    <td>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                        style="height: 32px"
+                        label="鎼滅储"
+                        onclick={searchHospital}
+                      >
+                        鎼滅储
+                      </button>
+                    </td>
+                  </tr>
+                </tbody>
+              </table>
+              <p style="height: 20px"></p>
+              <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
+              <div
+                style="
+                  border: 1px solid #d4d4d4;
+                  border-top: 3px solid #51606e;
+                  border-radius: 5px;
+                  margin-bottom: 7px;
+                "
+              >
+                <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+                  <lightning-layout>
+                    <lightning-layout-item padding="around-small">
+                      <p style="font-size: 18px">
+                        <strong>鎼滅储缁撴灉</strong>
+                      </p>
+                    </lightning-layout-item>
+                  </lightning-layout>
+                  <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
+                </div>
+                <div class="myTable" style="padding: 10px">
+                  <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
                                         hide-checkbox-column="true" data={hospitalList} columns={hosCols}
                                         onrowaction={chooseHos}></lightning-datatable> -->
-                                    <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
-                                        key-field="id" data={hospitalList} columns={hospitalColumns} hide-checkbox-column="true"
-                                        onrowaction={searchHandleRowAction}>
-                                    </lightning-datatable>
-                                </div>
-                            </div>
+                  <lightning-datatable
+                    class="datatabel slds-border_top wrapped-header-datatable"
+                    key-field="id"
+                    data={hospitalList}
+                    columns={hospitalColumns}
+                    hide-checkbox-column="true"
+                    onrowaction={searchHandleRowAction}
+                  >
+                  </lightning-datatable>
+                </div>
+              </div>
+            </div>
+            <footer class="slds-modal__footer">
+              <button
+                class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                label="鍙栨秷"
+                onclick={closeModal}
+              >
+                鍙栨秷
+              </button>
+            </footer>
+          </div>
+        </section>
+        <div class="slds-backdrop slds-backdrop_open"></div>
+      </template>
+      <div class="outerBorderCss">
+        <div style="padding: 5px">
+          <div class="borderCss">
+            <div style="padding: 10px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <template if:false={EditAble}>
+                  <lightning-layout multiple-rows="true">
+                    <lightning-layout-item size="2"></lightning-layout-item>
+                    <lightning-layout-item size="10">
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={SetEditAbleJs}
+                        disabled={isDisabledEdit}
+                        style="width: 150px"
+                      >
+                        缂栬緫
+                      </button>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+                        onclick={approvalJs}
+                        disabled={isDisabledEdit}
+                        style="width: 150px"
+                      >
+                        鎻愪氦
+                      </button>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+                        onclick={openReportJs}
+                        disabled={isOpenReportDisabled}
+                        style="width: 150px"
+                      >
+                        鏄剧ず鏄庣粏
+                      </button>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+                        onclick={reopenJs}
+                        disabled={isDisabledReopen}
+                        style="width: 150px"
+                      >
+                        浣滃簾閲嶅紑
+                      </button>
+                    </lightning-layout-item>
+                  </lightning-layout>
+
+                  <lightning-layout
+                    multiple-rows="true"
+                    style="margin-top: 20px"
+                  >
+                    <lightning-layout-item size="2"></lightning-layout-item>
+                    <lightning-layout-item size="10">
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={deleteButtonJs}
+                        disabled={isDisabledDelete}
+                        style="width: 150px"
+                      >
+                        鍒犻櫎
+                      </button>
+
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+                        disabled={isDisabledReopen}
+                        onclick={uploadOrder}
+                        style="width: 150px"
+                      >
+                        涓婁紶闄勪欢
+                      </button>
+
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
+                        onclick={saveAttachmentJs}
+                        disabled={isDisabledReopen}
+                        style="width: 150px"
+                      >
+                        淇濆瓨闄勪欢
+                      </button>
+                    </lightning-layout-item>
+                  </lightning-layout>
+                </template>
+
+                <!-- 涓婁紶闄勪欢寮圭獥 -->
+                <template if:true={showAttPop}>
+                  <section
+                    role="dialog"
+                    tabindex="-1"
+                    aria-labelledby="modal-heading-02"
+                    aria-modal="true"
+                    aria-describedby="modal-content-id-2"
+                    class="slds-modal slds-fade-in-open slds-modal_small"
+                    style="border: 1px solid #d4d4d4"
+                  >
+                    <template if:true={showPopSpinner}>
+                      <lightning-spinner
+                        size="medium"
+                        variant="brand"
+                      ></lightning-spinner>
+                    </template>
+                    <div class="slds-modal__container">
+                      <header
+                        class="slds-modal__header"
+                        style="background-color: #f3f3f3"
+                      >
+                        <button
+                          style=""
+                          class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+                          title="Close"
+                          onclick={closePop}
+                        >
+                          <lightning-icon
+                            icon-name="utility:close"
+                            alternative-text="close"
+                            variant="inverse"
+                            size="small"
+                          ></lightning-icon>
+                          <span class="slds-assistive-text">Close</span>
+                        </button>
+                        <h2
+                          id="modal-heading-02"
+                          class="slds-text-heading_medium slds-hyphenate"
+                        >
+                          涓婁紶闄勪欢
+                        </h2>
+                      </header>
+                      <div
+                        class="slds-modal__content slds-p-around_medium searchName"
+                        id="modal-content-id-2"
+                        style="border: 1px solid #f3f3f3"
+                      >
+                        <div class="slds-m-top_medium slds-m-bottom_x-large">
+                          <div class="slds-p-around_medium lgc-bg">
+                            <lightning-input
+                              class="fileUpload"
+                              type="file"
+                              label="闄勪欢涓婁紶"
+                              accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
+                              onchange={attChange}
+                            ></lightning-input>
+                          </div>
+                          <p class="fontWeight">
+                            宸查�夋嫨鏂囦欢锛歿fileName}
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <template if:true={attDelBtn}>
+                              <a onclick={removeAtt}>绉婚櫎</a>
+                            </template>
+                          </p>
                         </div>
-                        <footer class="slds-modal__footer">
-                            <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="鍙栨秷"
-                                onclick={closeModal}>鍙栨秷</button>
-                        </footer>
-                    </div>
-                </section>
-                <div class="slds-backdrop slds-backdrop_open"></div>
-            </template>
-            <div class="outerBorderCss">
-                <div style="padding:5px;">
-
-                    <div class="borderCss">
-                        <div style="padding:10px;">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <template if:false={EditAble}>
-                                    <lightning-layout multiple-rows="true">
-                                        <lightning-layout-item size="2"></lightning-layout-item>
-                                        <lightning-layout-item size="10">
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={SetEditAbleJs} disabled={isDisabledEdit}
-                                                style="width: 150px;">缂栬緫</button>
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
-                                                onclick={approvalJs} disabled={isDisabledEdit}
-                                                style="width: 150px;">鎻愪氦</button>
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
-                                                onclick={openReportJs} disabled={isOpenReportDisabled}
-                                                style="width: 150px;">鏄剧ず鏄庣粏</button>
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
-                                                onclick={reopenJs} disabled={isDisabledReopen}
-                                                style="width: 150px;">浣滃簾閲嶅紑</button>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-
-                                    <lightning-layout multiple-rows="true" style="margin-top: 20px;">
-                                        <lightning-layout-item size="2"></lightning-layout-item>
-                                        <lightning-layout-item size="10">
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={deleteButtonJs} disabled={isDisabledDelete}
-                                                style="width: 150px;">鍒犻櫎</button>
-
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
-                                                disabled={isDisabledReopen} onclick={uploadOrder}
-                                                style="width: 150px;">涓婁紶闄勪欢</button>
-
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder buttonminMarginLeft"
-                                                onclick={saveAttachmentJs} disabled={isDisabledReopen}
-                                                style="width: 150px;">淇濆瓨闄勪欢</button>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-                                </template>
-
-                                <!-- 涓婁紶闄勪欢寮圭獥 -->
-                                <template if:true={showAttPop}>
-                                    <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-02"
-                                        aria-modal="true" aria-describedby="modal-content-id-2"
-                                        class="slds-modal slds-fade-in-open slds-modal_small"
-                                        style="border: 1px solid #D4D4D4;">
-                                        <template if:true={showPopSpinner}>
-                                            <lightning-spinner size="medium" variant="brand"></lightning-spinner>
-                                        </template>
-                                        <div class="slds-modal__container">
-                                            <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                                                <button style=""
-                                                    class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
-                                                    title="Close" onclick={closePop}>
-                                                    <lightning-icon icon-name="utility:close" alternative-text="close"
-                                                        variant="inverse" size="small"></lightning-icon>
-                                                    <span class="slds-assistive-text">Close</span>
-                                                </button>
-                                                <h2 id="modal-heading-02"
-                                                    class="slds-text-heading_medium slds-hyphenate">涓婁紶闄勪欢</h2>
-                                            </header>
-                                            <div class="slds-modal__content slds-p-around_medium searchName"
-                                                id="modal-content-id-2" style="border: 1px solid #F3F3F3;">
-                                                <div class="slds-m-top_medium slds-m-bottom_x-large">
-                                                    <div class="slds-p-around_medium lgc-bg">
-                                                        <lightning-input class="fileUpload" type="file" label="闄勪欢涓婁紶"
-                                                            accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
-                                                            onchange={attChange}></lightning-input>
-                                                    </div>
-                                                    <p class="fontWeight">宸查�夋嫨鏂囦欢锛歿fileName}
-                                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                                                        <template if:true={attDelBtn}>
-                                                            <a onclick={removeAtt}>绉婚櫎</a>
-                                                        </template>
-                                                    </p>
-                                                </div>
-                                            </div>
-                                            <footer class="slds-modal__footer">
-                                                <!-- <lightning-button style="margin-left: 10px;" variant="neutral"
+                      </div>
+                      <footer class="slds-modal__footer">
+                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral"
                                                     label="鍙栨秷" onclick={closePop}></lightning-button>
                                                 <lightning-button style="margin-left: 10px;" variant="neutral"
                                                     label="涓婁紶" onclick={handleFilesChange}></lightning-button> -->
-                                                <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;"
-                                                    label="鍙栨秷" onclick={closePop}>鍙栨秷</button>
-                                                <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-left: 10px;"
-                                                    label="涓婁紶" onclick={handleFilesChange}>涓婁紶</button>
-                                            </footer>
-                                        </div>
-                                    </section>
-                                    <div class="slds-backdrop slds-backdrop_open"></div>
-                                </template>
+                        <button
+                          class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                          style="margin-left: 10px"
+                          label="鍙栨秷"
+                          onclick={closePop}
+                        >
+                          鍙栨秷
+                        </button>
+                        <button
+                          class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                          style="margin-left: 10px"
+                          label="涓婁紶"
+                          onclick={handleFilesChange}
+                        >
+                          涓婁紶
+                        </button>
+                      </footer>
+                    </div>
+                  </section>
+                  <div class="slds-backdrop slds-backdrop_open"></div>
+                </template>
 
-                                <template if:true={EditAble}>
-                                    <lightning-layout>
-                                        <lightning-layout-item size="1" padding="around-small"></lightning-layout-item>
-                                        <lightning-layout-item size="2" padding="around-small"></lightning-layout-item>
-                                        <lightning-layout-item padding="around-small">
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={SaveJs}>纭畾</button>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-                                </template>
+                <template if:true={EditAble}>
+                  <lightning-layout>
+                    <lightning-layout-item
+                      size="1"
+                      padding="around-small"
+                    ></lightning-layout-item>
+                    <lightning-layout-item
+                      size="2"
+                      padding="around-small"
+                    ></lightning-layout-item>
+                    <lightning-layout-item padding="around-small">
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={SaveJs}
+                      >
+                        纭畾
+                      </button>
+                    </lightning-layout-item>
+                  </lightning-layout>
+                </template>
 
-                                <!-- <lightning-layout>
+                <!-- <lightning-layout>
                                     <lightning-layout-item size="3"></lightning-layout-item>
                                     <template if:true={EditAble}>
                                         <lightning-layout-item size="1" padding="around-small">
@@ -225,283 +376,386 @@
                                     </template>
 
                                 </lightning-layout> -->
+              </div>
+            </div>
+          </div>
 
-                            </div>
+          <div class="borderCss">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍙戠エ淇℃伅</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 7px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <!--鍙戠エ淇℃伅 鏄剧ず鐢� -->
+                <template if:false={isEditInvoice}>
+                  <lightning-record-edit-form
+                    object-api-name="Consumable_order__c"
+                    record-id={cocId}
+                    onload={handleLoad2}
+                  >
+                    <!-- 鍙戠エ鍙� 鐘舵�� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Name"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Invoice_status__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 鍙戠エ鏃ユ湡 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Invoice_Date__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 浜岀骇缁忛攢鍟� -->
+                    <template if:true={isShowSecondaryDistributor}>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout multiple-rows="true">
+                        <lightning-layout-item class="hehe-layoutItem" size="5">
+                          <lightning-output-field
+                            field-name="Order_Dealer_Info__c"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
+                      </lightning-layout>
+                    </template>
+
+                    <!-- 瀹㈡埛鍚� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="ShipmentAccount__c"
+                          class="hideHelpText"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 绉戝 鍙戠エ绁ㄩ潰閲戦 -->
+                    <lightning-layout
+                      multiple-rows="true"
+                      style="height: 35.5px"
+                    >
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Order_ForCustomerText__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item
+                        size="5"
+                        class="readOnly"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-input
+                          label="鍙戠エ绁ㄩ潰閲戦(鍏�)"
+                          value={sumPrice}
+                          read-only
+                          variant="label-inline"
+                        ></lightning-input>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 澶囨敞 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Invoice_Note__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 鍙戠エ闄勪欢 鏄庣粏闄勪欢 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Invoice_attachment__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Invoicedet_attachment__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 闄勪欢棰勮 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"> </lightning-layout-item>
+                      <lightning-layout-item size="10">
+                        <lightning-card
+                          class="attListTitle"
+                          variant="Narrow"
+                          title="闄勪欢鍒楄〃"
+                          icon-name="utility:attach"
+                        >
+                          <lightning-layout slot="footer" multiple-rows="true">
+                            <template
+                              for:each={fileData}
+                              for:item="item"
+                              for:index="index"
+                            >
+                              <lightning-layout-item
+                                padding="around-none"
+                                size="2"
+                                key={item.recordId}
+                                style="text-align: left; padding: 5px"
+                              >
+                                <lightning-icon
+                                  title={item.Title}
+                                  style="margin-left: 20px"
+                                  icon-name="doctype:gform"
+                                  alternative-text={item.Title}
+                                  size="large"
+                                ></lightning-icon
+                                ><br />
+                                <div
+                                  title={item.Title}
+                                  style="
+                                    width: 100px;
+                                    text-overflow: ellipsis;
+                                    overflow: hidden;
+                                    white-space: nowrap;
+                                  "
+                                >
+                                  {item.Title}
+                                </div>
+                                <p>
+                                  <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
+                                  <a href={item.attUrl} target="_blank">
+                                    棰勮 </a
+                                  >&nbsp;路&nbsp;
+                                  <a href={item.downloadUrl}> 涓嬭浇 </a
+                                  >&nbsp;路&nbsp;
+                                  <a data-fileid={item.Id} onclick={deleteAtt}>
+                                    鍒犻櫎
+                                  </a>
+                                </p>
+                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
+                              </lightning-layout-item>
+                            </template>
+                          </lightning-layout>
+                        </lightning-card>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </lightning-record-edit-form>
+                </template>
+                <!--鍙戠エ淇℃伅 缂栬緫鐢� -->
+                <template if:true={isEditInvoice}>
+                  <lightning-record-edit-form
+                    object-api-name="Consumable_order__c"
+                    record-id={cocId}
+                    onload={handleLoad2}
+                  >
+                    <!-- 鍙戠エ鍙� 鐘舵�� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input
+                          label="鍙戠エ鍙�"
+                          value={OrderCode}
+                          data-field="OrderCode"
+                          onchange={dataChange}
+                          variant="label-inline"
+                          required
+                          class="inputFont"
+                        ></lightning-input>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Invoice_status__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 鍙戠エ鏃ユ湡 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input
+                          type="date"
+                          label="鍙戠エ鏃ユ湡"
+                          variant="label-inline"
+                          value={InvoiceDate}
+                          onchange={invoiceDateChange}
+                          required
+                          class="inputFont"
+                        ></lightning-input>
+                      </lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 瀹㈡埛鍚� 浜岀骇缁忛攢鍟� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <div
+                          class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+                        >
+                          <lightning-icon
+                            size="x-small"
+                            class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default hideHelpText"
+                            icon-name="utility:search"
+                          ></lightning-icon>
+                          <lightning-input
+                            type="text"
+                            name="HospitalName"
+                            label="瀹㈡埛鍚�"
+                            value={HospitalName}
+                            variant="label-inline"
+                            onclick={searchHospitalNameModal}
+                            data-field="HospitalName"
+                            onchange={clearAgencyI}
+                            class="inputFont"
+                          ></lightning-input>
                         </div>
-                    </div>
+                      </lightning-layout-item>
 
-                    <div class="borderCss">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍙戠エ淇℃伅</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                        </div>
-                        <div style="padding:7px;">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <!--鍙戠エ淇℃伅 鏄剧ず鐢� -->
-                                <template if:false={isEditInvoice}>
-                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
-                                        onload={handleLoad2}>
-                                        <!-- 鍙戠エ鍙� 鐘舵�� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-combobox
+                          data-field="secondaryDistributor"
+                          name="secondaryDistributor"
+                          label="浜岀骇缁忛攢鍟�"
+                          value={secondaryDistributor}
+                          placeholder="璇烽�夋嫨..."
+                          options={provinceOptsMap}
+                          variant="label-inline"
+                          onchange={dataChange}
+                          class="inputFont"
+                        ></lightning-combobox>
+                      </lightning-layout-item>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field field-name="Name"></lightning-output-field>
-                                            </lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;">
-                                                <lightning-output-field
-                                                    field-name="Invoice_status__c"></lightning-output-field>
-                                            </lightning-layout-item>
+                    <!-- 绉戝 缁忛攢鍟�(褰曞叆) -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input-field
+                          onchange={dataChange}
+                          data-field="ForCustomerText"
+                          value={ForCustomerText}
+                          field-name="Order_ForCustomerText__c"
+                          class="inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
 
-                                        </lightning-layout>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Order_ForDealerText__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                        <!-- 鍙戠エ鏃ユ湡 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="Invoice_Date__c"></lightning-output-field>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
+                    <!-- 澶囨敞 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                        <!-- 浜岀骇缁忛攢鍟� -->
-                                        <template if:true={isShowSecondaryDistributor}>
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout multiple-rows="true">
-                                                <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                    <lightning-output-field
-                                                        field-name="Order_Dealer_Info__c"></lightning-output-field>
-                                                </lightning-layout-item>
-                                            </lightning-layout>
-                                        </template>
-
-                                        <!-- 瀹㈡埛鍚� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field field-name="ShipmentAccount__c"
-                                                    class="hideHelpText"></lightning-output-field>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 绉戝 鍙戠エ绁ㄩ潰閲戦 -->
-                                        <lightning-layout multiple-rows="true" style="height:35.5px">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="Order_ForCustomerText__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="5" class="readOnly" style="padding-left: 100px;">
-                                                <lightning-input label="鍙戠エ绁ㄩ潰閲戦(鍏�)" value={sumPrice} read-only
-                                                    variant="label-inline"></lightning-input>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 澶囨敞 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="Invoice_Note__c"></lightning-output-field>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 鍙戠エ闄勪欢 鏄庣粏闄勪欢 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="Invoice_attachment__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;">
-                                                <lightning-output-field
-                                                    field-name="Invoicedet_attachment__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 闄勪欢棰勮 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1">
-                                            </lightning-layout-item>
-                                            <lightning-layout-item size="10">
-                                                <lightning-card class="attListTitle" variant="Narrow" title="闄勪欢鍒楄〃"
-                                                    icon-name="utility:attach">
-
-                                                    <lightning-layout slot="footer" multiple-rows="true">
-                                                        <template for:each={fileData} for:item="item" for:index="index">
-                                                            <lightning-layout-item padding="around-none" size="2"
-                                                                key={item.recordId}
-                                                                style="text-align: left;padding:5px">
-                                                                <lightning-icon title={item.Title}
-                                                                    style="margin-left: 20px;" icon-name="doctype:gform"
-                                                                    alternative-text={item.Title}
-                                                                    size="large"></lightning-icon><br />
-                                                                <div title={item.Title} style="width: 100px;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;">
-                                                                    {item.Title}
-                                                                </div>
-                                                                <p>
-                                                                    <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
-                                                                    <a href={item.attUrl} target="_blank">
-                                                                        棰勮
-                                                                    </a>&nbsp;路&nbsp;
-                                                                    <a href={item.downloadUrl}>
-                                                                        涓嬭浇
-                                                                    </a>&nbsp;路&nbsp;
-                                                                    <a data-fileid={item.Id} onclick={deleteAtt}>
-                                                                        鍒犻櫎
-                                                                    </a>
-                                                                </p>
-                                                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
-                                                            </lightning-layout-item>
-                                                        </template>
-                                                    </lightning-layout>
-                                                </lightning-card>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </lightning-record-edit-form>
-                                </template>
-                                <!--鍙戠エ淇℃伅 缂栬緫鐢� -->
-                                <template if:true={isEditInvoice}>
-                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
-                                        onload={handleLoad2}>
-                                        <!-- 鍙戠エ鍙� 鐘舵�� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input label="鍙戠エ鍙�" value={OrderCode} data-field="OrderCode"
-                                                    onchange={dataChange} variant="label-inline" required
-                                                    class="inputFont"></lightning-input>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;">
-                                                <lightning-output-field
-                                                    field-name="Invoice_status__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 鍙戠エ鏃ユ湡 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input type="date" label="鍙戠エ鏃ユ湡" variant="label-inline"
-                                                    value={InvoiceDate} onchange={invoiceDateChange} required
-                                                    class="inputFont"></lightning-input>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 瀹㈡埛鍚� 浜岀骇缁忛攢鍟� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <div
-                                                    class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
-                                                    <lightning-icon size="x-small"
-                                                        class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default hideHelpText"
-                                                        icon-name="utility:search"></lightning-icon>
-                                                    <lightning-input type="text" name="HospitalName" label="瀹㈡埛鍚�"
-                                                        value={HospitalName} variant="label-inline"
-                                                        onclick={searchHospitalNameModal} data-field="HospitalName"
-                                                        onchange={clearAgencyI} class="inputFont"></lightning-input>
-                                                </div>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;">
-                                                <lightning-combobox data-field="secondaryDistributor"
-                                                    name="secondaryDistributor" label="浜岀骇缁忛攢鍟�"
-                                                    value={secondaryDistributor} placeholder="璇烽�夋嫨..."
-                                                    options={provinceOptsMap} variant="label-inline"
-                                                    onchange={dataChange} class="inputFont"></lightning-combobox>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 绉戝 缁忛攢鍟�(褰曞叆) -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input-field onchange={dataChange}
-                                                    data-field="ForCustomerText" value={ForCustomerText}
-                                                    field-name="Order_ForCustomerText__c"
-                                                    class="inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5" style="padding-left: 100px;">
-                                                <lightning-output-field
-                                                    field-name="Order_ForDealerText__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 澶囨敞 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input-field onchange={dataChange} data-field="InvoiceNote"
-                                                    value={InvoiceNote} field-name="Invoice_Note__c"
-                                                    class="inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-
-                                    </lightning-record-edit-form>
-                                </template>
-                            </div>
-                        </div>
-                    </div>
-                    <!-- 鍑哄簱鍗曚竴瑙� -->
-                    <div class="borderCss">
-                        <div class="headerDorderCss">
-
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍑哄簱鍗曚竴瑙�</strong>
-                                    </p>
-                                </lightning-layout-item>
-                                <lightning-layout-item size="2" padding="around-small">
-                                </lightning-layout-item>
-                                <template if:false={hideCheckbox}>
-                                    <lightning-layout-item padding="around-small">
-                                        <!-- <lightning-button label="&#12288;妫�绱�&#12288;"
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input-field
+                          onchange={dataChange}
+                          data-field="InvoiceNote"
+                          value={InvoiceNote}
+                          field-name="Invoice_Note__c"
+                          class="inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </lightning-record-edit-form>
+                </template>
+              </div>
+            </div>
+          </div>
+          <!-- 鍑哄簱鍗曚竴瑙� -->
+          <div class="borderCss">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍑哄簱鍗曚竴瑙�</strong>
+                  </p>
+                </lightning-layout-item>
+                <lightning-layout-item size="2" padding="around-small">
+                </lightning-layout-item>
+                <template if:false={hideCheckbox}>
+                  <lightning-layout-item padding="around-small">
+                    <!-- <lightning-button label="&#12288;妫�绱�&#12288;"
                                             onclick={InvoiceorderSearchJs}></lightning-button> -->
-                                        <button
-                                            class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-                                            onclick={InvoiceorderSearchJs}>妫�绱�</button>
-                                    </lightning-layout-item>
-                                </template>
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                      onclick={InvoiceorderSearchJs}
+                    >
+                      妫�绱�
+                    </button>
+                  </lightning-layout-item>
+                </template>
+              </lightning-layout>
+            </div>
 
-                            </lightning-layout>
-                        </div>
-
-                        <!-- <template if:false={hideCheckbox}>
+            <!-- <template if:false={hideCheckbox}>
                             <div style="padding: 10px">
                                 <div lwc:dom="manual" class="resultDiv"></div>
                                 <div draggable="false">
@@ -517,45 +771,61 @@
                             </div>
                         </template> -->
 
-                        <div style="padding: 7px">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <lightning-datatable key-field="Id" data={outboundData} columns={outboundColumns}
-                                    hide-checkbox-column={hideCheckbox} onrowselection={getSelectedRows}
-                                    selected-rows={selectedRows} class="wrapped-header-datatable" data-field="outbound">
-                                </lightning-datatable>
-                                <lightning-datatable key-field="id" data={outboundDataSumPrice}
-                                    columns={outboundColumns} hide-checkbox-column hide-table-header
-                                    class="wrapped-header-datatable">
-                                </lightning-datatable>
-                            </div>
-                        </div>
-                    </div>
-                    <!-- 鍙戠エ鏄庣粏 -->
-                    <template if:true={done}>
-                        <div class="borderCss">
-                            <div class="headerDorderCss">
-                                <lightning-layout>
-                                    <lightning-layout-item padding="around-small">
-                                        <p style="font-size: 18px">
-                                            <strong>鍙戠エ鏄庣粏</strong>
-                                        </p>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                            </div>
-                            <div style="padding: 7px">
-                                <div lwc:dom="manual" class="resultDiv"></div>
-                                <div draggable="false">
-                                    <lightning-datatable key-field="id" data={invoiceOrderdetail1Recoeds}
-                                        columns={invoiceDetailsColumns} hide-checkbox-column
-                                        class="wrapped-header-datatable">
-                                    </lightning-datatable>
-                                </div>
-                            </div>
-                        </div>
-                    </template>
-                    <!-- 涓婁紶闄勪欢 -->
-                    <!-- <template if:false={EditAble}>
+            <div style="padding: 7px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <lightning-datatable
+                  key-field="Id"
+                  data={outboundData}
+                  columns={outboundColumns}
+                  hide-checkbox-column={hideCheckbox}
+                  onrowselection={getSelectedRows}
+                  selected-rows={selectedRows}
+                  class="wrapped-header-datatable"
+                  data-field="outbound"
+                >
+                </lightning-datatable>
+                <lightning-datatable
+                  key-field="id"
+                  data={outboundDataSumPrice}
+                  columns={outboundColumns}
+                  hide-checkbox-column
+                  hide-table-header
+                  class="wrapped-header-datatable"
+                >
+                </lightning-datatable>
+              </div>
+            </div>
+          </div>
+          <!-- 鍙戠エ鏄庣粏 -->
+          <template if:true={done}>
+            <div class="borderCss">
+              <div class="headerDorderCss">
+                <lightning-layout>
+                  <lightning-layout-item padding="around-small">
+                    <p style="font-size: 18px">
+                      <strong>鍙戠エ鏄庣粏</strong>
+                    </p>
+                  </lightning-layout-item>
+                </lightning-layout>
+              </div>
+              <div style="padding: 7px">
+                <div lwc:dom="manual" class="resultDiv"></div>
+                <div draggable="false">
+                  <lightning-datatable
+                    key-field="id"
+                    data={invoiceOrderdetail1Recoeds}
+                    columns={invoiceDetailsColumns}
+                    hide-checkbox-column
+                    class="wrapped-header-datatable"
+                  >
+                  </lightning-datatable>
+                </div>
+              </div>
+            </div>
+          </template>
+          <!-- 涓婁紶闄勪欢 -->
+          <!-- <template if:false={EditAble}>
                         <div class="borderCss">
                             <div class="headerDorderCss">
                                 <lightning-layout>
@@ -599,253 +869,331 @@
                             </div>
                         </div>
                     </template> -->
-                </div>
-            </div>
-        </template>
-
-        <template if:true={isConInvoiceList}>
-            <div class="outerBorderCss">
-                <div style="padding:5px;">
-                    <!-- 鏂板缓鍙戠エ -->
-                    <div class="borderCss">
-                        <div style="padding:15px;">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <!-- <lightning-button label="鏂板缓鍙戠エ" onclick={newInvoiceJs}></lightning-button> -->
-                                <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                    onclick={newInvoiceJs}>鏂板缓鍙戠エ</button>
-                            </div>
-                        </div>
-                    </div>
-
-                    <!-- 妫�绱㈡潯浠� -->
-                    <div class="borderCss" style="margin-top: 5px;">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>妫�绱㈡潯浠�</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                        </div>
-                        <div style="padding: 15px">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-
-                                <lightning-layout multiple-rows>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-text-align_center">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label ">鍑哄簱鏃�&#12288;浠�</div>
-                                                <lightning-input type="date" variant="label-hidden" label="鍑哄簱鏃� 浠�"
-                                                    onchange={dataChange} data-field="deliveryFromDate"
-                                                    value={deliveryFromDate} class="inputFont"
-                                                    style="max-width: 150px;"></lightning-input>
-                                            </div>
-
-                                            </br>
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label ">&#12288;&#12288;&#12288;&#12288;鍒�
-                                                </div>
-                                                <lightning-input type="date" variant="label-hidden" label="鍒�"
-                                                    onchange={dataChange} data-field="deliveryToDate"
-                                                    value={deliveryToDate} class="inputFont"
-                                                    style="max-width: 150px;"></lightning-input>
-                                            </div>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label ">鍙戠エ鍙�</div>
-                                            <lightning-input variant="label-hidden" label="鍙戠エ鍙�" onchange={dataChange}
-                                                data-field="category1" value={category1} class="inputFont"
-                                                style="max-width: 150px;"></lightning-input>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label ">瀹㈡埛鍚�</div>
-                                            <lightning-input variant="label-hidden" label="瀹㈡埛鍚�" onchange={dataChange}
-                                                data-field="category2" value={category2} class="inputFont"
-                                                style="max-width: 150px;"></lightning-input>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label ">鐘舵��</div>
-                                            <lightning-combobox data-field="invoiceStatus" name="invoiceStatus"
-                                                label="鐘舵��" value={invoiceStatusValue} placeholder="璇烽�夋嫨..."
-                                                options={Options} variant="label-hidden" onchange={dataChange}
-                                                style="min-width: 100px;max-width: 200px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-                                                onclick={invoiceCodeSearchJs} style="max-width: 110px;">妫�绱�</button>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-                                                onclick={ClearJs} style="max-width: 110px;">娓呯┖</button>
-                                        </div>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-
-                            </div>
-                        </div>
-                    </div>
-
-                    <!-- 鍙戠エ涓�瑙� -->
-                    <div class="borderCss" style="margin-top: 5px;">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍙戠エ涓�瑙�</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                        </div>
-                        <div style="padding: 7px">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <lightning-datatable key-field="id" data={invoiceData} columns={invoiceColumns}
-                                    hide-checkbox-column="true" class="wrapped-header-datatable">
-                                </lightning-datatable>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-            </div>
-        </template>
+        </div>
+      </div>
     </template>
 
-    <template if:true={isDetailsShow}>
-        <div class="outerBorderCss">
-            <div style="padding:5px;">
-                <!-- 纭畾 -->
-                <div class="borderCss">
-                    <div style="padding:10px;">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <!-- <lightning-button label="纭畾" onclick={detailsSaveJs}></lightning-button> -->
-                            <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                onclick={detailsSaveJs}>纭畾</button>
-                        </div>
-                    </div>
-                </div>
+    <template if:true={isConInvoiceList}>
+      <div class="outerBorderCss">
+        <div style="padding: 5px">
+          <!-- 鏂板缓鍙戠エ -->
+          <div class="borderCss">
+            <div style="padding: 15px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <!-- <lightning-button label="鏂板缓鍙戠エ" onclick={newInvoiceJs}></lightning-button> -->
+                <button
+                  class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                  onclick={newInvoiceJs}
+                >
+                  鏂板缓鍙戠エ
+                </button>
+              </div>
+            </div>
+          </div>
 
-                <!-- 鍙戠エ淇℃伅 -->
-                <div class="borderCss" style="margin-top: 5px;">
-                    <div class="headerDorderCss">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>鍙戠エ淇℃伅</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                    </div>
-                    <div style="padding: 7px">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <lightning-record-edit-form object-api-name="Consumable_order__c"
-                                record-id={detailsInvoiceId} onload={handleLoad2}>
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item size="1"></lightning-layout-item>
-                                    <lightning-layout-item size="5">
-                                        <lightning-output-field field-name="Name"></lightning-output-field>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item size="1"></lightning-layout-item>
-                                    <lightning-layout-item size="5" class="hehe-layoutItem">
-                                        <lightning-output-field field-name="ShipmentAccount__c"
-                                            class="hideHelpText"></lightning-output-field>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item size="1"></lightning-layout-item>
-                                    <lightning-layout-item size="5">
-                                        <lightning-output-field
-                                            field-name="Order_ForCustomerText__c"></lightning-output-field>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                            </lightning-record-edit-form>
+          <!-- 妫�绱㈡潯浠� -->
+          <div class="borderCss" style="margin-top: 5px">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>妫�绱㈡潯浠�</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 15px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <lightning-layout multiple-rows>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-text-align_center">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div class="slds-form-element__label">
+                          鍑哄簱鏃�&#12288;浠�
                         </div>
-                    </div>
-                </div>
+                        <lightning-input
+                          type="date"
+                          variant="label-hidden"
+                          label="鍑哄簱鏃� 浠�"
+                          onchange={dataChange}
+                          data-field="deliveryFromDate"
+                          value={deliveryFromDate}
+                          class="inputFont"
+                          style="max-width: 150px"
+                        ></lightning-input>
+                      </div>
 
-                <!-- 鍑哄簱鍗� -->
-                <div class="borderCss" style="margin-top: 5px;">
-                    <div class="headerDorderCss">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>鍑哄簱鍗�</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                    </div>
-                    <div style="padding: 7px">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={detailsCocId}>
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item size="1"></lightning-layout-item>
-                                    <lightning-layout-item size="5">
-                                        <lightning-output-field field-name="Name"></lightning-output-field>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item size="1"></lightning-layout-item>
-                                    <lightning-layout-item size="5">
-                                        <lightning-output-field field-name="Outbound_Date__c"></lightning-output-field>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                            </lightning-record-edit-form>
+                      <!-- </br> -->
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div class="slds-form-element__label">
+                          &#12288;&#12288;&#12288;&#12288;鍒�
                         </div>
+                        <lightning-input
+                          type="date"
+                          variant="label-hidden"
+                          label="鍒�"
+                          onchange={dataChange}
+                          data-field="deliveryToDate"
+                          value={deliveryToDate}
+                          class="inputFont"
+                          style="max-width: 150px"
+                        ></lightning-input>
+                      </div>
                     </div>
-                </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label">鍙戠エ鍙�</div>
+                      <lightning-input
+                        variant="label-hidden"
+                        label="鍙戠エ鍙�"
+                        onchange={dataChange}
+                        data-field="category1"
+                        value={category1}
+                        class="inputFont"
+                        style="max-width: 150px"
+                      ></lightning-input>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label">瀹㈡埛鍚�</div>
+                      <lightning-input
+                        variant="label-hidden"
+                        label="瀹㈡埛鍚�"
+                        onchange={dataChange}
+                        data-field="category2"
+                        value={category2}
+                        class="inputFont"
+                        style="max-width: 150px"
+                      ></lightning-input>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label">鐘舵��</div>
+                      <lightning-combobox
+                        data-field="invoiceStatus"
+                        name="invoiceStatus"
+                        label="鐘舵��"
+                        value={invoiceStatusValue}
+                        placeholder="璇烽�夋嫨..."
+                        options={Options}
+                        variant="label-hidden"
+                        onchange={dataChange}
+                        style="min-width: 100px; max-width: 200px"
+                        class="inputFont"
+                      ></lightning-combobox>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                        onclick={invoiceCodeSearchJs}
+                        style="max-width: 110px"
+                      >
+                        妫�绱�
+                      </button>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                        onclick={ClearJs}
+                        style="max-width: 110px"
+                      >
+                        娓呯┖
+                      </button>
+                    </div>
+                  </lightning-layout-item>
+                </lightning-layout>
+              </div>
+            </div>
+          </div>
 
-                <!-- 鍑哄簱鍗曟槑缁� -->
-                <div class="borderCss" style="margin-top: 5px;">
-                    <div class="headerDorderCss">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>鍑哄簱鍗曟槑缁�</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                    </div>
-                    <div style="padding: 7px">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <!-- <lightning-datatable class="datatabel slds-border_top" key-field="id"
+          <!-- 鍙戠エ涓�瑙� -->
+          <div class="borderCss" style="margin-top: 5px">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍙戠エ涓�瑙�</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 7px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <lightning-datatable
+                  key-field="id"
+                  data={invoiceData}
+                  columns={invoiceColumns}
+                  hide-checkbox-column="true"
+                  class="wrapped-header-datatable"
+                >
+                </lightning-datatable>
+              </div>
+            </div>
+          </div>
+        </div>
+      </div>
+    </template>
+  </template>
+
+  <template if:true={isDetailsShow}>
+    <div class="outerBorderCss">
+      <div style="padding: 5px">
+        <!-- 纭畾 -->
+        <div class="borderCss">
+          <div style="padding: 10px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <!-- <lightning-button label="纭畾" onclick={detailsSaveJs}></lightning-button> -->
+              <button
+                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                onclick={detailsSaveJs}
+              >
+                纭畾
+              </button>
+            </div>
+          </div>
+        </div>
+
+        <!-- 鍙戠エ淇℃伅 -->
+        <div class="borderCss" style="margin-top: 5px">
+          <div class="headerDorderCss">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>鍙戠エ淇℃伅</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+          <div style="padding: 7px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <lightning-record-edit-form
+                object-api-name="Consumable_order__c"
+                record-id={detailsInvoiceId}
+                onload={handleLoad2}
+              >
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item size="1"></lightning-layout-item>
+                  <lightning-layout-item size="5">
+                    <lightning-output-field
+                      field-name="Name"
+                    ></lightning-output-field>
+                  </lightning-layout-item>
+                </lightning-layout>
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item size="1"></lightning-layout-item>
+                  <lightning-layout-item size="5" class="hehe-layoutItem">
+                    <lightning-output-field
+                      field-name="ShipmentAccount__c"
+                      class="hideHelpText"
+                    ></lightning-output-field>
+                  </lightning-layout-item>
+                </lightning-layout>
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item size="1"></lightning-layout-item>
+                  <lightning-layout-item size="5">
+                    <lightning-output-field
+                      field-name="Order_ForCustomerText__c"
+                    ></lightning-output-field>
+                  </lightning-layout-item>
+                </lightning-layout>
+              </lightning-record-edit-form>
+            </div>
+          </div>
+        </div>
+
+        <!-- 鍑哄簱鍗� -->
+        <div class="borderCss" style="margin-top: 5px">
+          <div class="headerDorderCss">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>鍑哄簱鍗�</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+          <div style="padding: 7px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <lightning-record-edit-form
+                object-api-name="Consumable_order__c"
+                record-id={detailsCocId}
+              >
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item size="1"></lightning-layout-item>
+                  <lightning-layout-item size="5">
+                    <lightning-output-field
+                      field-name="Name"
+                    ></lightning-output-field>
+                  </lightning-layout-item>
+                </lightning-layout>
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item size="1"></lightning-layout-item>
+                  <lightning-layout-item size="5">
+                    <lightning-output-field
+                      field-name="Outbound_Date__c"
+                    ></lightning-output-field>
+                  </lightning-layout-item>
+                </lightning-layout>
+              </lightning-record-edit-form>
+            </div>
+          </div>
+        </div>
+
+        <!-- 鍑哄簱鍗曟槑缁� -->
+        <div class="borderCss" style="margin-top: 5px">
+          <div class="headerDorderCss">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>鍑哄簱鍗曟槑缁�</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+          <div style="padding: 7px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <!-- <lightning-datatable class="datatabel slds-border_top" key-field="id"
                                 data={detaisData} columns={detailsColumns}>
                             </lightning-datatable> -->
-                            <c-lex-custom-lightning-datatable key-field="Id" data={detailsData} columns={detailsColumns}
-                                onunitchange={handleUnitChange} onshipmentnumber={handleShipmentNumber}
-                                onrowselection={detailsGetSelectedRows} selected-rows={detailsSelectedRows}
-                                style="word-wrap:break-word; word-break:break-all; " class="wrapped-header-datatable"
-                                min-column-width="115">
-                            </c-lex-custom-lightning-datatable>
-                            <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
-                                key-field="id" data={invoiceAllpriceData} columns={detailsColumns} hide-checkbox-column
-                                hide-table-header>
-                            </lightning-datatable>
-                        </div>
-                    </div>
-                </div>
+              <c-lex-custom-lightning-datatable
+                key-field="Id"
+                data={detailsData}
+                columns={detailsColumns}
+                onunitchange={handleUnitChange}
+                onshipmentnumber={handleShipmentNumber}
+                onrowselection={detailsGetSelectedRows}
+                selected-rows={detailsSelectedRows}
+                style="word-wrap: break-word; word-break: break-all"
+                class="wrapped-header-datatable"
+              >
+              </c-lex-custom-lightning-datatable>
+              <lightning-datatable
+                class="datatabel slds-border_top wrapped-header-datatable"
+                key-field="id"
+                data={invoiceAllpriceData}
+                columns={detailsColumns}
+                hide-checkbox-column
+                hide-table-header
+              >
+              </lightning-datatable>
             </div>
+          </div>
         </div>
-    </template>
-
-</template>
\ No newline at end of file
+      </div>
+    </div>
+  </template>
+</template>
diff --git a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
index 032f8fc..4fc8f59 100644
--- a/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
+++ b/force-app/main/default/lwc/lexConInvoiceView/lexConInvoiceView.js
@@ -1,4 +1,4 @@
-import { LightningElement, api, track, wire } from 'lwc';
+import { LightningElement, api, track, wire } from "lwc";
 import { ShowToastEvent } from "lightning/platformShowToastEvent";
 import init from "@salesforce/apex/LexConInvoiceViewController.init";
 import save from "@salesforce/apex/LexConInvoiceViewController.save";
@@ -13,1777 +13,2020 @@
 import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
 import detailsInit from "@salesforce/apex/LexConInvoicedetailsController.init";
 import detailsSave from "@salesforce/apex/LexConInvoicedetailsController.save";
-import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt';
+import deleteAtt from "@salesforce/apex/LexSummonsCreatController.deleteAtt";
 import { NavigationMixin } from "lightning/navigation";
-//table css 
+//table css
 import { loadStyle } from "lightning/platformResourceLoader";
 import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
-import LexConInvoiceViewReport from '@salesforce/label/c.LexConInvoiceViewReport';
+import LexConInvoiceViewReport from "@salesforce/label/c.LexConInvoiceViewReport";
 
 const hospitalColumns = [
-    {
-        label: "",
-        fieldName: "Id1",
-        type: "button",
-        initialWidth: 90,
-        hideDefaultActions: true,
-        typeAttributes: {
-            label: "閫夋嫨",
-            name: "Id2",
-            size: 1,
-        },
-    },
-    {
-        label: "鍖婚櫌鍚嶇О",
-        fieldName: "Name",
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: "鐪佷唤",
-        fieldName: "stateMasterName",
-        hideDefaultActions: true,
+  {
+    label: "",
+    fieldName: "Id1",
+    type: "button",
+    initialWidth: 90,
+    hideDefaultActions: true,
+    typeAttributes: {
+      label: "閫夋嫨",
+      name: "Id2",
+      size: 1
     }
+  },
+  {
+    label: "鍖婚櫌鍚嶇О",
+    fieldName: "Name",
+    hideDefaultActions: true,
+    wrapText: true
+  },
+  {
+    label: "鐪佷唤",
+    fieldName: "stateMasterName",
+    hideDefaultActions: true
+  }
 ];
 const invoiceDetailsColumns = [
-    {
-        label: "鍑哄簱鏃ユ湡",
-        fieldName: "esdetProductOutDate",
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: "鍑哄簱鍗曠紪鐮�",
-        fieldName: "esdetInvoicedet1ODlinkName",
-        wrapText: true,
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: "浜у搧鍨嬪彿",
-        fieldName: "esdetAssetModelNo",
-        hideDefaultActions: true,
-        wrapText: true,
-        initialWidth: 400,
-    },
-    {
-        label: "鍗曚綅",
-        fieldName: "esdetInvoiceUnit",
-        hideDefaultActions: true,
-        wrapText: true,
-        initialWidth: 50,
-    },
-    {
-        label: "鍙戠エ鍗曚环",
-        fieldName: "esdetInvoiceUnitprice",
-        hideDefaultActions: true,
-        wrapText: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
-    {
-        label: "鍙戠エ鏁伴噺",
-        fieldName: "esdetInvoicedCount",
-        cellAttributes: { alignment: 'right' },
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
-        fieldName: "esdetInvoicedProCostRMB",
-        hideDefaultActions: true,
-        wrapText: true,
-        cellAttributes: { alignment: 'right' },
-        initialWidth:145,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
+  {
+    label: "鍑哄簱鏃ユ湡",
+    fieldName: "esdetProductOutDate",
+    hideDefaultActions: true,
+    wrapText: true
+  },
+  {
+    label: "鍑哄簱鍗曠紪鐮�",
+    fieldName: "esdetInvoicedet1ODlinkName",
+    wrapText: true,
+    hideDefaultActions: true,
+    wrapText: true
+  },
+  {
+    label: "浜у搧鍨嬪彿",
+    fieldName: "esdetAssetModelNo",
+    hideDefaultActions: true,
+    wrapText: true,
+    initialWidth: 400
+  },
+  {
+    label: "鍗曚綅",
+    fieldName: "esdetInvoiceUnit",
+    hideDefaultActions: true,
+    wrapText: true,
+    initialWidth: 50
+  },
+  {
+    label: "鍙戠エ鍗曚环",
+    fieldName: "esdetInvoiceUnitprice",
+    hideDefaultActions: true,
+    wrapText: true,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  },
+  {
+    label: "鍙戠エ鏁伴噺",
+    fieldName: "esdetInvoicedCount",
+    cellAttributes: { alignment: "right" },
+    hideDefaultActions: true,
+    wrapText: true
+  },
+  {
+    label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+    fieldName: "esdetInvoicedProCostRMB",
+    hideDefaultActions: true,
+    wrapText: true,
+    cellAttributes: { alignment: "right" },
+    initialWidth: 145,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  }
 ];
 const invoiceColumns = [
-    {
-        label: "鍙戠エ鏃ユ湡",
-        fieldName: "Invoice_Date__c",
-        hideDefaultActions: true,
-        initialWidth: 150
+  {
+    label: "鍙戠エ鏃ユ湡",
+    fieldName: "Invoice_Date__c",
+    hideDefaultActions: true,
+    initialWidth: 150
+  },
+  {
+    label: "鍙戠エ鍙�",
+    type: "url",
+    fieldName: "NameUrl",
+    typeAttributes: {
+      label: { fieldName: "Name" }
     },
-    {
-        label: "鍙戠エ鍙�",
-        type: 'url',
-        fieldName: "NameUrl",
-        typeAttributes: {
-            label: { fieldName: "Name" },
-        },
-        hideDefaultActions: true,
+    hideDefaultActions: true
+  },
+  {
+    label: "瀹㈡埛鍚�",
+    fieldName: "ShipmentAccount__c",
+    hideDefaultActions: true,
+    wrapText: true
+  },
+  {
+    label: "鍙戠エ鐘舵��",
+    fieldName: "Invoice_status__c",
+    hideDefaultActions: true,
+    initialWidth: 100
+  },
+  {
+    label: "鍙戠エ璐﹂潰閲戦(鍏�)",
+    fieldName: "Invoice_total_amount__c",
+    hideDefaultActions: true,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
     },
-    {
-        label: "瀹㈡埛鍚�",
-        fieldName: "ShipmentAccount__c",
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: "鍙戠エ鐘舵��",
-        fieldName: "Invoice_status__c",
-        hideDefaultActions: true,
-        initialWidth: 100
-    },
-    {
-        label: "鍙戠エ璐﹂潰閲戦(鍏�)",
-        fieldName: "Invoice_total_amount__c",
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-        initialWidth: 180
-    },
-    {
-        label: "鍙戠エ闄勪欢",
-        fieldName: "Invoice_attachment__c",
-        type: 'boolean',
-        hideDefaultActions: true,
-        initialWidth: 120
-    },
-    {
-        label: "鍙戠エ鏄庣粏闄勪欢",
-        fieldName: "Invoicedet_attachment__c",
-        type: 'boolean',
-        hideDefaultActions: true,
-        initialWidth: 120
-    },
+    initialWidth: 180
+  },
+  {
+    label: "鍙戠エ闄勪欢",
+    fieldName: "Invoice_attachment__c",
+    type: "boolean",
+    hideDefaultActions: true,
+    initialWidth: 120
+  },
+  {
+    label: "鍙戠エ鏄庣粏闄勪欢",
+    fieldName: "Invoicedet_attachment__c",
+    type: "boolean",
+    hideDefaultActions: true,
+    initialWidth: 120
+  }
 ];
 const detailsColumns = [
-    {
-        label: "浜у搧鍨嬪彿",
-        fieldName: "esdAssetModelNo",
-        hideDefaultActions: true,
-        initialWidth: 200,
-        wrapText: true,
+  {
+    label: "浜у搧鍨嬪彿",
+    fieldName: "esdAssetModelNo",
+    hideDefaultActions: true,
+    initialWidth: 150,
+    wrapText: true
+  },
+  {
+    label: "瑙勬牸",
+    fieldName: "packingListManual",
+    hideDefaultActions: true,
+    initialWidth: 50
+  },
+  {
+    label: "鍑鸿揣鍗曚环(鍏�)",
+    fieldName: "esdDeliveryListRMB",
+    hideDefaultActions: true,
+    initialWidth: 100,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  },
+  {
+    label: "鍑鸿揣鏁伴噺",
+    fieldName: "esdShipmentCount",
+    hideDefaultActions: true
+  },
+  {
+    label: "杩斿搧鏁伴噺",
+    fieldName: "esdRrturnProCount",
+    hideDefaultActions: true
+  },
+  {
+    label: "鍑哄簱鍗曚綅",
+    fieldName: "esdBoxPiece",
+    hideDefaultActions: true
+  },
+  {
+    label: "宸插彂绁ㄦ暟閲�",
+    fieldName: "esdInvoicedProcount",
+    hideDefaultActions: true,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  },
+  {
+    label: "杩樻病鍙戠エ鏁伴噺",
+    fieldName: "esdInvoiceProNotCount",
+    hideDefaultActions: true,
+    initialWidth: 100,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  },
+  {
+    label: "寮�绁ㄥ崟浣�",
+    hideDefaultActions: true,
+    type: "customUnit",
+    typeAttributes: {
+      unitValue: { fieldName: "unitValue" },
+      unitOptions: { fieldName: "unitOptions" },
+      recordId: { fieldName: "recordId" },
+      isDisabled: { fieldName: "isDisabled" }
+    }
+  },
+  {
+    label: "鍙戠エ鍗曚环",
+    fieldName: "esdInvoiceUnitprice",
+    hideDefaultActions: true,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
     },
-    {
-        label: "瑙勬牸",
-        fieldName: "packingListManual",
-        hideDefaultActions: true,
-        initialWidth: 30
-    },
-    {
-        label: "鍑鸿揣鍗曚环(鍏�)",
-        fieldName: "esdDeliveryListRMB",
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
-    {
-        label: "鍑鸿揣鏁伴噺",
-        fieldName: "esdShipmentCount",
-        hideDefaultActions: true,
-    },
-    {
-        label: "杩斿搧鏁伴噺",
-        fieldName: "esdRrturnProCount",
-        hideDefaultActions: true,
-    },
-    {
-        label: "鍑哄簱鍗曚綅",
-        fieldName: "esdBoxPiece",
-        hideDefaultActions: true,
-    },
-    {
-        label: "宸插彂绁ㄦ暟閲�",
-        fieldName: "esdInvoicedProcount",
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
-    {
-        label: "杩樻病鍙戠エ鏁伴噺",
-        fieldName: "esdInvoiceProNotCount",
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
-    {
-        label: "寮�绁ㄥ崟浣�",
-        hideDefaultActions: true,
-        type: "customUnit",
-        typeAttributes: {
-            unitValue: { fieldName: "unitValue" },
-            unitOptions: { fieldName: "unitOptions" },
-            recordId: { fieldName: "recordId" },
-            isDisabled: { fieldName: "isDisabled" },
-        },
-    },
-    {
-        label: "鍙戠エ鍗曚环",
-        fieldName: "esdInvoiceUnitprice",
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-        initialWidth: 130
-    },
-    {
-        label: "鍙戠エ鏁伴噺",
-        //fieldName: "invoiceCount",
-        hideDefaultActions: true,
-        type: "customShipment",
-        cellAttributes: { alignment: 'right' },
-        typeAttributes: {
-            recordId: { fieldName: "recordId" },
-            shipmentNumber: { fieldName: "shipmentNumber" },
-            isConinvoice: { fieldName: "isConinvoice" },
-            esdInvoiceProNotCount: { fieldName: "esdInvoiceProNotCount" },
-        },
-    },
-    {
-        label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
-        cellAttributes: { alignment: 'right' },
-        fieldName: "invoiceAllprice",
-        hideDefaultActions: true,
-        type: "number",
-        initialWidth: 150,
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-    },
-]
+    initialWidth: 130
+  },
+  {
+    label: "鍙戠エ鏁伴噺",
+    //fieldName: "invoiceCount",
+    hideDefaultActions: true,
+    type: "customShipment",
+    cellAttributes: { alignment: "right" },
+    typeAttributes: {
+      recordId: { fieldName: "recordId" },
+      shipmentNumber: { fieldName: "shipmentNumber" },
+      isConinvoice: { fieldName: "isConinvoice" },
+      esdInvoiceProNotCount: { fieldName: "esdInvoiceProNotCount" }
+    }
+  },
+  {
+    label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+    cellAttributes: { alignment: "right" },
+    fieldName: "invoiceAllprice",
+    hideDefaultActions: true,
+    type: "number",
+    initialWidth: 150,
+    typeAttributes: {
+      minimumFractionDigits: 2
+    }
+  }
+];
 const customLabel = {
-    LexConInvoiceViewReport
-}
-export default class LexConInvoiceView extends NavigationMixin(LightningElement) {
+  LexConInvoiceViewReport
+};
+export default class LexConInvoiceView extends NavigationMixin(
+  LightningElement
+) {
+  @track label = customLabel;
+  invoiceColumns = invoiceColumns;
+  detailsColumns = detailsColumns;
+  @track outboundColumns = [
+    {
+      label: "鍑哄簱鏃ユ湡",
+      fieldName: "esdOutboundDate",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍑哄簱鍗曠紪鐮�",
+      fieldName: "esdNameUrl",
+      type: "url",
+      typeAttributes: {
+        label: { fieldName: "esdName" },
+        target: "_blank"
+      },
+      hideDefaultActions: true,
+      wrapText: true
+    }
+  ];
+  @track outboundData = [];
+  @track outboundDataSumPrice = [];
+  @track invoiceData = [];
+  @track invoiceAllpriceData = [];
+  @track detailsSelectedRows = [];
+  @track showAttPop = false;
 
-    @track label = customLabel;
-    invoiceColumns = invoiceColumns;
-    detailsColumns = detailsColumns;
-    @track outboundColumns = [
-        {
-            label: "鍑哄簱鏃ユ湡",
-            fieldName: "esdOutboundDate",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鍑哄簱鍗曠紪鐮�",
-            fieldName: "esdNameUrl",
-            type: 'url',
-            typeAttributes: {
-                label: { fieldName: "esdName" },
-                target: "_blank",
-            },
-            hideDefaultActions: true,
-            wrapText: true,
+  @track invoiceId = "";
+  @track orderId = "";
+  @track userWorkLocation = "";
+  @track deliveryId = "";
+  @track cocId = "";
+  @track statusEdit = "";
+  @track coc = {};
+  @track EditAble = false;
+  @track isChange = false;
+  @track sumPrice = 0.0;
+  @track OrderCode = "";
+  @track ExistOutbound = false;
+  @track reopen = "";
+  @track invoiceOrderRecoedschange = [];
+  @track isNew = "";
+  @track outOrderStringListLwc = [];
+  @track outordercountMapLwc = {};
+  @track selectedRows = [];
+  @track detailsInvoiceId = "";
+  @track detailsCocId = "";
+  @track detailsData = [];
+  @track invoiceAllprice = 0.0;
+  //鐘舵��
+  @track invoiceStatusValue = "";
+  @track invoiceStatusOptions = [];
+  get Options() {
+    return this.invoiceStatusOptions;
+  }
+  //鍑哄簱浠�
+  @track deliveryFromDate = "";
+  //鍑哄簱鍒�
+  @track deliveryToDate = "";
+  //鍙戠エ鍙�
+  @track category1 = "";
+  //瀹㈡埛鍚�
+  @track category2 = "";
+  @track ConInvoiceListAccountId = "";
+  @track ConInvoiceListUserWorkLocation = "";
+  @track ConInvoiceListAgencyProType = "";
+
+  //浜岀骇缁忛攢鍟�
+  @track provinceOptsMap = [];
+  @track secondaryDistributor = "";
+  //瀹㈡埛鍚�
+  @track isModalOpen = false;
+  @track HospitalName = "";
+  @track HospitalInfo = "";
+  @track searchHospitalName = "";
+  @track isDisabledHospitalName = false;
+  @track agencyProType = "";
+  @track accountid = "";
+  @track hospitalList = [];
+  hospitalColumns = hospitalColumns;
+  //鍙戠エ鏃ユ湡
+  @track InvoiceDate = "";
+  //绉戝
+  @track ForCustomerText = "";
+  //澶囨敞
+  @track InvoiceNote = "";
+
+  //鍙戠エ鏄庣粏
+  @track invoiceOrderdetail1Recoeds = [];
+  invoiceDetailsColumns = invoiceDetailsColumns;
+
+  //鏄剧ず
+  @track isShowSecondaryDistributor = false;
+  @track isEditInvoice = false;
+  @track isShowSpinner = true;
+  @track hideCheckbox = true;
+  @track done = false;
+  @track isConInvoiceList = true;
+  @track isDetailsShow = false;
+
+  //disable
+  @track isDisabledEdit = false;
+  @track isDisabledReopen = false;
+  @track isDisabledDelete = false;
+  @track isDisabledAttachment = false;
+  @track isOpenReportDisabled = true;
+
+  //鏂囦欢涓婁紶
+  @track showLoadingSpinner = false;
+  @track showPopSpinner = false;
+  @track UploadFile = "Upload File";
+  @track fileName = "";
+  @track fileData = [];
+  @track fileColumns = [
+    {
+      label: "鏍囬",
+      fieldName: "url",
+      type: "url",
+      typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
+      hideDefaultActions: true
+    },
+    {
+      label: "鍒涘缓浜�",
+      type: "url",
+      fieldName: "CreatedByNameUrl",
+      typeAttributes: {
+        label: { fieldName: "CreatedByName" },
+        target: "_blank"
+      },
+      hideDefaultActions: true
+    },
+    {
+      label: "涓婁紶鏃ユ湡",
+      type: "date",
+      typeAttributes: {
+        year: "numeric",
+        month: "long",
+        day: "2-digit",
+        hour: "2-digit",
+        minute: "2-digit"
+      },
+      fieldName: "CreatedDate",
+      hideDefaultActions: true
+    },
+    {
+      label: "闄勪欢绫诲瀷",
+      type: "customAttachmentType",
+      typeAttributes: {
+        typeValue: { fieldName: "typeValue" },
+        typeOptions: { fieldName: "typeOptions" },
+        recordId: { fieldName: "recordId" },
+        isDisabledAttachment: { fieldName: "isDisabledAttachment" }
+      },
+      hideDefaultActions: true
+    },
+    {
+      label: "",
+      type: "tableCellIcon",
+      typeAttributes: {
+        iconName: "utility:delete",
+        recordId: {
+          fieldName: "Id"
         }
-    ]
-    @track outboundData = [];
-    @track outboundDataSumPrice = [];
-    @track invoiceData = [];
-    @track invoiceAllpriceData = [];
-    @track detailsSelectedRows = [];
-    @track showAttPop = false;
-
-    @track invoiceId = '';
-    @track orderId = '';
-    @track userWorkLocation = '';
-    @track deliveryId = '';
-    @track cocId = '';
-    @track statusEdit = '';
-    @track coc = {};
-    @track EditAble = false;
-    @track isChange = false;
-    @track sumPrice = 0.00;
-    @track OrderCode = '';
-    @track ExistOutbound = false;
-    @track reopen = '';
-    @track invoiceOrderRecoedschange = [];
-    @track isNew = '';
-    @track outOrderStringListLwc = [];
-    @track outordercountMapLwc = {};
-    @track selectedRows = [];
-    @track detailsInvoiceId = '';
-    @track detailsCocId = '';
-    @track detailsData = [];
-    @track invoiceAllprice = 0.00;
-    //鐘舵��
-    @track invoiceStatusValue = '';
-    @track invoiceStatusOptions = [];
-    get Options() {
-        return this.invoiceStatusOptions;
+      },
+      initialWidth: 50,
+      hideDefaultActions: true
     }
-    //鍑哄簱浠�
-    @track deliveryFromDate = '';
-    //鍑哄簱鍒�
-    @track deliveryToDate = '';
-    //鍙戠エ鍙�
-    @track category1 = '';
-    //瀹㈡埛鍚�
-    @track category2 = '';
-    @track ConInvoiceListAccountId = '';
-    @track ConInvoiceListUserWorkLocation = '';
-    @track ConInvoiceListAgencyProType = '';
+  ];
+  filesUploaded = [];
+  fileContents;
+  fileReader;
+  content;
+  MAX_FILE_SIZE = 1500000;
 
-    //浜岀骇缁忛攢鍟�
-    @track provinceOptsMap = [];
-    @track secondaryDistributor = '';
-    //瀹㈡埛鍚�
-    @track isModalOpen = false;
-    @track HospitalName = "";
-    @track HospitalInfo = "";
-    @track searchHospitalName = "";
-    @track isDisabledHospitalName = false;
-    @track agencyProType = '';
-    @track accountid = '';
-    @track hospitalList = [];
-    hospitalColumns = hospitalColumns;
-    //鍙戠エ鏃ユ湡
-    @track InvoiceDate = '';
-    //绉戝
-    @track ForCustomerText = '';
-    //澶囨敞
-    @track InvoiceNote = '';
-
-    //鍙戠エ鏄庣粏
-    @track invoiceOrderdetail1Recoeds = [];
-    invoiceDetailsColumns = invoiceDetailsColumns;
-
-    //鏄剧ず
-    @track isShowSecondaryDistributor = false;
-    @track isEditInvoice = false;
-    @track isShowSpinner = true;
-    @track hideCheckbox = true;
-    @track done = false;
-    @track isConInvoiceList = true;
-    @track isDetailsShow = false;
-
-    //disable
-    @track isDisabledEdit = false;
-    @track isDisabledReopen = false;
-    @track isDisabledDelete = false;
-    @track isDisabledAttachment = false;
-    @track isOpenReportDisabled = true;
-
-    //鏂囦欢涓婁紶
-    @track showLoadingSpinner = false;
-    @track showPopSpinner = false;
-    @track UploadFile = "Upload File";
-    @track fileName = "";
-    @track fileData = [];
-    @track fileColumns = [
-        {
-            label: "鏍囬",
-            fieldName: "url",
-            type: "url",
-            typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
-            hideDefaultActions: true,
-        },
-        {
-            label: "鍒涘缓浜�",
-            type: "url",
-            fieldName: "CreatedByNameUrl",
-            typeAttributes: { label: { fieldName: "CreatedByName" }, target: "_blank" },
-            hideDefaultActions: true,
-        },
-        {
-            label: "涓婁紶鏃ユ湡",
-            type: 'date',
-            typeAttributes: {
-                year: "numeric",
-                month: "long",
-                day: "2-digit",
-                hour: "2-digit",
-                minute: "2-digit"
-            },
-            fieldName: "CreatedDate",
-            hideDefaultActions: true,
-        },
-        {
-            label: "闄勪欢绫诲瀷",
-            type: "customAttachmentType",
-            typeAttributes: {
-                typeValue: { fieldName: "typeValue" },
-                typeOptions: { fieldName: "typeOptions" },
-                recordId: { fieldName: "recordId" },
-                isDisabledAttachment: { fieldName: "isDisabledAttachment" },
-            },
-            hideDefaultActions: true,
-        },
-        {
-            label: '',
-            type: 'tableCellIcon',
-            typeAttributes: {
-                iconName: 'utility:delete',
-                recordId: {
-                    fieldName: 'Id'
-                }
-            },
-            initialWidth: 50,
-            hideDefaultActions: true
-        },
-    ];
-    filesUploaded = [];
-    fileContents;
-    fileReader;
-    content;
-    MAX_FILE_SIZE = 1500000;
-
-    stylesLoaded = false;
-    renderedCallback() {
-        if (!this.stylesLoaded) {
-            Promise.all([loadStyle(this, WrappedHeaderTable)])
-                .then(() => {
-                    console.log("Custom styles loaded");
-                    this.stylesLoaded = true;
-                })
-                .catch((error) => {
-                    console.error("Error loading custom styles");
-                });
-        }
-    }
-
-    //鑾峰彇閾炬帴鍙傛暟
-    getQueryString(name) {
-        console.log("getQueryString name " + name);
-        let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
-        let r = window.location.search.substr(1).match(reg);
-        if (r != null) {
-            return decodeURIComponent(r[2]);
-        }
-        return null;
-    }
-
-    connectedCallback() {
-        this.init();
-    }
-
-    init() {
-        this.isShowSpinner = true;
-        this.deliveryId = this.getQueryString("deliveryId");
-        this.deliveryId = this.deliveryId == null ? "" : this.deliveryId;
-        this.invoiceId = this.getQueryString("invoiceId");
-        this.invoiceId = this.invoiceId == null ? "" : this.invoiceId;
-        this.orderId = this.getQueryString("orderId");
-        this.orderId = this.orderId == null ? "" : this.orderId;
-        this.statusEdit = this.getQueryString("KeyWords");
-        this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
-        this.reopen = this.getQueryString("reopen");
-        this.reopen = this.reopen == null ? "" : this.reopen;
-        this.isNew = this.getQueryString("isNew");
-        this.isNew = this.isNew == null ? "" : this.isNew;
-        console.log('this.deliveryId = ' + this.deliveryId + ' this.invoiceId = ' + this.invoiceId + ' this.statusEdit = ' + this.statusEdit);
-        if (this.invoiceId != '' && this.orderId != '') {
-            //杩涘叆coninvoiceDetails
-            detailsInit({
-                orderIdLwc: this.orderId,
-                invoiceIdLwc: this.invoiceId
-            }).then((r) => {
-                r = JSON.parse(JSON.stringify(r));
-                if (r.status == "Success") {
-                    this.detailsInvoiceId = r.entity.invoicecode.Id;
-                    this.detailsCocId = r.entity.coc.Id;
-                    this.detailsData = r.entity.consumableorderdetails1Records;
-                    for (var i in this.detailsData) {
-                        this.detailsData[i]['Id'] = this.detailsData[i].esd.Id;
-
-                        this.detailsData[i]['esdAssetModelNo'] = this.detailsData[i].esd.Asset_Model_No__c;
-                        this.detailsData[i]['packingListManual'] = this.detailsData[i].Packing_list_manual;
-                        this.detailsData[i]['esdDeliveryListRMB'] = this.detailsData[i].esd.Delivery_List_RMB__c;
-                        this.detailsData[i]['esdShipmentCount'] = this.detailsData[i].esd.Shipment_Count__c;
-                        this.detailsData[i]['esdRrturnProCount'] = this.detailsData[i].esd.RrturnPro_count__c;
-                        this.detailsData[i]['esdBoxPiece'] = this.detailsData[i].esd.Box_Piece__c;
-
-                        this.detailsData[i]['esdInvoicedProcount'] = this.detailsData[i].esd.Invoiced_Procount__c;
-                        this.detailsData[i]['esdInvoiceProNotCount'] = this.detailsData[i].esd.InvoiceProNot_count__c;
-                        //寮�绁ㄥ崟浣�
-                        //this.detailsData[i].esd.Box_Piece__c
-                        //this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Invoice_Unit__c;
-                        this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Box_Piece__c;
-                        console.log('unitValue = ' + this.detailsData[i]['unitValue']);
-                        this.detailsData[i]['recordId'] = this.detailsData[i].esd.Id;
-                        //disabled="{!IF(records.esd.Box_Piece__c =='涓�' || (records.esd.Box_Piece__c =='鐩�' && records.Packing_list_manual ==1),true,false)}"
-                        //this.detailsData[i]['isDisabled'] = (this.detailsData[i].esd.Box_Piece__c == '涓�' || (this.detailsData[i].esd.Box_Piece__c =='鐩�' && this.detailsData[i].Packing_list_manual ==1)) ? true:false;
-                        this.detailsData[i]['isDisabled'] = true;
-                        let unitOptions = [];
-                        for (var key in this.detailsData[i].Invoice_UnitOptsMap) {
-                            let unitOption = {};
-                            unitOption["label"] = this.detailsData[i].Invoice_UnitOptsMap[key];
-                            unitOption["value"] = key;
-                            unitOptions.push(unitOption);
-                        }
-                        this.detailsData[i]["unitOptions"] = unitOptions;
-                        this.detailsData[i]['esdInvoiceUnitprice'] = this.detailsData[i].esd.Invoice_Unitprice__c;
-                        //鍙戠エ鏁伴噺
-                        this.detailsData[i]['shipmentNumber'] = this.detailsData[i].invoiceCount;
-                        this.detailsData[i]['isConinvoice'] = true;
-                        this.detailsData[i]['invoiceAllprice'] = this.detailsData[i].invoiceAllprice;
-
-                        if (this.detailsData[i].check) {
-                            this.detailsSelectedRows.push(this.detailsData[i]['Id']);
-                            this.invoiceAllprice += this.detailsData[i]['invoiceAllprice'];
-                        }
-                    }
-
-                    console.log('this.detailsData = ' + JSON.stringify(this.detailsData));
-
-                    let lastInvoiceAllprice = {
-                        invoiceAllprice: this.invoiceAllprice
-                    }
-                    this.invoiceAllpriceData.push(lastInvoiceAllprice);
-                    console.log('this.invoiceAllpriceData = ' + JSON.stringify(this.invoiceAllpriceData))
-
-                    this.isShowSpinner = false;
-                    this.isDetailsShow = true;
-                } else {
-                    this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
-                }
-            }).catch((error) => {
-                this.isShowSpinner = false;
-                console.log("error = " + JSON.stringify(error));
-            });
-        } else if (this.deliveryId == '' && this.invoiceId == '' && this.isNew == '') {
-            console.log('conInvoiceListInit');
-            conInvoiceListInit().then((r) => {
-                r = JSON.parse(JSON.stringify(r));
-                console.log("conInvoiceListInit r = " + JSON.stringify(r));
-                if (r.status == "Success") {
-                    this.ConInvoiceListAccountId = r.entity.accountid;
-                    this.ConInvoiceListUserWorkLocation = r.entity.userWorkLocation;
-
-                    this.ConInvoiceListAgencyProType = r.entity.agencyProType;
-                    //if (this.ConInvoiceListAgencyProType != 'ET')
-                        this.isOpenReportDisabled = false;
-                    this.invoiceData = r.entity.raesList;
-                    for (var i in this.invoiceData) {
-                        this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
-                    }
-                    console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
-                    for (var key in r.entity.statusMap) {
-                        let object = {};
-                        object["label"] = key;
-                        object["value"] = r.entity.statusMap[key];
-                        this.invoiceStatusOptions.push(object);
-                    }
-                    this.invoiceStatusOptions = [...this.invoiceStatusOptions];
-                    console.log("this.invoiceStatusOptions = " + JSON.stringify(this.invoiceStatusOptions));
-                    this.isShowSpinner = false;
-                } else {
-                    this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
-                }
-            }).catch((error) => {
-                console.log("error = " + JSON.stringify(error));
-            });
-
-        } else {
-            console.log('init');
-            this.isConInvoiceList = false;
-            init({
-                invoiceId: this.invoiceId,
-                statusEdit: this.statusEdit,
-                deliveryId: this.deliveryId
-            }).then((r) => {
-                r = JSON.parse(JSON.stringify(r));
-                console.log("r = " + JSON.stringify(r));
-                if (r.status == "Success") {
-                    this.coc = r.entity.coc;
-                    this.cocId = this.coc.Id;
-                    this.EditAble = r.entity.EditAble;
-                    this.isChange = r.entity.isChange;
-                    this.ExistOutbound = r.entity.ExistOutbound;
-                    this.outboundData = r.entity.invoiceOrderRecoeds;
-                    console.log('this.outboundData = ' + JSON.stringify(this.outboundData))
-                    this.done = r.entity.done;
-                    this.accountid = r.entity.accountid;
-                    this.userWorkLocation = r.entity.userWorkLocation;
-                    this.outOrderStringListLwc = r.entity.outOrderStringList;
-                    this.outordercountMapLwc = r.entity.outordercountMap;
-                    this.invoiceOrderRecoedschange = r.entity.invoiceOrderRecoedschange;
-                    this.isDisabledEdit = (this.coc.Invoice_status__c == '鎻愪氦' || this.coc.Invoice_status__c == '宸插畬鎴�') ? true : false;
-                    this.isDisabledReopen = this.coc.Invoice_status__c == '鎻愪氦' ? false : true;
-                    this.isDisabledDelete = this.coc.Invoice_status__c == '鑽夋涓�' ? false : true;
-                    this.isDisabledAttachment = this.coc.Invoice_status__c == '宸插畬鎴�' ? true : false;
-                    this.OrderCode = this.coc.Name;
-                    this.InvoiceDate = this.coc.Invoice_Date__c;
-
-                    for (var i in this.outboundData) {
-                        this.outboundData[i].Id = this.outboundData[i].esd.Id;
-                        if (this.outboundData[i].check)
-                            this.selectedRows.push(this.outboundData[i].esd.Id);
-                    }
-                    this.selectedRows = [...this.selectedRows];
-                    console.log('r.entity.attachmentRecoeds = ' + JSON.stringify(r.entity.attachmentRecoeds))
-                    if (!this.EditAble) {
-                        //闄勪欢鏄剧ず
-                        this.showLoadingSpinner = true;
-                        this.fileData = r.entity.attachmentRecoeds;
-                        for (var i in this.fileData) {
-                            this.fileData[i]["Id"] = this.fileData[i].cvInfo.Id;
-                            this.fileData[i]["recordId"] = this.fileData[i].cvInfo.Id;
-                            this.fileData[i]["url"] = "/" + this.fileData[i].cvInfo.Id;
-                            this.fileData[i]["Title"] = this.fileData[i].cvInfo.Title;
-                            this.fileData[i]["CreatedByName"] = this.fileData[i].cvInfo.Owner.Name;
-                            this.fileData[i]["CreatedByNameUrl"] = "/" + this.fileData[i].cvInfo.OwnerId;;
-                            this.fileData[i]["CreatedDate"] = this.fileData[i].cvInfo.CreatedDate;
-                            this.fileData[i]["attUrl"] = '/' + this.fileData[i].cvInfo.Id;
-                            this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].cvInfo.ContentDocumentId + '?operationContext=S1';
-                            if (this.isDisabledAttachment) {
-                                console.log('杩涘叆this.isDisabledAttachment')
-                                this.fileData[i]["isDisabledAttachment"] = true;
-                            }
-                            let typeOptions = [];
-                            for (var key in this.fileData[i].mailSelectOptsMap) {
-                                let typeOption = {};
-                                typeOption["label"] = this.fileData[i].mailSelectOptsMap[key];
-                                typeOption["value"] = key;
-                                typeOptions.push(typeOption);
-                            }
-                            this.fileData[i]["typeValue"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin;
-                            this.fileData[i]["typeOptions"] = typeOptions;
-                            this.fileData[i]["mailSelectOptsin"] = this.fileData[i].mailSelectOptsin == null ? typeOptions[0].value : this.fileData[i].mailSelectOptsin;
-                        }
-                        console.log('this.fileData = ' + JSON.stringify(this.fileData))
-                    }
-
-                    //鍙戠エ鏄庣粏
-                    this.invoiceOrderdetail1Recoeds = r.entity.invoiceOrderdetail1Recoeds;
-                    for (var i in this.invoiceOrderdetail1Recoeds) {
-                        this.invoiceOrderdetail1Recoeds[i]['esdetProductOutDate'] = this.invoiceOrderdetail1Recoeds[i].esdet.Product_OutDate__c;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedet1ODlinkName'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoicedet1_OD_link__r.Name;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetAssetModelNo'] = this.invoiceOrderdetail1Recoeds[i].esdet.Asset_Model_No__c;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnit'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unit__c;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetInvoiceUnitprice'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unitprice__c;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedCount'] = this.invoiceOrderdetail1Recoeds[i].esdet.Invoiced_Count__c;
-                        this.invoiceOrderdetail1Recoeds[i]['esdetInvoicedProCostRMB'] = this.invoiceOrderdetail1Recoeds[i].esdet.InvoicedProCost_RMB__c;
-                    }
-                    //瀹㈡埛鍚�
-                    this.HospitalName = r.entity.HospitalName;
-                    this.HospitalInfo = r.entity.HospitalInfo;
-                    this.agencyProType = r.entity.agencyProType;
-                    //if (this.agencyProType != 'ET')
-                        this.isOpenReportDisabled = false;
-                    //绉戝
-                    this.ForCustomerText = this.coc.Order_ForCustomerText__c;
-                    //澶囨敞
-                    this.InvoiceNote = this.coc.Invoice_Note__c;
-                    //浜岀骇缁忛攢鍟�
-                    for (var key in r.entity.provinceOptsMap) {
-                        let object = {};
-                        object["label"] = r.entity.provinceOptsMap[key];
-                        object["value"] = key;
-                        this.provinceOptsMap.push(object);
-                    }
-                    //鍑鸿揣涓�瑙坈olumns
-
-
-                    if (this.EditAble) {
-                        let object1 = {
-                            label: '瀹㈡埛鍚�',
-                            fieldName: "hospitalName",
-                            hideDefaultActions: true,
-                            wrapText: true,
-                        };
-                        let object2 = {
-                            label: '鍑鸿揣閲戦(鍏�)',
-                            fieldName: "shipmentAmount",
-                            type: "number",
-                            typeAttributes: {
-                                minimumFractionDigits: 2,
-                            },
-                            hideDefaultActions: true,
-                        };
-                        let object3 = {
-                            label: '杩斿搧閲戦(鍏�)',
-                            fieldName: "returnAmount",
-                            type: "number",
-                            typeAttributes: {
-                                minimumFractionDigits: 2,
-                            },
-                            hideDefaultActions: true,
-                        };
-                        this.outboundColumns.push(object1)
-                        this.outboundColumns.push(object2)
-                        this.outboundColumns.push(object3)
-                    }
-                    let object4 = {
-                        label: '鏈彂绁ㄩ噾棰�(鍏�)',
-                        fieldName: "uninvoicedAmount",
-                        type: "number",
-                        typeAttributes: {
-                            minimumFractionDigits: 2,
-                        },
-                        hideDefaultActions: true,
-                    };
-                    this.outboundColumns.push(object4)
-
-                    //鍑鸿揣涓�瑙圖ata
-                    let index = 0;
-                    for (var i in this.outboundData) {
-                        this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c;
-                        this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id;
-                        this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name;
-                        if (this.EditAble) {
-                            this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c;
-                            this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c;
-                            this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c;
-                        }
-                        this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c;
-                        this.outboundData[i]['invoiceFaceAmount'] = this.keepTwoDecimalStr(this.outboundData[i].needInvoiceCount);
-                        if (!(this.outboundData[i].esd.Billed_Status__c == '鍏ㄩ儴寮�绁�' || this.EditAble || this.coc.Invoice_status__c != '鑽夋涓�')) {
-                            console.log('杩涘叆 if')
-                            let url = "/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
-                            this.outboundData[i]['invoiceFaceAmountUrl'] = url;
-                            if (index == 0) {
-                                let object5 = {
-                                    label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
-                                    cellAttributes: { alignment: 'right' },
-                                    type: 'url',
-                                    fieldName: "invoiceFaceAmountUrl",
-                                    typeAttributes: {
-                                        label: { fieldName: "invoiceFaceAmount" },
-                                        //target: "_blank",
-                                    },
-                                    hideDefaultActions: true,
-                                };
-                                this.outboundColumns.push(object5)
-                                index++;
-                            }
-                        } else {
-                            console.log('杩涘叆 else')
-                            if (index == 0) {
-                                let object5 = {
-                                    label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
-                                    cellAttributes: { alignment: 'right' },
-                                    fieldName: "invoiceFaceAmount",
-                                    hideDefaultActions: true,
-                                    type: "number",
-                                    typeAttributes: {
-                                        minimumFractionDigits: 2,
-                                    },
-                                };
-                                this.outboundColumns.push(object5)
-                                index++;
-                            }
-                        }
-                        //璁$畻鍙戠エ绁ㄩ潰閲戦
-                        this.sumPrice += this.outboundData[i].needInvoiceCount;
-                    }
-
-                    //鍥涜垗浜斿叆
-                    //this.sumPrice = this.sumPrice.toFixed(2);
-                    //濡傛灉涓嶅洓鑸嶄簲鍏�
-                    console.log('start keepTwoDecimalStr')
-                    this.sumPrice = this.keepTwoDecimalStr(this.sumPrice);
-                    console.log('end keepTwoDecimalStr = ' + this.sumPrice)
-                    //鍔犳渶鍚庝竴琛屾樉绀洪噾棰�
-                    if (this.EditAble) {
-                        let lastOutboundData = {
-                            invoiceFaceAmount: this.sumPrice
-                        }
-                        this.outboundDataSumPrice.push(lastOutboundData);
-                    }
-                    this.outboundColumns = [...this.outboundColumns];
-
-
-                    this.isEditInvoice = !(!this.EditAble || this.isChange);
-                    if (this.coc.SummonsForDirction__c == '閿�鍞粰浜岀骇缁忛攢鍟�')
-                        this.isShowSecondaryDistributor = true;
-                    if (this.deliveryId == '' && !this.ExistOutbound && this.EditAble)
-                        this.hideCheckbox = false;
-                    this.isShowSpinner = false;
-                    this.showLoadingSpinner = false;
-                } else {
-                    this.showMyToast('澶辫触', r.msg, 'Error');
-                }
-            }).catch((error) => {
-                console.log("error = " + JSON.stringify(error));
-            });
-        }
-
-    }
-
-
-    //涓婁紶閰嶇疆鍗�
-    uploadOrder(event) {
-        this.showAttPop = true;
-    }
-
-    //鍏抽棴闄勪欢寮圭獥
-    closePop() {
-        this.showAttPop = false;
-        this.filesUploaded = [];
-        this.fileName = null;
-    }
-
-    //闄勪欢change浜嬩欢
-    attChange(event) {
-        if (event.target.files.length > 0) {
-            this.filesUploaded = event.target.files;
-            this.fileName = event.target.files[0].name;
-            console.log('this.fileName:' + this.fileName);
-        }
-    }
-
-    //绉婚櫎闄勪欢
-    removeAtt() {
-        this.filesUploaded = [];
-        this.fileName = '';
-    }
-
-    //鏄惁鏄剧ず闄勪欢绉婚櫎
-    get attDelBtn() {
-        if (this.fileName != '' && this.fileName != null && this.fileName != '閫夋嫨涓�涓枃浠朵笂浼�') {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    keepTwoDecimalStr(num) {
-        const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
-        let s = result.toString();
-        let rs = s.indexOf('.');
-        if (rs < 0) {
-            rs = s.length;
-            s += '.';
-        }
-        while (s.length <= rs + 2) {
-            s += '0';
-        }
-        return s;
-    };
-
-    dataChange(event) {
-        let fieldName = event.target.getAttribute("data-field");
-        let value = event.detail.value;
-        console.log("fieldName = " + fieldName + " value = " + value);
-        switch (fieldName) {
-            case "OrderCode":
-                this.OrderCode = value;
-                this.coc['Name'] = value;
-                break;
-            case "ForCustomerText":
-                this.ForCustomerText = value;
-                this.coc['Order_ForCustomerText__c'] = value;
-                break;
-            case "InvoiceDate":
-                this.InvoiceDate = value;
-                this.coc['Invoice_Date__c'] = value;
-                break;
-            case "secondaryDistributor":
-                this.secondaryDistributor = value;
-                break;
-            case "deliveryFromDate":
-                this.deliveryFromDate = value;
-                break;
-            case "deliveryToDate":
-                this.deliveryToDate = value;
-                break;
-            case "category1":
-                this.category1 = value;
-                break;
-            case "category2":
-                this.category2 = value;
-                break;
-            case "invoiceStatus":
-                this.invoiceStatusValue = value;
-                break;
-            case "searchHospitalName":
-                this.searchHospitalName = value;
-                break;
-            case "InvoiceNote":
-                this.InvoiceNote = value;
-                this.coc['Invoice_Note__c'] = value;
-                break;
-        }
-    }
-
-    invoiceDateChange(event) {
-        this.InvoiceDate = event.detail.value;
-        this.coc['Invoice_Date__c'] = event.detail.value;
-        console.log('this.InvoiceDate = ' + this.InvoiceDate);
-    }
-
-    //鎼滅储瀹㈡埛鍚�
-    searchHospitalNameModal() {
-        console.log("searchHospitalNameModal");
-        hospitalInit({
-            ctype: this.agencyProType,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.hospitalList = r.entity.at;
-                for (var i in this.hospitalList) {
-                    this.hospitalList[i]["stateMasterName"] = this.hospitalList[i].State_Master__r.Name;
-                }
-                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
-                this.isModalOpen = true;
-            }
-        });
-    }
-
-    searchHospital() {
-        console.log("this.searchHospitalName = " + this.searchHospitalName);
-        serContact({
-            searchName: this.searchHospitalName,
-            ctype: this.agencyProType,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.hospitalList = r.entity.at;
-                for (var i in this.hospitalList) {
-                    this.hospitalList[i]["stateMasterName"] =
-                        this.hospitalList[i].State_Master__r.Name;
-                }
-                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
-            }
-        });
-    }
-
-    //閫夋嫨瀹㈡埛鍚�
-    searchHandleRowAction(event) {
-        console.log("searchHandleRowAction");
-        let row = event.detail.row;
-        this.HospitalInfo = row.Id;
-        this.HospitalName = row.Name;
-        console.log("this.HospitalInfo = " + this.HospitalInfo + " this.HospitalName = " + this.HospitalName);
-        this.isModalOpen = false;
-    }
-
-    //褰撳鎴峰悕鏄┖鏃躲�傚鎴穒d涔熷彉涓虹┖
-    clearAgencyI(event) {
-        this.HospitalName = event.target.value;
-        if (this.HospitalName == "" || this.HospitalName == null) {
-            this.HospitalInfo = "";
-        }
-        console.log("this.HospitalName = " + this.HospitalName);
-        console.log("this.HospitalInfo = " + this.HospitalInfo);
-    }
-
-    closeModal() {
-        this.isModalOpen = false;
-    }
-
-    SaveJs() {
-        this.isShowSpinner = true;
-        let cloneData = this.outboundData
-
-        debugger
-        const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows();
-        console.log('selectedRows = ' + JSON.stringify(selectedRows));
-
-        for (var i in cloneData) {
-            let b = false;
-            for (var j in selectedRows) {
-                if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
-                    b = true;
-                    cloneData[i].check = true;
-                }
-            }
-            if (!b) {
-                cloneData[i].check = false;
-            }
-            delete cloneData[i].esdOutboundDate;
-            delete cloneData[i].esdNameUrl;
-            delete cloneData[i].esdName;
-            delete cloneData[i].hospitalName;
-            delete cloneData[i].shipmentAmount;
-            delete cloneData[i].returnAmount;
-            delete cloneData[i].uninvoicedAmount;
-            delete cloneData[i].invoiceFaceAmount;
-            delete cloneData[i].invoiceFaceAmountUrl;
-        }
-
-        console.log('this.coc = ' + JSON.stringify(this.coc));
-        console.log('this.HospitalName = ' + this.HospitalName);
-        console.log('this.HospitalInfo = ' + this.HospitalInfo);
-        console.log('this.secondaryDistributor = ' + this.secondaryDistributor);
-        console.log('this.outboundData = ' + JSON.stringify(cloneData));
-        console.log('this.deliveryId = ' + this.deliveryId);
-        console.log('this.invoiceId = ' + this.invoiceId);
-        console.log('this.accountid = ' + this.accountid);
-        console.log('this.agencyProType = ' + this.agencyProType);
-        console.log('this.reopen = ' + this.reopen);
-        console.log('this.invoiceOrderRecoedschangeLwc = ' + JSON.stringify(this.invoiceOrderRecoedschange));
-        save({
-            cocLwc: this.coc,
-            HospitalNameLwc: this.HospitalName,
-            HospitalInfoLwc: this.HospitalInfo,
-            SecondDealerLwc: this.secondaryDistributor,
-            invoiceOrderRecoedsLwc: JSON.stringify(cloneData),
-            deliveryIdLwc: this.deliveryId,
-            invoiceIdLwc: this.invoiceId,
-            accountidLwc: this.accountid,
-            agencyProTypeLwc: this.agencyProType,
-            reopenLwc: this.reopen,
-            invoiceOrderRecoedschangeLwc: JSON.stringify(this.invoiceOrderRecoedschange)
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success" && r.msg == '') {
-                this.isShowSpinner = false;
-                console.log('save success');
-                let url = "/lexconinvoiceview?invoiceId=" + r.entity.invoiceId;
-                console.log('url = ' + url);
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: url,
-                    },
-                });
-            } else {
-                this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error));
-        });
-    }
-
-    //涓婁紶闄勪欢锛岀洿鎺ュ氨淇濆瓨濂斤紝鐒跺悗灞曠ず
-    handleFilesChange(event) {
-        console.log("handleFilesChange");
-        this.handleSave();
-        // if (event.target.files.length > 0) {
-            //     this.filesUploaded = event.target.files;
-            //     this.fileName = event.target.files[0].name;
-            //     this.handleSave();
-            // }
-        }
-        
-        handleSave() {
-        console.log("saveFile");
-        if (this.filesUploaded.length > 0) {
-            this.showPopSpinner = true;
-            this.file = this.filesUploaded[0];
-            if (this.file.size > this.MAX_FILE_SIZE) {
-                this.showMyToast('淇濆瓨澶辫触', '鏂囦欢杩囧ぇ', 'Error');
-                return;
-            }
-            this.fileReader = new FileReader();
-
-            this.fileReader.onloadend = () => {
-                this.fileContents = this.fileReader.result;
-                let base64 = "base64,";
-                this.content = this.fileContents.indexOf(base64) + base64.length;
-                this.fileContents = this.fileContents.substring(this.content);
-                this.saveToFile();
-            };
-            this.fileReader.readAsDataURL(this.file);
-        } else {
-            this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
-        }
-    }
-
-    saveToFile() {
-        console.log("saveToFile");
-        console.log("invoiceId = " + this.invoiceId);
-        console.log("fileName = " + this.fileName);
-        console.log("base64Data = " + encodeURIComponent(this.fileContents));
-        saveFile({
-            recordId: this.invoiceId,
-            fileName: this.fileName,
-            base64Data: encodeURIComponent(this.fileContents),
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r != '') {
-                this.showPopSpinner = false;
-                this.showMyToast('涓婁紶鎴愬姛', '', 'Success');
-                this.closePop();
-                this.init();
-            } else {
-                this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
-        });
-    }
-
-
-    handleTypeChange(event) {
-        console.log("handleTypeChange");
-        const typeDetail = event.detail;
-        console.log("typeDetail = " + JSON.stringify(typeDetail));
-        for (var i in this.fileData) {
-            if (this.fileData[i].recordId == typeDetail.data.recordId) {
-                this.fileData[i].typeValue = typeDetail.data.typeValue;
-                this.fileData[i].mailSelectOptsin = typeDetail.data.typeValue;
-            }
-        }
-        console.log("this.fileData = " + JSON.stringify(this.fileData));
-    }
-
-    newInvoiceJs() {
-        let url = "/lexconinvoiceview?isNew=yes";
-        console.log('url = ' + url);
-        this[NavigationMixin.Navigate]({
-            type: "standard__webPage",
-            attributes: {
-                url: url,
-            },
-        });
-    }
-
-    saveAttachmentJs() {
-        debugger
-        this.showLoadingSpinner = true;
-        let cloneData = this.deepClone(this.fileData)
-        for (var i in cloneData) {
-            delete cloneData[i].Id;
-            delete cloneData[i].recordId;
-            delete cloneData[i].url;
-            delete cloneData[i].Title;
-            delete cloneData[i].CreatedByName;
-            delete cloneData[i].CreatedByNameUrl;
-            delete cloneData[i].CreatedDate;
-            delete cloneData[i].typeValue;
-            delete cloneData[i].typeOptions;
-            delete cloneData[i].mailSelectOptsMap;
-        }
-        console.log('cloneData = ' + JSON.stringify(cloneData));
-        saveAttachment({
-            attachmentRecoedsLwc: JSON.stringify(cloneData),
-            invoiceId: this.invoiceId
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.showLoadingSpinner = false;
-                this.isShowSpinner = true;
-                // const event = new ShowToastEvent({
-                //     title: 'Success',
-                //     variant: 'Success',
-                //     message: '淇濆瓨鎴愬姛',
-                // });
-                // this.dispatchEvent(event);
-                this.showMyToast('闄勪欢淇濆瓨鎴愬姛', '', 'Success');
-                //this.init();
-                setTimeout(function () {
-                    //1绉掑悗鎵ц鍒锋柊
-                    window.location.reload();
-                }, 2000); //鍗曚綅鏄绉�                
-                // let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
-                // console.log('url = ' + url);
-                // this[NavigationMixin.Navigate]({
-                //     type: "standard__webPage",
-                //     attributes: {
-                //         url: url,
-                //     },
-                // });
-            } else {
-                this.showMyToast('涓婁紶澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '涓婁紶澶辫触', 'Error');
-        });
-    }
-
-    invoiceCodeSearchJs() {
-        this.isShowSpinner = true;
-        invoiceCodeSearch({
-            orderDateLwc: this.deliveryFromDate == null ? null : new Date(this.deliveryFromDate),
-            deliverDateLwc: this.deliveryToDate == null ? null : new Date(this.deliveryToDate),
-            invoiceStatusLwc: this.invoiceStatusValue,
-            category1Lwc: this.category1,
-            category2Lwc: this.category2,
-            accountidLwc: this.ConInvoiceListAccountId,
-            userWorkLocationLwc: this.ConInvoiceListUserWorkLocation,
-            agencyProTypeLwc: this.ConInvoiceListAgencyProType,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.invoiceData = r.entity.raesList;
-                for (var i in this.invoiceData) {
-                    this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
-                }
-                console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
-                this.isShowSpinner = false;
-                if (r.entity.raesListSize > 0) {
-                    this.showMyToast('鎼滅储鎴愬姛', '鍏辨绱㈠埌' + r.entity.raesListSize + '涓彂绁�', 'Success');
-                } else {
-                    this.showMyToast('鎼滅储澶辫触', '娌℃湁鎼滅储鍒扮浉鍏冲彂绁�', 'Error');
-                }
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
-        });
-    }
-
-    ClearJs() {
-        this.deliveryFromDate = '';
-        this.deliveryToDate = '';
-        this.category1 = '';
-        this.category2 = '';
-        this.invoiceStatusValue = '';
-        this.isShowSpinner = true;
-        conInvoiceListInit().then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("conInvoiceListInit r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.invoiceData = r.entity.raesList;
-                for (var i in this.invoiceData) {
-                    this.invoiceData[i]['NameUrl'] = '/lexconinvoiceview?invoiceId=' + this.invoiceData[i].Id;
-                }
-                console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
-                this.isShowSpinner = false;
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error));
-        });
-    }
-
-    InvoiceorderSearchJs() {
-        this.isShowSpinner = true;
-
-        debugger
-        let cloneData = this.outboundData
-        const selectedRows = this.template.querySelector("[data-field='outbound']").getSelectedRows();
-        console.log('selectedRows ' + JSON.stringify(selectedRows));
-        for (var i in cloneData) {
-            let b = false;
-            for (var j in selectedRows) {
-                if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
-                    b = true;
-                    cloneData[i].check = true;
-                }
-            }
-            if (!b) {
-                cloneData[i].check = false;
-            }
-            delete cloneData[i].esdOutboundDate;
-            delete cloneData[i].esdNameUrl;
-            delete cloneData[i].esdName;
-            delete cloneData[i].hospitalName;
-            delete cloneData[i].shipmentAmount;
-            delete cloneData[i].returnAmount;
-            delete cloneData[i].uninvoicedAmount;
-            delete cloneData[i].invoiceFaceAmount;
-            delete cloneData[i].invoiceFaceAmountUrl;
-        }
-
-        console.log('this.coc = ' + JSON.stringify(this.coc));
-        console.log('this.invoiceId = ' + this.invoiceId);
-        console.log('this.accountid = ' + this.accountid);
-        console.log('this.userWorkLocation = ' + this.userWorkLocation);
-        console.log('this.agencyProType = ' + this.agencyProType);
-        console.log('this.HospitalInfo = ' + this.HospitalInfo);
-        console.log('SecondDealer = ' + this.secondaryDistributor);
-        console.log('invoiceOrderRecoedsLwc = ' + JSON.stringify(cloneData));
-
-        InvoiceorderSearch({
-            cocLwc: this.coc,
-            invoiceIdLwc: this.invoiceId,
-            accountidLwc: this.accountid,
-            userWorkLocationLwc: this.userWorkLocation,
-            agencyProTypeLwc: this.agencyProType,
-            HospitalInfoLwc: this.HospitalInfo,
-            SecondDealerLwc: this.secondaryDistributor,
-            invoiceOrderRecoedsLwc: JSON.stringify(cloneData),
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.outboundData = r.entity.invoiceOrderRecoeds;
-                console.log('this.outboundData = ' + JSON.stringify(this.outboundData));
-                let index = 0;
-                this.selectedRows = [];
-                for (var i in this.outboundData) {
-
-                    if (this.outboundData[i].check)
-                        this.selectedRows.push(this.outboundData[i].esd.Id)
-                    this.outboundData[i].Id = this.outboundData[i].esd.Id;
-                    this.outboundData[i]['esdOutboundDate'] = this.outboundData[i].esd.Outbound_Date__c;
-                    this.outboundData[i]['esdNameUrl'] = '/s/lexsummonscreat?ESetid=' + this.outboundData[i].esd.Id;
-                    this.outboundData[i]['esdName'] = this.outboundData[i].esd.Name;
-                    if (this.EditAble) {
-                        this.outboundData[i]['hospitalName'] = this.outboundData[i].esd.ShipmentAccount__c;
-                        this.outboundData[i]['shipmentAmount'] = this.outboundData[i].esd.Shipment_total_amount__c;
-                        this.outboundData[i]['returnAmount'] = this.outboundData[i].esd.RrturnPro_total_amount__c;
-                    }
-                    this.outboundData[i]['uninvoicedAmount'] = this.outboundData[i].esd.InvoiceNotPro_money__c;
-                    this.outboundData[i]['invoiceFaceAmount'] = this.outboundData[i].needInvoiceCount;
-                    if (!(this.outboundData[i].esd.Billed_Status__c == '鍏ㄩ儴寮�绁�' || this.EditAble || this.coc.Invoice_status__c != '鑽夋涓�')) {
-                        //let url = "/ConInvoicedetails?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
-                        let url = "/s/lexconinvoiceview?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
-                        this.outboundData[i]['invoiceFaceAmountUrl'] = url;
-
-                        if (index == 0) {
-                            let object5 = {
-                                label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
-                                cellAttributes: { alignment: 'right' },
-                                type: 'url',
-                                fieldName: "invoiceFaceAmountUrl",
-                                typeAttributes: {
-                                    label: { fieldName: "invoiceFaceAmount" },
-                                    target: "_blank",
-                                },
-                                hideDefaultActions: true,
-                            };
-                            this.outboundColumns.push(object5)
-                            index++;
-                        }
-                    } else {
-                        if (index == 0) {
-                            let object5 = {
-                                label: '鍙戠エ绁ㄩ潰閲戦(鍏�)',
-                                cellAttributes: { alignment: 'right' },
-                                fieldName: "invoiceFaceAmount",
-                                hideDefaultActions: true,
-                            };
-                            this.outboundColumns.push(object5)
-                            index++;
-                        }
-                    }
-                    //璁$畻鍙戠エ绁ㄩ潰閲戦
-                    this.sumPrice += this.outboundData[i].needInvoiceCount;
-                }
-                console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows))
-                this.isShowSpinner = false;
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
-        });
-    }
-
-    getSelectedRows(event) {
-        // console.log("getSelectedRows ");
-        // for (var i in this.outboundData) {
-        //     this.outboundData[i].check = false;
-        // }
-        // const selectedRows = event.detail.selectedRows;
-        // for (var i in this.outboundData) {
-        //     for (var j in selectedRows) {
-        //         if (this.outboundData[i].esd.Id == selectedRows[j].esd.Id) {
-        //             //this.outboundData[i].check = !this.outboundData[i].check;
-        //             this.outboundData[i].check = true;
-        //         }
-        //     }
-        // }
-        // console.log('this.outboundData = ' + JSON.stringify(this.outboundData));
-    }
-
-    deleteButtonJs() {
-        this.isShowSpinner = true;
-        deleteButton({
-            cocLwc: this.coc,
-            invoiceIdLwc: this.invoiceId,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.isShowSpinner = false
-                let url = "/lexconinvoiceview";
-                console.log('url = ' + url);
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: url,
-                    },
-                });
-            } else {
-                this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-        });
-    }
-
-    SetEditAbleJs() {
-        let statusEditAbleJs = 'Redirect';
-        let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&KeyWords=' + statusEditAbleJs;
-        console.log('url = ' + url);
-        this[NavigationMixin.Navigate]({
-            type: "standard__webPage",
-            attributes: {
-                url: url,
-            },
-        });
-    }
-
-    approvalJs() {
-        this.isShowSpinner = true;
-        approval({
-            outOrderStringListLwc: this.outOrderStringListLwc,
-            outordercountMapLwc: this.outordercountMapLwc,
-            invoiceIdLwc: this.invoiceId
-
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.isShowSpinner = false
-                let url = "/s/lexconinvoiceview?invoiceId=" + this.invoiceId;
-                console.log('url = ' + url);
-                window.open(url, '_self');
-                // this[NavigationMixin.Navigate]({
-                //     type: "standard__webPage",
-                //     attributes: {
-                //         url: url,
-                //     },
-                // });
-            } else {
-                this.showMyToast('閿欒', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-        });
-    }
-
-    openReportJs() {
-        console.log("openReportJs");
-        let reportUrl = this.label.LexConInvoiceViewReport;
-        let reportFilters = '[{"operator":"equals","value":"' + this.OrderCode + '","column":"FK_NAME"}]';
-        console.log('reportUrl = ' + reportUrl);
-        let url = "/s/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters);
-        window.open(url);
-        // this[NavigationMixin.Navigate]({
-        //     type: "standard__webPage",
-        //     attributes: {
-        //         url: url,
-        //         target: '_blank'
-        //     },
-        // });
-    }
-
-    reopenJs() {
-        // statusEdit = 'Redirect';
-        // PageReference ref = new Pagereference('/ConInvoiceView?invoiceId=' + invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEdit);
-        let statusEditAbleJs = 'Redirect';
-        let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEditAbleJs;
-        console.log('url = ' + url);
-        this[NavigationMixin.Navigate]({
-            type: "standard__webPage",
-            attributes: {
-                url: url,
-            },
-        });
-    }
-
-    showMyToast(title, message, variant) {
-        this.isShowSpinner = false;
-        this.showLoadingSpinner = false;
-        this.showPopSpinner = false;
-        this.showAttPop = false;
-        this.filesUploaded = [];
-        this.fileName = null;
-        console.log('show custom message');
-        var iconName = '';
-        var content = '';
-        if (variant.toLowerCase() == 'success') {
-            iconName = 'utility:check';
-        } else {
-            iconName = 'utility:error';
-        }
-        if (message != '') {
-            content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
-        } else {
-            content = '<h2><strong>' + title + '<strong/></h2>';
-        }
-        this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
-    }
-
-    handleLoad() {
-        console.log('handleLoad')
-        try {
-            const style = document.createElement('style');
-            style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
-            this.template.querySelector('.hideHelpText').appendChild(style);
-
-            const style2 = document.createElement('style');
-            style2.innerText = '.hehe-layoutItem  .slds-form-element__label {padding : 0px}';
-            this.template.querySelector('.hideHelpText').appendChild(style2);
-
-            const style3 = document.createElement('style');
-            style3.innerText = '.readOnly  .slds-form-element__label {padding-top: 7px;}';
-            this.template.querySelector('.hideHelpText').appendChild(style3);
-        } catch (error) {
-            console.log(error);
-        }
-    }
-
-    keepTwoDecimalStr(num) {
-        const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
-        let s = result.toString();
-        let rs = s.indexOf('.');
-        if (rs < 0) {
-            rs = s.length;
-            s += '.';
-        }
-        while (s.length <= rs + 2) {
-            s += '0';
-        }
-        return s;
-    };
-
-    handleLoad2() {
-        console.log('handleLoad2')
-        try {
-            const style = document.createElement('style');
-            style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
-            this.template.querySelector('.hideHelpText').appendChild(style);
-
-            const style2 = document.createElement('style');
-            style2.innerText = '.hehe-layoutItem  .slds-form-element__label {padding : 0px}';
-            this.template.querySelector('.hideHelpText').appendChild(style2);
-        } catch (error) {
-            console.log(error);
-        }
-    }
-
-    handleUnitChange(event) {
-        console.log("handleUnitChange");
-        this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
-        const unitDetail = event.detail;
-        console.log("unitDetail = " + JSON.stringify(unitDetail));
-        for (var i in this.detailsData) {
-            if (this.detailsData[i].recordId == unitDetail.data.recordId) {
-                this.detailsData[i].unitValue = unitDetail.data.unitValue;
-                this.detailsData[i].esd.Invoice_Unit__c = unitDetail.data.unitValue;
-                if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1)
-                    this.detailsSelectedRows.push(this.detailsData[i].recordId);
-            }
-        }
-        this.detailsSelectedRows = [...this.detailsSelectedRows];
-
-
-        console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows))
-        for (var i in this.detailsData) {
-            this.detailsData[i].invoiceAllprice = 0.00;
-            for (var j in this.detailsSelectedRows) {
-                console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id);
-                console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]);
-                if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
-                    this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
-                    console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
-                }
-            }
-            this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
-        }
-        this.detailsData = [...this.detailsData];
-        this.invoiceAllpriceData = [...this.invoiceAllpriceData];
-    }
-
-    handleShipmentNumber(event) {
-        console.log("handleShipmentNumber");
-        this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
-        const numberDetail = event.detail;
-        console.log('numberDetail = ' + JSON.stringify(numberDetail))
-        if (numberDetail.data.shipmentnumber == 0) {
-            if (this.detailsSelectedRows.indexOf(numberDetail.data.recordId) != -1) {
-                this.detailsSelectedRows.splice(this.detailsSelectedRows.indexOf(numberDetail.data.recordId), 1);
-            }
-        }
-        console.log("start this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows));
-        console.log("numberDetail = " + JSON.stringify(numberDetail));
-        for (var i in this.detailsData) {
-            if (this.detailsData[i].recordId == numberDetail.data.recordId) {
-                this.detailsData[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
-                this.detailsData[i].invoiceCount = Number(numberDetail.data.shipmentnumber);
-                if (this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1 && numberDetail.data.shipmentnumber != 0)
-                    this.detailsSelectedRows.push(this.detailsData[i].recordId);
-            }
-        }
-
-        console.log("end this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows));
-        this.detailsSelectedRows = [...this.detailsSelectedRows];
-
-
-        console.log('this.detailsSelectedRows = ' + JSON.stringify(this.detailsSelectedRows));
-        for (var i in this.detailsData) {
-            this.detailsData[i].invoiceAllprice = 0.00;
-            for (var j in this.detailsSelectedRows) {
-                console.log('this.detailsData[i].Id = ' + this.detailsData[i].Id);
-                console.log('this.detailsSelectedRows[j] = ' + this.detailsSelectedRows[j]);
-                if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
-                    this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
-                    console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
-                }
-            }
-            this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
-        }
-        this.detailsData = [...this.detailsData];
-        this.invoiceAllpriceData = [...this.invoiceAllpriceData];
-    }
-
-    detailsGetSelectedRows(event) {
-        console.log("detailsGetSelectedRows ");
-        this.invoiceAllpriceData[0].invoiceAllprice = 0.00;
-        let selectedRows = event.detail.selectedRows;
-        for (var i in this.detailsData) {
-            this.detailsData[i].invoiceAllprice = 0.00;
-            for (var j in selectedRows) {
-                if (this.detailsData[i].Id == selectedRows[j].esd.Id) {
-                    this.detailsData[i].invoiceAllprice = this.amend(this.detailsData[i].shipmentNumber, this.detailsData[i].esdInvoiceUnitprice, '*');
-                    console.log('this.detailsData[i].invoiceAllprice = ' + this.detailsData[i].invoiceAllprice);
-                }
-            }
-            this.invoiceAllpriceData[0].invoiceAllprice = this.amend(this.invoiceAllpriceData[0].invoiceAllprice, this.detailsData[i].invoiceAllprice, '+');
-            console.log('this.invoiceAllpriceData[0].invoiceAllprice = ' + this.invoiceAllpriceData[0].invoiceAllprice);
-        }
-        console.log('start this.detailsData = ' + JSON.stringify(this.detailsData));
-        this.detailsData = [...this.detailsData];
-        console.log('end this.detailsData = ' + JSON.stringify(this.detailsData));
-        this.invoiceAllpriceData = [...this.invoiceAllpriceData];
-    }
-
-    ComputePrice(index, number, price) {
-        console.log("index = " + index);
-        console.log("number = " + number);
-        console.log("price = " + price);
-        let shipmentAmount = this.amend(number, price, "*");
-        console.log("shipmentAmount = " + shipmentAmount);
-        let sumPrice = 0.0;
-        this.data[index].shipmentAmount = shipmentAmount;
-        for (var i in this.data) {
-            if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
-        }
-        this.sumPrice = sumPrice + "鍏�";
-        //瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
-        if (this.selectedRows.indexOf(this.data[index].Id) == -1)
-            this.selectedRows.push(this.data[index].Id);
-        this.data = [...this.data];
-        this.selectedRows = [...this.selectedRows]
-        console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
-        console.log("this.data = " + JSON.stringify(this.data));
-    }
-
-    deepClone(obj) {
-        return JSON.parse(JSON.stringify(obj));
-    }
-
-    detailsSaveJs() {
-        this.isShowSpinner = true;
-        let cloneData = this.deepClone(this.detailsData);
-
-        let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
-        console.log('selectedRows = ' + JSON.stringify(selectedRows));
-
-        for (var i in cloneData) {
-            delete cloneData[i].Id;
-            delete cloneData[i].esdAssetModelNo;
-            delete cloneData[i].packingListManual;
-            delete cloneData[i].esdDeliveryListRMB;
-            delete cloneData[i].esdShipmentCount;
-            delete cloneData[i].esdRrturnProCount;
-            delete cloneData[i].esdBoxPiece;
-            delete cloneData[i].esdInvoicedProcount;
-            delete cloneData[i].esdInvoiceProNotCount;
-            delete cloneData[i].unitValue;
-            delete cloneData[i].recordId;
-            delete cloneData[i].unitOptions;
-            delete cloneData[i].esdInvoiceUnitprice;
-            delete cloneData[i].shipmentNumber;
-            delete cloneData[i].invoiceAllprice;
-            for (var j in selectedRows) {
-                if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
-                    cloneData[i]['check'] = true;
-                }
-            }
-        }
-        console.log('cloneData = ' + JSON.stringify(cloneData));
-
-
-
-        detailsSave({
-            consumableorderdetails1RecordsLwc: JSON.stringify(cloneData),
-            invoiceIdLwc: this.invoiceId,
-            orderIdLwc: this.orderId
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: url,
-                    },
-                });
-            } else {
-                this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-        });
-    }
-
-    //num1 num2浼犲叆涓や釜鍊�  symbol +-*/绗﹀彿
-    amend(num1, num2, symbol) {
-        var str1 = num1.toString(),
-            str2 = num2.toString(),
-            result,
-            str1Length,
-            str2Length;
-        //瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
-        try {
-            str1Length = str1.split(".")[1].length;
-        } catch (error) {
-            str1Length = 0;
-        }
-        try {
-            str2Length = str2.split(".")[1].length;
-        } catch (error) {
-            str2Length = 0;
-        }
-        var step = Math.pow(10, Math.max(str1Length, str2Length));
-        switch (symbol) {
-            case "+":
-                result = (num1 * step + num2 * step) / step;
-                break;
-            case "-":
-                result = (num1 * step - num2 * step) / step;
-                break;
-            case "*":
-                result = (num1 * step * (num2 * step)) / step / step;
-                break;
-            case "/":
-                result = (num1 * step) / (num2 * step);
-                break;
-            default:
-                break;
-        }
-        return result;
-    }
-
-    //鍒犻櫎闄勪欢
-    deleteAtt(event) {
-        this.isShowSpinner = true;
-        //var recordId = event.detail.data.recordId;
-        var recordId = event.target.getAttribute("data-fileid");
-        console.log('attid:' + recordId);
-        deleteAtt({
-            contentVersionId: recordId
-        }).then(r => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.showMyToast('鍒犻櫎鎴愬姛', '', 'Success');
-                if (this.fileData.length == 1)
-                    window.location.reload();
-                else
-                    this.init();
-            } else {
-                this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
-            }
-        }).catch(error => {
-            this.showMyToast('閿欒', error.message, 'Error');
+  stylesLoaded = false;
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
         })
+        .catch((error) => {
+          console.error("Error loading custom styles");
+        });
     }
-}
\ No newline at end of file
+  }
+
+  //鑾峰彇閾炬帴鍙傛暟
+  getQueryString(name) {
+    console.log("getQueryString name " + name);
+    let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+    let r = window.location.search.substr(1).match(reg);
+    if (r != null) {
+      return decodeURIComponent(r[2]);
+    }
+    return null;
+  }
+
+  connectedCallback() {
+    this.init();
+  }
+
+  init() {
+    this.isShowSpinner = true;
+    this.deliveryId = this.getQueryString("deliveryId");
+    this.deliveryId = this.deliveryId == null ? "" : this.deliveryId;
+    this.invoiceId = this.getQueryString("invoiceId");
+    this.invoiceId = this.invoiceId == null ? "" : this.invoiceId;
+    this.orderId = this.getQueryString("orderId");
+    this.orderId = this.orderId == null ? "" : this.orderId;
+    this.statusEdit = this.getQueryString("KeyWords");
+    this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
+    this.reopen = this.getQueryString("reopen");
+    this.reopen = this.reopen == null ? "" : this.reopen;
+    this.isNew = this.getQueryString("isNew");
+    this.isNew = this.isNew == null ? "" : this.isNew;
+    console.log(
+      "this.deliveryId = " +
+        this.deliveryId +
+        " this.invoiceId = " +
+        this.invoiceId +
+        " this.statusEdit = " +
+        this.statusEdit
+    );
+    if (this.invoiceId != "" && this.orderId != "") {
+      //杩涘叆coninvoiceDetails
+      detailsInit({
+        orderIdLwc: this.orderId,
+        invoiceIdLwc: this.invoiceId
+      })
+        .then((r) => {
+          r = JSON.parse(JSON.stringify(r));
+          if (r.status == "Success") {
+            this.detailsInvoiceId = r.entity.invoicecode.Id;
+            this.detailsCocId = r.entity.coc.Id;
+            this.detailsData = r.entity.consumableorderdetails1Records;
+            for (var i in this.detailsData) {
+              this.detailsData[i]["Id"] = this.detailsData[i].esd.Id;
+
+              this.detailsData[i]["esdAssetModelNo"] =
+                this.detailsData[i].esd.Asset_Model_No__c;
+              this.detailsData[i]["packingListManual"] =
+                this.detailsData[i].Packing_list_manual;
+              this.detailsData[i]["esdDeliveryListRMB"] =
+                this.detailsData[i].esd.Delivery_List_RMB__c;
+              this.detailsData[i]["esdShipmentCount"] =
+                this.detailsData[i].esd.Shipment_Count__c;
+              this.detailsData[i]["esdRrturnProCount"] =
+                this.detailsData[i].esd.RrturnPro_count__c;
+              this.detailsData[i]["esdBoxPiece"] =
+                this.detailsData[i].esd.Box_Piece__c;
+
+              this.detailsData[i]["esdInvoicedProcount"] =
+                this.detailsData[i].esd.Invoiced_Procount__c;
+              this.detailsData[i]["esdInvoiceProNotCount"] =
+                this.detailsData[i].esd.InvoiceProNot_count__c;
+              //寮�绁ㄥ崟浣�
+              //this.detailsData[i].esd.Box_Piece__c
+              //this.detailsData[i]['unitValue'] = this.detailsData[i].esd.Invoice_Unit__c;
+              this.detailsData[i]["unitValue"] =
+                this.detailsData[i].esd.Box_Piece__c;
+              console.log("unitValue = " + this.detailsData[i]["unitValue"]);
+              this.detailsData[i]["recordId"] = this.detailsData[i].esd.Id;
+              //disabled="{!IF(records.esd.Box_Piece__c =='涓�' || (records.esd.Box_Piece__c =='鐩�' && records.Packing_list_manual ==1),true,false)}"
+              //this.detailsData[i]['isDisabled'] = (this.detailsData[i].esd.Box_Piece__c == '涓�' || (this.detailsData[i].esd.Box_Piece__c =='鐩�' && this.detailsData[i].Packing_list_manual ==1)) ? true:false;
+              this.detailsData[i]["isDisabled"] = true;
+              let unitOptions = [];
+              for (var key in this.detailsData[i].Invoice_UnitOptsMap) {
+                let unitOption = {};
+                unitOption["label"] =
+                  this.detailsData[i].Invoice_UnitOptsMap[key];
+                unitOption["value"] = key;
+                unitOptions.push(unitOption);
+              }
+              this.detailsData[i]["unitOptions"] = unitOptions;
+              this.detailsData[i]["esdInvoiceUnitprice"] =
+                this.detailsData[i].esd.Invoice_Unitprice__c;
+              //鍙戠エ鏁伴噺
+              this.detailsData[i]["shipmentNumber"] =
+                this.detailsData[i].invoiceCount;
+              this.detailsData[i]["isConinvoice"] = true;
+              this.detailsData[i]["invoiceAllprice"] =
+                this.detailsData[i].invoiceAllprice;
+
+              if (this.detailsData[i].check) {
+                this.detailsSelectedRows.push(this.detailsData[i]["Id"]);
+                this.invoiceAllprice += this.detailsData[i]["invoiceAllprice"];
+              }
+            }
+
+            console.log(
+              "this.detailsData = " + JSON.stringify(this.detailsData)
+            );
+
+            let lastInvoiceAllprice = {
+              invoiceAllprice: this.invoiceAllprice
+            };
+            this.invoiceAllpriceData.push(lastInvoiceAllprice);
+            console.log(
+              "this.invoiceAllpriceData = " +
+                JSON.stringify(this.invoiceAllpriceData)
+            );
+
+            this.isShowSpinner = false;
+            this.isDetailsShow = true;
+          } else {
+            this.showMyToast("鍒濆鍖栧け璐�", r.msg, "Error");
+          }
+        })
+        .catch((error) => {
+          this.isShowSpinner = false;
+          console.log("error = " + JSON.stringify(error));
+        });
+    } else if (
+      this.deliveryId == "" &&
+      this.invoiceId == "" &&
+      this.isNew == ""
+    ) {
+      console.log("conInvoiceListInit");
+      conInvoiceListInit()
+        .then((r) => {
+          r = JSON.parse(JSON.stringify(r));
+          console.log("conInvoiceListInit r = " + JSON.stringify(r));
+          if (r.status == "Success") {
+            this.ConInvoiceListAccountId = r.entity.accountid;
+            this.ConInvoiceListUserWorkLocation = r.entity.userWorkLocation;
+
+            this.ConInvoiceListAgencyProType = r.entity.agencyProType;
+            //if (this.ConInvoiceListAgencyProType != 'ET')
+            this.isOpenReportDisabled = false;
+            this.invoiceData = r.entity.raesList;
+            for (var i in this.invoiceData) {
+              this.invoiceData[i]["NameUrl"] =
+                "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id;
+            }
+            console.log(
+              "this.invoiceData = " + JSON.stringify(this.invoiceData)
+            );
+            for (var key in r.entity.statusMap) {
+              let object = {};
+              object["label"] = key;
+              object["value"] = r.entity.statusMap[key];
+              this.invoiceStatusOptions.push(object);
+            }
+            this.invoiceStatusOptions = [...this.invoiceStatusOptions];
+            console.log(
+              "this.invoiceStatusOptions = " +
+                JSON.stringify(this.invoiceStatusOptions)
+            );
+            this.isShowSpinner = false;
+          } else {
+            this.showMyToast("鍒濆鍖栧け璐�", r.msg, "Error");
+          }
+        })
+        .catch((error) => {
+          console.log("error = " + JSON.stringify(error));
+        });
+    } else {
+      console.log("init");
+      this.isConInvoiceList = false;
+      init({
+        invoiceId: this.invoiceId,
+        statusEdit: this.statusEdit,
+        deliveryId: this.deliveryId
+      })
+        .then((r) => {
+          r = JSON.parse(JSON.stringify(r));
+          console.log("r = " + JSON.stringify(r));
+          if (r.status == "Success") {
+            this.coc = r.entity.coc;
+            this.cocId = this.coc.Id;
+            this.EditAble = r.entity.EditAble;
+            this.isChange = r.entity.isChange;
+            this.ExistOutbound = r.entity.ExistOutbound;
+            this.outboundData = r.entity.invoiceOrderRecoeds;
+            console.log(
+              "this.outboundData = " + JSON.stringify(this.outboundData)
+            );
+            this.done = r.entity.done;
+            this.accountid = r.entity.accountid;
+            this.userWorkLocation = r.entity.userWorkLocation;
+            this.outOrderStringListLwc = r.entity.outOrderStringList;
+            this.outordercountMapLwc = r.entity.outordercountMap;
+            this.invoiceOrderRecoedschange = r.entity.invoiceOrderRecoedschange;
+            this.isDisabledEdit =
+              this.coc.Invoice_status__c == "鎻愪氦" ||
+              this.coc.Invoice_status__c == "宸插畬鎴�"
+                ? true
+                : false;
+            this.isDisabledReopen =
+              this.coc.Invoice_status__c == "鎻愪氦" ? false : true;
+            this.isDisabledDelete =
+              this.coc.Invoice_status__c == "鑽夋涓�" ? false : true;
+            this.isDisabledAttachment =
+              this.coc.Invoice_status__c == "宸插畬鎴�" ? true : false;
+            this.OrderCode = this.coc.Name;
+            this.InvoiceDate = this.coc.Invoice_Date__c;
+
+            for (var i in this.outboundData) {
+              this.outboundData[i].Id = this.outboundData[i].esd.Id;
+              if (this.outboundData[i].check)
+                this.selectedRows.push(this.outboundData[i].esd.Id);
+            }
+            this.selectedRows = [...this.selectedRows];
+            console.log(
+              "r.entity.attachmentRecoeds = " +
+                JSON.stringify(r.entity.attachmentRecoeds)
+            );
+            if (!this.EditAble) {
+              //闄勪欢鏄剧ず
+              this.showLoadingSpinner = true;
+              this.fileData = r.entity.attachmentRecoeds;
+              for (var i in this.fileData) {
+                this.fileData[i]["Id"] = this.fileData[i].cvInfo.Id;
+                this.fileData[i]["recordId"] = this.fileData[i].cvInfo.Id;
+                this.fileData[i]["url"] = "/" + this.fileData[i].cvInfo.Id;
+                this.fileData[i]["Title"] = this.fileData[i].cvInfo.Title;
+                this.fileData[i]["CreatedByName"] =
+                  this.fileData[i].cvInfo.Owner.Name;
+                this.fileData[i]["CreatedByNameUrl"] =
+                  "/" + this.fileData[i].cvInfo.OwnerId;
+                this.fileData[i]["CreatedDate"] =
+                  this.fileData[i].cvInfo.CreatedDate;
+                this.fileData[i]["attUrl"] = "/" + this.fileData[i].cvInfo.Id;
+                this.fileData[i]["downloadUrl"] =
+                  "/sfc/servlet.shepherd/document/download/" +
+                  this.fileData[i].cvInfo.ContentDocumentId +
+                  "?operationContext=S1";
+                if (this.isDisabledAttachment) {
+                  console.log("杩涘叆this.isDisabledAttachment");
+                  this.fileData[i]["isDisabledAttachment"] = true;
+                }
+                let typeOptions = [];
+                for (var key in this.fileData[i].mailSelectOptsMap) {
+                  let typeOption = {};
+                  typeOption["label"] = this.fileData[i].mailSelectOptsMap[key];
+                  typeOption["value"] = key;
+                  typeOptions.push(typeOption);
+                }
+                this.fileData[i]["typeValue"] =
+                  this.fileData[i].mailSelectOptsin == null
+                    ? typeOptions[0].value
+                    : this.fileData[i].mailSelectOptsin;
+                this.fileData[i]["typeOptions"] = typeOptions;
+                this.fileData[i]["mailSelectOptsin"] =
+                  this.fileData[i].mailSelectOptsin == null
+                    ? typeOptions[0].value
+                    : this.fileData[i].mailSelectOptsin;
+              }
+              console.log("this.fileData = " + JSON.stringify(this.fileData));
+            }
+
+            //鍙戠エ鏄庣粏
+            this.invoiceOrderdetail1Recoeds =
+              r.entity.invoiceOrderdetail1Recoeds;
+            for (var i in this.invoiceOrderdetail1Recoeds) {
+              this.invoiceOrderdetail1Recoeds[i]["esdetProductOutDate"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.Product_OutDate__c;
+              this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedet1ODlinkName"] =
+                this.invoiceOrderdetail1Recoeds[
+                  i
+                ].esdet.Invoicedet1_OD_link__r.Name;
+              this.invoiceOrderdetail1Recoeds[i]["esdetAssetModelNo"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.Asset_Model_No__c;
+              this.invoiceOrderdetail1Recoeds[i]["esdetInvoiceUnit"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unit__c;
+              this.invoiceOrderdetail1Recoeds[i]["esdetInvoiceUnitprice"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.Invoice_Unitprice__c;
+              this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedCount"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.Invoiced_Count__c;
+              this.invoiceOrderdetail1Recoeds[i]["esdetInvoicedProCostRMB"] =
+                this.invoiceOrderdetail1Recoeds[i].esdet.InvoicedProCost_RMB__c;
+            }
+            //瀹㈡埛鍚�
+            this.HospitalName = r.entity.HospitalName;
+            this.HospitalInfo = r.entity.HospitalInfo;
+            this.agencyProType = r.entity.agencyProType;
+            //if (this.agencyProType != 'ET')
+            this.isOpenReportDisabled = false;
+            //绉戝
+            this.ForCustomerText = this.coc.Order_ForCustomerText__c;
+            //澶囨敞
+            this.InvoiceNote = this.coc.Invoice_Note__c;
+            //浜岀骇缁忛攢鍟�
+            for (var key in r.entity.provinceOptsMap) {
+              let object = {};
+              object["label"] = r.entity.provinceOptsMap[key];
+              object["value"] = key;
+              this.provinceOptsMap.push(object);
+            }
+            //鍑鸿揣涓�瑙坈olumns
+
+            if (this.EditAble) {
+              let object1 = {
+                label: "瀹㈡埛鍚�",
+                fieldName: "hospitalName",
+                hideDefaultActions: true,
+                wrapText: true
+              };
+              let object2 = {
+                label: "鍑鸿揣閲戦(鍏�)",
+                fieldName: "shipmentAmount",
+                type: "number",
+                typeAttributes: {
+                  minimumFractionDigits: 2
+                },
+                hideDefaultActions: true
+              };
+              let object3 = {
+                label: "杩斿搧閲戦(鍏�)",
+                fieldName: "returnAmount",
+                type: "number",
+                typeAttributes: {
+                  minimumFractionDigits: 2
+                },
+                hideDefaultActions: true
+              };
+              this.outboundColumns.push(object1);
+              this.outboundColumns.push(object2);
+              this.outboundColumns.push(object3);
+            }
+            let object4 = {
+              label: "鏈彂绁ㄩ噾棰�(鍏�)",
+              fieldName: "uninvoicedAmount",
+              type: "number",
+              typeAttributes: {
+                minimumFractionDigits: 2
+              },
+              hideDefaultActions: true
+            };
+            this.outboundColumns.push(object4);
+
+            //鍑鸿揣涓�瑙圖ata
+            let index = 0;
+            for (var i in this.outboundData) {
+              this.outboundData[i]["esdOutboundDate"] =
+                this.outboundData[i].esd.Outbound_Date__c;
+              this.outboundData[i]["esdNameUrl"] =
+                "/s/lexsummonscreat?ESetid=" + this.outboundData[i].esd.Id;
+              this.outboundData[i]["esdName"] = this.outboundData[i].esd.Name;
+              if (this.EditAble) {
+                this.outboundData[i]["hospitalName"] =
+                  this.outboundData[i].esd.ShipmentAccount__c;
+                this.outboundData[i]["shipmentAmount"] =
+                  this.outboundData[i].esd.Shipment_total_amount__c;
+                this.outboundData[i]["returnAmount"] =
+                  this.outboundData[i].esd.RrturnPro_total_amount__c;
+              }
+              this.outboundData[i]["uninvoicedAmount"] =
+                this.outboundData[i].esd.InvoiceNotPro_money__c;
+              this.outboundData[i]["invoiceFaceAmount"] =
+                this.keepTwoDecimalStr(this.outboundData[i].needInvoiceCount);
+              if (
+                !(
+                  this.outboundData[i].esd.Billed_Status__c == "鍏ㄩ儴寮�绁�" ||
+                  this.EditAble ||
+                  this.coc.Invoice_status__c != "鑽夋涓�"
+                )
+              ) {
+                console.log("杩涘叆 if");
+                let url =
+                  "/lexconinvoiceview?orderId=" +
+                  this.outboundData[i].esd.Id +
+                  "&invoiceId=" +
+                  this.invoiceId;
+                this.outboundData[i]["invoiceFaceAmountUrl"] = url;
+                if (index == 0) {
+                  let object5 = {
+                    label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+                    cellAttributes: { alignment: "right" },
+                    type: "url",
+                    fieldName: "invoiceFaceAmountUrl",
+                    typeAttributes: {
+                      label: {
+                        fieldName: "invoiceFaceAmount"
+                      }
+                      //target: "_blank",
+                    },
+                    hideDefaultActions: true
+                  };
+                  this.outboundColumns.push(object5);
+                  index++;
+                }
+              } else {
+                console.log("杩涘叆 else");
+                if (index == 0) {
+                  let object5 = {
+                    label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+                    cellAttributes: { alignment: "right" },
+                    fieldName: "invoiceFaceAmount",
+                    hideDefaultActions: true,
+                    type: "number",
+                    typeAttributes: {
+                      minimumFractionDigits: 2
+                    }
+                  };
+                  this.outboundColumns.push(object5);
+                  index++;
+                }
+              }
+              //璁$畻鍙戠エ绁ㄩ潰閲戦
+              this.sumPrice += this.outboundData[i].needInvoiceCount;
+            }
+
+            //鍥涜垗浜斿叆
+            //this.sumPrice = this.sumPrice.toFixed(2);
+            //濡傛灉涓嶅洓鑸嶄簲鍏�
+            console.log("start keepTwoDecimalStr");
+            this.sumPrice = this.keepTwoDecimalStr(this.sumPrice);
+            console.log("end keepTwoDecimalStr = " + this.sumPrice);
+            //鍔犳渶鍚庝竴琛屾樉绀洪噾棰�
+            if (this.EditAble) {
+              let lastOutboundData = {
+                invoiceFaceAmount: this.sumPrice
+              };
+              this.outboundDataSumPrice.push(lastOutboundData);
+            }
+            this.outboundColumns = [...this.outboundColumns];
+
+            this.isEditInvoice = !(!this.EditAble || this.isChange);
+            if (this.coc.SummonsForDirction__c == "閿�鍞粰浜岀骇缁忛攢鍟�")
+              this.isShowSecondaryDistributor = true;
+            if (this.deliveryId == "" && !this.ExistOutbound && this.EditAble)
+              this.hideCheckbox = false;
+            this.isShowSpinner = false;
+            this.showLoadingSpinner = false;
+          } else {
+            this.showMyToast("澶辫触", r.msg, "Error");
+          }
+        })
+        .catch((error) => {
+          console.log("error = " + JSON.stringify(error));
+        });
+    }
+  }
+
+  //涓婁紶閰嶇疆鍗�
+  uploadOrder(event) {
+    this.showAttPop = true;
+  }
+
+  //鍏抽棴闄勪欢寮圭獥
+  closePop() {
+    this.showAttPop = false;
+    this.filesUploaded = [];
+    this.fileName = null;
+  }
+
+  //闄勪欢change浜嬩欢
+  attChange(event) {
+    if (event.target.files.length > 0) {
+      this.filesUploaded = event.target.files;
+      this.fileName = event.target.files[0].name;
+      console.log("this.fileName:" + this.fileName);
+    }
+  }
+
+  //绉婚櫎闄勪欢
+  removeAtt() {
+    this.filesUploaded = [];
+    this.fileName = "";
+  }
+
+  //鏄惁鏄剧ず闄勪欢绉婚櫎
+  get attDelBtn() {
+    if (
+      this.fileName != "" &&
+      this.fileName != null &&
+      this.fileName != "閫夋嫨涓�涓枃浠朵笂浼�"
+    ) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  keepTwoDecimalStr(num) {
+    const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
+    let s = result.toString();
+    let rs = s.indexOf(".");
+    if (rs < 0) {
+      rs = s.length;
+      s += ".";
+    }
+    while (s.length <= rs + 2) {
+      s += "0";
+    }
+    return s;
+  }
+
+  dataChange(event) {
+    let fieldName = event.target.getAttribute("data-field");
+    let value = event.detail.value;
+    console.log("fieldName = " + fieldName + " value = " + value);
+    switch (fieldName) {
+      case "OrderCode":
+        this.OrderCode = value;
+        this.coc["Name"] = value;
+        break;
+      case "ForCustomerText":
+        this.ForCustomerText = value;
+        this.coc["Order_ForCustomerText__c"] = value;
+        break;
+      case "InvoiceDate":
+        this.InvoiceDate = value;
+        this.coc["Invoice_Date__c"] = value;
+        break;
+      case "secondaryDistributor":
+        this.secondaryDistributor = value;
+        break;
+      case "deliveryFromDate":
+        this.deliveryFromDate = value;
+        break;
+      case "deliveryToDate":
+        this.deliveryToDate = value;
+        break;
+      case "category1":
+        this.category1 = value;
+        break;
+      case "category2":
+        this.category2 = value;
+        break;
+      case "invoiceStatus":
+        this.invoiceStatusValue = value;
+        break;
+      case "searchHospitalName":
+        this.searchHospitalName = value;
+        break;
+      case "InvoiceNote":
+        this.InvoiceNote = value;
+        this.coc["Invoice_Note__c"] = value;
+        break;
+    }
+  }
+
+  invoiceDateChange(event) {
+    this.InvoiceDate = event.detail.value;
+    this.coc["Invoice_Date__c"] = event.detail.value;
+    console.log("this.InvoiceDate = " + this.InvoiceDate);
+  }
+
+  //鎼滅储瀹㈡埛鍚�
+  searchHospitalNameModal() {
+    console.log("searchHospitalNameModal");
+    hospitalInit({
+      ctype: this.agencyProType
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      if (r.status == "Success") {
+        this.hospitalList = r.entity.at;
+        for (var i in this.hospitalList) {
+          this.hospitalList[i]["stateMasterName"] =
+            this.hospitalList[i].State_Master__r.Name;
+        }
+        console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+        this.isModalOpen = true;
+      }
+    });
+  }
+
+  searchHospital() {
+    console.log("this.searchHospitalName = " + this.searchHospitalName);
+    serContact({
+      searchName: this.searchHospitalName,
+      ctype: this.agencyProType
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      if (r.status == "Success") {
+        this.hospitalList = r.entity.at;
+        for (var i in this.hospitalList) {
+          this.hospitalList[i]["stateMasterName"] =
+            this.hospitalList[i].State_Master__r.Name;
+        }
+        console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+      }
+    });
+  }
+
+  //閫夋嫨瀹㈡埛鍚�
+  searchHandleRowAction(event) {
+    console.log("searchHandleRowAction");
+    let row = event.detail.row;
+    this.HospitalInfo = row.Id;
+    this.HospitalName = row.Name;
+    console.log(
+      "this.HospitalInfo = " +
+        this.HospitalInfo +
+        " this.HospitalName = " +
+        this.HospitalName
+    );
+    this.isModalOpen = false;
+  }
+
+  //褰撳鎴峰悕鏄┖鏃躲�傚鎴穒d涔熷彉涓虹┖
+  clearAgencyI(event) {
+    this.HospitalName = event.target.value;
+    if (this.HospitalName == "" || this.HospitalName == null) {
+      this.HospitalInfo = "";
+    }
+    console.log("this.HospitalName = " + this.HospitalName);
+    console.log("this.HospitalInfo = " + this.HospitalInfo);
+  }
+
+  closeModal() {
+    this.isModalOpen = false;
+  }
+
+  SaveJs() {
+    this.isShowSpinner = true;
+    let cloneData = this.outboundData;
+
+    debugger;
+    const selectedRows = this.template
+      .querySelector("[data-field='outbound']")
+      .getSelectedRows();
+    console.log("selectedRows = " + JSON.stringify(selectedRows));
+
+    for (var i in cloneData) {
+      let b = false;
+      for (var j in selectedRows) {
+        if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
+          b = true;
+          cloneData[i].check = true;
+        }
+      }
+      if (!b) {
+        cloneData[i].check = false;
+      }
+      delete cloneData[i].esdOutboundDate;
+      delete cloneData[i].esdNameUrl;
+      delete cloneData[i].esdName;
+      delete cloneData[i].hospitalName;
+      delete cloneData[i].shipmentAmount;
+      delete cloneData[i].returnAmount;
+      delete cloneData[i].uninvoicedAmount;
+      delete cloneData[i].invoiceFaceAmount;
+      delete cloneData[i].invoiceFaceAmountUrl;
+    }
+
+    console.log("this.coc = " + JSON.stringify(this.coc));
+    console.log("this.HospitalName = " + this.HospitalName);
+    console.log("this.HospitalInfo = " + this.HospitalInfo);
+    console.log("this.secondaryDistributor = " + this.secondaryDistributor);
+    console.log("this.outboundData = " + JSON.stringify(cloneData));
+    console.log("this.deliveryId = " + this.deliveryId);
+    console.log("this.invoiceId = " + this.invoiceId);
+    console.log("this.accountid = " + this.accountid);
+    console.log("this.agencyProType = " + this.agencyProType);
+    console.log("this.reopen = " + this.reopen);
+    console.log(
+      "this.invoiceOrderRecoedschangeLwc = " +
+        JSON.stringify(this.invoiceOrderRecoedschange)
+    );
+    save({
+      cocLwc: this.coc,
+      HospitalNameLwc: this.HospitalName,
+      HospitalInfoLwc: this.HospitalInfo,
+      SecondDealerLwc: this.secondaryDistributor,
+      invoiceOrderRecoedsLwc: JSON.stringify(cloneData),
+      deliveryIdLwc: this.deliveryId,
+      invoiceIdLwc: this.invoiceId,
+      accountidLwc: this.accountid,
+      agencyProTypeLwc: this.agencyProType,
+      reopenLwc: this.reopen,
+      invoiceOrderRecoedschangeLwc: JSON.stringify(
+        this.invoiceOrderRecoedschange
+      )
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success" && r.msg == "") {
+          this.isShowSpinner = false;
+          console.log("save success");
+          let url = "/lexconinvoiceview?invoiceId=" + r.entity.invoiceId;
+          console.log("url = " + url);
+          this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+              url: url
+            }
+          });
+        } else {
+          this.showMyToast("淇濆瓨澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+      });
+  }
+
+  //涓婁紶闄勪欢锛岀洿鎺ュ氨淇濆瓨濂斤紝鐒跺悗灞曠ず
+  handleFilesChange(event) {
+    console.log("handleFilesChange");
+    this.handleSave();
+    // if (event.target.files.length > 0) {
+    //     this.filesUploaded = event.target.files;
+    //     this.fileName = event.target.files[0].name;
+    //     this.handleSave();
+    // }
+  }
+
+  handleSave() {
+    console.log("saveFile");
+    if (this.filesUploaded.length > 0) {
+      this.showPopSpinner = true;
+      this.file = this.filesUploaded[0];
+      if (this.file.size > this.MAX_FILE_SIZE) {
+        this.showMyToast("淇濆瓨澶辫触", "鏂囦欢杩囧ぇ", "Error");
+        return;
+      }
+      this.fileReader = new FileReader();
+
+      this.fileReader.onloadend = () => {
+        this.fileContents = this.fileReader.result;
+        let base64 = "base64,";
+        this.content = this.fileContents.indexOf(base64) + base64.length;
+        this.fileContents = this.fileContents.substring(this.content);
+        this.saveToFile();
+      };
+      this.fileReader.readAsDataURL(this.file);
+    } else {
+      this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
+    }
+  }
+
+  saveToFile() {
+    console.log("saveToFile");
+    console.log("invoiceId = " + this.invoiceId);
+    console.log("fileName = " + this.fileName);
+    console.log("base64Data = " + encodeURIComponent(this.fileContents));
+    saveFile({
+      recordId: this.invoiceId,
+      fileName: this.fileName,
+      base64Data: encodeURIComponent(this.fileContents)
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r != "") {
+          this.showPopSpinner = false;
+          this.showMyToast("涓婁紶鎴愬姛", "", "Success");
+          this.closePop();
+          this.init();
+        } else {
+          this.showMyToast("涓婁紶澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "涓婁紶澶辫触", "Error");
+      });
+  }
+
+  handleTypeChange(event) {
+    console.log("handleTypeChange");
+    const typeDetail = event.detail;
+    console.log("typeDetail = " + JSON.stringify(typeDetail));
+    for (var i in this.fileData) {
+      if (this.fileData[i].recordId == typeDetail.data.recordId) {
+        this.fileData[i].typeValue = typeDetail.data.typeValue;
+        this.fileData[i].mailSelectOptsin = typeDetail.data.typeValue;
+      }
+    }
+    console.log("this.fileData = " + JSON.stringify(this.fileData));
+  }
+
+  newInvoiceJs() {
+    let url = "/lexconinvoiceview?isNew=yes";
+    console.log("url = " + url);
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: url
+      }
+    });
+  }
+
+  saveAttachmentJs() {
+    debugger;
+    this.showLoadingSpinner = true;
+    let cloneData = this.deepClone(this.fileData);
+    for (var i in cloneData) {
+      delete cloneData[i].Id;
+      delete cloneData[i].recordId;
+      delete cloneData[i].url;
+      delete cloneData[i].Title;
+      delete cloneData[i].CreatedByName;
+      delete cloneData[i].CreatedByNameUrl;
+      delete cloneData[i].CreatedDate;
+      delete cloneData[i].typeValue;
+      delete cloneData[i].typeOptions;
+      delete cloneData[i].mailSelectOptsMap;
+    }
+    console.log("cloneData = " + JSON.stringify(cloneData));
+    saveAttachment({
+      attachmentRecoedsLwc: JSON.stringify(cloneData),
+      invoiceId: this.invoiceId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.showLoadingSpinner = false;
+          this.isShowSpinner = true;
+          // const event = new ShowToastEvent({
+          //     title: 'Success',
+          //     variant: 'Success',
+          //     message: '淇濆瓨鎴愬姛',
+          // });
+          // this.dispatchEvent(event);
+          this.showMyToast("闄勪欢淇濆瓨鎴愬姛", "", "Success");
+          //this.init();
+          setTimeout(function () {
+            //1绉掑悗鎵ц鍒锋柊
+            window.location.reload();
+          }, 2000); //鍗曚綅鏄绉�
+          // let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
+          // console.log('url = ' + url);
+          // this[NavigationMixin.Navigate]({
+          //     type: "standard__webPage",
+          //     attributes: {
+          //         url: url,
+          //     },
+          // });
+        } else {
+          this.showMyToast("涓婁紶澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "涓婁紶澶辫触", "Error");
+      });
+  }
+
+  invoiceCodeSearchJs() {
+    this.isShowSpinner = true;
+    invoiceCodeSearch({
+      orderDateLwc:
+        this.deliveryFromDate == null ? null : new Date(this.deliveryFromDate),
+      deliverDateLwc:
+        this.deliveryToDate == null ? null : new Date(this.deliveryToDate),
+      invoiceStatusLwc: this.invoiceStatusValue,
+      category1Lwc: this.category1,
+      category2Lwc: this.category2,
+      accountidLwc: this.ConInvoiceListAccountId,
+      userWorkLocationLwc: this.ConInvoiceListUserWorkLocation,
+      agencyProTypeLwc: this.ConInvoiceListAgencyProType
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.invoiceData = r.entity.raesList;
+          for (var i in this.invoiceData) {
+            this.invoiceData[i]["NameUrl"] =
+              "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id;
+          }
+          console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
+          this.isShowSpinner = false;
+          if (r.entity.raesListSize > 0) {
+            this.showMyToast(
+              "鎼滅储鎴愬姛",
+              "鍏辨绱㈠埌" + r.entity.raesListSize + "涓彂绁�",
+              "Success"
+            );
+          } else {
+            this.showMyToast("鎼滅储澶辫触", "娌℃湁鎼滅储鍒扮浉鍏冲彂绁�", "Error");
+          }
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "鎼滅储澶辫触", "Error");
+      });
+  }
+
+  ClearJs() {
+    this.deliveryFromDate = "";
+    this.deliveryToDate = "";
+    this.category1 = "";
+    this.category2 = "";
+    this.invoiceStatusValue = "";
+    this.isShowSpinner = true;
+    conInvoiceListInit()
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("conInvoiceListInit r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.invoiceData = r.entity.raesList;
+          for (var i in this.invoiceData) {
+            this.invoiceData[i]["NameUrl"] =
+              "/lexconinvoiceview?invoiceId=" + this.invoiceData[i].Id;
+          }
+          console.log("this.invoiceData = " + JSON.stringify(this.invoiceData));
+          this.isShowSpinner = false;
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+      });
+  }
+
+  InvoiceorderSearchJs() {
+    this.isShowSpinner = true;
+
+    debugger;
+    let cloneData = this.outboundData;
+    const selectedRows = this.template
+      .querySelector("[data-field='outbound']")
+      .getSelectedRows();
+    console.log("selectedRows " + JSON.stringify(selectedRows));
+    for (var i in cloneData) {
+      let b = false;
+      for (var j in selectedRows) {
+        if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
+          b = true;
+          cloneData[i].check = true;
+        }
+      }
+      if (!b) {
+        cloneData[i].check = false;
+      }
+      delete cloneData[i].esdOutboundDate;
+      delete cloneData[i].esdNameUrl;
+      delete cloneData[i].esdName;
+      delete cloneData[i].hospitalName;
+      delete cloneData[i].shipmentAmount;
+      delete cloneData[i].returnAmount;
+      delete cloneData[i].uninvoicedAmount;
+      delete cloneData[i].invoiceFaceAmount;
+      delete cloneData[i].invoiceFaceAmountUrl;
+    }
+
+    console.log("this.coc = " + JSON.stringify(this.coc));
+    console.log("this.invoiceId = " + this.invoiceId);
+    console.log("this.accountid = " + this.accountid);
+    console.log("this.userWorkLocation = " + this.userWorkLocation);
+    console.log("this.agencyProType = " + this.agencyProType);
+    console.log("this.HospitalInfo = " + this.HospitalInfo);
+    console.log("SecondDealer = " + this.secondaryDistributor);
+    console.log("invoiceOrderRecoedsLwc = " + JSON.stringify(cloneData));
+
+    InvoiceorderSearch({
+      cocLwc: this.coc,
+      invoiceIdLwc: this.invoiceId,
+      accountidLwc: this.accountid,
+      userWorkLocationLwc: this.userWorkLocation,
+      agencyProTypeLwc: this.agencyProType,
+      HospitalInfoLwc: this.HospitalInfo,
+      SecondDealerLwc: this.secondaryDistributor,
+      invoiceOrderRecoedsLwc: JSON.stringify(cloneData)
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.outboundData = r.entity.invoiceOrderRecoeds;
+          console.log(
+            "this.outboundData = " + JSON.stringify(this.outboundData)
+          );
+          let index = 0;
+          this.selectedRows = [];
+          for (var i in this.outboundData) {
+            if (this.outboundData[i].check)
+              this.selectedRows.push(this.outboundData[i].esd.Id);
+            this.outboundData[i].Id = this.outboundData[i].esd.Id;
+            this.outboundData[i]["esdOutboundDate"] =
+              this.outboundData[i].esd.Outbound_Date__c;
+            this.outboundData[i]["esdNameUrl"] =
+              "/s/lexsummonscreat?ESetid=" + this.outboundData[i].esd.Id;
+            this.outboundData[i]["esdName"] = this.outboundData[i].esd.Name;
+            if (this.EditAble) {
+              this.outboundData[i]["hospitalName"] =
+                this.outboundData[i].esd.ShipmentAccount__c;
+              this.outboundData[i]["shipmentAmount"] =
+                this.outboundData[i].esd.Shipment_total_amount__c;
+              this.outboundData[i]["returnAmount"] =
+                this.outboundData[i].esd.RrturnPro_total_amount__c;
+            }
+            this.outboundData[i]["uninvoicedAmount"] =
+              this.outboundData[i].esd.InvoiceNotPro_money__c;
+            this.outboundData[i]["invoiceFaceAmount"] =
+              this.outboundData[i].needInvoiceCount;
+            if (
+              !(
+                this.outboundData[i].esd.Billed_Status__c == "鍏ㄩ儴寮�绁�" ||
+                this.EditAble ||
+                this.coc.Invoice_status__c != "鑽夋涓�"
+              )
+            ) {
+              //let url = "/ConInvoicedetails?orderId=" + this.outboundData[i].esd.Id + "&invoiceId=" + this.invoiceId;
+              let url =
+                "/s/lexconinvoiceview?orderId=" +
+                this.outboundData[i].esd.Id +
+                "&invoiceId=" +
+                this.invoiceId;
+              this.outboundData[i]["invoiceFaceAmountUrl"] = url;
+
+              if (index == 0) {
+                let object5 = {
+                  label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+                  cellAttributes: { alignment: "right" },
+                  type: "url",
+                  fieldName: "invoiceFaceAmountUrl",
+                  typeAttributes: {
+                    label: {
+                      fieldName: "invoiceFaceAmount"
+                    },
+                    target: "_blank"
+                  },
+                  hideDefaultActions: true
+                };
+                this.outboundColumns.push(object5);
+                index++;
+              }
+            } else {
+              if (index == 0) {
+                let object5 = {
+                  label: "鍙戠エ绁ㄩ潰閲戦(鍏�)",
+                  cellAttributes: { alignment: "right" },
+                  fieldName: "invoiceFaceAmount",
+                  hideDefaultActions: true
+                };
+                this.outboundColumns.push(object5);
+                index++;
+              }
+            }
+            //璁$畻鍙戠エ绁ㄩ潰閲戦
+            this.sumPrice += this.outboundData[i].needInvoiceCount;
+          }
+          console.log(
+            "this.selectedRows = " + JSON.stringify(this.selectedRows)
+          );
+          this.isShowSpinner = false;
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "鎼滅储澶辫触", "Error");
+      });
+  }
+
+  getSelectedRows(event) {
+    // console.log("getSelectedRows ");
+    // for (var i in this.outboundData) {
+    //     this.outboundData[i].check = false;
+    // }
+    // const selectedRows = event.detail.selectedRows;
+    // for (var i in this.outboundData) {
+    //     for (var j in selectedRows) {
+    //         if (this.outboundData[i].esd.Id == selectedRows[j].esd.Id) {
+    //             //this.outboundData[i].check = !this.outboundData[i].check;
+    //             this.outboundData[i].check = true;
+    //         }
+    //     }
+    // }
+    // console.log('this.outboundData = ' + JSON.stringify(this.outboundData));
+  }
+
+  deleteButtonJs() {
+    this.isShowSpinner = true;
+    deleteButton({
+      cocLwc: this.coc,
+      invoiceIdLwc: this.invoiceId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.isShowSpinner = false;
+          let url = "/lexconinvoiceview";
+          console.log("url = " + url);
+          this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+              url: url
+            }
+          });
+        } else {
+          this.showMyToast("鍒犻櫎澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+      });
+  }
+
+  SetEditAbleJs() {
+    let statusEditAbleJs = "Redirect";
+    let url =
+      "/lexconinvoiceview?invoiceId=" +
+      this.invoiceId +
+      "&KeyWords=" +
+      statusEditAbleJs;
+    console.log("url = " + url);
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: url
+      }
+    });
+  }
+
+  approvalJs() {
+    this.isShowSpinner = true;
+    approval({
+      outOrderStringListLwc: this.outOrderStringListLwc,
+      outordercountMapLwc: this.outordercountMapLwc,
+      invoiceIdLwc: this.invoiceId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.isShowSpinner = false;
+          let url = "/s/lexconinvoiceview?invoiceId=" + this.invoiceId;
+          console.log("url = " + url);
+          window.open(url, "_self");
+          // this[NavigationMixin.Navigate]({
+          //     type: "standard__webPage",
+          //     attributes: {
+          //         url: url,
+          //     },
+          // });
+        } else {
+          this.showMyToast("閿欒", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+      });
+  }
+
+  openReportJs() {
+    console.log("openReportJs");
+    let reportUrl = this.label.LexConInvoiceViewReport;
+    let reportFilters =
+      '[{"operator":"equals","value":"' +
+      this.OrderCode +
+      '","column":"FK_NAME"}]';
+    console.log("reportUrl = " + reportUrl);
+    let url =
+      "/s/report/" +
+      reportUrl +
+      "?reportFilters=" +
+      encodeURIComponent(reportFilters);
+    window.open(url);
+    // this[NavigationMixin.Navigate]({
+    //     type: "standard__webPage",
+    //     attributes: {
+    //         url: url,
+    //         target: '_blank'
+    //     },
+    // });
+  }
+
+  reopenJs() {
+    // statusEdit = 'Redirect';
+    // PageReference ref = new Pagereference('/ConInvoiceView?invoiceId=' + invoiceId + '&reopen=isreopen' + '&KeyWords=' + statusEdit);
+    let statusEditAbleJs = "Redirect";
+    let url =
+      "/lexconinvoiceview?invoiceId=" +
+      this.invoiceId +
+      "&reopen=isreopen" +
+      "&KeyWords=" +
+      statusEditAbleJs;
+    console.log("url = " + url);
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: url
+      }
+    });
+  }
+
+  showMyToast(title, message, variant) {
+    this.isShowSpinner = false;
+    this.showLoadingSpinner = false;
+    this.showPopSpinner = false;
+    this.showAttPop = false;
+    this.filesUploaded = [];
+    this.fileName = null;
+    console.log("show custom message");
+    var iconName = "";
+    var content = "";
+    if (variant.toLowerCase() == "success") {
+      iconName = "utility:check";
+    } else {
+      iconName = "utility:error";
+    }
+    if (message != "") {
+      content =
+        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
+    } else {
+      content = "<h2><strong>" + title + "<strong/></h2>";
+    }
+    this.template
+      .querySelector("c-common-toast")
+      .showToast(variant, content, iconName, 10000);
+  }
+
+  handleLoad() {
+    console.log("handleLoad");
+    try {
+      const style = document.createElement("style");
+      style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}";
+      this.template.querySelector(".hideHelpText").appendChild(style);
+
+      const style2 = document.createElement("style");
+      style2.innerText =
+        ".hehe-layoutItem  .slds-form-element__label {padding : 0px}";
+      this.template.querySelector(".hideHelpText").appendChild(style2);
+
+      const style3 = document.createElement("style");
+      style3.innerText =
+        ".readOnly  .slds-form-element__label {padding-top: 7px;}";
+      this.template.querySelector(".hideHelpText").appendChild(style3);
+    } catch (error) {
+      console.log(error);
+    }
+  }
+
+  keepTwoDecimalStr(num) {
+    const result = Number(num.toString().match(/^\d+(?:\.\d{0,2})?/));
+    let s = result.toString();
+    let rs = s.indexOf(".");
+    if (rs < 0) {
+      rs = s.length;
+      s += ".";
+    }
+    while (s.length <= rs + 2) {
+      s += "0";
+    }
+    return s;
+  }
+
+  handleLoad2() {
+    console.log("handleLoad2");
+    try {
+      const style = document.createElement("style");
+      style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}";
+      this.template.querySelector(".hideHelpText").appendChild(style);
+
+      const style2 = document.createElement("style");
+      style2.innerText =
+        ".hehe-layoutItem  .slds-form-element__label {padding : 0px}";
+      this.template.querySelector(".hideHelpText").appendChild(style2);
+    } catch (error) {
+      console.log(error);
+    }
+  }
+
+  handleUnitChange(event) {
+    console.log("handleUnitChange");
+    this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
+    const unitDetail = event.detail;
+    console.log("unitDetail = " + JSON.stringify(unitDetail));
+    for (var i in this.detailsData) {
+      if (this.detailsData[i].recordId == unitDetail.data.recordId) {
+        this.detailsData[i].unitValue = unitDetail.data.unitValue;
+        this.detailsData[i].esd.Invoice_Unit__c = unitDetail.data.unitValue;
+        if (
+          this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) == -1
+        )
+          this.detailsSelectedRows.push(this.detailsData[i].recordId);
+      }
+    }
+    this.detailsSelectedRows = [...this.detailsSelectedRows];
+
+    console.log(
+      "this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows)
+    );
+    for (var i in this.detailsData) {
+      this.detailsData[i].invoiceAllprice = 0.0;
+      for (var j in this.detailsSelectedRows) {
+        console.log("this.detailsData[i].Id = " + this.detailsData[i].Id);
+        console.log(
+          "this.detailsSelectedRows[j] = " + this.detailsSelectedRows[j]
+        );
+        if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
+          this.detailsData[i].invoiceAllprice = this.amend(
+            this.detailsData[i].shipmentNumber,
+            this.detailsData[i].esdInvoiceUnitprice,
+            "*"
+          );
+          console.log(
+            "this.detailsData[i].invoiceAllprice = " +
+              this.detailsData[i].invoiceAllprice
+          );
+        }
+      }
+      this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+        this.invoiceAllpriceData[0].invoiceAllprice,
+        this.detailsData[i].invoiceAllprice,
+        "+"
+      );
+    }
+    this.detailsData = [...this.detailsData];
+    this.invoiceAllpriceData = [...this.invoiceAllpriceData];
+  }
+
+  handleShipmentNumber(event) {
+    console.log("handleShipmentNumber");
+    this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
+    const numberDetail = event.detail;
+    console.log("numberDetail = " + JSON.stringify(numberDetail));
+    if (numberDetail.data.shipmentnumber == 0) {
+      if (this.detailsSelectedRows.indexOf(numberDetail.data.recordId) != -1) {
+        this.detailsSelectedRows.splice(
+          this.detailsSelectedRows.indexOf(numberDetail.data.recordId),
+          1
+        );
+      }
+    }
+    console.log(
+      "start this.detailsSelectedRows = " +
+        JSON.stringify(this.detailsSelectedRows)
+    );
+    console.log("numberDetail = " + JSON.stringify(numberDetail));
+    for (var i in this.detailsData) {
+      if (this.detailsData[i].recordId == numberDetail.data.recordId) {
+        this.detailsData[i].shipmentNumber = Number(
+          numberDetail.data.shipmentnumber
+        );
+        this.detailsData[i].invoiceCount = Number(
+          numberDetail.data.shipmentnumber
+        );
+        if (
+          this.detailsSelectedRows.indexOf(this.detailsData[i].recordId) ==
+            -1 &&
+          numberDetail.data.shipmentnumber != 0
+        )
+          this.detailsSelectedRows.push(this.detailsData[i].recordId);
+      }
+    }
+
+    console.log(
+      "end this.detailsSelectedRows = " +
+        JSON.stringify(this.detailsSelectedRows)
+    );
+    this.detailsSelectedRows = [...this.detailsSelectedRows];
+
+    console.log(
+      "this.detailsSelectedRows = " + JSON.stringify(this.detailsSelectedRows)
+    );
+    for (var i in this.detailsData) {
+      this.detailsData[i].invoiceAllprice = 0.0;
+      for (var j in this.detailsSelectedRows) {
+        console.log("this.detailsData[i].Id = " + this.detailsData[i].Id);
+        console.log(
+          "this.detailsSelectedRows[j] = " + this.detailsSelectedRows[j]
+        );
+        if (this.detailsData[i].Id == this.detailsSelectedRows[j]) {
+          this.detailsData[i].invoiceAllprice = this.amend(
+            this.detailsData[i].shipmentNumber,
+            this.detailsData[i].esdInvoiceUnitprice,
+            "*"
+          );
+          console.log(
+            "this.detailsData[i].invoiceAllprice = " +
+              this.detailsData[i].invoiceAllprice
+          );
+        }
+      }
+      this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+        this.invoiceAllpriceData[0].invoiceAllprice,
+        this.detailsData[i].invoiceAllprice,
+        "+"
+      );
+    }
+    this.detailsData = [...this.detailsData];
+    this.invoiceAllpriceData = [...this.invoiceAllpriceData];
+  }
+
+  detailsGetSelectedRows(event) {
+    console.log("detailsGetSelectedRows ");
+    this.invoiceAllpriceData[0].invoiceAllprice = 0.0;
+    let selectedRows = event.detail.selectedRows;
+    for (var i in this.detailsData) {
+      this.detailsData[i].invoiceAllprice = 0.0;
+      for (var j in selectedRows) {
+        if (this.detailsData[i].Id == selectedRows[j].esd.Id) {
+          this.detailsData[i].invoiceAllprice = this.amend(
+            this.detailsData[i].shipmentNumber,
+            this.detailsData[i].esdInvoiceUnitprice,
+            "*"
+          );
+          console.log(
+            "this.detailsData[i].invoiceAllprice = " +
+              this.detailsData[i].invoiceAllprice
+          );
+        }
+      }
+      this.invoiceAllpriceData[0].invoiceAllprice = this.amend(
+        this.invoiceAllpriceData[0].invoiceAllprice,
+        this.detailsData[i].invoiceAllprice,
+        "+"
+      );
+      console.log(
+        "this.invoiceAllpriceData[0].invoiceAllprice = " +
+          this.invoiceAllpriceData[0].invoiceAllprice
+      );
+    }
+    console.log("start this.detailsData = " + JSON.stringify(this.detailsData));
+    this.detailsData = [...this.detailsData];
+    console.log("end this.detailsData = " + JSON.stringify(this.detailsData));
+    this.invoiceAllpriceData = [...this.invoiceAllpriceData];
+  }
+
+  ComputePrice(index, number, price) {
+    console.log("index = " + index);
+    console.log("number = " + number);
+    console.log("price = " + price);
+    let shipmentAmount = this.amend(number, price, "*");
+    console.log("shipmentAmount = " + shipmentAmount);
+    let sumPrice = 0.0;
+    this.data[index].shipmentAmount = shipmentAmount;
+    for (var i in this.data) {
+      if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
+    }
+    this.sumPrice = sumPrice + "鍏�";
+    //瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
+    if (this.selectedRows.indexOf(this.data[index].Id) == -1)
+      this.selectedRows.push(this.data[index].Id);
+    this.data = [...this.data];
+    this.selectedRows = [...this.selectedRows];
+    console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
+    console.log("this.data = " + JSON.stringify(this.data));
+  }
+
+  deepClone(obj) {
+    return JSON.parse(JSON.stringify(obj));
+  }
+
+  detailsSaveJs() {
+    this.isShowSpinner = true;
+    let cloneData = this.deepClone(this.detailsData);
+
+    let selectedRows = this.template
+      .querySelector("c-lex-custom-lightning-datatable")
+      .getSelectedRows();
+    console.log("selectedRows = " + JSON.stringify(selectedRows));
+
+    for (var i in cloneData) {
+      delete cloneData[i].Id;
+      delete cloneData[i].esdAssetModelNo;
+      delete cloneData[i].packingListManual;
+      delete cloneData[i].esdDeliveryListRMB;
+      delete cloneData[i].esdShipmentCount;
+      delete cloneData[i].esdRrturnProCount;
+      delete cloneData[i].esdBoxPiece;
+      delete cloneData[i].esdInvoicedProcount;
+      delete cloneData[i].esdInvoiceProNotCount;
+      delete cloneData[i].unitValue;
+      delete cloneData[i].recordId;
+      delete cloneData[i].unitOptions;
+      delete cloneData[i].esdInvoiceUnitprice;
+      delete cloneData[i].shipmentNumber;
+      delete cloneData[i].invoiceAllprice;
+      for (var j in selectedRows) {
+        if (cloneData[i].esd.Id == selectedRows[j].esd.Id) {
+          cloneData[i]["check"] = true;
+        }
+      }
+    }
+    console.log("cloneData = " + JSON.stringify(cloneData));
+
+    detailsSave({
+      consumableorderdetails1RecordsLwc: JSON.stringify(cloneData),
+      invoiceIdLwc: this.invoiceId,
+      orderIdLwc: this.orderId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          let url = "/lexconinvoiceview?invoiceId=" + this.invoiceId;
+          this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+              url: url
+            }
+          });
+        } else {
+          this.showMyToast("淇濆瓨澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+      });
+  }
+
+  //num1 num2浼犲叆涓や釜鍊�  symbol +-*/绗﹀彿
+  amend(num1, num2, symbol) {
+    var str1 = num1.toString(),
+      str2 = num2.toString(),
+      result,
+      str1Length,
+      str2Length;
+    //瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
+    try {
+      str1Length = str1.split(".")[1].length;
+    } catch (error) {
+      str1Length = 0;
+    }
+    try {
+      str2Length = str2.split(".")[1].length;
+    } catch (error) {
+      str2Length = 0;
+    }
+    var step = Math.pow(10, Math.max(str1Length, str2Length));
+    switch (symbol) {
+      case "+":
+        result = (num1 * step + num2 * step) / step;
+        break;
+      case "-":
+        result = (num1 * step - num2 * step) / step;
+        break;
+      case "*":
+        result = (num1 * step * (num2 * step)) / step / step;
+        break;
+      case "/":
+        result = (num1 * step) / (num2 * step);
+        break;
+      default:
+        break;
+    }
+    return result;
+  }
+
+  //鍒犻櫎闄勪欢
+  deleteAtt(event) {
+    this.isShowSpinner = true;
+    //var recordId = event.detail.data.recordId;
+    var recordId = event.target.getAttribute("data-fileid");
+    console.log("attid:" + recordId);
+    deleteAtt({
+      contentVersionId: recordId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        if (r.status == "Success") {
+          this.showMyToast("鍒犻櫎鎴愬姛", "", "Success");
+          if (this.fileData.length == 1) window.location.reload();
+          else this.init();
+        } else {
+          this.showMyToast("鍒犻櫎澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        this.showMyToast("閿欒", error.message, "Error");
+      });
+  }
+}
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.js b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
index 2ec7082..9d361ec 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.js
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
@@ -207,7 +207,7 @@
       wrapText: true,
       hideDefaultActions: true,
       sortable: true
-      // initialWidth: 150
+      // initialWidth: 136
     });
     cols.push({
       label: "瑙勬牸",
diff --git a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
index d2c33e0..17867c3 100644
--- a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
+++ b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.html
@@ -1,20 +1,20 @@
 <!-- sldsValidatorIgnore -->
 <!-- sldsValidatorIgnore -->
 <template>
-    <c-common-toast></c-common-toast>
-    <div class="outerBorderCss">
-        <div style="padding: 5px">
-            <div class="borderCss">
-                <div style="padding: 15px">
-                    <div lwc:dom="manual" class="resultDiv"></div>
-                    <div draggable="false">
-                        <!-- <div class="slds-m-top_small slds-m-bottom_medium"> -->
-                        <!-- <lightning-button label="鏂板缓鍑哄簱鍗�" onclick={neworderhead}
+  <c-common-toast></c-common-toast>
+  <div class="outerBorderCss">
+    <div style="padding: 5px">
+      <div class="borderCss">
+        <div style="padding: 15px">
+          <div lwc:dom="manual" class="resultDiv"></div>
+          <div draggable="false">
+            <!-- <div class="slds-m-top_small slds-m-bottom_medium"> -->
+            <!-- <lightning-button label="鏂板缓鍑哄簱鍗�" onclick={neworderhead}
                                 class="slds-m-left_x-small" disabled></lightning-button>
                             <lightning-button label="涓婁紶宸插嚭搴撲竴瑙�" onclick={editProductLimit}
                                 class="slds-m-left_x-small"></lightning-button> -->
-                        聽
-                        <!-- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
+            聽
+            <!-- <button class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
                             onclick={neworderhead}>
                             鏂板缓鍑哄簱鍗�
                         </button>
@@ -25,175 +25,233 @@
                             涓婁紶宸插嚭搴撲竴瑙�
                         </button> -->
 
-                        <lightning-layout multiple-rows>
-                            <lightning-layout-item size="6">
-                                <div class="slds-text-align_center">
-                                    <div class="slds-grid slds-grid_vertical-align-center">
-                                        <button
-                                            class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
-                                            onclick={neworderhead}>
-                                            鏂板缓鍑哄簱鍗�
-                                        </button>
-                                        聽
-                                        <div class="slds-form-element__label searchName" style="visibility: hidden">
-                                            鍑哄簱鏃�&#12288;浠�
-                                        </div>
-                                        <div class="slds-form-element__label searchName" style="visibility: hidden">
-                                            &#12288;鍒�
-                                        </div>
-                                        <button
-                                            class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
-                                            onclick={editProductLimit} style="margin-left: 4px;">
-                                            涓婁紶宸插嚭搴撲竴瑙�
-                                        </button>
-                                    </div>
-                                </div>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                        <!-- </div> -->
+            <lightning-layout multiple-rows>
+              <lightning-layout-item size="6">
+                <div class="slds-text-align_center">
+                  <div class="slds-grid slds-grid_vertical-align-center">
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
+                      onclick={neworderhead}
+                    >
+                      鏂板缓鍑哄簱鍗�
+                    </button>
+                    聽
+                    <div
+                      class="slds-form-element__label searchName"
+                      style="visibility: hidden"
+                    >
+                      鍑哄簱鏃�&#12288;浠�
                     </div>
-                </div>
-            </div>
-
-            <div class="borderCss">
-                <div class="headerDorderCss">
-                    <lightning-layout>
-                        <lightning-layout-item padding="around-small">
-                            <p style="font-size: 18px">
-                                <strong>妫�绱㈡潯浠�</strong>
-                            </p>
-                        </lightning-layout-item>
-                    </lightning-layout>
-                </div>
-                <div style="padding: 15px">
-                    <div lwc:dom="manual" class="resultDiv"></div>
-                    <div draggable="false">
-                        <lightning-layout multiple-rows>
-                            <lightning-layout-item size="6">
-                                <div class="slds-text-align_center">
-                                    <lightning-layout multiple-rows>
-                                        <lightning-layout-item size="6">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label searchName">
-                                                    鍑哄簱鏃�&#12288;浠�
-                                                </div>
-                                                <lightning-input type="date" variant="label-hidden" label="鍑哄簱鏃� 浠�"
-                                                    onchange={dataChange} data-field="deliveryFromDate"
-                                                    value={deliveryFromDate} class="inputFont"
-                                                    style="max-width: 150px;"></lightning-input>
-                                            </div>
-                                        </lightning-layout-item>
-
-                                        <lightning-layout-item size="6">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label searchName">
-                                                    鍒�
-                                                </div>
-                                                <lightning-input type="date" variant="label-hidden" label="鍒�"
-                                                    onchange={dataChange} data-field="deliveryToDate"
-                                                    value={deliveryToDate} class="inputFont"
-                                                    style="max-width: 150px;"></lightning-input>
-                                            </div>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-                                </div>
-                            </lightning-layout-item>
-
-                            <lightning-layout-item size="3">
-                                <div class="slds-text-align_center">
-                                    <div class="slds-grid slds-grid_vertical-align-center">
-                                        <div class="slds-form-element__label searchName">
-                                            鍑哄簱鍗曞彿
-                                        </div>
-                                        <lightning-input variant="label-hidden" label="鍑哄簱鍗曞彿" onchange={dataChange}
-                                            data-field="deliveryOrderNo" value={deliveryOrderNo} class="inputFont"
-                                            style="max-width: 150px;"></lightning-input>
-                                    </div>
-                                </div>
-                            </lightning-layout-item>
-
-                            <lightning-layout-item>
-                                <div class="slds-text-align_center">
-                                    <div class="slds-grid slds-grid_vertical-align-center">
-                                        <div class="slds-form-element__label searchName">
-                                            瀹㈡埛鍚�
-                                        </div>
-                                        <lightning-input variant="label-hidden" label="瀹㈡埛鍚�" onchange={dataChange}
-                                            data-field="contactName" value={contactName} class="inputFont"
-                                            style="max-width: 150px;"></lightning-input>
-                                    </div>
-                                </div>
-                            </lightning-layout-item>
-                        </lightning-layout>
-
-                        <lightning-layout multiple-rows style="margin-top: 20px">
-                            <lightning-layout-item size="6">
-                                <lightning-layout multiple-rows>
-                                    <lightning-layout-item size="6">
-                                        <button
-                                            class="slds-button slds-button_neutral slds-button_stretch  lexsearchStyle"
-                                            onclick={searchConsumableorderdetailsJs} style="min-width: 180px;">
-                                            杩樻病鍑哄簱鐨勫嚭搴撳崟
-                                        </button>
-                                    </lightning-layout-item>
-
-                                    <lightning-layout-item size="6">
-                                        <button
-                                            class="slds-button slds-button_neutral slds-button_stretch  lexsearchStyle"
-                                            onclick={searchOrderInstatusJs} style="min-width: 215px;">
-                                            宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�
-                                        </button>
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                            </lightning-layout-item>
-
-                            <lightning-layout-item size="3">
-                                <button class="slds-button slds-button_neutral slds-button_stretch  lexsearchStyle"
-                                    onclick={searchConsumableorFinishJs} style="min-width: 225px">
-                                    宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
-                                </button>
-                            </lightning-layout-item>
-
-                            <lightning-layout-item>
-                                <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-                                    onclick={clearJs} style="width: 206px;">
-                                    娓呯┖
-                                </button>
-                            </lightning-layout-item>
-                        </lightning-layout>
+                    <div
+                      class="slds-form-element__label searchName"
+                      style="visibility: hidden"
+                    >
+                      &#12288;鍒�
                     </div>
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexBorder lexBorderWidth"
+                      onclick={editProductLimit}
+                      style="margin-left: 4px"
+                    >
+                      涓婁紶宸插嚭搴撲竴瑙�
+                    </button>
+                  </div>
                 </div>
-            </div>
-
-            <div class="borderCss">
-                <template if:true={isShowSpinner}>
-                    <div class="slds-spinner_container">
-            聽 聽 聽 聽 聽 聽 <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
-            聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span>
-            聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-a"></div>
-            聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-b"></div>
-                聽 聽 聽 聽 </div>
-            聽 聽 聽 聽 </div>
-                </template>
-                <div class="headerDorderCss">
-                    <lightning-layout>
-                        <lightning-layout-item padding="around-small">
-                            <p style="font-size: 18px">
-                                <strong>鍑哄簱鍗曚竴瑙堣〃</strong>
-                            </p>
-                        </lightning-layout-item>
-                    </lightning-layout>
-                </div>
-                <template if:true={showTable}>
-                    <div style="padding: 7px; height: 500px">
-                        <lightning-datatable key-field="id" data={data} columns={columns}
-                            hide-checkbox-column default-sort-direction={defaultSortDirection}
-                            sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
-                            class="wrapped-header-datatable">
-                        </lightning-datatable>
-                    </div>
-                </template>
-            </div>
+              </lightning-layout-item>
+            </lightning-layout>
+            <!-- </div> -->
+          </div>
         </div>
+      </div>
+
+      <div class="borderCss">
+        <div class="headerDorderCss">
+          <lightning-layout>
+            <lightning-layout-item padding="around-small">
+              <p style="font-size: 18px">
+                <strong>妫�绱㈡潯浠�</strong>
+              </p>
+            </lightning-layout-item>
+          </lightning-layout>
+        </div>
+        <div style="padding: 15px">
+          <div lwc:dom="manual" class="resultDiv"></div>
+          <div draggable="false">
+            <lightning-layout multiple-rows>
+              <lightning-layout-item size="6">
+                <div class="slds-text-align_center">
+                  <lightning-layout multiple-rows>
+                    <lightning-layout-item size="6">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div class="slds-form-element__label searchName">
+                          鍑哄簱鏃�&#12288;浠�
+                        </div>
+                        <lightning-input
+                          type="date"
+                          variant="label-hidden"
+                          label="鍑哄簱鏃� 浠�"
+                          onchange={dataChange}
+                          data-field="deliveryFromDate"
+                          value={deliveryFromDate}
+                          class="inputFont"
+                          style="max-width: 150px"
+                        ></lightning-input>
+                      </div>
+                    </lightning-layout-item>
+
+                    <lightning-layout-item size="6">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div class="slds-form-element__label searchName">
+                          鍒�
+                        </div>
+                        <lightning-input
+                          type="date"
+                          variant="label-hidden"
+                          label="鍒�"
+                          onchange={dataChange}
+                          data-field="deliveryToDate"
+                          value={deliveryToDate}
+                          class="inputFont"
+                          style="max-width: 150px"
+                        ></lightning-input>
+                      </div>
+                    </lightning-layout-item>
+                  </lightning-layout>
+                </div>
+              </lightning-layout-item>
+
+              <lightning-layout-item size="3">
+                <div class="slds-text-align_center">
+                  <div class="slds-grid slds-grid_vertical-align-center">
+                    <div class="slds-form-element__label searchName">
+                      鍑哄簱鍗曞彿
+                    </div>
+                    <lightning-input
+                      variant="label-hidden"
+                      label="鍑哄簱鍗曞彿"
+                      onchange={dataChange}
+                      data-field="deliveryOrderNo"
+                      value={deliveryOrderNo}
+                      class="inputFont"
+                      style="max-width: 150px"
+                    ></lightning-input>
+                  </div>
+                </div>
+              </lightning-layout-item>
+
+              <lightning-layout-item>
+                <div class="slds-text-align_center">
+                  <div class="slds-grid slds-grid_vertical-align-center">
+                    <div class="slds-form-element__label searchName">
+                      瀹㈡埛鍚�
+                    </div>
+                    <lightning-input
+                      variant="label-hidden"
+                      label="瀹㈡埛鍚�"
+                      onchange={dataChange}
+                      data-field="contactName"
+                      value={contactName}
+                      class="inputFont"
+                      style="max-width: 150px"
+                    ></lightning-input>
+                  </div>
+                </div>
+              </lightning-layout-item>
+            </lightning-layout>
+
+            <lightning-layout multiple-rows style="margin-top: 20px">
+              <lightning-layout-item size="6">
+                <lightning-layout multiple-rows>
+                  <lightning-layout-item size="6">
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                      onclick={searchConsumableorderdetailsJs}
+                      style="min-width: 180px"
+                    >
+                      杩樻病鍑哄簱鐨勫嚭搴撳崟
+                    </button>
+                  </lightning-layout-item>
+
+                  <lightning-layout-item size="6">
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                      onclick={searchOrderInstatusJs}
+                      style="min-width: 215px"
+                    >
+                      宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�
+                    </button>
+                  </lightning-layout-item>
+                </lightning-layout>
+              </lightning-layout-item>
+
+              <lightning-layout-item size="3">
+                <button
+                  class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                  onclick={searchConsumableorFinishJs}
+                  style="min-width: 225px"
+                >
+                  宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
+                </button>
+              </lightning-layout-item>
+
+              <lightning-layout-item>
+                <button
+                  class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                  onclick={clearJs}
+                  style="width: 206px"
+                >
+                  娓呯┖
+                </button>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+        </div>
+      </div>
+
+      <div class="borderCss">
+        <template if:true={isShowSpinner}>
+          <div class="slds-spinner_container">
+            聽 聽 聽 聽 聽 聽
+            <div
+              role="status"
+              class="slds-spinner slds-spinner_medium slds-spinner_brand"
+            >
+              聽 聽 聽 聽 聽 聽 聽 聽
+              <span class="slds-assistive-text">Loading</span> 聽 聽 聽 聽 聽 聽 聽 聽
+              <div class="slds-spinner__dot-a"></div>
+              聽 聽 聽 聽 聽 聽 聽 聽
+              <div class="slds-spinner__dot-b"></div>
+              聽 聽 聽 聽
+            </div>
+            聽 聽 聽 聽
+          </div>
+        </template>
+        <div class="headerDorderCss">
+          <lightning-layout>
+            <lightning-layout-item padding="around-small">
+              <p style="font-size: 18px">
+                <strong>鍑哄簱鍗曚竴瑙堣〃</strong>
+              </p>
+            </lightning-layout-item>
+          </lightning-layout>
+        </div>
+        <template if:true={showTable}>
+          <div style="padding: 7px; height: 500px">
+            <lightning-datatable
+              key-field="id"
+              data={data}
+              columns={columns}
+              hide-checkbox-column
+              default-sort-direction={defaultSortDirection}
+              sorted-direction={sortDirection}
+              sorted-by={sortedBy}
+              onsort={onHandleSort}
+              class="wrapped-header-datatable"
+            >
+            </lightning-datatable>
+          </div>
+        </template>
+      </div>
     </div>
-</template>
\ No newline at end of file
+  </div>
+</template>
diff --git a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
index 17153ab..c0f551c 100644
--- a/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
+++ b/force-app/main/default/lwc/lexSaleAndDelivery/lexSaleAndDelivery.js
@@ -1,409 +1,427 @@
-import { LightningElement, wire, api, track } from 'lwc';
-import { NavigationMixin } from 'lightning/navigation';
-import init from '@salesforce/apex/LexSaleAndDeliveryController.init';//cleanUp
-import cleanUp from '@salesforce/apex/LexSaleAndDeliveryController.cleanUp';
+import { LightningElement, wire, api, track } from "lwc";
+import { NavigationMixin } from "lightning/navigation";
+import init from "@salesforce/apex/LexSaleAndDeliveryController.init"; //cleanUp
+import cleanUp from "@salesforce/apex/LexSaleAndDeliveryController.cleanUp";
 import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import searchOrderInstatus from '@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus';
-import searchConsumableorderdetails from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails';
-import searchConsumableorFinish from '@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish';
-//table css 
+import searchOrderInstatus from "@salesforce/apex/LexSaleAndDeliveryController.searchOrderInstatus";
+import searchConsumableorderdetails from "@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorderdetails";
+import searchConsumableorFinish from "@salesforce/apex/LexSaleAndDeliveryController.searchConsumableorFinish";
+//table css
 import { loadStyle } from "lightning/platformResourceLoader";
 import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
 
 const columns = [
-    {
-        label: '鍑哄簱鏃�',
-        fieldName: 'Outbound_Date__c',
-        type: 'date',
-        hideDefaultActions: true,
-        sortable: true,
-        wrapText: true,
+  {
+    label: "鍑哄簱鏃�",
+    fieldName: "Outbound_Date__c",
+    type: "date",
+    hideDefaultActions: true,
+    sortable: true,
+    wrapText: true
+  },
+  {
+    label: "鍑哄簱鍗曞彿",
+    fieldName: "url",
+    type: "url",
+    initialWidth: 250,
+    typeAttributes: {
+      label: {
+        fieldName: "Name"
+      },
+      target: "_blank"
     },
-    {
-        label: '鍑哄簱鍗曞彿',
-        fieldName: 'url',
-        type: 'url',
-        typeAttributes: {
-            label: {
-                fieldName: 'Name'
-            },
-            target: '_blank'
-        },
-        hideDefaultActions: true,
-        sortable: true,
-        wrapText: true,
+    hideDefaultActions: true,
+    sortable: true,
+    wrapText: true
+  },
+  {
+    label: "瀹㈡埛鍚�",
+    fieldName: "ShipmentAccount__c",
+    hideDefaultActions: true,
+    initialWidth: 250,
+    wrapText: true,
+    sortable: true
+  },
+  {
+    label: "绉戝",
+    fieldName: "Order_ForCustomerText__c",
+    hideDefaultActions: true,
+    initialWidth: 130,
+    wrapText: true
+  },
+  {
+    label: "鍑哄簱鍗曠姸鎬�",
+    fieldName: "SummonsStatus_c__c",
+    hideDefaultActions: true,
+    sortable: true,
+    wrapText: true
+  },
+  {
+    label: "寮�绁ㄧ姸鎬�",
+    fieldName: "Billed_Status__c",
+    hideDefaultActions: true,
+    initialWidth: 130,
+    sortable: true,
+    wrapText: true
+  },
+  {
+    label: "鏈彂绁ㄩ噾棰�(鍏�)",
+    fieldName: "InvoiceNotPro_money__c",
+    hideDefaultActions: true,
+    type: "number",
+    typeAttributes: {
+      minimumFractionDigits: 2
     },
-    {
-        label: '瀹㈡埛鍚�',
-        fieldName: 'ShipmentAccount__c',
-        hideDefaultActions: true,
-        wrapText: true,
-        sortable: true
-    },
-    {
-        label: '绉戝',
-        fieldName: 'Order_ForCustomerText__c',
-        hideDefaultActions: true,
-        wrapText: true,
-    },
-    {
-        label: '鍑哄簱鍗曠姸鎬�',
-        fieldName: 'SummonsStatus_c__c',
-        hideDefaultActions: true,
-        sortable: true,
-        wrapText: true,
-    },
-    {
-        label: '寮�绁ㄧ姸鎬�',
-        fieldName: 'Billed_Status__c',
-        hideDefaultActions: true,
-        sortable: true,
-        wrapText: true,
-    },
-    {
-        label: '鏈彂绁ㄩ噾棰�(鍏�)',
-        fieldName: 'InvoiceNotPro_money__c',
-        hideDefaultActions: true,
-        type: "number",
-        typeAttributes: {
-            minimumFractionDigits: 2,
-        },
-        wrapText: true,
-    },
-    {
-        label: '鍒涘缓鏃ユ湡',
-        fieldName: 'CreatedDate',
-        hideDefaultActions: true,
-        sortable: true,
-        wrapText: true,
-        type: "date",
-        typeAttributes: {
-            timeZone: "Asia/Shanghai",
-            day: "numeric",
-            month: "numeric",
-            year: "numeric",
-            hour: "2-digit",
-            minute: "2-digit"
-        },
+    wrapText: true
+  },
+  {
+    label: "鍒涘缓鏃ユ湡",
+    fieldName: "CreatedDate",
+    hideDefaultActions: true,
+    sortable: true,
+    wrapText: true,
+    type: "date",
+    typeAttributes: {
+      timeZone: "Asia/Shanghai",
+      day: "numeric",
+      month: "numeric",
+      year: "numeric",
+      hour: "2-digit",
+      minute: "2-digit"
     }
+  }
 ];
-export default class LexSaleAndDelivery extends NavigationMixin(LightningElement) {
-    columns = columns;
-    @track isShowSpinner = true;
-    @track message = '';
-    @track deliveryFromDate = '';
-    @track deliveryToDate = '';
-    @track deliveryOrderNo = '';
-    @track contactName = '';
-    @track data = [];
-    @track userinfoId = '';
-    @track accountid = '';
-    @track agencyProType = '';
-    @track userWorkLocation = '';
-    @track showTable = false;
-    @track hidecheckboxcolumn = true;
+export default class LexSaleAndDelivery extends NavigationMixin(
+  LightningElement
+) {
+  columns = columns;
+  @track isShowSpinner = true;
+  @track message = "";
+  @track deliveryFromDate = "";
+  @track deliveryToDate = "";
+  @track deliveryOrderNo = "";
+  @track contactName = "";
+  @track data = [];
+  @track userinfoId = "";
+  @track accountid = "";
+  @track agencyProType = "";
+  @track userWorkLocation = "";
+  @track showTable = false;
+  @track hidecheckboxcolumn = true;
 
-    //鎺掑簭
-    defaultSortDirection = 'asc';
-    sortDirection = 'asc';
-    sortedBy;
+  //鎺掑簭
+  defaultSortDirection = "asc";
+  sortDirection = "asc";
+  sortedBy;
 
-
-    stylesLoaded = false;
-    renderedCallback() {
-        if (!this.stylesLoaded) {
-            Promise.all([loadStyle(this, WrappedHeaderTable)])
-                .then(() => {
-                    console.log("Custom styles loaded");
-                    this.stylesLoaded = true;
-                })
-                .catch((error) => {
-                    console.error("Error loading custom styles");
-                });
-        }
-    }
-
-    connectedCallback() {
-        init().then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log('r = ' + JSON.stringify(r));
-            if (r.status == 'Success') {
-                this.userinfoId = r.entity.userinfoId;
-                this.accountid = r.entity.accountid;
-                this.agencyProType = r.entity.agencyProType;
-                this.userWorkLocation = r.entity.userWorkLocation;
-                this.data = r.entity.raesList;
-                for (var i in this.data) {
-                    this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
-                }
-                console.log('this.data = ' + JSON.stringify(this.data));
-                this.isShowSpinner = false;
-                this.showTable = true;
-
-            } else {
-                console.log('r = ' + JSON.stringify(r))
-                this.showMyToast('鍒濆鍖栧け璐�', r.msg,'Error');
-            }
-        }).catch((error) => {
-            console.log('error = ' + JSON.stringify(error))
-            this.showMyToast('閿欒', '鍒濆鍖栧け璐�','Error');
+  stylesLoaded = false;
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
         })
-    }
-
-
-
-    //鏂板缓鍑哄簱鍗�
-    neworderhead() {
-        this[NavigationMixin.Navigate]({
-            type: 'standard__webPage',
-            attributes: {
-                url: '/lexsummonscreat'
-            }
+        .catch((error) => {
+          console.error("Error loading custom styles");
         });
     }
+  }
 
-    //宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�
-    searchOrderInstatusJs() {
-        this.isShowSpinner = true;
-        this.showTable = false;
-        console.log('searchOrderInstatusJs');
-        searchOrderInstatus({
-            orderDate: this.deliveryFromDate,
-            deliverDate: this.deliveryToDate,
-            accountid: this.accountid,
-            agencyProType: this.agencyProType,
-            userWorkLocation: this.userWorkLocation,
-            category1: this.deliveryOrderNo,
-            category2: this.contactName
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log('r = ' + JSON.stringify(r));
-            if (r.status == 'Success') {
-                this.data = r.entity.raesList;
-                for (var i in this.data) {
-                    this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
-                }
-                this.message = r.msg;
-                if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
-                    this.showMyToast('鎼滅储澶辫触', this.message,'Error');
-                } else {
-                    this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
-                }
-                this.isShowSpinner = false;
-                //this.isCssLoaded = true
-                this.showTable = true;
-            } else {
-                this.showMyToast('閿欒',  r.msg,'Error');
-            }
-        }).catch((error) => {
-            console.log('error = ' + JSON.stringify(error))
-        })
-    }
-
-    //杩樻病鍑哄簱鐨勫嚭搴撳崟
-    searchConsumableorderdetailsJs() {
-        this.isShowSpinner = true;
-        this.showTable = false;
-        console.log('searchConsumableorderdetailsJs');
-        console.log('this.deliveryFromDate = ' + this.deliveryFromDate);
-        console.log('this.deliveryToDate = ' + this.deliveryToDate);
-        searchConsumableorderdetails({
-            orderDate: this.deliveryFromDate,
-            deliverDate: this.deliveryToDate,
-            accountid: this.accountid,
-            agencyProType: this.agencyProType,
-            userWorkLocation: this.userWorkLocation,
-            category1: this.deliveryOrderNo,
-            category2: this.contactName
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log('r = ' + JSON.stringify(r));
-            if (r.status == 'Success') {
-                this.data = r.entity.raesList;
-                for (var i in this.data) {
-                    this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
-                }
-                this.message = r.msg;
-                if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
-                    this.showMyToast('鎼滅储澶辫触', this.message,'Error');
-                } else {
-                    this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
-                }
-                this.isShowSpinner = false;
-                this.showTable = true;
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
-            }
-        }).catch((error) => {
-            console.log('error = ' + JSON.stringify(error))
-            this.showMyToast('鎼滅储澶辫触', '鎼滅储杩樻病鍑哄簱鐨勫嚭搴撳崟鍑洪敊','Error');
-        })
-    }
-
-    //宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
-    searchConsumableorFinishJs() {
-        this.isShowSpinner = true;
-        this.showTable = false;
-        console.log('searchConsumableorFinishJs');
-        searchConsumableorFinish({
-            orderDate: this.deliveryFromDate,
-            deliverDate: this.deliveryToDate,
-            accountid: this.accountid,
-            agencyProType: this.agencyProType,
-            userWorkLocation: this.userWorkLocation,
-            category1: this.deliveryOrderNo,
-            category2: this.contactName
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log('r = ' + JSON.stringify(r));
-            if (r.status == 'Success') {
-                this.data = r.entity.raesList;
-                for (var i in this.data) {
-                    this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
-                }
-                this.message = r.msg;
-                if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
-                    this.showMyToast('鎼滅储澶辫触', this.message,'Error');
-                } else {
-                    this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
-                }
-                this.isShowSpinner = false;
-                this.showTable = true;
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
-            }
-        }).catch((error) => {
-            console.log('error = ' + JSON.stringify(error))
-            this.showMyToast('鎼滅储澶辫触', '鎼滅储宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗曞嚭閿�','Error');
-        })
-    }
-
-    //娓呯┖
-    clearJs() {
-        this.deliveryFromDate = '';
-        this.deliveryToDate = '';
-        this.deliveryOrderNo = '';
-        this.contactName = '';
-        this.isShowSpinner = true;
-        this.showTable = false;
-        cleanUp({
-            accountid: this.accountid,
-            agencyProType: this.agencyProType,
-            userWorkLocation: this.userWorkLocation,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log('r = ' + JSON.stringify(r));
-            if (r.status == 'Success') {
-                this.data = r.entity.raesList;
-                for (var i in this.data) {
-                    this.data[i]['url'] = '/s/lexsummonscreat?ESetid=' + this.data[i].Id;
-                }
-                this.message = r.msg;
-                if (this.message == '娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟') {
-                    this.showMyToast('鎼滅储澶辫触', this.message,'Error');
-                } else {
-                    this.showMyToast('鎼滅储鎴愬姛', this.message,'Success');
-                }
-                this.isShowSpinner = false;
-                this.showTable = true;
-            } else {
-                this.showMyToast('鎼滅储澶辫触', r.msg,'Error');
-            }
-        }).catch((error) => {
-            console.log('error = ' + JSON.stringify(error))
-            this.showMyToast('鎼滅储澶辫触', '鎼滅储澶辫触','Error');
-        })
-    }
-
-    //Capture the event fired from the paginator component
-    handlePaginatorChange(event) {
-        this.recordsToDisplay = event.detail.recordsToDisplay;
-        this.preSelected = event.detail.preSelected;
-        if (this.recordsToDisplay && this.recordsToDisplay > 0) {
-            this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
+  connectedCallback() {
+    init()
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.userinfoId = r.entity.userinfoId;
+          this.accountid = r.entity.accountid;
+          this.agencyProType = r.entity.agencyProType;
+          this.userWorkLocation = r.entity.userWorkLocation;
+          this.data = r.entity.raesList;
+          for (var i in this.data) {
+            this.data[i]["url"] =
+              "/s/lexsummonscreat?ESetid=" + this.data[i].Id;
+          }
+          console.log("this.data = " + JSON.stringify(this.data));
+          this.isShowSpinner = false;
+          this.showTable = true;
         } else {
-            this.rowNumberOffset = 0;
+          console.log("r = " + JSON.stringify(r));
+          this.showMyToast("鍒濆鍖栧け璐�", r.msg, "Error");
         }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+        this.showMyToast("閿欒", "鍒濆鍖栧け璐�", "Error");
+      });
+  }
+
+  //鏂板缓鍑哄簱鍗�
+  neworderhead() {
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: "/lexsummonscreat"
+      }
+    });
+  }
+
+  //宸插嚭搴撴湭寮�绁ㄧ殑鍑哄簱鍗�
+  searchOrderInstatusJs() {
+    this.isShowSpinner = true;
+    this.showTable = false;
+    console.log("searchOrderInstatusJs");
+    searchOrderInstatus({
+      orderDate: this.deliveryFromDate,
+      deliverDate: this.deliveryToDate,
+      accountid: this.accountid,
+      agencyProType: this.agencyProType,
+      userWorkLocation: this.userWorkLocation,
+      category1: this.deliveryOrderNo,
+      category2: this.contactName
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.data = r.entity.raesList;
+          for (var i in this.data) {
+            this.data[i]["url"] =
+              "/s/lexsummonscreat?ESetid=" + this.data[i].Id;
+          }
+          this.message = r.msg;
+          if (this.message == "娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟") {
+            this.showMyToast("鎼滅储澶辫触", this.message, "Error");
+          } else {
+            this.showMyToast("鎼滅储鎴愬姛", this.message, "Success");
+          }
+          this.isShowSpinner = false;
+          //this.isCssLoaded = true
+          this.showTable = true;
+        } else {
+          this.showMyToast("閿欒", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+      });
+  }
+
+  //杩樻病鍑哄簱鐨勫嚭搴撳崟
+  searchConsumableorderdetailsJs() {
+    this.isShowSpinner = true;
+    this.showTable = false;
+    console.log("searchConsumableorderdetailsJs");
+    console.log("this.deliveryFromDate = " + this.deliveryFromDate);
+    console.log("this.deliveryToDate = " + this.deliveryToDate);
+    searchConsumableorderdetails({
+      orderDate: this.deliveryFromDate,
+      deliverDate: this.deliveryToDate,
+      accountid: this.accountid,
+      agencyProType: this.agencyProType,
+      userWorkLocation: this.userWorkLocation,
+      category1: this.deliveryOrderNo,
+      category2: this.contactName
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.data = r.entity.raesList;
+          for (var i in this.data) {
+            this.data[i]["url"] =
+              "/s/lexsummonscreat?ESetid=" + this.data[i].Id;
+          }
+          this.message = r.msg;
+          if (this.message == "娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟") {
+            this.showMyToast("鎼滅储澶辫触", this.message, "Error");
+          } else {
+            this.showMyToast("鎼滅储鎴愬姛", this.message, "Success");
+          }
+          this.isShowSpinner = false;
+          this.showTable = true;
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+        this.showMyToast("鎼滅储澶辫触", "鎼滅储杩樻病鍑哄簱鐨勫嚭搴撳崟鍑洪敊", "Error");
+      });
+  }
+
+  //宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗�
+  searchConsumableorFinishJs() {
+    this.isShowSpinner = true;
+    this.showTable = false;
+    console.log("searchConsumableorFinishJs");
+    searchConsumableorFinish({
+      orderDate: this.deliveryFromDate,
+      deliverDate: this.deliveryToDate,
+      accountid: this.accountid,
+      agencyProType: this.agencyProType,
+      userWorkLocation: this.userWorkLocation,
+      category1: this.deliveryOrderNo,
+      category2: this.contactName
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.data = r.entity.raesList;
+          for (var i in this.data) {
+            this.data[i]["url"] =
+              "/s/lexsummonscreat?ESetid=" + this.data[i].Id;
+          }
+          this.message = r.msg;
+          if (this.message == "娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟") {
+            this.showMyToast("鎼滅储澶辫触", this.message, "Error");
+          } else {
+            this.showMyToast("鎼滅储鎴愬姛", this.message, "Success");
+          }
+          this.isShowSpinner = false;
+          this.showTable = true;
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+        this.showMyToast("鎼滅储澶辫触", "鎼滅储宸插嚭搴撳凡寮�绁ㄧ殑鍑哄簱鍗曞嚭閿�", "Error");
+      });
+  }
+
+  //娓呯┖
+  clearJs() {
+    this.deliveryFromDate = "";
+    this.deliveryToDate = "";
+    this.deliveryOrderNo = "";
+    this.contactName = "";
+    this.isShowSpinner = true;
+    this.showTable = false;
+    cleanUp({
+      accountid: this.accountid,
+      agencyProType: this.agencyProType,
+      userWorkLocation: this.userWorkLocation
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.data = r.entity.raesList;
+          for (var i in this.data) {
+            this.data[i]["url"] =
+              "/s/lexsummonscreat?ESetid=" + this.data[i].Id;
+          }
+          this.message = r.msg;
+          if (this.message == "娌℃湁鎼滅储鍒扮浉鍏冲嚭搴撳崟") {
+            this.showMyToast("鎼滅储澶辫触", this.message, "Error");
+          } else {
+            this.showMyToast("鎼滅储鎴愬姛", this.message, "Success");
+          }
+          this.isShowSpinner = false;
+          this.showTable = true;
+        } else {
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+        this.showMyToast("鎼滅储澶辫触", "鎼滅储澶辫触", "Error");
+      });
+  }
+
+  //Capture the event fired from the paginator component
+  handlePaginatorChange(event) {
+    this.recordsToDisplay = event.detail.recordsToDisplay;
+    this.preSelected = event.detail.preSelected;
+    if (this.recordsToDisplay && this.recordsToDisplay > 0) {
+      this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
+    } else {
+      this.rowNumberOffset = 0;
     }
+  }
 
-    //鎺掑簭
-    onHandleSort(event) {
-        const { fieldName: sortedBy, sortDirection } = event.detail;
-        const cloneData = [...this.data];
-        cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
-        this.data = cloneData;
-        this.sortDirection = sortDirection;
-        this.sortedBy = sortedBy;
-    }
+  //鎺掑簭
+  onHandleSort(event) {
+    const { fieldName: sortedBy, sortDirection } = event.detail;
+    const cloneData = [...this.data];
+    cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1));
+    this.data = cloneData;
+    this.sortDirection = sortDirection;
+    this.sortedBy = sortedBy;
+  }
 
-    sortBy(field, reverse, primer) {
-        const key = primer
-            ? function (x) {
-                return primer(x[field]);
-            }
-            : function (x) {
-                return x[field];
-            };
-
-        return function (a, b) {
-            a = key(a);
-            b = key(b);
-            return reverse * ((a > b) - (b > a));
+  sortBy(field, reverse, primer) {
+    const key = primer
+      ? function (x) {
+          return primer(x[field]);
+        }
+      : function (x) {
+          return x[field];
         };
+
+    return function (a, b) {
+      a = key(a);
+      b = key(b);
+      return reverse * ((a > b) - (b > a));
+    };
+  }
+
+  dataChange(event) {
+    let fieldName = event.target.getAttribute("data-field");
+    let value = event.detail.value;
+    switch (fieldName) {
+      case "deliveryFromDate":
+        this.deliveryFromDate = value;
+        break;
+      case "deliveryToDate":
+        this.deliveryToDate = value;
+        break;
+      case "deliveryOrderNo":
+        this.deliveryOrderNo = value;
+        break;
+      case "contactName":
+        this.contactName = value;
+        break;
+      default:
+        console.log("no data");
     }
+  }
 
+  editProductLimit() {
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: "/lexoutboundorderimport"
+      }
+    });
+  }
 
-    dataChange(event) {
-        let fieldName = event.target.getAttribute("data-field");
-        let value = event.detail.value;
-        switch (fieldName) {
-            case 'deliveryFromDate':
-                this.deliveryFromDate = value;
-                break
-            case 'deliveryToDate':
-                this.deliveryToDate = value;
-                break
-            case 'deliveryOrderNo':
-                this.deliveryOrderNo = value;
-                break
-            case 'contactName':
-                this.contactName = value;
-                break
-            default:
-                console.log('no data');
-        }
-
+  showMyToast(title, message, variant) {
+    this.isShowSpinner = false;
+    console.log("show custom message");
+    var iconName = "";
+    var content = "";
+    if (variant.toLowerCase() == "success") {
+      iconName = "utility:check";
+    } else {
+      iconName = "utility:error";
     }
-
-    editProductLimit() {
-        this[NavigationMixin.Navigate]({
-            type: 'standard__webPage',
-            attributes: {
-                url: '/lexoutboundorderimport'
-            }
-        });
+    if (message != "") {
+      content =
+        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
+    } else {
+      content = "<h2><strong>" + title + "<strong/></h2>";
     }
+    this.template
+      .querySelector("c-common-toast")
+      .showToast(variant, content, iconName, 10000);
+  }
 
-    showMyToast(title, message, variant) {
-        this.isShowSpinner = false;
-        console.log('show custom message');
-        var iconName = '';
-        var content = '';
-        if (variant.toLowerCase() == 'success') {
-            iconName = 'utility:check';
-        } else {
-            iconName = 'utility:error';
-        }
-        if (message != '') {
-            content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
-        } else {
-            content = '<h2><strong>' + title + '<strong/></h2>';
-        }
-        this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
-    }
-
-    @track isModalOpen = false;
-    openModal() {
-        this.isModalOpen = true;
-    }
-}
\ No newline at end of file
+  @track isModalOpen = false;
+  openModal() {
+    this.isModalOpen = true;
+  }
+}
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
index 29ad382..650d183 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
@@ -1,901 +1,1299 @@
 <!-- sldsValidatorIgnore -->
 <!-- sldsValidatorIgnore -->
 <template>
-    <c-common-toast></c-common-toast>
-    <template if:true={isShowSpinner}>
-        <div class="slds-spinner_container">
-聽 聽 聽 聽 聽 聽 <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
-聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span>
-聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-a"></div>
-聽 聽 聽 聽 聽 聽 聽 聽 <div class="slds-spinner__dot-b"></div>
-    聽 聽 聽 聽 </div>
-聽 聽 聽 聽 </div>
-    </template>
-    <!-- 鎼滅储瀹㈡埛鍚� -->
-    <template if:true={isModalOpen}>
-        <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
-            aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_medium"
-            style="border: 1px solid #D4D4D4;">
-            <div class="slds-modal__container">
-                <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                    <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
-                        title="Close" onclick={closeModal}>
-                        <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
-                            size="small"></lightning-icon>
-                        <span class="slds-assistive-text">Close</span>
-                    </button>
-                    <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">缁忛攢鍟嗗尰闄㈡绱�</h2>
-                </header>
-                <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1"
-                    style="border: 1px solid #F3F3F3;">
-                    <table style="width: 100%;">
-                        <tbody>
-                            <tr>
-                                <td style="width: 74px;">
-                                    <div style="color:#696969;font-size:16px;text-align: left;">鍖婚櫌鍚嶇О</div>
-                                </td>
-                                <td style="width: 60%;"><lightning-input class="inputFont" label="鍖婚櫌鍚嶇О"
-                                        variant="label-hidden" placeholder="璇疯緭鍏ュ尰闄㈠悕绉�" value={searchHospitalName}
-                                        data-field="searchHospitalName" onchange={dataChange}></lightning-input></td>
-                                <td style="width: 10px;"></td>
-                                <td><button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-                                        style="height: 32px;" label="鎼滅储" onclick={searchHospital}>鎼滅储</button></td>
-                            </tr>
-                        </tbody>
-                    </table>
-                    <p style="height: 20px;"></p>
-                    <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
-                    <div
-                        style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                        <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鎼滅储缁撴灉</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                            <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
-                        </div>
-                        <div class="myTable" style="padding:10px;">
-                            <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
+  <c-common-toast></c-common-toast>
+  <template if:true={isShowSpinner}>
+    <div class="slds-spinner_container">
+      聽 聽 聽 聽 聽 聽
+      <div
+        role="status"
+        class="slds-spinner slds-spinner_medium slds-spinner_brand"
+      >
+        聽 聽 聽 聽 聽 聽 聽 聽 <span class="slds-assistive-text">Loading</span> 聽 聽 聽 聽
+        聽 聽 聽 聽
+        <div class="slds-spinner__dot-a"></div>
+        聽 聽 聽 聽 聽 聽 聽 聽
+        <div class="slds-spinner__dot-b"></div>
+        聽 聽 聽 聽
+      </div>
+      聽 聽 聽 聽
+    </div>
+  </template>
+  <!-- 鎼滅储瀹㈡埛鍚� -->
+  <template if:true={isModalOpen}>
+    <section
+      role="dialog"
+      tabindex="-1"
+      aria-labelledby="modal-heading-01"
+      aria-modal="true"
+      aria-describedby="modal-content-id-1"
+      class="slds-modal slds-fade-in-open slds-modal_medium"
+      style="border: 1px solid #d4d4d4"
+    >
+      <div class="slds-modal__container">
+        <header class="slds-modal__header" style="background-color: #f3f3f3">
+          <button
+            style=""
+            class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+            title="Close"
+            onclick={closeModal}
+          >
+            <lightning-icon
+              icon-name="utility:close"
+              alternative-text="close"
+              variant="inverse"
+              size="small"
+            ></lightning-icon>
+            <span class="slds-assistive-text">Close</span>
+          </button>
+          <h2
+            id="modal-heading-01"
+            class="slds-text-heading_medium slds-hyphenate"
+          >
+            缁忛攢鍟嗗尰闄㈡绱�
+          </h2>
+        </header>
+        <div
+          class="slds-modal__content slds-p-around_medium"
+          id="modal-content-id-1"
+          style="border: 1px solid #f3f3f3"
+        >
+          <table style="width: 100%">
+            <tbody>
+              <tr>
+                <td style="width: 74px">
+                  <div
+                    style="color: #696969; font-size: 16px; text-align: left"
+                  >
+                    鍖婚櫌鍚嶇О
+                  </div>
+                </td>
+                <td style="width: 60%">
+                  <lightning-input
+                    class="inputFont"
+                    label="鍖婚櫌鍚嶇О"
+                    variant="label-hidden"
+                    placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
+                    value={searchHospitalName}
+                    data-field="searchHospitalName"
+                    onchange={dataChange}
+                  ></lightning-input>
+                </td>
+                <td style="width: 10px"></td>
+                <td>
+                  <button
+                    class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                    style="height: 32px"
+                    label="鎼滅储"
+                    onclick={searchHospital}
+                  >
+                    鎼滅储
+                  </button>
+                </td>
+              </tr>
+            </tbody>
+          </table>
+          <p style="height: 20px"></p>
+          <!-- <p>宸查�夋嫨鍖婚櫌锛歿chooseHospital}</p> -->
+          <div
+            style="
+              border: 1px solid #d4d4d4;
+              border-top: 3px solid #51606e;
+              border-radius: 5px;
+              margin-bottom: 7px;
+            "
+          >
+            <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鎼滅储缁撴灉</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+              <!-- <p style="font-size: 16px;"><strong>鎼滅储缁撴灉</strong></p> -->
+            </div>
+            <div class="myTable" style="padding: 10px">
+              <!-- <lightning-datatable class="wrapped-header-datatable" key-field="id"
                                 hide-checkbox-column="true" data={hospitalList} columns={hosCols}
                                 onrowaction={chooseHos}></lightning-datatable> -->
-                            <lightning-datatable class="datatabel slds-border_top wrapped-header-datatable"
-                                key-field="id" data={hospitalList} columns={hospitalColumns} hide-checkbox-column="true"
-                                onrowaction={searchHandleRowAction}>
-                            </lightning-datatable>
-                        </div>
-                    </div>
-                </div>
-                <footer class="slds-modal__footer">
-                    <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" label="鍙栨秷"
-                        onclick={closeModal}>鍙栨秷</button>
-                </footer>
+              <lightning-datatable
+                class="datatabel slds-border_top wrapped-header-datatable"
+                key-field="id"
+                data={hospitalList}
+                columns={hospitalColumns}
+                hide-checkbox-column="true"
+                onrowaction={searchHandleRowAction}
+              >
+              </lightning-datatable>
             </div>
-        </section>
-        <div class="slds-backdrop slds-backdrop_open"></div>
-    </template>
+          </div>
+        </div>
+        <footer class="slds-modal__footer">
+          <button
+            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+            label="鍙栨秷"
+            onclick={closeModal}
+          >
+            鍙栨秷
+          </button>
+        </footer>
+      </div>
+    </section>
+    <div class="slds-backdrop slds-backdrop_open"></div>
+  </template>
 
-    <!-- 涓婁紶闄勪欢寮圭獥 -->
-    <template if:true={showAttPop}>
-        <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true"
-            aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small"
-            style="border: 1px solid #D4D4D4;">
-            <template if:true={showPopSpinner}>
-                <lightning-spinner size="medium" variant="brand"></lightning-spinner>
-            </template>
-            <div class="slds-modal__container">
-                <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                    <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
-                        title="Close" onclick={closePop}>
-                        <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
-                            size="small"></lightning-icon>
-                        <span class="slds-assistive-text">Close</span>
-                    </button>
-                    <h2 id="modal-heading-02" class="slds-text-heading_medium slds-hyphenate">涓婁紶闄勪欢</h2>
-                </header>
-                <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2"
-                    style="border: 1px solid #F3F3F3;">
-                    <div class="slds-m-top_medium slds-m-bottom_x-large">
-                        <div class="slds-p-around_medium lgc-bg">
-                            <lightning-input class="fileUpload" type="file" label="闄勪欢涓婁紶"
-                                accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
-                                onchange={attChange}></lightning-input>
-                        </div>
-                        <p  style="font-size: 16px;">宸查�夋嫨鏂囦欢锛歿fileName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                            <template if:true={attDelBtn}>
-                                <a onclick={removeAtt}>绉婚櫎</a>
-                            </template>
-                        </p>
-                    </div>
-                </div>
-                <footer class="slds-modal__footer">
-                    <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷"
+  <!-- 涓婁紶闄勪欢寮圭獥 -->
+  <template if:true={showAttPop}>
+    <section
+      role="dialog"
+      tabindex="-1"
+      aria-labelledby="modal-heading-01"
+      aria-modal="true"
+      aria-describedby="modal-content-id-1"
+      class="slds-modal slds-fade-in-open slds-modal_small"
+      style="border: 1px solid #d4d4d4"
+    >
+      <template if:true={showPopSpinner}>
+        <lightning-spinner size="medium" variant="brand"></lightning-spinner>
+      </template>
+      <div class="slds-modal__container">
+        <header class="slds-modal__header" style="background-color: #f3f3f3">
+          <button
+            style=""
+            class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+            title="Close"
+            onclick={closePop}
+          >
+            <lightning-icon
+              icon-name="utility:close"
+              alternative-text="close"
+              variant="inverse"
+              size="small"
+            ></lightning-icon>
+            <span class="slds-assistive-text">Close</span>
+          </button>
+          <h2
+            id="modal-heading-02"
+            class="slds-text-heading_medium slds-hyphenate"
+          >
+            涓婁紶闄勪欢
+          </h2>
+        </header>
+        <div
+          class="slds-modal__content slds-p-around_medium"
+          id="modal-content-id-2"
+          style="border: 1px solid #f3f3f3"
+        >
+          <div class="slds-m-top_medium slds-m-bottom_x-large">
+            <div class="slds-p-around_medium lgc-bg">
+              <lightning-input
+                class="fileUpload"
+                type="file"
+                label="闄勪欢涓婁紶"
+                accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
+                onchange={attChange}
+              ></lightning-input>
+            </div>
+            <p style="font-size: 16px">
+              宸查�夋嫨鏂囦欢锛歿fileName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+              <template if:true={attDelBtn}>
+                <a onclick={removeAtt}>绉婚櫎</a>
+              </template>
+            </p>
+          </div>
+        </div>
+        <footer class="slds-modal__footer">
+          <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷"
                         onclick={closePop}></lightning-button>
                     <lightning-button style="margin-left: 10px;" variant="neutral" label="涓婁紶"
                         onclick={handleSave}></lightning-button> -->
-                    <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" label="鍙栨秷"
-                        onclick={closePop}>鍙栨秷</button>
-                    <button class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle" style="margin-left: 10px;" label="涓婁紶"
-                        onclick={handleSave}>涓婁紶</button>
-                </footer>
-            </div>
-        </section>
-        <div class="slds-backdrop slds-backdrop_open"></div>
-    </template>
+          <button
+            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+            style="margin-left: 10px"
+            label="鍙栨秷"
+            onclick={closePop}
+          >
+            鍙栨秷
+          </button>
+          <button
+            class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+            style="margin-left: 10px"
+            label="涓婁紶"
+            onclick={handleSave}
+          >
+            涓婁紶
+          </button>
+        </footer>
+      </div>
+    </section>
+    <div class="slds-backdrop slds-backdrop_open"></div>
+  </template>
 
-    <div class="outerBorderCss">
-        <div style="padding: 5px">
-            <template if:false={isShippingSales}>
-                <!-- 鎸夐挳 -->
-                <div class="borderCss">
-                    <div style="padding: 15px">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <table>
-                                <colgroup>
-                                    <col width="150px" />
-                                    <col width="310px" />
-                                    <col width="310px" />
-                                    <col width="310px" />
-                                    <col width="200px" />
-                                    <col width="200px" />
-                                    <col width="90px" />
-                                    <col width="100px" />
-                                    <col width="10px" />
-                                    <col width="85px" />
-                                    <col width="100px" />
-                                    <col width="10px" />
-                                    <col width="70px" />
-                                    <col width="100px" />
-                                </colgroup>
-                                <tr>
-                                    <td>
-                                        <template if:true={isSaveShow}>
-                                            <!-- <lightning-button label="淇濆瓨" onclick={saveConfirmJs}
+  <div class="outerBorderCss">
+    <div style="padding: 5px">
+      <template if:false={isShippingSales}>
+        <!-- 鎸夐挳 -->
+        <div class="borderCss">
+          <div style="padding: 15px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <table>
+                <colgroup>
+                  <col width="150px" />
+                  <col width="310px" />
+                  <col width="310px" />
+                  <col width="310px" />
+                  <col width="200px" />
+                  <col width="200px" />
+                  <col width="90px" />
+                  <col width="100px" />
+                  <col width="10px" />
+                  <col width="85px" />
+                  <col width="100px" />
+                  <col width="10px" />
+                  <col width="70px" />
+                  <col width="100px" />
+                </colgroup>
+                <tr>
+                  <td>
+                    <template if:true={isSaveShow}>
+                      <!-- <lightning-button label="淇濆瓨" onclick={saveConfirmJs}
                                                 style="width: 150px"></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={saveConfirmJs}>淇濆瓨</button>
-                                        </template>
-                                    </td>
-                                    <td colspan="4">
-                                        <!-- <template if:true={isSaveShow}>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={saveConfirmJs}
+                      >
+                        淇濆瓨
+                      </button>
+                    </template>
+                  </td>
+                  <td colspan="4">
+                    <!-- <template if:true={isSaveShow}>
                                             <lightning-button label="淇濆瓨" onclick={saveConfirmJs}
                                                 style="width: 150px"></lightning-button>
                                         </template> -->
-                                    </td>
-                                </tr>
-                                <tr>
-                                    <td></td>
-                                    <td>
-                                        <template if:true={isEditShow}>
-                                            <!-- <lightning-button label="缂栬緫鍑哄簱鍗�" onclick={EditConsumable}
+                  </td>
+                </tr>
+                <tr>
+                  <td></td>
+                  <td>
+                    <template if:true={isEditShow}>
+                      <!-- <lightning-button label="缂栬緫鍑哄簱鍗�" onclick={EditConsumable}
                                                 style="width: 150px" disabled={isEditDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={EditConsumable} disabled={isEditDisabled}>缂栬緫鍑哄簱鍗�</button>
-                                        </template>
-                                    </td>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={EditConsumable}
+                        disabled={isEditDisabled}
+                      >
+                        缂栬緫鍑哄簱鍗�
+                      </button>
+                    </template>
+                  </td>
 
-                                    <td>
-                                        <template if:true={isDeliveryShow}>
-                                            <!-- <lightning-button label="鍑鸿揣/閿�鍞�" onclick={GoodsDeliveryJs}
+                  <td>
+                    <template if:true={isDeliveryShow}>
+                      <!-- <lightning-button label="鍑鸿揣/閿�鍞�" onclick={GoodsDeliveryJs}
                                                 style="width: 150px;" disabled={isDeliveryDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={GoodsDeliveryJs} disabled={isDeliveryDisabled}>鍑鸿揣/閿�鍞�</button>
-                                        </template>
-                                    </td>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={GoodsDeliveryJs}
+                        disabled={isDeliveryDisabled}
+                      >
+                        鍑鸿揣/閿�鍞�
+                      </button>
+                    </template>
+                  </td>
 
-                                    <td>
-                                        <template if:true={isOpenToInvoiceShow}>
-                                            <!-- <lightning-button label="寮�绁�" onclick={openToInvoiceJs} style="width: 150px"
+                  <td>
+                    <template if:true={isOpenToInvoiceShow}>
+                      <!-- <lightning-button label="寮�绁�" onclick={openToInvoiceJs} style="width: 150px"
                                                 disabled={isOpenToInvoiceDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={openToInvoiceJs} disabled={isOpenToInvoiceDisabled}>寮�绁�</button>
-                                        </template>
-                                    </td>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={openToInvoiceJs}
+                        disabled={isOpenToInvoiceDisabled}
+                      >
+                        寮�绁�
+                      </button>
+                    </template>
+                  </td>
 
-                                    <td>
-                                        <template if:false={EditAble}>
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={uploadOrder}>涓婁紶闄勪欢</button>
-                                        </template>
-                                    </td>
-                                </tr>
-                                <tr style="height: 5px;"></tr>
-                                <tr>
-                                    <td></td>
-                                    <td>
-                                        <template if:true={isPraseToPDFShow}>
-                                            <!-- <lightning-button label="鎵撳嵃鎸囩ず鍗�" onclick={PraseToPDFJs} style="width: 150px"
+                  <td>
+                    <template if:false={EditAble}>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={uploadOrder}
+                      >
+                        涓婁紶闄勪欢
+                      </button>
+                    </template>
+                  </td>
+                </tr>
+                <tr style="height: 5px"></tr>
+                <tr>
+                  <td></td>
+                  <td>
+                    <template if:true={isPraseToPDFShow}>
+                      <!-- <lightning-button label="鎵撳嵃鎸囩ず鍗�" onclick={PraseToPDFJs} style="width: 150px"
                                                 disabled={isPraseToPDFDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={PraseToPDFJs} disabled={isPraseToPDFDisabled}>鎵撳嵃鎸囩ず鍗�</button>
-                                        </template>
-                                    </td>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={PraseToPDFJs}
+                        disabled={isPraseToPDFDisabled}
+                      >
+                        鎵撳嵃鎸囩ず鍗�
+                      </button>
+                    </template>
+                  </td>
 
-                                    <td>
-
-                                        <template if:true={isOpenReportShow}>
-                                            <!-- <lightning-button label="鏄剧ず鏄庣粏&ensp;" onclick={openReportJs}
+                  <td>
+                    <template if:true={isOpenReportShow}>
+                      <!-- <lightning-button label="鏄剧ず鏄庣粏&ensp;" onclick={openReportJs}
                                                 style="width: 150px" disabled={isOpenReportDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={openReportJs} disabled={isOpenReportDisabled}>鏄剧ず鏄庣粏</button>
-                                        </template>
-                                    </td>
-                                    <td>
-
-                                        <template if:true={isDeleteShow}>
-                                            <!-- <lightning-button label="鍒犻櫎" onclick={DeleteConsumable} style="width: 150px"
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={openReportJs}
+                        disabled={isOpenReportDisabled}
+                      >
+                        鏄剧ず鏄庣粏
+                      </button>
+                    </template>
+                  </td>
+                  <td>
+                    <template if:true={isDeleteShow}>
+                      <!-- <lightning-button label="鍒犻櫎" onclick={DeleteConsumable} style="width: 150px"
                                                 disabled={isDeleteDisabled}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={DeleteConsumable} disabled={isDeleteDisabled}>鍒犻櫎</button>
-                                        </template>
-                                    </td>
-                                    <td></td>
-                                </tr>
-                            </table>
-                        </div>
-                    </div>
-                </div>
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={DeleteConsumable}
+                        disabled={isDeleteDisabled}
+                      >
+                        鍒犻櫎
+                      </button>
+                    </template>
+                  </td>
+                  <td></td>
+                </tr>
+              </table>
+            </div>
+          </div>
+        </div>
 
-                <!-- 鍑哄簱鍗曚俊鎭� EditAble = true -->
-                <template if:true={EditAble}>
-                    <div class="borderCss">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍑哄簱鍗曚俊鎭�</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                        </div>
-                        <div style="padding: 7px">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <!-- SummonsStatus_c__c == '浠锋牸鏈畾' -->
-                                <template if:true={summonsStatusPriceNotDetermined}>
-                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
-                                        onload={handleLoad}>
-                                        <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <template if:true={isSummonsFlag}>
-                                                <lightning-layout-item size="1"></lightning-layout-item>
+        <!-- 鍑哄簱鍗曚俊鎭� EditAble = true -->
+        <template if:true={EditAble}>
+          <div class="borderCss">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍑哄簱鍗曚俊鎭�</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 7px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <!-- SummonsStatus_c__c == '浠锋牸鏈畾' -->
+                <template if:true={summonsStatusPriceNotDetermined}>
+                  <lightning-record-edit-form
+                    object-api-name="Consumable_order__c"
+                    record-id={cocId}
+                    onload={handleLoad}
+                  >
+                    <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
+                    <lightning-layout multiple-rows="true">
+                      <template if:true={isSummonsFlag}>
+                        <lightning-layout-item size="1"></lightning-layout-item>
 
-                                                <lightning-layout-item size="5">
-                                                    <lightning-output-field field-name="Name"
-                                                        class="hehe-layoutItem"></lightning-output-field>
-                                                </lightning-layout-item>
+                        <lightning-layout-item size="5">
+                          <lightning-output-field
+                            field-name="Name"
+                            class="hehe-layoutItem"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
 
-                                                <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                    style="padding-left: 100px;">
-                                                    <lightning-output-field
-                                                        field-name="SummonsStatus_c__c"></lightning-output-field>
-                                                </lightning-layout-item>
+                        <lightning-layout-item
+                          class="hehe-layoutItem"
+                          size="5"
+                          style="padding-left: 100px"
+                        >
+                          <lightning-output-field
+                            field-name="SummonsStatus_c__c"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
 
-                                                <lightning-layout-item size="1"></lightning-layout-item>
+                        <lightning-layout-item size="1"></lightning-layout-item>
+                      </template>
+                    </lightning-layout>
 
+                    <!-- 鐩殑   寮�绁ㄧ姸鎬� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                            </template>
-                                        </lightning-layout>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="SummonsForDirction__c"
+                          class="searchName"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                        <!-- 鐩殑   寮�绁ㄧ姸鎬� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Billed_Status__c"
+                          class="searchName"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field field-name="SummonsForDirction__c"
-                                                    class="searchName"></lightning-output-field>
-                                            </lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <lightning-output-field field-name="Billed_Status__c"
-                                                    class="searchName"></lightning-output-field>
-                                            </lightning-layout-item>
+                    <!-- 浜岀骇缁忛攢鍟� -->
+                    <template if:true={isSummonsForDirctionTwoShow}>
+                      <lightning-layout multiple-rows="true">
+                        <lightning-layout-item size="1"></lightning-layout-item>
 
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                        <lightning-layout-item class="hehe-layoutItem" size="5">
+                          <lightning-output-field
+                            field-name="Order_Dealer_Info__c"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
+                      </lightning-layout>
+                    </template>
 
+                    <!-- 瀹㈡埛鍚� 鍙戠エ-->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                        </lightning-layout>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          class="hideHelpText"
+                          field-name="ShipmentAccount__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                        <!-- 浜岀骇缁忛攢鍟� -->
-                                        <template if:true={isSummonsForDirctionTwoShow}>
-                                            <lightning-layout multiple-rows="true">
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-input-field
+                          data-field={ConInvoice_Code__c}
+                          onchange={invoiceChange}
+                          field-name="ConInvoice_Code__c"
+                          class="inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
 
-                                                <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                                <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                    <lightning-output-field
-                                                        field-name="Order_Dealer_Info__c"></lightning-output-field>
-                                                </lightning-layout-item>
+                    <!-- 绉戝 鍑哄簱閲戦 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="Order_ForCustomerText__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                            </lightning-layout>
-                                        </template>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="Shipment_total_amount__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                        <!-- 瀹㈡埛鍚� 鍙戠エ-->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field class="hideHelpText"
-                                                    field-name="ShipmentAccount__c"></lightning-output-field>
-                                            </lightning-layout-item>
+                    <!-- 娌℃湁纭畾浠锋牸 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <lightning-input-field data-field={ConInvoice_Code__c}
-                                                    onchange={invoiceChange} field-name="ConInvoice_Code__c"
-                                                    class="inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                        </lightning-layout>
-
-                                        <!-- 绉戝 鍑哄簱閲戦 -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="Order_ForCustomerText__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <lightning-output-field
-                                                    field-name="Shipment_total_amount__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                        </lightning-layout>
-
-                                        <!-- 娌℃湁纭畾浠锋牸 -->
-                                        <lightning-layout multiple-rows="true">
-
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-output-field
-                                                    field-name="NoConfirmedPrice__c"></lightning-output-field>
-                                            </lightning-layout-item>
-
-
-                                        </lightning-layout>
-                                    </lightning-record-edit-form>
-                                </template>
-
-                                <!-- SummonsStatus_c__c != '浠锋牸鏈畾' -->
-                                <template if:false={summonsStatusPriceNotDetermined}>
-                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
-                                        onsubmit={handleSubmit} onload={handleLoad}>
-                                        <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <template if:true={isSummonsFlag}>
-                                                <lightning-layout-item size="1"></lightning-layout-item>
-
-                                                <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                    <lightning-output-field field-name="Name"></lightning-output-field>
-                                                </lightning-layout-item>
-
-                                                <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                    style="padding-left: 100px;">
-                                                    <lightning-output-field
-                                                        field-name="SummonsStatus_c__c"></lightning-output-field>
-                                                </lightning-layout-item>
-
-                                                <lightning-layout-item size="1"></lightning-layout-item>
-                                            </template>
-                                        </lightning-layout>
-
-                                        <!-- 鐩殑   浜岀骇缁忛攢鍟� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input-field data-field="summonsForDirction"
-                                                    value={summonsForDirction} field-name="SummonsForDirction__c"
-                                                    required="true" onchange={ChangeDirction}
-                                                    class="inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <lightning-combobox data-field="secondaryDistributor"
-                                                    name="secondaryDistributor" label="浜岀骇缁忛攢鍟�"
-                                                    value={secondaryDistributor} placeholder="璇烽�夋嫨..."
-                                                    options={secondaryDistributorOptions} variant="label-inline"
-                                                    onchange={dataChange} disabled={isDisabledSecondaryDistributor}
-                                                    class="inputFont"></lightning-combobox>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                        </lightning-layout>
-
-                                        <!-- 瀹㈡埛鍚�   缁忛攢鍟嗗綍鍏� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <div
-                                                    class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
-                                                    <lightning-icon size="x-small"
-                                                        class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
-                                                        icon-name="utility:search"></lightning-icon>
-                                                    <lightning-input type="text" name="HospitalName" label="瀹㈡埛鍚�"
-                                                        value={HospitalName} variant="label-inline"
-                                                        onclick={searchHospitalNameModal} data-field="HospitalName"
-                                                        disabled={isDisabledHospitalName} onchange={clearAgencyI}
-                                                        class="inputFont"></lightning-input>
-                                                </div>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <template if:true={isMutualTransferGoods}>
-                                                    <c-lex-lookup onsearch={handleSearch}
-                                                        onselectionchange={handleSelectionChange} label="缁忛攢鍟�(褰曞叆)"
-                                                        variant="label-inline" placeholder="鎼滅储缁忛攢鍟�"
-                                                        onisdisabledfordealertext={isDisabledForDealerText}
-                                                        account-value={accountValue} onblur={vpClear2Delay}
-                                                        disabled={isDisabledForDealerText} class="inputFont">
-                                                    </c-lex-lookup>
-                                                </template>
-                                                <template if:false={isMutualTransferGoods}>
-                                                    <lightning-input type="text" name="Order_ForDealerText__c"
-                                                        label="缁忛攢鍟�(褰曞叆)" value={ForDealerText} onchange={dataChange}
-                                                        data-field="Order_ForDealerText__c"
-                                                        disabled={isDisabledForDealerText} variant="label-inline"
-                                                        class="inputFont">
-                                                    </lightning-input>
-                                                </template>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                        </lightning-layout>
-
-                                        <!-- 绉戝   鎬婚噾棰� -->
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input-field onchange={dataChange}
-                                                    data-field="ForCustomerText" value={ForCustomerText}
-                                                    field-name="Order_ForCustomerText__c"
-                                                    disabled={isDisabledForCustomerText}
-                                                    class="inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-
-
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5"
-                                                style="padding-left: 100px;">
-                                                <lightning-input type="text" name="sumPrice" label="鎬婚噾棰�"
-                                                    value={sumPrice} variant="label-inline" onchange={dataChange}
-                                                    data-field="sumPrice" readonly></lightning-input>
-                                            </lightning-layout-item>
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </lightning-layout>
-
-                                        <!-- 娌℃湁纭畾浠锋牸 -->
-                                        <lightning-layout multiple-rows="true">
-
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item class="hehe-layoutItem" size="5">
-                                                <lightning-input-field value={NoConfirmedPrice}
-                                                    field-name="NoConfirmedPrice__c" data-field="NoConfirmedPrice"
-                                                    onchange={dataChange}></lightning-input-field>
-                                            </lightning-layout-item>
-
-
-
-                                        </lightning-layout>
-                                    </lightning-record-edit-form>
-                                </template>
-                            </div>
-                        </div>
-                    </div>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-output-field
+                          field-name="NoConfirmedPrice__c"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </lightning-record-edit-form>
                 </template>
 
-                <!-- 鍑哄簱鍗曚俊鎭� EditAble = false -->
-                <template if:false={EditAble}>
-                    <div class="borderCss">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍑哄簱鍗曚俊鎭�</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
+                <!-- SummonsStatus_c__c != '浠锋牸鏈畾' -->
+                <template if:false={summonsStatusPriceNotDetermined}>
+                  <lightning-record-edit-form
+                    object-api-name="Consumable_order__c"
+                    record-id={cocId}
+                    onsubmit={handleSubmit}
+                    onload={handleLoad}
+                  >
+                    <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
+                    <lightning-layout multiple-rows="true">
+                      <template if:true={isSummonsFlag}>
+                        <lightning-layout-item size="1"></lightning-layout-item>
+
+                        <lightning-layout-item class="hehe-layoutItem" size="5">
+                          <lightning-output-field
+                            field-name="Name"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
+
+                        <lightning-layout-item
+                          class="hehe-layoutItem"
+                          size="5"
+                          style="padding-left: 100px"
+                        >
+                          <lightning-output-field
+                            field-name="SummonsStatus_c__c"
+                          ></lightning-output-field>
+                        </lightning-layout-item>
+
+                        <lightning-layout-item size="1"></lightning-layout-item>
+                      </template>
+                    </lightning-layout>
+
+                    <!-- 鐩殑   浜岀骇缁忛攢鍟� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input-field
+                          data-field="summonsForDirction"
+                          value={summonsForDirction}
+                          field-name="SummonsForDirction__c"
+                          required="true"
+                          onchange={ChangeDirction}
+                          class="inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-combobox
+                          data-field="secondaryDistributor"
+                          name="secondaryDistributor"
+                          label="浜岀骇缁忛攢鍟�"
+                          value={secondaryDistributor}
+                          placeholder="璇烽�夋嫨..."
+                          options={secondaryDistributorOptions}
+                          variant="label-inline"
+                          onchange={dataChange}
+                          disabled={isDisabledSecondaryDistributor}
+                          class="inputFont"
+                        ></lightning-combobox>
+                      </lightning-layout-item>
+
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
+
+                    <!-- 瀹㈡埛鍚�   缁忛攢鍟嗗綍鍏� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <div
+                          class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+                        >
+                          <lightning-icon
+                            size="x-small"
+                            class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
+                            icon-name="utility:search"
+                          ></lightning-icon>
+                          <lightning-input
+                            type="text"
+                            name="HospitalName"
+                            label="瀹㈡埛鍚�"
+                            value={HospitalName}
+                            variant="label-inline"
+                            onclick={searchHospitalNameModal}
+                            data-field="HospitalName"
+                            disabled={isDisabledHospitalName}
+                            onchange={clearAgencyI}
+                            class="inputFont"
+                          ></lightning-input>
                         </div>
-                        <div style="padding: 7px">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
-                                    onload={handleLoad2}>
-                                    <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
-                                    <lightning-layout multiple-rows="true">
-                                        <template if:true={isSummonsFlag}>
-                                            <lightning-layout-item size="1"></lightning-layout-item>
+                      </lightning-layout-item>
 
-                                            <lightning-layout-item size="5">
-                                                <lightning-output-field field-name="Name"
-                                                    class="hehe-layoutItem"></lightning-output-field>
-                                            </lightning-layout-item>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <template if:true={isMutualTransferGoods}>
+                          <c-lex-lookup
+                            onsearch={handleSearch}
+                            onselectionchange={handleSelectionChange}
+                            label="缁忛攢鍟�(褰曞叆)"
+                            variant="label-inline"
+                            placeholder="鎼滅储缁忛攢鍟�"
+                            onisdisabledfordealertext={isDisabledForDealerText}
+                            account-value={accountValue}
+                            onblur={vpClear2Delay}
+                            disabled={isDisabledForDealerText}
+                            class="inputFont"
+                          >
+                          </c-lex-lookup>
+                        </template>
+                        <template if:false={isMutualTransferGoods}>
+                          <lightning-input
+                            type="text"
+                            name="Order_ForDealerText__c"
+                            label="缁忛攢鍟�(褰曞叆)"
+                            value={ForDealerText}
+                            onchange={dataChange}
+                            data-field="Order_ForDealerText__c"
+                            disabled={isDisabledForDealerText}
+                            variant="label-inline"
+                            class="inputFont"
+                          >
+                          </lightning-input>
+                        </template>
+                      </lightning-layout-item>
 
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
+                    <!-- 绉戝   鎬婚噾棰� -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                            <lightning-layout-item size="5" style="padding-left: 100px;">
-                                                <lightning-output-field field-name="SummonsStatus_c__c"
-                                                    class="hehe-layoutItem"></lightning-output-field>
-                                            </lightning-layout-item>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input-field
+                          onchange={dataChange}
+                          data-field="ForCustomerText"
+                          value={ForCustomerText}
+                          field-name="Order_ForCustomerText__c"
+                          disabled={isDisabledForCustomerText}
+                          class="inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
 
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-                                        </template>
-                                    </lightning-layout>
+                      <lightning-layout-item
+                        class="hehe-layoutItem"
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-input
+                          type="text"
+                          name="sumPrice"
+                          label="鎬婚噾棰�"
+                          value={sumPrice}
+                          variant="label-inline"
+                          onchange={dataChange}
+                          data-field="sumPrice"
+                          readonly
+                        ></lightning-input>
+                      </lightning-layout-item>
 
-                                    <!-- 鐩殑   寮�绁ㄧ姸鎬� -->
-                                    <lightning-layout multiple-rows="true">
-                                        <lightning-layout-item size="1"></lightning-layout-item>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </lightning-layout>
 
-                                        <lightning-layout-item size="5">
-                                            <lightning-output-field field-name="SummonsForDirction__c"
-                                                class="hehe-layoutItem"></lightning-output-field>
-                                        </lightning-layout-item>
+                    <!-- 娌℃湁纭畾浠锋牸 -->
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                        <lightning-layout-item size="5" style="padding-left: 100px;">
-                                            <lightning-output-field field-name="Billed_Status__c"
-                                                class="hehe-layoutItem"></lightning-output-field>
-                                        </lightning-layout-item>
-
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                    </lightning-layout>
-
-                                    <!-- 浜岀骇缁忛攢鍟� -->
-                                    <template if:true={isSummonsForDirctionTwoShow}>
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1"></lightning-layout-item>
-
-                                            <lightning-layout-item size="5">
-                                                <lightning-output-field field-name="Order_Dealer_Info__c"
-                                                    class="hehe-layoutItem"></lightning-output-field>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </template>
-
-                                    <!-- 瀹㈡埛鍚� 鍙戠エ-->
-                                    <lightning-layout multiple-rows="true">
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-                                        <lightning-layout-item size="5" class="hehe-layoutItem">
-                                            <lightning-output-field class="hideHelpText"
-                                                field-name="ShipmentAccount__c"></lightning-output-field>
-                                        </lightning-layout-item>
-
-                                        <template if:true={isConInvoiceShow}>
-                                            <lightning-layout-item size="5" style="padding-left: 100px;">
-                                                <lightning-input-field data-field={ConInvoice_Code__c}
-                                                    onchange={invoiceChange} field-name="ConInvoice_Code__c"
-                                                    class="hehe-layoutItem inputFont"></lightning-input-field>
-                                            </lightning-layout-item>
-                                        </template>
-
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                    </lightning-layout>
-
-                                    <!-- 绉戝 鍑哄簱閲戦 -->
-                                    <lightning-layout multiple-rows="true">
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-                                        <lightning-layout-item size="5">
-                                            <lightning-output-field field-name="Order_ForCustomerText__c"
-                                                class="hehe-layoutItem"></lightning-output-field>
-                                        </lightning-layout-item>
-
-                                        <lightning-layout-item size="5" style="padding-left: 100px;">
-                                            <lightning-output-field field-name="Shipment_total_amount__c"
-                                                class="hehe-layoutItem"></lightning-output-field>
-                                        </lightning-layout-item>
-
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-
-                                    </lightning-layout>
-
-                                    <!-- 娌℃湁纭畾浠锋牸 -->
-                                    <lightning-layout multiple-rows="true">
-
-                                        <lightning-layout-item size="1"></lightning-layout-item>
-
-                                        <lightning-layout-item size="5">
-                                            <lightning-output-field field-name="NoConfirmedPrice__c"
-                                                class="hehe-layoutItem"></lightning-output-field>
-                                        </lightning-layout-item>
-                                    </lightning-layout>
-
-                                    <!-- 闄勪欢棰勮 -->
-                                    <template if:false={EditAble}>
-                                        <lightning-layout multiple-rows="true">
-                                            <lightning-layout-item size="1">
-                                            </lightning-layout-item>
-                                            <lightning-layout-item size="10">
-                                                <lightning-card class="attListTitle" variant="Narrow" title="闄勪欢鍒楄〃"
-                                                    icon-name="utility:attach">
-
-                                                    <lightning-layout slot="footer" multiple-rows="true">
-                                                        <template for:each={fileData} for:item="item" for:index="index">
-                                                            <lightning-layout-item padding="around-none" size="2"
-                                                                key={item.recordId}
-                                                                style="text-align: left;padding:5px;word-wrap:break-word; word-break:break-all;">
-                                                                <lightning-icon title={item.Title}
-                                                                    style="margin-left: 20px;" icon-name="doctype:gform"
-                                                                    alternative-text={item.Title}
-                                                                    size="large"></lightning-icon><br />
-                                                                <div title={item.Title} style="width: 100px;text-overflow: ellipsis;overflow: hidden;white-space: nowrap;">
-                                                                    {item.Title}
-                                                                </div>
-                                                                <p>
-                                                                    <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
-                                                                    <a href={item.attUrl} target="_blank">
-                                                                        棰勮
-                                                                    </a>&nbsp;路&nbsp;
-                                                                    <a href={item.downloadUrl}>
-                                                                        涓嬭浇
-                                                                    </a>&nbsp;路&nbsp;
-                                                                    <a data-fileid={item.Id} onclick={deleteAtt}>
-                                                                        鍒犻櫎
-                                                                    </a>
-                                                                </p>
-                                                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
-                                                            </lightning-layout-item>
-                                                        </template>
-                                                    </lightning-layout>
-                                                </lightning-card>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </template>
-
-                                </lightning-record-edit-form>
-                            </div>
-                        </div>
-                    </div>
+                      <lightning-layout-item class="hehe-layoutItem" size="5">
+                        <lightning-input-field
+                          value={NoConfirmedPrice}
+                          field-name="NoConfirmedPrice__c"
+                          data-field="NoConfirmedPrice"
+                          onchange={dataChange}
+                        ></lightning-input-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </lightning-record-edit-form>
                 </template>
+              </div>
+            </div>
+          </div>
+        </template>
 
-                <!-- 妫�绱� -->
-                <template if:true={isSearchShow}>
-                    <div class="borderCss">
-                        <div style="padding: 3px;">
-                            <div lwc:dom="manual" class="resultDiv"></div>
-                            <div draggable="false">
-                                <lightning-layout multiple-rows style="margin-top: 10px;">
-                                    <lightning-layout-item style="padding-left: 10px;" flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label">娑堣�楀搧鍚嶇О</div>
-                                            <lightning-input type="text" name="consumableName" label="娑堣�楀搧鍚嶇О"
-                                                value={consumableName} variant="label-hidden" onchange={dataChange}
-                                                data-field="consumableName" class="inputFont"
-                                                style="width:150px"></lightning-input>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label" style="width:80px">绗�3鍒嗙被</div>
-                                            <lightning-combobox name="progress" label="绗�3鍒嗙被" value={Category3}
-                                                variant="label-hidden" options={category3Options} onchange={dataChange}
-                                                data-field="Category3" style="min-width: 120px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label" style="width:80px">绗�4鍒嗙被</div>
-                                            <lightning-combobox name="progress" label="绗�4鍒嗙被" value={Category4}
-                                                variant="label-hidden" options={category4Options} onchange={dataChange}
-                                                data-field="Category4" style="min-width: 120px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
+        <!-- 鍑哄簱鍗曚俊鎭� EditAble = false -->
+        <template if:false={EditAble}>
+          <div class="borderCss">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍑哄簱鍗曚俊鎭�</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 7px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <lightning-record-edit-form
+                  object-api-name="Consumable_order__c"
+                  record-id={cocId}
+                  onload={handleLoad2}
+                >
+                  <!-- 鍑哄簱鍗曞彿 鍑哄簱鍗曠姸鎬� -->
+                  <lightning-layout multiple-rows="true">
+                    <template if:true={isSummonsFlag}>
+                      <lightning-layout-item size="1"></lightning-layout-item>
 
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label" style="width:80px">绗�5鍒嗙被</div>
-                                            <lightning-combobox name="progress" label="绗�5鍒嗙被" value={Category5}
-                                                variant="label-hidden" onchange={dataChange} data-field="Category5"
-                                                options={category5Options} style="min-width: 120px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
+                      <lightning-layout-item size="5">
+                        <lightning-output-field
+                          field-name="Name"
+                          class="hehe-layoutItem"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                    </lightning-layout-item>
-                                    <template if:true={hasHosPro}>
-                                        <lightning-layout-item flexibility="auto">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label">鍖婚櫌鐗逛环</div>
-                                                <lightning-combobox name="progress" label="鍖婚櫌鐗逛环" value={outOutPattern}
-                                                    variant="label-hidden" options={outOutPatternOptionList}
-                                                    onchange={dataChange} data-field="outOutPattern"
-                                                    style="min-width: 120px;" class="inputFont"></lightning-combobox>
-                                            </div>
-                                        </lightning-layout-item>
-                                    </template>
-                                </lightning-layout>
+                      <lightning-layout-item
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-output-field
+                          field-name="SummonsStatus_c__c"
+                          class="hehe-layoutItem"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
 
-                                <lightning-layout multiple-rows style="margin-top: 10px;">
-                                    <lightning-layout-item style="padding-left: 10px;visibility:hidden;"
-                                        flexibility="auto">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label">娑堣�楀搧鍚嶇О</div>
-                                            <lightning-input type="text" name="consumableName" label="娑堣�楀搧鍚嶇О"
-                                                value={consumableName} variant="label-hidden" onchange={dataChange}
-                                                data-field="consumableName" class="inputFont"
-                                                style="width:150px"></lightning-input>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto" style="visibility:hidden;">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label" style="width:80px">绗�3鍒嗙被</div>
-                                            <lightning-combobox name="progress" label="绗�3鍒嗙被" value={Category3}
-                                                variant="label-hidden" options={category3Options} onchange={dataChange}
-                                                data-field="Category3" style="min-width: 120px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
-                                    </lightning-layout-item>
-                                    <lightning-layout-item flexibility="auto" style="visibility:hidden;">
-                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                            <div class="slds-form-element__label" style="width:80px">绗�4鍒嗙被</div>
-                                            <lightning-combobox name="progress" label="绗�4鍒嗙被" value={Category4}
-                                                variant="label-hidden" options={category4Options} onchange={dataChange}
-                                                data-field="Category4" style="min-width: 120px;"
-                                                class="inputFont"></lightning-combobox>
-                                        </div>
+                      <lightning-layout-item size="1"></lightning-layout-item>
+                    </template>
+                  </lightning-layout>
 
-                                    </lightning-layout-item>
-                                    <template if:false={hasHosPro}>
-                                        <lightning-layout-item flexibility="auto">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <button
-                                                    class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
-                                                    onclick={searchProductJs}
-                                                    style="min-width: 80px;max-width: 100px;">妫�绱�</button>
-                                                <button style="margin-left:10px;min-width: 80px;max-width: 100px;"
-                                                    class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
-                                                    onclick={ClearJs}>娓呯┖</button>
-                                            </div>
-                                        </lightning-layout-item>
-                                    </template>
-                                    <template if:true={hasHosPro}>
-                                        <lightning-layout-item flexibility="auto" style="visibility:hidden;">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <div class="slds-form-element__label" style="width:80px">绗�5鍒嗙被</div>
-                                                <lightning-combobox name="progress" label="绗�5鍒嗙被" value={Category5}
-                                                    variant="label-hidden" onchange={dataChange} data-field="Category5"
-                                                    options={category5Options} style="min-width: 120px;"
-                                                    class="inputFont"></lightning-combobox>
-                                            </div>
-                                        </lightning-layout-item>
-                                        <lightning-layout-item flexibility="auto">
-                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                <button
-                                                    class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
-                                                    onclick={searchProductJs}
-                                                    style="min-width: 80px;max-width: 110px;">妫�绱�</button>
-                                                <button style="margin-left:10px;min-width: 80px;max-width: 110px;"
-                                                    class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
-                                                    onclick={ClearJs}>娓呯┖</button>
-                                            </div>
-                                        </lightning-layout-item>
-                                    </template>
-                                </lightning-layout>
-                            </div>
-                        </div>
-                    </div>
-                </template>
+                  <!-- 鐩殑   寮�绁ㄧ姸鎬� -->
+                  <lightning-layout multiple-rows="true">
+                    <lightning-layout-item size="1"></lightning-layout-item>
 
-                <!-- 鍑哄簱鍗曟槑缁� -->
-                <div class="borderCss">
-                    <div class="headerDorderCss">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>鍑哄簱鍗曟槑缁�</strong>
+                    <lightning-layout-item size="5">
+                      <lightning-output-field
+                        field-name="SummonsForDirction__c"
+                        class="hehe-layoutItem"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+
+                    <lightning-layout-item size="5" style="padding-left: 100px">
+                      <lightning-output-field
+                        field-name="Billed_Status__c"
+                        class="hehe-layoutItem"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+
+                    <lightning-layout-item size="1"></lightning-layout-item>
+                  </lightning-layout>
+
+                  <!-- 浜岀骇缁忛攢鍟� -->
+                  <template if:true={isSummonsForDirctionTwoShow}>
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"></lightning-layout-item>
+
+                      <lightning-layout-item size="5">
+                        <lightning-output-field
+                          field-name="Order_Dealer_Info__c"
+                          class="hehe-layoutItem"
+                        ></lightning-output-field>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </template>
+
+                  <!-- 瀹㈡埛鍚� 鍙戠エ-->
+                  <lightning-layout multiple-rows="true">
+                    <lightning-layout-item size="1"></lightning-layout-item>
+
+                    <lightning-layout-item size="5" class="hehe-layoutItem">
+                      <lightning-output-field
+                        class="hideHelpText"
+                        field-name="ShipmentAccount__c"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+
+                    <template if:true={isConInvoiceShow}>
+                      <lightning-layout-item
+                        size="5"
+                        style="padding-left: 100px"
+                      >
+                        <lightning-input-field
+                          data-field={ConInvoice_Code__c}
+                          onchange={invoiceChange}
+                          field-name="ConInvoice_Code__c"
+                          class="hehe-layoutItem inputFont"
+                        ></lightning-input-field>
+                      </lightning-layout-item>
+                    </template>
+
+                    <lightning-layout-item size="1"></lightning-layout-item>
+                  </lightning-layout>
+
+                  <!-- 绉戝 鍑哄簱閲戦 -->
+                  <lightning-layout multiple-rows="true">
+                    <lightning-layout-item size="1"></lightning-layout-item>
+
+                    <lightning-layout-item size="5">
+                      <lightning-output-field
+                        field-name="Order_ForCustomerText__c"
+                        class="hehe-layoutItem"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+
+                    <lightning-layout-item size="5" style="padding-left: 100px">
+                      <lightning-output-field
+                        field-name="Shipment_total_amount__c"
+                        class="hehe-layoutItem"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+
+                    <lightning-layout-item size="1"></lightning-layout-item>
+                  </lightning-layout>
+
+                  <!-- 娌℃湁纭畾浠锋牸 -->
+                  <lightning-layout multiple-rows="true">
+                    <lightning-layout-item size="1"></lightning-layout-item>
+
+                    <lightning-layout-item size="5">
+                      <lightning-output-field
+                        field-name="NoConfirmedPrice__c"
+                        class="hehe-layoutItem"
+                      ></lightning-output-field>
+                    </lightning-layout-item>
+                  </lightning-layout>
+
+                  <!-- 闄勪欢棰勮 -->
+                  <template if:false={EditAble}>
+                    <lightning-layout multiple-rows="true">
+                      <lightning-layout-item size="1"> </lightning-layout-item>
+                      <lightning-layout-item size="10">
+                        <lightning-card
+                          class="attListTitle"
+                          variant="Narrow"
+                          title="闄勪欢鍒楄〃"
+                          icon-name="utility:attach"
+                        >
+                          <lightning-layout slot="footer" multiple-rows="true">
+                            <template
+                              for:each={fileData}
+                              for:item="item"
+                              for:index="index"
+                            >
+                              <lightning-layout-item
+                                padding="around-none"
+                                size="2"
+                                key={item.recordId}
+                                style="
+                                  text-align: left;
+                                  padding: 5px;
+                                  word-wrap: break-word;
+                                  word-break: break-all;
+                                "
+                              >
+                                <lightning-icon
+                                  title={item.Title}
+                                  style="margin-left: 20px"
+                                  icon-name="doctype:gform"
+                                  alternative-text={item.Title}
+                                  size="large"
+                                ></lightning-icon
+                                ><br />
+                                <div
+                                  title={item.Title}
+                                  style="
+                                    width: 100px;
+                                    text-overflow: ellipsis;
+                                    overflow: hidden;
+                                    white-space: nowrap;
+                                  "
+                                >
+                                  {item.Title}
+                                </div>
+                                <p>
+                                  <!-- <a data-fileid ={item.documentId} onclick={previweAtt}> -->
+                                  <a href={item.attUrl} target="_blank">
+                                    棰勮 </a
+                                  >&nbsp;路&nbsp;
+                                  <a href={item.downloadUrl}> 涓嬭浇 </a
+                                  >&nbsp;路&nbsp;
+                                  <a data-fileid={item.Id} onclick={deleteAtt}>
+                                    鍒犻櫎
+                                  </a>
                                 </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                    </div>
-                    <div style="padding: 7px">
-                        <template if:true={EditAble}>
-                            <template if:true={showTable}>
-                                <c-lex-custom-lightning-datatable key-field="Id" data={data} columns={columns}
-                                    hide-checkbox-column={hideCheckboxColumn} onunitchange={handleUnitChange}
-                                    onshipmentnumber={handleShipmentNumber}
-                                    onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
-                                    selected-rows={selectedRows} default-sort-direction={defaultSortDirection}
-                                    sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
-                                    style="word-wrap:break-word; word-break:break-all; "
-                                    class="wrapped-header-datatable" min-column-width="110">
-                                </c-lex-custom-lightning-datatable>
+                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
+                              </lightning-layout-item>
                             </template>
-                            <c-paginator onprevious={handlePrevious} onnext={handleNext}
-                                onpageschange={handlePageschange} onfirst={handleFirst} onlast={handleLast}
-                                page-size-options={pageSizeOptions} previous-button-disabled={previousButtonDisabled}
-                                next-button-disabled={nextButtonDisabled} record-start={recordStart}
-                                record-end={recordEnd} total-records={totalRecords}></c-paginator>
-                        </template>
+                          </lightning-layout>
+                        </lightning-card>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </template>
+                </lightning-record-edit-form>
+              </div>
+            </div>
+          </div>
+        </template>
 
-                        <template if:false={EditAble}>
-                            <template if:true={showTable}>
-                                <c-lex-custom-lightning-datatable hide-checkbox-column key-field="Id" data={editData}
-                                    columns={editColumns} onunitchange={handleUnitChange}
-                                    onshipmentnumber={handleShipmentNumber}
-                                    onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
-                                    selected-rows={selectedRows} default-sort-direction={defaultSortDirection}
-                                    sorted-direction={sortDirection} sorted-by={sortedBy} onsort={onHandleSort}
-                                    style="word-wrap:break-word; word-break:break-all; "
-                                    class="wrapped-header-datatable" min-column-width="110">
-                                </c-lex-custom-lightning-datatable>
-                                <c-paginator onprevious={editHandlePrevious} onnext={editHandleNext}
-                                    onpageschange={editHandlePageschange} onfirst={editHandleFirst}
-                                    onlast={editHandleLast} page-size-options={pageSizeOptions}
-                                    previous-button-disabled={previousButtonDisabled}
-                                    next-button-disabled={nextButtonDisabled} record-start={recordStart}
-                                    record-end={recordEnd} total-records={totalRecords}></c-paginator>
-                            </template>
-                        </template>
-
-                        <template if:true={isEditShowSpinner}>
-                            <lightning-spinner alternative-text="Uploading now"></lightning-spinner>
-                        </template>
+        <!-- 妫�绱� -->
+        <template if:true={isSearchShow}>
+          <div class="borderCss">
+            <div style="padding: 3px">
+              <div lwc:dom="manual" class="resultDiv"></div>
+              <div draggable="false">
+                <lightning-layout multiple-rows style="margin-top: 10px">
+                  <lightning-layout-item
+                    style="padding-left: 10px"
+                    flexibility="auto"
+                  >
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label">娑堣�楀搧鍚嶇О</div>
+                      <lightning-input
+                        type="text"
+                        name="consumableName"
+                        label="娑堣�楀搧鍚嶇О"
+                        value={consumableName}
+                        variant="label-hidden"
+                        onchange={dataChange}
+                        data-field="consumableName"
+                        class="inputFont"
+                        style="width: 150px"
+                      ></lightning-input>
                     </div>
-                </div>
-
-                <!-- 鍑哄簱浜у搧鏄庣粏 -->
-                <template if:true={isShowOutboundProductDetails}>
-                    <div class="borderCss">
-                        <div class="headerDorderCss">
-                            <lightning-layout>
-                                <lightning-layout-item padding="around-small">
-                                    <p style="font-size: 18px">
-                                        <strong>鍑哄簱浜у搧鏄庣粏</strong>
-                                    </p>
-                                </lightning-layout-item>
-                            </lightning-layout>
-                        </div>
-                        <div style="padding: 7px">
-                            <lightning-datatable key-field="id" data={consumableorderdetails2Records}
-                                columns={consumableorderdetails2RecordsColumns} hide-checkbox-column
-                                class="wrapped-header-datatable">
-                            </lightning-datatable>
-                        </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label" style="width: 80px">
+                        绗�3鍒嗙被
+                      </div>
+                      <lightning-combobox
+                        name="progress"
+                        label="绗�3鍒嗙被"
+                        value={Category3}
+                        variant="label-hidden"
+                        options={category3Options}
+                        onchange={dataChange}
+                        data-field="Category3"
+                        style="min-width: 120px"
+                        class="inputFont"
+                      ></lightning-combobox>
                     </div>
-                </template>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label" style="width: 80px">
+                        绗�4鍒嗙被
+                      </div>
+                      <lightning-combobox
+                        name="progress"
+                        label="绗�4鍒嗙被"
+                        value={Category4}
+                        variant="label-hidden"
+                        options={category4Options}
+                        onchange={dataChange}
+                        data-field="Category4"
+                        style="min-width: 120px"
+                        class="inputFont"
+                      ></lightning-combobox>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item flexibility="auto">
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label" style="width: 80px">
+                        绗�5鍒嗙被
+                      </div>
+                      <lightning-combobox
+                        name="progress"
+                        label="绗�5鍒嗙被"
+                        value={Category5}
+                        variant="label-hidden"
+                        onchange={dataChange}
+                        data-field="Category5"
+                        options={category5Options}
+                        style="min-width: 120px"
+                        class="inputFont"
+                      ></lightning-combobox>
+                    </div>
+                  </lightning-layout-item>
+                  <template if:true={hasHosPro}>
+                    <lightning-layout-item flexibility="auto">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div class="slds-form-element__label">鍖婚櫌鐗逛环</div>
+                        <lightning-combobox
+                          name="progress"
+                          label="鍖婚櫌鐗逛环"
+                          value={outOutPattern}
+                          variant="label-hidden"
+                          options={outOutPatternOptionList}
+                          onchange={dataChange}
+                          data-field="outOutPattern"
+                          style="min-width: 120px"
+                          class="inputFont"
+                        ></lightning-combobox>
+                      </div>
+                    </lightning-layout-item>
+                  </template>
+                </lightning-layout>
 
-                <!-- 涓婁紶闄勪欢 -->
-                <!-- <template if:false={EditAble}>
+                <lightning-layout multiple-rows style="margin-top: 10px">
+                  <lightning-layout-item
+                    style="padding-left: 10px; visibility: hidden"
+                    flexibility="auto"
+                  >
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label">娑堣�楀搧鍚嶇О</div>
+                      <lightning-input
+                        type="text"
+                        name="consumableName"
+                        label="娑堣�楀搧鍚嶇О"
+                        value={consumableName}
+                        variant="label-hidden"
+                        onchange={dataChange}
+                        data-field="consumableName"
+                        class="inputFont"
+                        style="width: 150px"
+                      ></lightning-input>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item
+                    flexibility="auto"
+                    style="visibility: hidden"
+                  >
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label" style="width: 80px">
+                        绗�3鍒嗙被
+                      </div>
+                      <lightning-combobox
+                        name="progress"
+                        label="绗�3鍒嗙被"
+                        value={Category3}
+                        variant="label-hidden"
+                        options={category3Options}
+                        onchange={dataChange}
+                        data-field="Category3"
+                        style="min-width: 120px"
+                        class="inputFont"
+                      ></lightning-combobox>
+                    </div>
+                  </lightning-layout-item>
+                  <lightning-layout-item
+                    flexibility="auto"
+                    style="visibility: hidden"
+                  >
+                    <div class="slds-grid slds-grid_vertical-align-center">
+                      <div class="slds-form-element__label" style="width: 80px">
+                        绗�4鍒嗙被
+                      </div>
+                      <lightning-combobox
+                        name="progress"
+                        label="绗�4鍒嗙被"
+                        value={Category4}
+                        variant="label-hidden"
+                        options={category4Options}
+                        onchange={dataChange}
+                        data-field="Category4"
+                        style="min-width: 120px"
+                        class="inputFont"
+                      ></lightning-combobox>
+                    </div>
+                  </lightning-layout-item>
+                  <template if:false={hasHosPro}>
+                    <lightning-layout-item flexibility="auto">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <button
+                          class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
+                          onclick={searchProductJs}
+                          style="min-width: 80px; max-width: 100px"
+                        >
+                          妫�绱�
+                        </button>
+                        <button
+                          style="
+                            margin-left: 10px;
+                            min-width: 80px;
+                            max-width: 100px;
+                          "
+                          class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
+                          onclick={ClearJs}
+                        >
+                          娓呯┖
+                        </button>
+                      </div>
+                    </lightning-layout-item>
+                  </template>
+                  <template if:true={hasHosPro}>
+                    <lightning-layout-item
+                      flexibility="auto"
+                      style="visibility: hidden"
+                    >
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <div
+                          class="slds-form-element__label"
+                          style="width: 80px"
+                        >
+                          绗�5鍒嗙被
+                        </div>
+                        <lightning-combobox
+                          name="progress"
+                          label="绗�5鍒嗙被"
+                          value={Category5}
+                          variant="label-hidden"
+                          onchange={dataChange}
+                          data-field="Category5"
+                          options={category5Options}
+                          style="min-width: 120px"
+                          class="inputFont"
+                        ></lightning-combobox>
+                      </div>
+                    </lightning-layout-item>
+                    <lightning-layout-item flexibility="auto">
+                      <div class="slds-grid slds-grid_vertical-align-center">
+                        <button
+                          class="slds-button slds-button_neutral slds-button_stretch lexBorder lexsearchStyle"
+                          onclick={searchProductJs}
+                          style="min-width: 80px; max-width: 110px"
+                        >
+                          妫�绱�
+                        </button>
+                        <button
+                          style="
+                            margin-left: 10px;
+                            min-width: 80px;
+                            max-width: 110px;
+                          "
+                          class="slds-button slds-button_neutral slds-button_stretch lexBorder lexclearStyle"
+                          onclick={ClearJs}
+                        >
+                          娓呯┖
+                        </button>
+                      </div>
+                    </lightning-layout-item>
+                  </template>
+                </lightning-layout>
+              </div>
+            </div>
+          </div>
+        </template>
+
+        <!-- 鍑哄簱鍗曟槑缁� -->
+        <div class="borderCss">
+          <div class="headerDorderCss">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>鍑哄簱鍗曟槑缁�</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+          <div style="padding: 7px">
+            <template if:true={EditAble}>
+              <template if:true={showTable}>
+                <c-lex-custom-lightning-datatable
+                  key-field="Id"
+                  data={data}
+                  columns={columns}
+                  hide-checkbox-column={hideCheckboxColumn}
+                  onunitchange={handleUnitChange}
+                  onshipmentnumber={handleShipmentNumber}
+                  onshipmentunitprice={handleShipmentUnitPrice}
+                  onrowselection={getSelectedRows}
+                  selected-rows={selectedRows}
+                  default-sort-direction={defaultSortDirection}
+                  sorted-direction={sortDirection}
+                  sorted-by={sortedBy}
+                  onsort={onHandleSort}
+                  style="word-wrap: break-word; word-break: break-all"
+                  class="wrapped-header-datatable slds-is-selected"
+                >
+                </c-lex-custom-lightning-datatable>
+              </template>
+              <c-paginator
+                onprevious={handlePrevious}
+                onnext={handleNext}
+                onpageschange={handlePageschange}
+                onfirst={handleFirst}
+                onlast={handleLast}
+                page-size-options={pageSizeOptions}
+                previous-button-disabled={previousButtonDisabled}
+                next-button-disabled={nextButtonDisabled}
+                record-start={recordStart}
+                record-end={recordEnd}
+                total-records={totalRecords}
+              ></c-paginator>
+            </template>
+
+            <template if:false={EditAble}>
+              <template if:true={showTable}>
+                <c-lex-custom-lightning-datatable
+                  hide-checkbox-column
+                  key-field="Id"
+                  data={editData}
+                  columns={editColumns}
+                  onunitchange={handleUnitChange}
+                  onshipmentnumber={handleShipmentNumber}
+                  onshipmentunitprice={handleShipmentUnitPrice}
+                  onrowselection={getSelectedRows}
+                  selected-rows={selectedRows}
+                  default-sort-direction={defaultSortDirection}
+                  sorted-direction={sortDirection}
+                  sorted-by={sortedBy}
+                  onsort={onHandleSort}
+                  style="word-wrap: break-word; word-break: break-all"
+                  class="wrapped-header-datatable slds-is-selected"
+                >
+                </c-lex-custom-lightning-datatable>
+                <c-paginator
+                  onprevious={editHandlePrevious}
+                  onnext={editHandleNext}
+                  onpageschange={editHandlePageschange}
+                  onfirst={editHandleFirst}
+                  onlast={editHandleLast}
+                  page-size-options={pageSizeOptions}
+                  previous-button-disabled={previousButtonDisabled}
+                  next-button-disabled={nextButtonDisabled}
+                  record-start={recordStart}
+                  record-end={recordEnd}
+                  total-records={totalRecords}
+                ></c-paginator>
+              </template>
+            </template>
+
+            <template if:true={isEditShowSpinner}>
+              <lightning-spinner
+                alternative-text="Uploading now"
+              ></lightning-spinner>
+            </template>
+          </div>
+        </div>
+
+        <!-- 鍑哄簱浜у搧鏄庣粏 -->
+        <template if:true={isShowOutboundProductDetails}>
+          <div class="borderCss">
+            <div class="headerDorderCss">
+              <lightning-layout>
+                <lightning-layout-item padding="around-small">
+                  <p style="font-size: 18px">
+                    <strong>鍑哄簱浜у搧鏄庣粏</strong>
+                  </p>
+                </lightning-layout-item>
+              </lightning-layout>
+            </div>
+            <div style="padding: 7px">
+              <lightning-datatable
+                key-field="id"
+                data={consumableorderdetails2Records}
+                columns={consumableorderdetails2RecordsColumns}
+                hide-checkbox-column
+                class="wrapped-header-datatable"
+              >
+              </lightning-datatable>
+            </div>
+          </div>
+        </template>
+
+        <!-- 涓婁紶闄勪欢 -->
+        <!-- <template if:false={EditAble}>
                     <div class="borderCss">
                         <div class="headerDorderCss">
                             <lightning-layout>
@@ -931,236 +1329,319 @@
                         </div>
                     </div>
                 </template> -->
-            </template>
+      </template>
 
-            <!-- 鍑鸿揣/閿�鍞� -->
-            <template if:true={isShippingSales}>
-                <div class="borderCss">
-                    <div class="headerDorderCss">
-                        <lightning-layout>
-                            <lightning-layout-item padding="around-small">
-                                <p style="font-size: 18px">
-                                    <strong>鍑鸿揣绠$悊</strong>
-                                </p>
-                            </lightning-layout-item>
-                        </lightning-layout>
-                    </div>
-                    <div style="padding: 7px;">
-                        <div lwc:dom="manual" class="resultDiv"></div>
-                        <div draggable="false">
-                            <lightning-layout multiple-rows="true" style="height:50px">
-                                <lightning-layout-item class="hehe-layoutItem" size="4">
-                                </lightning-layout-item>
-                                <template if:true={isSales}>
-                                    <lightning-layout-item class="hehe-layoutItem" size="4">
-                                        <!-- <lightning-button label="閿�鍞�" onclick={SaveP}
+      <!-- 鍑鸿揣/閿�鍞� -->
+      <template if:true={isShippingSales}>
+        <div class="borderCss">
+          <div class="headerDorderCss">
+            <lightning-layout>
+              <lightning-layout-item padding="around-small">
+                <p style="font-size: 18px">
+                  <strong>鍑鸿揣绠$悊</strong>
+                </p>
+              </lightning-layout-item>
+            </lightning-layout>
+          </div>
+          <div style="padding: 7px">
+            <div lwc:dom="manual" class="resultDiv"></div>
+            <div draggable="false">
+              <lightning-layout multiple-rows="true" style="height: 50px">
+                <lightning-layout-item class="hehe-layoutItem" size="4">
+                </lightning-layout-item>
+                <template if:true={isSales}>
+                  <lightning-layout-item class="hehe-layoutItem" size="4">
+                    <!-- <lightning-button label="閿�鍞�" onclick={SaveP}
                                             style="margin-top:-10px"></lightning-button> -->
-                                        <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                            onclick={SaveP}>閿�鍞�</button>
-                                    </lightning-layout-item>
-                                </template>
-                                <template if:false={isSales}>
-                                    <lightning-layout-item class="hehe-layoutItem" size="4">
-                                        <!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
-                                        <button class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                            onclick={SaveE}>鍑鸿揣</button>
-                                    </lightning-layout-item>
-                                </template>
-                                <lightning-layout-item class="hehe-layoutItem" size="4">
-                                </lightning-layout-item>
-                            </lightning-layout>
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                      onclick={SaveP}
+                    >
+                      閿�鍞�
+                    </button>
+                  </lightning-layout-item>
+                </template>
+                <template if:false={isSales}>
+                  <lightning-layout-item class="hehe-layoutItem" size="4">
+                    <!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
+                    <button
+                      class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                      onclick={SaveE}
+                    >
+                      鍑鸿揣
+                    </button>
+                  </lightning-layout-item>
+                </template>
+                <lightning-layout-item class="hehe-layoutItem" size="4">
+                </lightning-layout-item>
+              </lightning-layout>
 
-                            <template if:true={isShowInformation}>
-                                <div class="borderCss" style="margin-top: 5px;">
-                                    <div class="headerDorderCss">
-                                        <lightning-layout>
-                                            <lightning-layout-item padding="around-small">
-                                                <p style="font-size: 18px">
-                                                    <strong>鍑哄簱鍗曚俊鎭�</strong>
-                                                </p>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </div>
-                                    <div style="padding: 7px">
-                                        <div lwc:dom="manual" class="resultDiv"></div>
-                                        <div draggable="false">
-                                            <lightning-record-edit-form object-api-name="Consumable_order__c"
-                                                record-id={cocId} onload={handleLoad2}>
-                                                <lightning-layout multiple-rows="true">
-                                                    <lightning-layout-item size="3" padding="around-small">
-                                                        <!-- <lightning-output-field field-name="Name"></lightning-output-field> -->
-                                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                                            <div class="slds-form-element__label" style="padding: 0px;">
-                                                                鍑哄簱鍗曞彿锛�</div>
-                                                            <lightning-output-field field-name="Name"
-                                                                variant="label-hidden"></lightning-output-field>
-                                                        </div>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="4" padding="around-small">
-                                                        <!-- <lightning-output-field
+              <template if:true={isShowInformation}>
+                <div class="borderCss" style="margin-top: 5px">
+                  <div class="headerDorderCss">
+                    <lightning-layout>
+                      <lightning-layout-item padding="around-small">
+                        <p style="font-size: 18px">
+                          <strong>鍑哄簱鍗曚俊鎭�</strong>
+                        </p>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </div>
+                  <div style="padding: 7px">
+                    <div lwc:dom="manual" class="resultDiv"></div>
+                    <div draggable="false">
+                      <lightning-record-edit-form
+                        object-api-name="Consumable_order__c"
+                        record-id={cocId}
+                        onload={handleLoad2}
+                      >
+                        <lightning-layout multiple-rows="true">
+                          <lightning-layout-item
+                            size="3"
+                            padding="around-small"
+                          >
+                            <!-- <lightning-output-field field-name="Name"></lightning-output-field> -->
+                            <div
+                              class="slds-grid slds-grid_vertical-align-center"
+                            >
+                              <div
+                                class="slds-form-element__label"
+                                style="padding: 0px"
+                              >
+                                鍑哄簱鍗曞彿锛�
+                              </div>
+                              <lightning-output-field
+                                field-name="Name"
+                                variant="label-hidden"
+                              ></lightning-output-field>
+                            </div>
+                          </lightning-layout-item>
+                          <lightning-layout-item
+                            size="4"
+                            padding="around-small"
+                          >
+                            <!-- <lightning-output-field
                                                             field-name="ShipmentAccount__c" class="hideHelpText"></lightning-output-field> -->
-                                                        <div
-                                                            class="slds-grid slds-grid_vertical-align-center hehe-layoutItem">
-                                                            <div class="slds-form-element__label" style="padding: 0px;">
-                                                                瀹㈡埛鍚嶏細</div>
-                                                            <lightning-output-field field-name="ShipmentAccount__c"
-                                                                variant="label-hidden"></lightning-output-field>
-                                                        </div>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" padding="around-small">
-                                                        <!-- <lightning-output-field
+                            <div
+                              class="slds-grid slds-grid_vertical-align-center hehe-layoutItem"
+                            >
+                              <div
+                                class="slds-form-element__label"
+                                style="padding: 0px"
+                              >
+                                瀹㈡埛鍚嶏細
+                              </div>
+                              <lightning-output-field
+                                field-name="ShipmentAccount__c"
+                                variant="label-hidden"
+                              ></lightning-output-field>
+                            </div>
+                          </lightning-layout-item>
+                          <lightning-layout-item
+                            size="2"
+                            padding="around-small"
+                          >
+                            <!-- <lightning-output-field
                                                             field-name="Order_ForCustomerText__c"></lightning-output-field> -->
-                                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                                            <div class="slds-form-element__label" style="padding: 0px;">
-                                                                绉戝锛�</div>
-                                                            <lightning-output-field
-                                                                field-name="Order_ForCustomerText__c"
-                                                                variant="label-hidden"></lightning-output-field>
-                                                        </div>
-                                                    </lightning-layout-item>
-                                                    <lightning-layout-item size="2" padding="around-small">
-                                                        <!-- <lightning-output-field
+                            <div
+                              class="slds-grid slds-grid_vertical-align-center"
+                            >
+                              <div
+                                class="slds-form-element__label"
+                                style="padding: 0px"
+                              >
+                                绉戝锛�
+                              </div>
+                              <lightning-output-field
+                                field-name="Order_ForCustomerText__c"
+                                variant="label-hidden"
+                              ></lightning-output-field>
+                            </div>
+                          </lightning-layout-item>
+                          <lightning-layout-item
+                            size="2"
+                            padding="around-small"
+                          >
+                            <!-- <lightning-output-field
                                                             field-name="SummonsForDirction__c"></lightning-output-field> -->
-                                                        <div class="slds-grid slds-grid_vertical-align-center">
-                                                            <div class="slds-form-element__label" style="padding: 0px;">
-                                                                鐩殑锛�</div>
-                                                            <lightning-output-field field-name="SummonsForDirction__c"
-                                                                variant="label-hidden"></lightning-output-field>
-                                                        </div>
-                                                    </lightning-layout-item>
-                                                </lightning-layout>
-                                            </lightning-record-edit-form>
-                                        </div>
-                                    </div>
-                                </div>
+                            <div
+                              class="slds-grid slds-grid_vertical-align-center"
+                            >
+                              <div
+                                class="slds-form-element__label"
+                                style="padding: 0px"
+                              >
+                                鐩殑锛�
+                              </div>
+                              <lightning-output-field
+                                field-name="SummonsForDirction__c"
+                                variant="label-hidden"
+                              ></lightning-output-field>
+                            </div>
+                          </lightning-layout-item>
+                        </lightning-layout>
+                      </lightning-record-edit-form>
+                    </div>
+                  </div>
+                </div>
 
-                                <template if:true={isBarcode}>
-                                    <div class="borderCss">
-                                        <div class="headerDorderCss">
-                                            <lightning-layout>
-                                                <lightning-layout-item padding="around-small">
-                                                    <p style="font-size: 18px">
-                                                        <strong>BarCode褰曞叆</strong>
-                                                    </p>
-                                                </lightning-layout-item>
-                                            </lightning-layout>
-                                        </div>
-                                        <div style="padding: 7px">
-                                            <div lwc:dom="manual" class="resultDiv"></div>
-                                            <div draggable="false">
-                                                <lightning-record-edit-form object-api-name="Consumable_order__c"
-                                                    record-id={cocId}>
-                                                    <lightning-layout multiple-rows="true">
-                                                        <lightning-layout-item size="1"></lightning-layout-item>
-                                                        <lightning-layout-item padding="around-small">
-                                                            <!-- <lightning-textarea name="Barcode" label="BarCode鍙�"
+                <template if:true={isBarcode}>
+                  <div class="borderCss">
+                    <div class="headerDorderCss">
+                      <lightning-layout>
+                        <lightning-layout-item padding="around-small">
+                          <p style="font-size: 18px">
+                            <strong>BarCode褰曞叆</strong>
+                          </p>
+                        </lightning-layout-item>
+                      </lightning-layout>
+                    </div>
+                    <div style="padding: 7px">
+                      <div lwc:dom="manual" class="resultDiv"></div>
+                      <div draggable="false">
+                        <lightning-record-edit-form
+                          object-api-name="Consumable_order__c"
+                          record-id={cocId}
+                        >
+                          <lightning-layout multiple-rows="true">
+                            <lightning-layout-item
+                              size="1"
+                            ></lightning-layout-item>
+                            <lightning-layout-item padding="around-small">
+                              <!-- <lightning-textarea name="Barcode" label="BarCode鍙�"
                                                                 onchange={dataChange} variant="label-inline"
                                                                 data-field="Barcode"
                                                                 value={Barcode}></lightning-textarea> -->
 
-                                                            <div class="slds-grid">
-                                                                <div class="slds-form-element__label">BarCode鍙�</div>
-                                                                <lightning-textarea name="Barcode" label="BarCode鍙�"
-                                                                    onchange={dataChange} variant="label-hidden"
-                                                                    data-field="Barcode" value={Barcode}
-                                                                    style="min-width: 400px;"></lightning-textarea>
-                                                            </div>
-                                                        </lightning-layout-item>
-                                                        <lightning-layout-item padding="around-small">
-                                                            <div class="slds-grid slds-grid_vertical-align-center">
-                                                                <div class="slds-form-element__label">
-                                                                    <!-- <lightning-button label="纭"
+                              <div class="slds-grid">
+                                <div class="slds-form-element__label">
+                                  BarCode鍙�
+                                </div>
+                                <lightning-textarea
+                                  name="Barcode"
+                                  label="BarCode鍙�"
+                                  onchange={dataChange}
+                                  variant="label-hidden"
+                                  data-field="Barcode"
+                                  value={Barcode}
+                                  style="min-width: 400px"
+                                ></lightning-textarea>
+                              </div>
+                            </lightning-layout-item>
+                            <lightning-layout-item padding="around-small">
+                              <div
+                                class="slds-grid slds-grid_vertical-align-center"
+                              >
+                                <div class="slds-form-element__label">
+                                  <!-- <lightning-button label="纭"
                                                                         onclick={SalesearchProductJs}></lightning-button> -->
-                                                                    <button
-                                                                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                                        onclick={SalesearchProductJs}>鑾峰彇鏄庣粏</button>
-                                                                </div>
-                                                            </div>
-                                                        </lightning-layout-item>
-                                                    </lightning-layout>
-                                                </lightning-record-edit-form>
-                                            </div>
-                                        </div>
-                                    </div>
-                                </template>
+                                  <button
+                                    class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                                    onclick={SalesearchProductJs}
+                                  >
+                                    鑾峰彇鏄庣粏
+                                  </button>
+                                </div>
+                              </div>
+                            </lightning-layout-item>
+                          </lightning-layout>
+                        </lightning-record-edit-form>
+                      </div>
+                    </div>
+                  </div>
+                </template>
 
-                                <div class="borderCss">
-                                    <div class="headerDorderCss">
-                                        <lightning-layout>
-                                            <lightning-layout-item padding="around-small">
-                                                <p style="font-size: 18px">
-                                                    <strong>鍑鸿揣鏄庣粏</strong>
-                                                </p>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </div>
-                                    <div style="padding: 7px">
-                                        <div lwc:dom="manual" class="resultDiv"></div>
-                                        <div draggable="false">
-                                            <!-- <lightning-datatable key-field="id" data={salesData} columns={salesColumns}
+                <div class="borderCss">
+                  <div class="headerDorderCss">
+                    <lightning-layout>
+                      <lightning-layout-item padding="around-small">
+                        <p style="font-size: 18px">
+                          <strong>鍑鸿揣鏄庣粏</strong>
+                        </p>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </div>
+                  <div style="padding: 7px">
+                    <div lwc:dom="manual" class="resultDiv"></div>
+                    <div draggable="false">
+                      <!-- <lightning-datatable key-field="id" data={salesData} columns={salesColumns}
                                                 hide-checkbox-column
                                                 style="word-wrap:break-word; word-break:break-all; "
                                                 class="wrapped-header-datatable">
                                             </lightning-datatable> -->
-                                            <c-lex-custom-lightning-datatable key-field="Id" data={salesData}
-                                                columns={salesColumns} onoutboundcount={handleOutboundCount}
-                                                hide-checkbox-column
-                                                style="word-wrap:break-word; word-break:break-all; "
-                                                class="wrapped-header-datatable" min-column-width="120">
-                                            </c-lex-custom-lightning-datatable>
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <div class="borderCss">
-                                    <div class="headerDorderCss">
-                                        <lightning-layout>
-                                            <lightning-layout-item padding="around-small">
-                                                <p style="font-size: 18px">
-                                                    <strong>鍑鸿揣閿欒鏄庣粏</strong>
-                                                </p>
-                                            </lightning-layout-item>
-                                        </lightning-layout>
-                                    </div>
-                                    <div style="padding: 7px">
-                                        <div lwc:dom="manual" class="resultDiv"></div>
-                                        <div draggable="false">
-                                            <lightning-datatable key-field="id" data={salesErrorData}
-                                                columns={salesErrorColumns} hide-checkbox-column min-column-width="120"
-                                                style="word-wrap:break-word; word-break:break-all; "
-                                                class="wrapped-header-datatable">
-                                            </lightning-datatable>
-                                        </div>
-                                    </div>
-                                </div>
-
-                                <lightning-layout multiple-rows="true">
-                                    <lightning-layout-item class="hehe-layoutItem" size="4">
-                                    </lightning-layout-item>
-                                    <template if:true={isSales}>
-                                        <lightning-layout-item class="hehe-layoutItem" size="4">
-                                            <!-- <lightning-button label="閿�鍞�" onclick={SaveP}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={SaveP}>閿�鍞�</button>
-                                        </lightning-layout-item>
-                                    </template>
-                                    <template if:false={isSales}>
-                                        <lightning-layout-item class="hehe-layoutItem" size="4">
-                                            <!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
-                                            <button
-                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-                                                onclick={SaveE}>鍑鸿揣</button>
-                                        </lightning-layout-item>
-                                    </template>
-                                    <lightning-layout-item class="hehe-layoutItem" size="4">
-                                    </lightning-layout-item>
-                                </lightning-layout>
-                            </template>
-                        </div>
+                      <c-lex-custom-lightning-datatable
+                        key-field="Id"
+                        data={salesData}
+                        columns={salesColumns}
+                        onoutboundcount={handleOutboundCount}
+                        hide-checkbox-column
+                        style="word-wrap: break-word; word-break: break-all"
+                        class="wrapped-header-datatable"
+                      >
+                      </c-lex-custom-lightning-datatable>
                     </div>
+                  </div>
                 </div>
-            </template>
+
+                <div class="borderCss">
+                  <div class="headerDorderCss">
+                    <lightning-layout>
+                      <lightning-layout-item padding="around-small">
+                        <p style="font-size: 18px">
+                          <strong>鍑鸿揣閿欒鏄庣粏</strong>
+                        </p>
+                      </lightning-layout-item>
+                    </lightning-layout>
+                  </div>
+                  <div style="padding: 7px">
+                    <div lwc:dom="manual" class="resultDiv"></div>
+                    <div draggable="false">
+                      <lightning-datatable
+                        key-field="id"
+                        data={salesErrorData}
+                        columns={salesErrorColumns}
+                        hide-checkbox-column
+                        style="word-wrap: break-word; word-break: break-all"
+                        class="wrapped-header-datatable"
+                      >
+                      </lightning-datatable>
+                    </div>
+                  </div>
+                </div>
+
+                <lightning-layout multiple-rows="true">
+                  <lightning-layout-item class="hehe-layoutItem" size="4">
+                  </lightning-layout-item>
+                  <template if:true={isSales}>
+                    <lightning-layout-item class="hehe-layoutItem" size="4">
+                      <!-- <lightning-button label="閿�鍞�" onclick={SaveP}></lightning-button> -->
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={SaveP}
+                      >
+                        閿�鍞�
+                      </button>
+                    </lightning-layout-item>
+                  </template>
+                  <template if:false={isSales}>
+                    <lightning-layout-item class="hehe-layoutItem" size="4">
+                      <!-- <lightning-button label="鍑鸿揣" onclick={SaveE}></lightning-button> -->
+                      <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        onclick={SaveE}
+                      >
+                        鍑鸿揣
+                      </button>
+                    </lightning-layout-item>
+                  </template>
+                  <lightning-layout-item class="hehe-layoutItem" size="4">
+                  </lightning-layout-item>
+                </lightning-layout>
+              </template>
+            </div>
+          </div>
         </div>
+      </template>
     </div>
-</template>
\ No newline at end of file
+  </div>
+</template>
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
index 728b39d..f209d7b 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -1,4 +1,5 @@
-import { LightningElement, wire, api, track } from "lwc"; save
+import { LightningElement, wire, api, track } from "lwc";
+save;
 import init from "@salesforce/apex/LexSummonsCreatController.init";
 import { ShowToastEvent } from "lightning/platformShowToastEvent";
 import searchConsumableorderdetails from "@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails";
@@ -19,1120 +20,1081 @@
 import { getObjectInfo } from "lightning/uiObjectInfoApi";
 import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init";
 import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
-import deleteAtt from '@salesforce/apex/LexSummonsCreatController.deleteAtt';
+import deleteAtt from "@salesforce/apex/LexSummonsCreatController.deleteAtt";
 import { NavigationMixin } from "lightning/navigation";
-//table css 
+//table css
 import { loadStyle } from "lightning/platformResourceLoader";
 import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
 
-import ConsumableOutboundReportId from '@salesforce/label/c.ConsumableOutboundReportId';
+import ConsumableOutboundReportId from "@salesforce/label/c.ConsumableOutboundReportId";
 const customLabel = {
-    ConsumableOutboundReportId
-}
+  ConsumableOutboundReportId
+};
 
 export default class LexSummonsCreat extends NavigationMixin(LightningElement) {
-    @track label = customLabel;
-    @track isShowSpinner = true;
-    @track isEditShowSpinner = false;
-    @track showResults = true;
-    @track results = [
-        {
-            Id: "1",
-            Name: "z",
-        },
-        {
-            Id: "2",
-            Name: "h",
-        },
-        {
-            Id: "3",
-            Name: "j",
-        },
-    ];
-
-    @track COLS = [
-        {
-            label: "Account Name",
-            type: "customName",
-            typeAttributes: {
-                accountName: { fieldName: "Name" },
-            },
-        },
-    ];
-    @track columns = [
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "Name__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 175,
-            sortable: true
-        },
-        {
-            label: "瑙勬牸",
-            fieldName: "packinglist",
-            cellAttributes: { alignment: "right" },
-            wrapText: true,
-            initialWidth: 50,
-            hideDefaultActions: true,
-        },
-        {
-            label: "CFDA鐘舵��",
-            fieldName: "SFDA_Status__c",
-            initialWidth: 105,
-            wrapText: true,
-            hideDefaultActions: true,
-        },
-        {
-            label: "娉ㄥ唽璇佺紪鐮佸彿",
-            fieldName: "approbation_No",
-            wrapText: true,
-            initialWidth: 130,
-            hideDefaultActions: true,
-        },
-        {
-            label: "娉ㄥ唽璇佹晥鏈�",
-            wrapText: true,
-            initialWidth: 115,
-            fieldName: "expiration_Date",
-            hideDefaultActions: true,
-        },
-        {
-            label: "绗�3鍒嗙被",
-            fieldName: "Category3__c",
-            wrapText: true,
-            initialWidth: 115,
-            hideDefaultActions: true,
-            sortable: true,
-        },
-        {
-            label: "绗�4鍒嗙被",
-            fieldName: "Category4__c",
-            wrapText: true,
-            initialWidth: 115,
-            hideDefaultActions: true,
-            sortable: true,
-        },
-        {
-            label: "绗�5鍒嗙被",
-            fieldName: "Category5__c",
-            wrapText: true,
-            initialWidth: 115,
-            hideDefaultActions: true,
-            sortable: true,
-        },
-        {
-            label: "鍗曚綅",
-            type: "customUnit",
-            initialWidth: 100,
-            hideDefaultActions: true,
-            typeAttributes: {
-                unitValue: { fieldName: "unitValue" },
-                unitOptions: { fieldName: "unitOptions" },
-                recordId: { fieldName: "Id" },
-            }
-        },
-        {
-            label: "鍑鸿揣鏁伴噺",
-            type: "customShipment",
-            initialWidth: 100,
-            hideDefaultActions: true,
-            cellAttributes: { alignment: "right" },
-            typeAttributes: {
-                recordId: { fieldName: "Id" },
-                shipmentNumber: { fieldName: "shipmentNumber" },
-            },
-        },
-        {
-            label: "鍑鸿揣鍗曚环(鍏�)",
-            type: "customShipmentUnitPrice",
-            hideDefaultActions: true,
-            initialWidth: 120,
-            typeAttributes: {
-                recordId: { fieldName: "Id" },
-                shippingUnitPrice: { fieldName: "shippingUnitPrice" },
-            },
-        },
-        {
-            label: "鍑鸿揣閲戦(鍏�)",
-            type: "customShipmentAmount",
-            initialWidth: 120,
-            cellAttributes: { alignment: "right" },
-            hideDefaultActions: true,
-            typeAttributes: {
-                shipmentAmount: { fieldName: "shipmentAmount" },
-            },
-        },
-        {
-            label: "鏈夋晥鏈熷唴搴撳瓨(鐩�)",
-            fieldName: "Boxnumber",
-            cellAttributes: { alignment: "right" },
-            wrapText: true,
-            initialWidth: 160,
-            hideDefaultActions: true,
-        },
-        {
-            label: "鏈夋晥鏈熷唴搴撳瓨(涓�)",
-            fieldName: "Piecenumber",
-            cellAttributes: { alignment: "right" },
-            wrapText: true,
-            initialWidth: 160,
-            hideDefaultActions: true,
-        },
-    ];
-    @track editColumns = [
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "Name__c",
-            hideDefaultActions: true,
-            initialWidth: 320,
-            wrapText: true,
-            sortable: true,
-        },
-        {
-            label: "瑙勬牸",
-            fieldName: "packinglist",
-            initialWidth: 80,
-            cellAttributes: { alignment: "right" },
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "CFDA鐘舵��",
-            fieldName: "SFDA_Status__c",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "娉ㄥ唽璇佺紪鐮佸彿",
-            fieldName: "approbation_No",
-            hideDefaultActions: true,
-            initialWidth: 130,
-            wrapText: true,
-        },
-        {
-            label: "娉ㄥ唽璇佹晥鏈�",
-            fieldName: "expiration_Date",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "绗�3鍒嗙被",
-            fieldName: "Category3__c",
-            initialWidth: 100,
-            hideDefaultActions: true,
-            sortable: true,
-            wrapText: true,
-        },
-        {
-            label: "绗�4鍒嗙被",
-            fieldName: "Category4__c",
-            initialWidth: 100,
-            hideDefaultActions: true,
-            sortable: true,
-            wrapText: true,
-        },
-        {
-            label: "绗�5鍒嗙被",
-            fieldName: "Category5__c",
-            initialWidth: 100,
-            hideDefaultActions: true,
-            sortable: true,
-            wrapText: true,
-        },
-        {
-            label: "鍗曚綅",
-            fieldName: "Box_Piece__c",
-            initialWidth: 50,
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鍑鸿揣鏁伴噺",
-            fieldName: "Shipment_Count__c",
-            cellAttributes: { alignment: "right" },
-            hideDefaultActions: true,
-            initialWidth: 100,
-            wrapText: true,
-        },
-        {
-            label: "鍑鸿揣鍗曚环(鍏�)",
-            fieldName: "shippingUnitPrice",
-            type: "number",
-            typeAttributes: {
-                minimumFractionDigits: 2,
-            },
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-    ];
-    @track editData = [];
-
-    @track hospitalList = [];
-    @track hospitalColumns = [
-        {
-            label: "",
-            fieldName: "Id1",
-            type: "button",
-            hideDefaultActions: true,
-            initialWidth: 90,
-            typeAttributes: {
-                label: "閫夋嫨",
-                name: "Id2",
-                size: 1,
-            },
-        },
-        {
-            label: "鍖婚櫌鍚嶇О",
-            fieldName: "Name",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鐪佷唤",
-            fieldName: "stateMasterName",
-            hideDefaultActions: true,
-        }
-    ];
-
-    @track accountid = "";
-    @track consumableproductdetailsRecords = [];
-    @track SummonsStatus = "";
-    @track ESetid = "";
-    @track statusEdit = "";
-    @track cocLwc = {};
-    @track selectedRows = [];
-    @track ConsumableOut_report = "";
-    @track isMutualTransferGoods = false;
-    @track Barcode = "";
-    @track summonsForDirction = '';
-    @track accountValue = '';
-
-    @track consumableorderdetails2RecordsColumns = [
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "ProdName",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鎵规鍙�",
-            fieldName: "orderdetails2SerialLotNo__c",
-            hideDefaultActions: true,
-        },
-        {
-            label: "绠$悊缂栫爜",
-            fieldName: "orderdetails2TracingCode__c",
-            hideDefaultActions: true,
-        },
-        {
-            label: "浣跨敤鏈熼檺",
-            fieldName: "orderdetails2Sterilization_limit__c",
-            hideDefaultActions: true,
-        },
-    ];
-    @track consumableorderdetails2Records = [];
-
-    //鍑鸿揣/閿�鍞�
-    @track salesColumns = [
-        {
-            label: "娑堣�楀搧璁㈠崟",
-            fieldName: "ConsumableorderminorUrl",
-            hideDefaultActions: true,
-            initialWidth: 210,
-            type: "url",
-            typeAttributes: {
-                label: { fieldName: "Consumable_order_minor__c" },
-                target: "_blank",
-            },
-            wrapText: true,
-        },
-        {
-            label: "娑堣�楀搧鏄庣粏2鍚嶇О",
-            fieldName: "orderdetails2NameUrl",
-            type: "url",
-            typeAttributes: {
-                label: { fieldName: "orderdetails2Name" },
-                target: "_blank",
-            },
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 240
-        },
-        {
-            label: "鍗曚綅",
-            fieldName: "Box_Piece__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 50
-        },
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "ProdName",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鍙戣揣鏃ユ湡",
-            fieldName: "Deliver_date__c",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "BarCode",
-            fieldName: "Bar_Code__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 400
-        },
-        {
-            label: "浣跨敤鏈熼檺",
-            fieldName: "Sterilization_limit__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 120
-        },
-        {
-            label: "鍑鸿揣鏁伴噺",
-            fieldName: 'outboundCount',
-            hideDefaultActions: true,
-            cellAttributes: { alignment: "right" },
-        }
-    ];
-    @track salesData = [];
-
-    @track salesErrorColumns = [
-        {
-            label: "娑堣�楀搧璁㈠崟",
-            fieldName: "ConsumableorderminorUrl",
-            hideDefaultActions: true,
-            type: "url",
-            initialWidth: 210,
-            typeAttributes: {
-                label: { fieldName: "Consumable_order_minor__c" },
-                target: "_blank",
-            },
-            wrapText: true,
-        },
-        {
-            label: "娑堣�楀搧鏄庣粏2鍚嶇О",
-            fieldName: "orderdetails2Name",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 240
-        },
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "ProdName",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "鍗曚綅",
-            fieldName: "Box_Piece__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 50
-        },
-        {
-            label: "BarCode",
-            fieldName: "Bar_Code__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 400
-        },
-        {
-            label: "浣跨敤鏈熼檺",
-            fieldName: "Sterilization_limit__c",
-            hideDefaultActions: true,
-            wrapText: true,
-            initialWidth: 120
-        },
-        {
-            label: "閿欒鍘熷洜",
-            fieldName: "ErrorReason",
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-    ];
-    @track salesErrorData = [];
-    @track salesAccountName = "";
-    @track salesUserWorkLocation = "";
-    @track salesAccountid = "";
-    @track salesOrderdetails = [];
-    @track salesCoc = {};
-    @track salesOrderpieceorboxMap;
-    @track salesOrderpriceMap;
-    @track salesOrderagencypriceMap;
-
-    //鏄剧ず鎸夐挳
-    @track isSaveShow = false;
-    @track isEditShow = false;
-    @track isDeliveryShow = false;
-    @track isOpenToInvoiceShow = false;
-    @track isPraseToPDFShow = false;
-    @track isOpenReportShow = false;
-    @track isDeleteShow = false;
-    @track isFileShow = false;
-    @track isShippingSales = false;
-    @track isSales = false;
-    @track isBarcode = true;
-    @track isShowInformation = true;
-    @track isShowOutboundProductDetails = false;
-    @track showAttPop = false;
-    @track showPopSpinner = false;
-
-    //disable鎸夐挳
-    @track isEditDisabled = false;
-    @track isDeliveryDisabled = false;
-    @track isOpenToInvoiceDisabled = true;
-    @track isPraseToPDFDisabled = true;
-    @track isOpenReportDisabled = true;
-    @track isDeleteDisabled = false;
-
-    //鍑哄簱鍗曚俊鎭�
-    @track cocId = "";
-    @track EditAble = false;
-    @track summonsStatusPriceNotDetermined = false;
-    @track isSummonsForDirctionTwoShow = false;
-    @track isSummonsFlag = false;
-    @track isConInvoiceShow = false;
-    @track sumPrice = "";
-    @track isSearchShow = false;
-    @track Existarrive = false;
-    @track Category3 = "";
-    @track category3Options = [];
-    @track Category4 = "";
-    @track category4Options = [];
-    @track Category5 = "";
-    @track category5Options = [];
-    //鍙戠エid
-    @track invoiceId = '';
-
-    //浜岀骇缁忛攢鍟�
-    @track secondaryDistributor = "";
-    @track secondaryDistributorOptions = [];
-    @track isDisabledSecondaryDistributor = false;
-
-    //缁忛攢鍟嗗綍鍏�
-    @track ForDealerText = "";
-    @track isDisabledForDealerText = false;
-
-    //瀹㈡埛鍚�
-    @track isModalOpen = false;
-    @track HospitalName = "";
-    @track searchHospitalName = "";
-    @track OECId = "";
-    @track isDisabledHospitalName = false;
-
-    //绉戝
-    @track ForCustomerText = "";
-    @track isDisabledForCustomerText = false;
-
-    //娌℃湁纭畾浠锋牸
-    @track NoConfirmedPrice = false;
-
-    //娑堣�楀搧鍚嶇О
-    @track consumableName = "";
-
-    @track agencyProType = "";
-    @track accountName = "";
-    @track userWorkLocation = "";
-    @track OutPattern__c = false;
-    @track outOutPattern = "";
-
-    //鍑哄簱鍗曟槑缁�
-    @track showTable = false;
-    @track data = [];
-    @track isSelectShow = false;
-    @track hidecheckboxcolumn = false;
-    @track is345Show = false;
-    @track arriveorder = "";
-    @track hasHosPro = false;
-    @track InvoiceProNotLabel = "";
-    @track RrturnProLabel = "";
-    @track InvoicedLabel = "";
-    @track outOutPatternOptionList = [];
-
-    //鏂囦欢涓婁紶
-    @track showLoadingSpinner = false;
-    @track UploadFile = "Upload File";
-    @track fileName = "";
-    @track fileData = [];
-    @track fileColumns = [
-        {
-            label: "鏍囬",
-            fieldName: "url",
-            type: "url",
-            typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
-            hideDefaultActions: true,
-        },
-        {
-            label: "鍒涘缓浜�",
-            fieldName: "CreatedByName",
-            hideDefaultActions: true,
-        },
-        {
-            label: '',
-            type: 'tableCellIcon',
-            typeAttributes: {
-                iconName: 'utility:delete',
-                recordId: {
-                    fieldName: 'Id'
-                }
-            },
-            initialWidth: 50,
-            hideDefaultActions: true
-        },
-    ];
-    filesUploaded = [];
-    fileContents;
-    fileReader;
-    content;
-    MAX_FILE_SIZE = 1500000;
-
-    //鍒嗛〉start
-    //@track sortBy = "";
-    //@track sortDirection = "asc";
-    defaultSortDirection = 'asc';
-    sortDirection = 'asc';
-    sortedBy;
-    @track pageSize = 10;
-    error;
-    records;
-    currentPageToken = 0;
-    nextPageToken = this.pageSize;
-    @track totalRecords = 0;
-    @track loader = false;
-    @track pageNumber = 1;
-    @track paginationVisibility = false;
-    @track totalPages = 1;
-    pageSizeOptions = [10, 25, 50, 100];
-    @track recordStart = 0;
-    @track recordEnd = 0;
-    //end
-    @track SearchDone = '';
-    @track hideCheckboxColumn = false;
-
-    stylesLoaded = false;
-    renderedCallback() {
-        if (!this.stylesLoaded) {
-            Promise.all([loadStyle(this, WrappedHeaderTable)])
-                .then(() => {
-                    console.log("Custom styles loaded");
-                    this.stylesLoaded = true;
-                })
-                .catch((error) => {
-                    console.error("Error loading custom styles");
-                });
-        }
+  @track label = customLabel;
+  @track isShowSpinner = true;
+  @track isEditShowSpinner = false;
+  @track showResults = true;
+  @track results = [
+    {
+      Id: "1",
+      Name: "z"
+    },
+    {
+      Id: "2",
+      Name: "h"
+    },
+    {
+      Id: "3",
+      Name: "j"
     }
+  ];
 
-    //InvoiceProNotLabel    RrturnProLabel  InvoicedLabel
-    @wire(getObjectInfo, { objectApiName: OPPORTUNITY_OBJECT })
-    oppInfo({ data, error }) {
-        if (data) {
-            this.InvoiceProNotLabel = data.fields.InvoiceProNot_count__c.label;
-            this.RrturnProLabel = data.fields.RrturnPro_count__c.label;
-            this.InvoicedLabel = data.fields.Invoiced_Procount__c.label;
-            console.log("this.InvoiceProNotLabel = " + this.InvoiceProNotLabel);
-            console.log("this.RrturnProLabel = " + this.RrturnProLabel);
-            console.log("this.InvoicedLabel = " + this.InvoicedLabel);
-        }
+  @track COLS = [
+    {
+      label: "Account Name",
+      type: "customName",
+      typeAttributes: {
+        accountName: { fieldName: "Name" }
+      }
     }
-
-    //鑾峰彇閾炬帴鍙傛暟
-    getQueryString(name) {
-        console.log("getQueryString name " + name);
-        let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
-        let r = window.location.search.substr(1).match(reg);
-        if (r != null) {
-            return decodeURIComponent(r[2]);
-        }
-        return null;
+  ];
+  @track columns = [
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "Name__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 175,
+      sortable: true
+    },
+    {
+      label: "瑙勬牸",
+      fieldName: "packinglist",
+      cellAttributes: { alignment: "right" },
+      wrapText: true,
+      initialWidth: 50,
+      hideDefaultActions: true
+    },
+    {
+      label: "CFDA鐘舵��",
+      fieldName: "SFDA_Status__c",
+      initialWidth: 105,
+      wrapText: true,
+      hideDefaultActions: true
+    },
+    {
+      label: "娉ㄥ唽璇佺紪鐮佸彿",
+      fieldName: "approbation_No",
+      wrapText: true,
+      initialWidth: 105,
+      hideDefaultActions: true
+    },
+    {
+      label: "娉ㄥ唽璇佹晥鏈�",
+      wrapText: true,
+      initialWidth: 115,
+      fieldName: "expiration_Date",
+      hideDefaultActions: true
+    },
+    {
+      label: "绗�3鍒嗙被",
+      fieldName: "Category3__c",
+      wrapText: true,
+      initialWidth: 115,
+      hideDefaultActions: true,
+      sortable: true
+    },
+    {
+      label: "绗�4鍒嗙被",
+      fieldName: "Category4__c",
+      wrapText: true,
+      initialWidth: 115,
+      hideDefaultActions: true,
+      sortable: true
+    },
+    {
+      label: "绗�5鍒嗙被",
+      fieldName: "Category5__c",
+      wrapText: true,
+      initialWidth: 115,
+      hideDefaultActions: true,
+      sortable: true
+    },
+    {
+      label: "鍗曚綅",
+      type: "customUnit",
+      initialWidth: 100,
+      hideDefaultActions: true,
+      typeAttributes: {
+        unitValue: { fieldName: "unitValue" },
+        unitOptions: { fieldName: "unitOptions" },
+        recordId: { fieldName: "Id" }
+      }
+    },
+    {
+      label: "鍑鸿揣鏁伴噺",
+      type: "customShipment",
+      initialWidth: 100,
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "right" },
+      typeAttributes: {
+        recordId: { fieldName: "Id" },
+        shipmentNumber: { fieldName: "shipmentNumber" }
+      }
+    },
+    {
+      label: "鍑鸿揣鍗曚环(鍏�)",
+      type: "customShipmentUnitPrice",
+      hideDefaultActions: true,
+      initialWidth: 120,
+      typeAttributes: {
+        recordId: { fieldName: "Id" },
+        shippingUnitPrice: { fieldName: "shippingUnitPrice" }
+      }
+    },
+    {
+      label: "鍑鸿揣閲戦(鍏�)",
+      type: "customShipmentAmount",
+      initialWidth: 120,
+      cellAttributes: { alignment: "right" },
+      hideDefaultActions: true,
+      typeAttributes: {
+        shipmentAmount: { fieldName: "shipmentAmount" }
+      }
+    },
+    {
+      label: "鏈夋晥鏈熷唴搴撳瓨(鐩�)",
+      fieldName: "Boxnumber",
+      cellAttributes: { alignment: "right" },
+      wrapText: true,
+      initialWidth: 160,
+      hideDefaultActions: true
+    },
+    {
+      label: "鏈夋晥鏈熷唴搴撳瓨(涓�)",
+      fieldName: "Piecenumber",
+      cellAttributes: { alignment: "right" },
+      wrapText: true,
+      initialWidth: 160,
+      hideDefaultActions: true
     }
-    connectedCallback() {
-        console.log("connectedCallback LexSummonsCreat");
-        this.ESetid = this.getQueryString("ESetid");
-        this.ESetid = this.ESetid == null ? "" : this.ESetid;
-        //statusEdit
-        this.statusEdit = this.getQueryString("KeyWords");
-        this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
-        //arriveorder
-        this.arriveorder = this.getQueryString("arriveorder");
-        this.arriveorder = this.arriveorder == null ? "" : this.arriveorder;
-        console.log("this.ESetid = " + this.ESetid);
-        console.log("this.statusEdit = " + this.statusEdit);
-        console.log("this.arriveorder = " + this.arriveorder);
-        if (this.ESetid == "") {
-            this.isShowInformation = false;
+  ];
+  @track editColumns = [
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "Name__c",
+      hideDefaultActions: true,
+      initialWidth: 175,
+      wrapText: true,
+      sortable: true
+    },
+    {
+      label: "瑙勬牸",
+      fieldName: "packinglist",
+      initialWidth: 50,
+      cellAttributes: { alignment: "right" },
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "CFDA鐘舵��",
+      fieldName: "SFDA_Status__c",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "娉ㄥ唽璇佺紪鐮佸彿",
+      fieldName: "approbation_No",
+      hideDefaultActions: true,
+      initialWidth: 130,
+      wrapText: true
+    },
+    {
+      label: "娉ㄥ唽璇佹晥鏈�",
+      fieldName: "expiration_Date",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "绗�3鍒嗙被",
+      fieldName: "Category3__c",
+      hideDefaultActions: true,
+      sortable: true,
+      wrapText: true
+    },
+    {
+      label: "绗�4鍒嗙被",
+      fieldName: "Category4__c",
+      hideDefaultActions: true,
+      sortable: true,
+      wrapText: true
+    },
+    {
+      label: "绗�5鍒嗙被",
+      fieldName: "Category5__c",
+      hideDefaultActions: true,
+      sortable: true,
+      wrapText: true
+    },
+    {
+      label: "鍗曚綅",
+      fieldName: "Box_Piece__c",
+      initialWidth: 50,
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍑鸿揣鏁伴噺",
+      fieldName: "Shipment_Count__c",
+      cellAttributes: { alignment: "right" },
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍑鸿揣鍗曚环(鍏�)",
+      fieldName: "shippingUnitPrice",
+      type: "number",
+      typeAttributes: {
+        minimumFractionDigits: 2
+      },
+      hideDefaultActions: true,
+      wrapText: true
+    }
+  ];
+  @track editData = [];
+
+  @track hospitalList = [];
+  @track hospitalColumns = [
+    {
+      label: "",
+      fieldName: "Id1",
+      type: "button",
+      hideDefaultActions: true,
+      initialWidth: 90,
+      typeAttributes: {
+        label: "閫夋嫨",
+        name: "Id2",
+        size: 1
+      }
+    },
+    {
+      label: "鍖婚櫌鍚嶇О",
+      fieldName: "Name",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鐪佷唤",
+      fieldName: "stateMasterName",
+      hideDefaultActions: true
+    }
+  ];
+
+  @track accountid = "";
+  @track consumableproductdetailsRecords = [];
+  @track SummonsStatus = "";
+  @track ESetid = "";
+  @track statusEdit = "";
+  @track cocLwc = {};
+  @track selectedRows = [];
+  @track ConsumableOut_report = "";
+  @track isMutualTransferGoods = false;
+  @track Barcode = "";
+  @track summonsForDirction = "";
+  @track accountValue = "";
+
+  @track consumableorderdetails2RecordsColumns = [
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "ProdName",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鎵规鍙�",
+      fieldName: "orderdetails2SerialLotNo__c",
+      hideDefaultActions: true
+    },
+    {
+      label: "绠$悊缂栫爜",
+      fieldName: "orderdetails2TracingCode__c",
+      hideDefaultActions: true
+    },
+    {
+      label: "浣跨敤鏈熼檺",
+      fieldName: "orderdetails2Sterilization_limit__c",
+      hideDefaultActions: true
+    }
+  ];
+  @track consumableorderdetails2Records = [];
+
+  //鍑鸿揣/閿�鍞�
+  @track salesColumns = [
+    {
+      label: "娑堣�楀搧璁㈠崟",
+      fieldName: "ConsumableorderminorUrl",
+      hideDefaultActions: true,
+      type: "url",
+      typeAttributes: {
+        label: { fieldName: "Consumable_order_minor__c" },
+        target: "_blank"
+      },
+      wrapText: true
+    },
+    {
+      label: "娑堣�楀搧鏄庣粏2鍚嶇О",
+      fieldName: "orderdetails2NameUrl",
+      type: "url",
+      initialWidth: 150,
+      typeAttributes: {
+        label: { fieldName: "orderdetails2Name" },
+        target: "_blank"
+      },
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍗曚綅",
+      fieldName: "Box_Piece__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 50
+    },
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "ProdName",
+      initialWidth: 100,
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍙戣揣鏃ユ湡",
+      fieldName: "Deliver_date__c",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "BarCode",
+      fieldName: "Bar_Code__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 380
+    },
+    {
+      label: "浣跨敤鏈熼檺",
+      fieldName: "Sterilization_limit__c",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍑鸿揣鏁伴噺",
+      fieldName: "outboundCount",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "right" }
+    }
+  ];
+  @track salesData = [];
+
+  @track salesErrorColumns = [
+    {
+      label: "娑堣�楀搧璁㈠崟",
+      fieldName: "ConsumableorderminorUrl",
+      hideDefaultActions: true,
+      type: "url",
+      typeAttributes: {
+        label: { fieldName: "Consumable_order_minor__c" },
+        target: "_blank"
+      },
+      wrapText: true
+    },
+    {
+      label: "娑堣�楀搧鏄庣粏2鍚嶇О",
+      fieldName: "orderdetails2Name",
+      hideDefaultActions: true,
+      initialWidth: 150,
+      wrapText: true
+    },
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "ProdName",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "鍗曚綅",
+      fieldName: "Box_Piece__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 50
+    },
+    {
+      label: "BarCode",
+      fieldName: "Bar_Code__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 380
+    },
+    {
+      label: "浣跨敤鏈熼檺",
+      fieldName: "Sterilization_limit__c",
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "閿欒鍘熷洜",
+      fieldName: "ErrorReason",
+      hideDefaultActions: true,
+      wrapText: true
+    }
+  ];
+  @track salesErrorData = [];
+  @track salesAccountName = "";
+  @track salesUserWorkLocation = "";
+  @track salesAccountid = "";
+  @track salesOrderdetails = [];
+  @track salesCoc = {};
+  @track salesOrderpieceorboxMap;
+  @track salesOrderpriceMap;
+  @track salesOrderagencypriceMap;
+
+  //鏄剧ず鎸夐挳
+  @track isSaveShow = false;
+  @track isEditShow = false;
+  @track isDeliveryShow = false;
+  @track isOpenToInvoiceShow = false;
+  @track isPraseToPDFShow = false;
+  @track isOpenReportShow = false;
+  @track isDeleteShow = false;
+  @track isFileShow = false;
+  @track isShippingSales = false;
+  @track isSales = false;
+  @track isBarcode = true;
+  @track isShowInformation = true;
+  @track isShowOutboundProductDetails = false;
+  @track showAttPop = false;
+  @track showPopSpinner = false;
+
+  //disable鎸夐挳
+  @track isEditDisabled = false;
+  @track isDeliveryDisabled = false;
+  @track isOpenToInvoiceDisabled = true;
+  @track isPraseToPDFDisabled = true;
+  @track isOpenReportDisabled = true;
+  @track isDeleteDisabled = false;
+
+  //鍑哄簱鍗曚俊鎭�
+  @track cocId = "";
+  @track EditAble = false;
+  @track summonsStatusPriceNotDetermined = false;
+  @track isSummonsForDirctionTwoShow = false;
+  @track isSummonsFlag = false;
+  @track isConInvoiceShow = false;
+  @track sumPrice = "";
+  @track isSearchShow = false;
+  @track Existarrive = false;
+  @track Category3 = "";
+  @track category3Options = [];
+  @track Category4 = "";
+  @track category4Options = [];
+  @track Category5 = "";
+  @track category5Options = [];
+  //鍙戠エid
+  @track invoiceId = "";
+
+  //浜岀骇缁忛攢鍟�
+  @track secondaryDistributor = "";
+  @track secondaryDistributorOptions = [];
+  @track isDisabledSecondaryDistributor = false;
+
+  //缁忛攢鍟嗗綍鍏�
+  @track ForDealerText = "";
+  @track isDisabledForDealerText = false;
+
+  //瀹㈡埛鍚�
+  @track isModalOpen = false;
+  @track HospitalName = "";
+  @track searchHospitalName = "";
+  @track OECId = "";
+  @track isDisabledHospitalName = false;
+
+  //绉戝
+  @track ForCustomerText = "";
+  @track isDisabledForCustomerText = false;
+
+  //娌℃湁纭畾浠锋牸
+  @track NoConfirmedPrice = false;
+
+  //娑堣�楀搧鍚嶇О
+  @track consumableName = "";
+
+  @track agencyProType = "";
+  @track accountName = "";
+  @track userWorkLocation = "";
+  @track OutPattern__c = false;
+  @track outOutPattern = "";
+
+  //鍑哄簱鍗曟槑缁�
+  @track showTable = false;
+  @track data = [];
+  @track isSelectShow = false;
+  @track hidecheckboxcolumn = false;
+  @track is345Show = false;
+  @track arriveorder = "";
+  @track hasHosPro = false;
+  @track InvoiceProNotLabel = "";
+  @track RrturnProLabel = "";
+  @track InvoicedLabel = "";
+  @track outOutPatternOptionList = [];
+
+  //鏂囦欢涓婁紶
+  @track showLoadingSpinner = false;
+  @track UploadFile = "Upload File";
+  @track fileName = "";
+  @track fileData = [];
+  @track fileColumns = [
+    {
+      label: "鏍囬",
+      fieldName: "url",
+      type: "url",
+      typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
+      hideDefaultActions: true
+    },
+    {
+      label: "鍒涘缓浜�",
+      fieldName: "CreatedByName",
+      hideDefaultActions: true
+    },
+    {
+      label: "",
+      type: "tableCellIcon",
+      typeAttributes: {
+        iconName: "utility:delete",
+        recordId: {
+          fieldName: "Id"
         }
-        console.log("init LexSummonsCreat");
-        init({
-            ESetidJs: this.ESetid,
-            statusEdit: this.statusEdit,
-            pageSizeLWC: this.pageSize,
-            pageTokenLWC: this.currentPageToken,
-            arriveorderLWC: this.arriveorder
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
+      },
+      initialWidth: 50,
+      hideDefaultActions: true
+    }
+  ];
+  filesUploaded = [];
+  fileContents;
+  fileReader;
+  content;
+  MAX_FILE_SIZE = 1500000;
 
-            if (r.status == "Success") {
+  //鍒嗛〉start
+  //@track sortBy = "";
+  //@track sortDirection = "asc";
+  defaultSortDirection = "asc";
+  sortDirection = "asc";
+  sortedBy;
+  @track pageSize = 10;
+  error;
+  records;
+  currentPageToken = 0;
+  nextPageToken = this.pageSize;
+  @track totalRecords = 0;
+  @track loader = false;
+  @track pageNumber = 1;
+  @track paginationVisibility = false;
+  @track totalPages = 1;
+  pageSizeOptions = [10, 25, 50, 100];
+  @track recordStart = 0;
+  @track recordEnd = 0;
+  //end
+  @track SearchDone = "";
+  @track hideCheckboxColumn = false;
 
-                //鍒嗛〉
-                console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
-                this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
-                this.totalRecords = r.entity.paginatedAccounts.totalRecords;
-                this.recordStart = r.entity.paginatedAccounts.recordStart;
-                this.recordEnd = r.entity.paginatedAccounts.recordEnd;
-                this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
-                console.log('this.totalPages = ' + this.totalPages);
-
-
-                this.OECId = r.entity.HospitalInfo == null ? '' : r.entity.HospitalInfo;
-                console.log("this.OECId = " + this.OECId);
-                this.ConsumableOut_report = r.entity.ConsumableOut_report;
-                console.log("this.ConsumableOut_report = " + this.ConsumableOut_report);
-                this.accountid = r.entity.accountid;
-                this.consumableproductdetailsRecords =
-                    r.entity.consumableproductdetailsRecords;
-                this.accountName = r.entity.accountName;
-                this.agencyProType = r.entity.agencyProType;
-                this.accountName = r.entity.accountName;
-                this.userWorkLocation = r.entity.userWorkLocation;
-                this.EditAble = r.entity.EditAble;
-                this.consumableorderdetails2Records = r.entity.consumableorderdetails2Records;
-                for (var i in this.consumableorderdetails2Records) {
-                    this.consumableorderdetails2Records[i]["ProdName"] = this.consumableorderdetails2Records[i].Prod.Name;
-                    this.consumableorderdetails2Records[i]["orderdetails2SerialLotNo__c"] = this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c;
-                    this.consumableorderdetails2Records[i]["orderdetails2TracingCode__c"] = this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c;
-                    this.consumableorderdetails2Records[i]["orderdetails2Sterilization_limit__c"] = this.consumableorderdetails2Records[i].orderdetails2.Sterilization_limit__c;
-                }
-                this.isShowOutboundProductDetails = r.entity.consumableorderdetails2Count > 0 ? true : false;
-                console.log("this.agencyProType = " + this.agencyProType);
-                console.log("this.EditAble = " + this.EditAble);
-                //鏌ヨ闄勪欢
-                if (!this.EditAble) this.getFiles();
-                //绗�3鍒嗙被
-                for (var key in r.entity.categoryOptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.categoryOptionMap[key];
-                    object["value"] = key;
-                    this.category3Options.push(object);
-                }
-                console.log("this.category3Options = " + JSON.stringify(this.category3Options));
-                //绗�4鍒嗙被
-                for (var key in r.entity.category4OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category4OptionMap[key];
-                    object["value"] = key;
-                    this.category4Options.push(object);
-                }
-                console.log("this.category4Options = " + this.category4Options);
-                //绗�5鍒嗙被
-                for (var key in r.entity.category5OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category5OptionMap[key];
-                    object["value"] = key;
-                    this.category5Options.push(object);
-                }
-                console.log("this.category5Options = " + this.category5Options);
-
-                this.data = r.entity.pageRecords;
-                this.editData = r.entity.pageRecords;
-                console.log("this.data start = " + JSON.stringify(this.data));
-                this.hasHosPro = r.entity.hasHosPro;
-                console.log("this.hasHosPro = " + this.hasHosPro);
-                if (this.EditAble) {
-                    for (var i in this.data) {
-                        let unitOptions = [];
-                        for (var key in this.data[i].boxorpieceMap) {
-                            let unitOption = {};
-                            unitOption["label"] = this.data[i].boxorpieceMap[key];
-                            unitOption["value"] = key;
-                            unitOptions.push(unitOption);
-                        }
-                        this.data[i]["unitOptions"] = unitOptions;
-                        this.data[i]["unitValue"] = this.data[i]["unitValue"] == null ? unitOptions[0].value : this.data[i]["unitValue"];
-                        if (this.EditAble) {
-                            this.data[i].orderdetails1["Box_Piece__c"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
-                            this.data[i]["unitValue"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
-                            console.log('this.data[i].orderdetails1["Box_Piece__c"] = ' + this.data[i].orderdetails1["Box_Piece__c"]);
-                            this.data[i].orderdetails1["Shipment_Count__c"] = this.data[i].orderdetails1["Shipment_Count__c"] == null ? 0 : this.data[i].orderdetails1["Shipment_Count__c"];
-                            this.data[i].orderdetails1["Delivery_List_RMB__c"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : this.data[i].orderdetails1["Delivery_List_RMB__c"];
-                        } else {
-                            this.data[i]["InvoiceProNot_count__c"] = this.data[i].orderdetails1.InvoiceProNot_count__c;
-                            this.data[i]["RrturnPro_count__c"] = this.data[i].orderdetails1.RrturnPro_count__c;
-                            this.data[i]["Invoiced_Procount__c"] = this.data[i].orderdetails1.Invoiced_Procount__c;
-                        }
-                        // this.data[i]["shipmentNumber"] = 0;
-                        // this.data[i]["shippingUnitPrice"] = 0.0;
-                        //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
-                        //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
-                        this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"];
-                        this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"];
-
-
-
-                        this.data[i]["Id"] = this.data[i].Prod.Id;
-
-                        if (this.hasHosPro) {
-                            if (this.data[i]["hospitalSpecialOffer"]) {
-                                this.data[i]["Id"] = this.data[i].Prod.Id + 'ishos';
-                            } else {
-                                this.data[i]["Id"] = this.data[i].Prod.Id + 'nothos';
-                            }
-                        }
-                        this.data[i]["recordId"] = this.data[i].Prod.Id;
-                        this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
-                        this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
-                        this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
-                        this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c;
-                        this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c;
-                        this.data[i]["Box_Piece__c"] = this.data[i].orderdetails1.Box_Piece__c;
-                        this.data[i]["shipmentAmount"] = this.data[i].orderdetails1.Shipment_amount__c;
-                        this.data[i]["Shipment_amount__c"] = this.data[i].orderdetails1.Shipment_amount__c;
-                        this.data[i]["Shipment_Count__c"] = this.data[i].orderdetails1.Shipment_Count__c;
-
-                        if (this.data[i]['check']) {
-                            this.selectedRows.push(this.data[i].Id);
-                        }
-                    }
-                    console.log('EditAble this.data = ' + JSON.stringify(this.data))
-                } else {
-                    for (var i in this.editData) {
-                        this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
-                        this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c;
-                        this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c;
-                        this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c;
-                        this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"];
-                        this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"];
-
-                        this.editData[i]["recordId"] = this.editData[i].Prod.Id;
-                        this.editData[i]["Id"] = this.editData[i].Prod.Id;
-                        this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
-                        this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c;
-                        this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c;
-                        this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c;
-                        this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
-                        this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
-                        this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
-                        //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
-                        this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
-                        this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
-                    }
-                    console.log('end this.editData = ' + JSON.stringify(this.editData));
-                }
-
-                console.log("this.data = " + JSON.stringify(this.data));
-                //show
-                if (r.entity.EditDelCommitBtnDisabled || r.entity.EditAble) {
-                    this.isSaveShow = true;
-                } else {
-                    this.isEditShow = true;
-                    this.isDeliveryShow = true;
-                    this.isOpenToInvoiceShow = true;
-                    this.isPraseToPDFShow = true;
-                    this.isOpenReportShow = true;
-                    this.isDeleteShow = true;
-                }
-
-                this.Existarrive = r.entity.Existarrive;
-
-                console.log("this.EditAble = " + this.EditAble);
-
-                //disable
-
-                if (Object.values(r.entity.coc).length > 0) {
-                    this.cocLwc = r.entity.coc;
-                    console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-                    var coc = r.entity.coc;
-                    this.accountValue = coc.Order_ForDealerText__c;
-                    this.ForDealerText = coc.Order_ForDealerText__c;
-                    console.log('this.accountValue = ' + this.accountValue);
-                    this.cocId = coc.Id;
-                    console.log('cocId = ' + this.cocId);
-                    coc.SummonsStatus = coc.SummonsStatus_c__c;
-                    if (coc.SummonsStatus_c__c == "宸插畬鎴�") {
-                        this.isEditDisabled = true;
-                    }
-                    if (
-                        coc.SummonsStatus_c__c == "鎵瑰噯" ||
-                        coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
-                        coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
-                        coc.SummonsStatus_c__c == "宸插畬鎴�"
-                    ) {
-                        this.isDeliveryDisabled = true;
-                    }
-                    if (
-                        ((coc.Billed_Status__c != "鍏ㄩ儴寮�绁�" &&
-                            coc.SummonsStatus_c__c == "宸插畬鎴�") ||
-                            coc.Onchange_order__c == true) &&
-                        coc.SummonsForDirction__c != "浜掔浉璋冭揣"
-                    ) {
-                        this.isOpenToInvoiceDisabled = false;
-                    }
-                    if (
-                        coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
-                        coc.SummonsStatus_c__c == "鎵瑰噯" ||
-                        coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
-                        coc.SummonsStatus_c__c == "鑽夋涓�"
-                    ) {
-                        this.isPraseToPDFDisabled = false;
-                    }
-                    if ((coc.Billed_Status__c != "杩樻病寮�绁�" || coc.SummonsStatus_c__c == "宸插畬鎴�")) {
-                        this.isOpenReportDisabled = false;
-                    }
-                    if (
-                        coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
-                        coc.SummonsStatus_c__c == "浠锋牸鏈畾" ||
-                        coc.SummonsStatus_c__c == "鎵瑰噯" ||
-                        coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
-                        coc.SummonsStatus_c__c == "宸插畬鎴�"
-                    ) {
-                        this.isDeleteDisabled = true;
-                    }
-                    this.isConInvoiceShow =
-                        coc.SummonsStatus_c__c == "宸插畬鎴�" &&
-                            coc.SummonsForDirction__c != "浜掔浉璋冭揣"
-                            ? true
-                            : false;
-                    this.summonsStatusPriceNotDetermined =
-                        coc.SummonsStatus_c__c == "浠锋牸鏈畾" ? true : false;
-                    this.isSummonsForDirctionTwoShow =
-                        coc.SummonsForDirction__c == "閿�鍞粰浜岀骇缁忛攢鍟�" ? true : false;
-                }
-                this.isSearchShow =
-                    !this.Existarrive &&
-                        r.entity.coc.SummonsStatus_c__c != "浠锋牸鏈畾" &&
-                        r.entity.EditAble
-                        ? true
-                        : false;
-                this.hidecheckboxcolumn = !this.isSearchShow;
-                this.arriveorder = r.entity.arriveorder;
-                this.is345Show =
-                    this.arriveorder == "" && this.Existarrive == false && this.EditAble
-                        ? true
-                        : false;
-                //濡傛灉涓嶆樉绀�345鍒嗙被锛宑olumns閲岄潰鍒犻櫎3锛�4锛�5鍒嗙被
-                if (!this.is345Show) {
-                    for (var i = 0; i < this.columns.length; i++) {
-                        if (this.columns[i].label == "绗�3鍒嗙被") {
-                            this.columns.splice(i, 1);
-                        }
-                    }
-                    for (var i = 0; i < this.columns.length; i++) {
-                        if (this.columns[i].label == "绗�4鍒嗙被") {
-                            this.columns.splice(i, 1);
-                        }
-                    }
-                    for (var i = 0; i < this.columns.length; i++) {
-                        if (this.columns[i].label == "绗�5鍒嗙被") {
-                            this.columns.splice(i, 1);
-                        }
-                    }
-                    for (var i = 0; i < this.editColumns.length; i++) {
-                        if (this.editColumns[i].label == "绗�3鍒嗙被") {
-                            this.editColumns.splice(i, 1);
-                        }
-                    }
-                    for (var i = 0; i < this.editColumns.length; i++) {
-                        if (this.editColumns[i].label == "绗�4鍒嗙被") {
-                            this.editColumns.splice(i, 1);
-                        }
-                    }
-                    for (var i = 0; i < this.editColumns.length; i++) {
-                        if (this.editColumns[i].label == "绗�5鍒嗙被") {
-                            this.editColumns.splice(i, 1);
-                        }
-                    }
-                }
-                //濡傛灉EditAble==false锛屽垹闄� 鍑鸿揣閲戦(鍏�) 鏈夋晥鏈熷唴搴撳瓨(鐩�) 鏈夋晥鏈熷唴搴撳瓨(涓�) 3鍒� 灞曠ず 杩樻病鍙戠エ鏁伴噺 杩斿搧鏁伴噺 宸插彂绁ㄦ暟閲�
-                //type : "number",
-                // typeAttributes:{
-                //     minimumFractionDigits:2,
-                // },
-                if (!this.EditAble) {
-                    let object1 = {
-                        label: this.InvoiceProNotLabel,
-                        fieldName: "InvoiceProNot_count__c",
-                        type: "number",
-                        initialWidth: 120,
-                        typeAttributes: {
-                            minimumFractionDigits: 2,
-                        },
-                        hideDefaultActions: true,
-                    };
-                    let object2 = {
-                        label: this.RrturnProLabel,
-                        fieldName: "RrturnPro_count__c",
-                        initialWidth: 100,
-                        cellAttributes: { alignment: "right" },
-                        hideDefaultActions: true,
-                    };
-                    let object3 = {
-                        label: this.InvoicedLabel,
-                        fieldName: "Invoiced_Procount__c",
-                        initialWidth: 100,
-                        type: "number",
-                        typeAttributes: {
-                            minimumFractionDigits: 2,
-                        },
-                        hideDefaultActions: true,
-                    };
-                    this.editColumns.push(object1);
-                    this.editColumns.push(object2);
-                    this.editColumns.push(object3);
-                } else {
-                    this.ForCustomerText = this.cocLwc.Order_ForCustomerText__c;
-                    console.log('EditAble = true this.ForCustomerText = ' + this.ForCustomerText);
-                    this.summonsForDirction = this.cocLwc.SummonsForDirction__c;
-                    console.log('EditAble = true this.summonsForDirction = ' + this.summonsForDirction);
-                    let value = this.summonsForDirction;
-                    switch (value) {
-                        case "鐩存帴閿�鍞粰鍖婚櫌":
-                            this.isDisabledHospitalName = false;
-                            this.isDisabledForCustomerText = false;
-                            this.secondaryDistributor = "";
-                            this.ForDealerText = "";
-                            this.accountValue = "";
-                            this.cocLwc['Order_ForDealerText__c'] = '';
-                            this.isDisabledForDealerText = true;
-                            this.isDisabledSecondaryDistributor = true;
-                            break;
-                        case "鍖婚櫌璇曠敤":
-                            this.isDisabledHospitalName = false;
-                            this.isDisabledForCustomerText = false;
-                            this.isDisabledForDealerText = false;
-                            this.isDisabledSecondaryDistributor = false;
-                            this.isMutualTransferGoods = false;
-                            break;
-                        case "閿�鍞粰浜岀骇缁忛攢鍟�":
-                            this.isDisabledHospitalName = false;
-                            this.isDisabledForCustomerText = false;
-                            this.isDisabledForDealerText = false;
-                            this.isDisabledSecondaryDistributor = false;
-                            this.isMutualTransferGoods = false;
-                            break;
-                        case "浜掔浉璋冭揣":
-                            this.isDisabledHospitalName = true;
-                            this.HospitalName = "";
-                            this.OECId = "";
-                            this.isDisabledForCustomerText = true;
-                            this.ForCustomerText = "";
-                            this.cocLwc["Order_ForCustomerText__c"] = "";
-                            this.isDisabledForDealerText = false;
-                            this.isDisabledSecondaryDistributor = false;
-                            this.isMutualTransferGoods = true;
-                            break;
-                        default:
-                            this.isDisabledHospitalName = false;
-                            this.isDisabledForCustomerText = false;
-                            this.isDisabledForDealerText = false;
-                            this.isDisabledSecondaryDistributor = false;
-                    }
-                }
-
-                //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
-                if (this.hasHosPro) {
-                    let object1 = {
-                        label: "鍖婚櫌鐗逛环",
-                        fieldName: "hospitalSpecialOffer",
-                        type: 'boolean',
-                        initialWidth: 100,
-                        hideDefaultActions: true,
-                    };
-                    this.columns.push(object1);
-                    this.editColumns.push(object1);
-                }
-                //鍑哄簱鍗曚俊鎭�
-                this.isSummonsFlag = r.entity.SummonsFlag == "visible" ? true : false;
-                console.log("r.entity.provinceOptsMap = " + r.entity.provinceOptsMap);
-                for (var key in r.entity.provinceOptsMap) {
-                    let object = {};
-                    object["label"] = r.entity.provinceOptsMap[key];
-                    object["value"] = key;
-                    this.secondaryDistributorOptions.push(object);
-                }
-                for (var key in r.entity.outOutPatternOptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.outOutPatternOptionMap[key];
-                    object["value"] = key;
-                    this.outOutPatternOptionList.push(object);
-                }
-                console.log(
-                    "this.secondaryDistributorOptions = " +
-                    JSON.stringify(this.secondaryDistributorOptions)
-                );
-                this.HospitalName = r.entity.HospitalName;
-                this.sumPrice = r.entity.sumPrice.toFixed(2) + "鍏�";
-                debugger
-                console.log('this.Existarrive = ' + this.Existarrive);
-                console.log('this.EditAble = ' + this.EditAble);
-                console.log('r.entity.coc.SummonsStatus_c__c = ' + r.entity.coc.SummonsStatus_c__c);
-                if (!this.Existarrive && this.EditAble && r.entity.coc.SummonsStatus_c__c != '浠锋牸鏈畾') {
-                    this.hideCheckboxColumn = false;
-                } else {
-                    this.hideCheckboxColumn = true;
-                }
-                if (!(this.arriveorder == '' && this.Existarrive == false && this.EditAble && this.cocLwc.SummonsStatus_c__c != '浠锋牸鏈畾')) {
-                    //璁╁崟浣嶏紝鍑鸿揣鏁伴噺 鍙樹负涓嶅彲閫夌殑text绫诲瀷
-                    for (var i in this.columns) {
-                        if (this.columns[i].label == '鍗曚綅') {
-                            this.columns[i].type = 'text';
-                            this.columns[i].fieldName = 'unitValue';
-                        }
-                        if (this.columns[i].label == '鍑鸿揣鏁伴噺') {
-                            this.columns[i].type = 'text';
-                            this.columns[i].fieldName = 'shipmentNumber';
-                        }
-                    }
-                }
-                this.isShowSpinner = false;
-                this.showTable = true;
-                console.log("ESetid = " + this.ESetid);
-            } else {
-                console.log("r = " + JSON.stringify(r));
-                this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error));
-            this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
+  stylesLoaded = false;
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
+        })
+        .catch((error) => {
+          console.error("Error loading custom styles");
         });
     }
+  }
 
-    ChangeDirction(event) {
-        let value = event.target.value;
-        this.summonsForDirction = value;
-        this.cocLwc["SummonsForDirction__c"] = value;
-        console.log("閫夋嫨浜� = " + value);
-        switch (value) {
-            case "鐩存帴閿�鍞粰鍖婚櫌":
+  //InvoiceProNotLabel    RrturnProLabel  InvoicedLabel
+  @wire(getObjectInfo, { objectApiName: OPPORTUNITY_OBJECT })
+  oppInfo({ data, error }) {
+    if (data) {
+      this.InvoiceProNotLabel = data.fields.InvoiceProNot_count__c.label;
+      this.RrturnProLabel = data.fields.RrturnPro_count__c.label;
+      this.InvoicedLabel = data.fields.Invoiced_Procount__c.label;
+      console.log("this.InvoiceProNotLabel = " + this.InvoiceProNotLabel);
+      console.log("this.RrturnProLabel = " + this.RrturnProLabel);
+      console.log("this.InvoicedLabel = " + this.InvoicedLabel);
+    }
+  }
+
+  //鑾峰彇閾炬帴鍙傛暟
+  getQueryString(name) {
+    console.log("getQueryString name " + name);
+    let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
+    let r = window.location.search.substr(1).match(reg);
+    if (r != null) {
+      return decodeURIComponent(r[2]);
+    }
+    return null;
+  }
+  connectedCallback() {
+    console.log("connectedCallback LexSummonsCreat");
+    this.ESetid = this.getQueryString("ESetid");
+    this.ESetid = this.ESetid == null ? "" : this.ESetid;
+    //statusEdit
+    this.statusEdit = this.getQueryString("KeyWords");
+    this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
+    //arriveorder
+    this.arriveorder = this.getQueryString("arriveorder");
+    this.arriveorder = this.arriveorder == null ? "" : this.arriveorder;
+    console.log("this.ESetid = " + this.ESetid);
+    console.log("this.statusEdit = " + this.statusEdit);
+    console.log("this.arriveorder = " + this.arriveorder);
+    if (this.ESetid == "") {
+      this.isShowInformation = false;
+    }
+    console.log("init LexSummonsCreat");
+    init({
+      ESetidJs: this.ESetid,
+      statusEdit: this.statusEdit,
+      pageSizeLWC: this.pageSize,
+      pageTokenLWC: this.currentPageToken,
+      arriveorderLWC: this.arriveorder
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+
+        if (r.status == "Success") {
+          //鍒嗛〉
+          console.log(
+            "r.entity.paginatedAccounts = " +
+              JSON.stringify(r.entity.paginatedAccounts)
+          );
+          this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
+          this.totalRecords = r.entity.paginatedAccounts.totalRecords;
+          this.recordStart = r.entity.paginatedAccounts.recordStart;
+          this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+          this.totalPages = Math.ceil(
+            r.entity.paginatedAccounts.totalRecords / this.pageSize
+          );
+          console.log("this.totalPages = " + this.totalPages);
+
+          this.OECId =
+            r.entity.HospitalInfo == null ? "" : r.entity.HospitalInfo;
+          console.log("this.OECId = " + this.OECId);
+          this.ConsumableOut_report = r.entity.ConsumableOut_report;
+          console.log(
+            "this.ConsumableOut_report = " + this.ConsumableOut_report
+          );
+          this.accountid = r.entity.accountid;
+          this.consumableproductdetailsRecords =
+            r.entity.consumableproductdetailsRecords;
+          this.accountName = r.entity.accountName;
+          this.agencyProType = r.entity.agencyProType;
+          this.accountName = r.entity.accountName;
+          this.userWorkLocation = r.entity.userWorkLocation;
+          this.EditAble = r.entity.EditAble;
+          this.consumableorderdetails2Records =
+            r.entity.consumableorderdetails2Records;
+          for (var i in this.consumableorderdetails2Records) {
+            this.consumableorderdetails2Records[i]["ProdName"] =
+              this.consumableorderdetails2Records[i].Prod.Name;
+            this.consumableorderdetails2Records[i][
+              "orderdetails2SerialLotNo__c"
+            ] =
+              this.consumableorderdetails2Records[
+                i
+              ].orderdetails2.SerialLotNo__c;
+            this.consumableorderdetails2Records[i][
+              "orderdetails2TracingCode__c"
+            ] =
+              this.consumableorderdetails2Records[
+                i
+              ].orderdetails2.TracingCode__c;
+            this.consumableorderdetails2Records[i][
+              "orderdetails2Sterilization_limit__c"
+            ] =
+              this.consumableorderdetails2Records[
+                i
+              ].orderdetails2.Sterilization_limit__c;
+          }
+          this.isShowOutboundProductDetails =
+            r.entity.consumableorderdetails2Count > 0 ? true : false;
+          console.log("this.agencyProType = " + this.agencyProType);
+          console.log("this.EditAble = " + this.EditAble);
+          //鏌ヨ闄勪欢
+          if (!this.EditAble) this.getFiles();
+          //绗�3鍒嗙被
+          for (var key in r.entity.categoryOptionMap) {
+            let object = {};
+            object["label"] = r.entity.categoryOptionMap[key];
+            object["value"] = key;
+            this.category3Options.push(object);
+          }
+          console.log(
+            "this.category3Options = " + JSON.stringify(this.category3Options)
+          );
+          //绗�4鍒嗙被
+          for (var key in r.entity.category4OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category4OptionMap[key];
+            object["value"] = key;
+            this.category4Options.push(object);
+          }
+          console.log("this.category4Options = " + this.category4Options);
+          //绗�5鍒嗙被
+          for (var key in r.entity.category5OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category5OptionMap[key];
+            object["value"] = key;
+            this.category5Options.push(object);
+          }
+          console.log("this.category5Options = " + this.category5Options);
+
+          this.data = r.entity.pageRecords;
+          this.editData = r.entity.pageRecords;
+          console.log("this.data start = " + JSON.stringify(this.data));
+          this.hasHosPro = r.entity.hasHosPro;
+          console.log("this.hasHosPro = " + this.hasHosPro);
+          if (this.EditAble) {
+            for (var i in this.data) {
+              let unitOptions = [];
+              for (var key in this.data[i].boxorpieceMap) {
+                let unitOption = {};
+                unitOption["label"] = this.data[i].boxorpieceMap[key];
+                unitOption["value"] = key;
+                unitOptions.push(unitOption);
+              }
+              this.data[i]["unitOptions"] = unitOptions;
+              this.data[i]["unitValue"] =
+                this.data[i]["unitValue"] == null
+                  ? unitOptions[0].value
+                  : this.data[i]["unitValue"];
+              if (this.EditAble) {
+                this.data[i].orderdetails1["Box_Piece__c"] =
+                  this.data[i].orderdetails1["Box_Piece__c"] == null
+                    ? unitOptions[0].value
+                    : this.data[i].orderdetails1["Box_Piece__c"];
+                this.data[i]["unitValue"] =
+                  this.data[i].orderdetails1["Box_Piece__c"] == null
+                    ? unitOptions[0].value
+                    : this.data[i].orderdetails1["Box_Piece__c"];
+                console.log(
+                  'this.data[i].orderdetails1["Box_Piece__c"] = ' +
+                    this.data[i].orderdetails1["Box_Piece__c"]
+                );
+                this.data[i].orderdetails1["Shipment_Count__c"] =
+                  this.data[i].orderdetails1["Shipment_Count__c"] == null
+                    ? 0
+                    : this.data[i].orderdetails1["Shipment_Count__c"];
+                this.data[i].orderdetails1["Delivery_List_RMB__c"] =
+                  this.data[i].orderdetails1["Delivery_List_RMB__c"] == null
+                    ? 0.0
+                    : this.data[i].orderdetails1["Delivery_List_RMB__c"];
+              } else {
+                this.data[i]["InvoiceProNot_count__c"] =
+                  this.data[i].orderdetails1.InvoiceProNot_count__c;
+                this.data[i]["RrturnPro_count__c"] =
+                  this.data[i].orderdetails1.RrturnPro_count__c;
+                this.data[i]["Invoiced_Procount__c"] =
+                  this.data[i].orderdetails1.Invoiced_Procount__c;
+              }
+              // this.data[i]["shipmentNumber"] = 0;
+              // this.data[i]["shippingUnitPrice"] = 0.0;
+              //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
+              //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
+              this.data[i]["shipmentNumber"] =
+                this.data[i].orderdetails1["Shipment_Count__c"];
+              this.data[i]["shippingUnitPrice"] =
+                this.data[i].orderdetails1["Delivery_List_RMB__c"];
+
+              this.data[i]["Id"] = this.data[i].Prod.Id;
+
+              if (this.hasHosPro) {
+                if (this.data[i]["hospitalSpecialOffer"]) {
+                  this.data[i]["Id"] = this.data[i].Prod.Id + "ishos";
+                } else {
+                  this.data[i]["Id"] = this.data[i].Prod.Id + "nothos";
+                }
+              }
+              this.data[i]["recordId"] = this.data[i].Prod.Id;
+              this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
+              this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
+              this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
+              this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c;
+              this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c;
+              this.data[i]["Box_Piece__c"] =
+                this.data[i].orderdetails1.Box_Piece__c;
+              this.data[i]["shipmentAmount"] =
+                this.data[i].orderdetails1.Shipment_amount__c;
+              this.data[i]["Shipment_amount__c"] =
+                this.data[i].orderdetails1.Shipment_amount__c;
+              this.data[i]["Shipment_Count__c"] =
+                this.data[i].orderdetails1.Shipment_Count__c;
+
+              if (this.data[i]["check"]) {
+                this.selectedRows.push(this.data[i].Id);
+              }
+            }
+            console.log("EditAble this.data = " + JSON.stringify(this.data));
+          } else {
+            for (var i in this.editData) {
+              this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
+              this.editData[i]["InvoiceProNot_count__c"] =
+                this.editData[i].orderdetails1.InvoiceProNot_count__c;
+              this.editData[i]["RrturnPro_count__c"] =
+                this.editData[i].orderdetails1.RrturnPro_count__c;
+              this.editData[i]["Invoiced_Procount__c"] =
+                this.editData[i].orderdetails1.Invoiced_Procount__c;
+              this.editData[i]["shipmentNumber"] =
+                this.editData[i].orderdetails1["Shipment_Count__c"];
+              this.editData[i]["shippingUnitPrice"] =
+                this.editData[i].orderdetails1["Delivery_List_RMB__c"];
+
+              this.editData[i]["recordId"] = this.editData[i].Prod.Id;
+              this.editData[i]["Id"] = this.editData[i].Prod.Id;
+              this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
+              this.editData[i]["SFDA_Status__c"] =
+                this.editData[i].Prod.SFDA_Status__c;
+              this.editData[i]["Category3__c"] =
+                this.editData[i].Prod.Category3__c;
+              this.editData[i]["Category4__c"] =
+                this.editData[i].Prod.Category4__c;
+              this.editData[i]["Category5__c"] =
+                this.editData[i].Prod.Category5__c;
+              this.editData[i]["Box_Piece__c"] =
+                this.editData[i].orderdetails1.Box_Piece__c;
+              this.editData[i]["shipmentAmount"] =
+                this.editData[i].orderdetails1.Shipment_amount__c;
+              //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+              this.editData[i]["Delivery_List_RMB__c"] =
+                this.editData[i].orderdetails1.Delivery_List_RMB__c;
+              this.editData[i]["Shipment_Count__c"] =
+                this.editData[i].orderdetails1.Shipment_Count__c;
+            }
+            console.log("end this.editData = " + JSON.stringify(this.editData));
+          }
+
+          console.log("this.data = " + JSON.stringify(this.data));
+          //show
+          if (r.entity.EditDelCommitBtnDisabled || r.entity.EditAble) {
+            this.isSaveShow = true;
+          } else {
+            this.isEditShow = true;
+            this.isDeliveryShow = true;
+            this.isOpenToInvoiceShow = true;
+            this.isPraseToPDFShow = true;
+            this.isOpenReportShow = true;
+            this.isDeleteShow = true;
+          }
+
+          this.Existarrive = r.entity.Existarrive;
+
+          console.log("this.EditAble = " + this.EditAble);
+
+          //disable
+
+          debugger;
+          if (Object.values(r.entity.coc).length > 0) {
+            this.cocLwc = r.entity.coc;
+            console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+            var coc = r.entity.coc;
+            this.accountValue =
+              coc.Order_ForDealerText__c == null
+                ? ""
+                : coc.Order_ForDealerText__c;
+            this.ForDealerText =
+              coc.Order_ForDealerText__c == null
+                ? ""
+                : coc.Order_ForDealerText__c;
+            console.log("this.accountValue = " + this.accountValue);
+            this.cocId = coc.Id;
+            console.log("cocId = " + this.cocId);
+            coc.SummonsStatus = coc.SummonsStatus_c__c;
+            console.log(
+              "this.cocLwc.Arrive_Order__c = " + this.cocLwc.Arrive_Order__c
+            );
+            if (this.cocLwc.Arrive_Order__c == null) {
+              this.isBarcode = true;
+            } else {
+              this.isBarcode = false;
+            }
+            if (coc.SummonsStatus_c__c == "宸插畬鎴�") {
+              this.isEditDisabled = true;
+            }
+            if (
+              coc.SummonsStatus_c__c == "鎵瑰噯" ||
+              coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
+              coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
+              coc.SummonsStatus_c__c == "宸插畬鎴�"
+            ) {
+              this.isDeliveryDisabled = true;
+            }
+            if (
+              ((coc.Billed_Status__c != "鍏ㄩ儴寮�绁�" &&
+                coc.SummonsStatus_c__c == "宸插畬鎴�") ||
+                coc.Onchange_order__c == true) &&
+              coc.SummonsForDirction__c != "浜掔浉璋冭揣"
+            ) {
+              this.isOpenToInvoiceDisabled = false;
+            }
+            if (
+              coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
+              coc.SummonsStatus_c__c == "鎵瑰噯" ||
+              coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
+              coc.SummonsStatus_c__c == "鑽夋涓�"
+            ) {
+              this.isPraseToPDFDisabled = false;
+            }
+            if (
+              coc.Billed_Status__c != "杩樻病寮�绁�" ||
+              coc.SummonsStatus_c__c == "宸插畬鎴�"
+            ) {
+              this.isOpenReportDisabled = false;
+            }
+            if (
+              coc.SummonsStatus_c__c == "宸查攢鍞緟涓婁紶绾冲搧涔�" ||
+              coc.SummonsStatus_c__c == "浠锋牸鏈畾" ||
+              coc.SummonsStatus_c__c == "鎵瑰噯" ||
+              coc.SummonsStatus_c__c == "鍑哄簱鍗曞凡鎵撳嵃" ||
+              coc.SummonsStatus_c__c == "宸插畬鎴�"
+            ) {
+              this.isDeleteDisabled = true;
+            }
+            this.isConInvoiceShow =
+              coc.SummonsStatus_c__c == "宸插畬鎴�" &&
+              coc.SummonsForDirction__c != "浜掔浉璋冭揣"
+                ? true
+                : false;
+            this.summonsStatusPriceNotDetermined =
+              coc.SummonsStatus_c__c == "浠锋牸鏈畾" ? true : false;
+            this.isSummonsForDirctionTwoShow =
+              coc.SummonsForDirction__c == "閿�鍞粰浜岀骇缁忛攢鍟�" ? true : false;
+          }
+          this.isSearchShow =
+            !this.Existarrive &&
+            r.entity.coc.SummonsStatus_c__c != "浠锋牸鏈畾" &&
+            r.entity.EditAble
+              ? true
+              : false;
+          this.hidecheckboxcolumn = !this.isSearchShow;
+          this.arriveorder = r.entity.arriveorder;
+          this.is345Show =
+            this.arriveorder == "" && this.Existarrive == false && this.EditAble
+              ? true
+              : false;
+          //濡傛灉涓嶆樉绀�345鍒嗙被锛宑olumns閲岄潰鍒犻櫎3锛�4锛�5鍒嗙被
+          if (!this.is345Show) {
+            for (var i = 0; i < this.columns.length; i++) {
+              if (this.columns[i].label == "绗�3鍒嗙被") {
+                this.columns.splice(i, 1);
+              }
+            }
+            for (var i = 0; i < this.columns.length; i++) {
+              if (this.columns[i].label == "绗�4鍒嗙被") {
+                this.columns.splice(i, 1);
+              }
+            }
+            for (var i = 0; i < this.columns.length; i++) {
+              if (this.columns[i].label == "绗�5鍒嗙被") {
+                this.columns.splice(i, 1);
+              }
+            }
+            for (var i = 0; i < this.editColumns.length; i++) {
+              if (this.editColumns[i].label == "绗�3鍒嗙被") {
+                this.editColumns.splice(i, 1);
+              }
+            }
+            for (var i = 0; i < this.editColumns.length; i++) {
+              if (this.editColumns[i].label == "绗�4鍒嗙被") {
+                this.editColumns.splice(i, 1);
+              }
+            }
+            for (var i = 0; i < this.editColumns.length; i++) {
+              if (this.editColumns[i].label == "绗�5鍒嗙被") {
+                this.editColumns.splice(i, 1);
+              }
+            }
+          }
+          //濡傛灉EditAble==false锛屽垹闄� 鍑鸿揣閲戦(鍏�) 鏈夋晥鏈熷唴搴撳瓨(鐩�) 鏈夋晥鏈熷唴搴撳瓨(涓�) 3鍒� 灞曠ず 杩樻病鍙戠エ鏁伴噺 杩斿搧鏁伴噺 宸插彂绁ㄦ暟閲�
+          //type : "number",
+          // typeAttributes:{
+          //     minimumFractionDigits:2,
+          // },
+          if (!this.EditAble) {
+            let object1 = {
+              label: this.InvoiceProNotLabel,
+              fieldName: "InvoiceProNot_count__c",
+              type: "number",
+              typeAttributes: {
+                minimumFractionDigits: 2
+              },
+              hideDefaultActions: true
+            };
+            let object2 = {
+              label: this.RrturnProLabel,
+              fieldName: "RrturnPro_count__c",
+              cellAttributes: { alignment: "right" },
+              hideDefaultActions: true
+            };
+            let object3 = {
+              label: this.InvoicedLabel,
+              fieldName: "Invoiced_Procount__c",
+              type: "number",
+              typeAttributes: {
+                minimumFractionDigits: 2
+              },
+              hideDefaultActions: true
+            };
+            this.editColumns.push(object1);
+            this.editColumns.push(object2);
+            this.editColumns.push(object3);
+          } else {
+            this.ForCustomerText = this.cocLwc.Order_ForCustomerText__c;
+            console.log(
+              "EditAble = true this.ForCustomerText = " + this.ForCustomerText
+            );
+            this.summonsForDirction = this.cocLwc.SummonsForDirction__c;
+            console.log(
+              "EditAble = true this.summonsForDirction = " +
+                this.summonsForDirction
+            );
+            let value = this.summonsForDirction;
+            switch (value) {
+              case "鐩存帴閿�鍞粰鍖婚櫌":
                 this.isDisabledHospitalName = false;
                 this.isDisabledForCustomerText = false;
                 this.secondaryDistributor = "";
                 this.ForDealerText = "";
-                this.cocLwc['Order_ForDealerText__c'] = '';
+                this.accountValue = "";
+                this.cocLwc["Order_ForDealerText__c"] = "";
                 this.isDisabledForDealerText = true;
                 this.isDisabledSecondaryDistributor = true;
-                this.isMutualTransferGoods = false;
                 break;
-            case "鍖婚櫌璇曠敤":
+              case "鍖婚櫌璇曠敤":
                 this.isDisabledHospitalName = false;
                 this.isDisabledForCustomerText = false;
                 this.isDisabledForDealerText = false;
                 this.isDisabledSecondaryDistributor = false;
                 this.isMutualTransferGoods = false;
                 break;
-            case "閿�鍞粰浜岀骇缁忛攢鍟�":
+              case "閿�鍞粰浜岀骇缁忛攢鍟�":
                 this.isDisabledHospitalName = false;
                 this.isDisabledForCustomerText = false;
                 this.isDisabledForDealerText = false;
                 this.isDisabledSecondaryDistributor = false;
                 this.isMutualTransferGoods = false;
                 break;
-            case "浜掔浉璋冭揣":
+              case "浜掔浉璋冭揣":
                 this.isDisabledHospitalName = true;
                 this.HospitalName = "";
                 this.OECId = "";
@@ -1143,1414 +1105,1787 @@
                 this.isDisabledSecondaryDistributor = false;
                 this.isMutualTransferGoods = true;
                 break;
-            default:
+              default:
                 this.isDisabledHospitalName = false;
                 this.isDisabledForCustomerText = false;
                 this.isDisabledForDealerText = false;
                 this.isDisabledSecondaryDistributor = false;
-                this.isMutualTransferGoods = false;
-        }
-    }
-
-    dataChange(event) {
-        let fieldName = event.target.getAttribute("data-field");
-        let value = event.detail.value;
-        console.log("fieldName = " + fieldName + " value = " + value);
-        switch (fieldName) {
-            case "summonsForDirction":
-                this.summonsForDirction = value;
-                break;
-            case "secondaryDistributor":
-                this.secondaryDistributor = value;
-                break;
-            case "HospitalName":
-                this.HospitalName = value;
-                break;
-            case "outOutPattern":
-                this.outOutPattern = value;
-                break;
-            case "ForDealerText":
-                this.ForDealerText = value;
-                this.cocLwc["Order_ForDealerText__c"] = value;
-                break;
-            case "ForCustomerText":
-                this.cocLwc["Order_ForCustomerText__c"] = value;
-                this.ForCustomerText = value;
-                break;
-            case "sumPrice":
-                this.sumPrice = value.toFixed(2);
-                break;
-            case "NoConfirmedPrice":
-                this.NoConfirmedPrice = !this.NoConfirmedPrice;
-                this.cocLwc["NoConfirmedPrice__c"] = this.NoConfirmedPrice;
-                console.log("this.NoConfirmedPrice = " + this.NoConfirmedPrice);
-                break;
-            case "consumableName":
-                this.consumableName = value;
-                break;
-            case "Category3":
-                this.Category3 = value;
-                //璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
-                this.showAllCate();
-                if (this.Category3 == '') {
-                    this.Category4 = '';
-                    this.Category5 = '';
-                }
-                break;
-            case "Category4":
-                this.Category4 = value;
-                //璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
-                this.showCate();
-                if (this.Category4 == '') {
-                    this.Category5 = '';
-                }
-                break;
-            case "Category5":
-                this.Category5 = value;
-                break;
-            case "searchHospitalName":
-                this.searchHospitalName = value;
-                break;
-            case "Barcode":
-                this.Barcode = value;
-                break;
-            case "Order_ForDealerText__c":
-                this.cocLwc["Order_ForDealerText__c"] = value;
-                break;
-        }
-    }
-
-    showAllCate() {
-        console.log('showAllCate')
-        categoryAllload({
-            category3Lwc: this.Category3
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.category4Options = [];
-                this.category5Options = [];
-                //绗�4鍒嗙被
-                for (var key in r.entity.category4OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category4OptionMap[key];
-                    object["value"] = key;
-                    this.category4Options.push(object);
-                }
-                console.log("this.category4Options = " + this.category4Options);
-                //绗�5鍒嗙被
-                for (var key in r.entity.category5OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category5OptionMap[key];
-                    object["value"] = key;
-                    this.category5Options.push(object);
-                }
-            } else {
-                console.log("r = " + JSON.stringify(r));
-                this.showMyToast('4/5鍒嗙被鏌ヨ澶辫触', r.msg, 'Error');
             }
-        }).catch((error) => {
-            console.log("error" + JSON.stringify(error));
-        });
-    }
+          }
 
-    showCate() {
-        console.log('showAllCate')
-        categoryload({
-            category3Lwc: this.Category3,
-            category4Lwc: this.Category4
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.category4Options = [];
-                this.category5Options = [];
-                //绗�4鍒嗙被
-                for (var key in r.entity.category4OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category4OptionMap[key];
-                    object["value"] = key;
-                    this.category4Options.push(object);
-                }
-                console.log("this.category4Options = " + this.category4Options);
-                //绗�5鍒嗙被
-                for (var key in r.entity.category5OptionMap) {
-                    let object = {};
-                    object["label"] = r.entity.category5OptionMap[key];
-                    object["value"] = key;
-                    this.category5Options.push(object);
-                }
-            } else {
-                console.log("r = " + JSON.stringify(r));
-                this.showMyToast('Error', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error" + JSON.stringify(error));
-        });
-    }
-
-    invoiceChange(event) {
-        this.invoiceId = event.target.value;
-        console.log('this.invoiceId = ' + this.invoiceId);
-    }
-
-    showMyToast(title, message, variant) {
-        this.isShowSpinner = false;
-        this.showLoadingSpinner = false;
-        this.isEditShowSpinner = false;
-        console.log('show custom message');
-        var iconName = '';
-        var content = '';
-        if (variant.toLowerCase() == 'success') {
-            iconName = 'utility:check';
-        } else {
-            iconName = 'utility:error';
-        }
-        if (message != '') {
-            content = '<h2><strong>' + title + '<strong/></h2><h5>' + message + '</h5>';
-        } else {
-            content = '<h2><strong>' + title + '<strong/></h2>';
-        }
-        this.template.querySelector('c-common-toast').showToast(variant, content, iconName, 10000);
-    }
-
-    searchProductJs() {
-        this.isEditShowSpinner = true;
-        //this.showTable = false;
-        //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
-        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
-        console.log('selectedRows = ' + selectedRows);
-        for (var i in this.data) {
-            this.data[i]["check"] = false;
-        }
-        for (var i in this.data) {
-            for (var j in selectedRows) {
-                if (this.data[i].Id == selectedRows[j].Id) {
-                    this.data[i]["check"] = true;
-                }
-            }
-        }
-
-        let cloneData = this.deepClone(this.data);
-        for (var i in cloneData) {
-            cloneData[i]["Name"] = cloneData[i].Name__c;
-            cloneData[i]["Category3"] = cloneData[i].Category3__c;
-            cloneData[i]["Category4"] = cloneData[i].Category4__c;
-            cloneData[i]["Category5"] = cloneData[i].Category5__c;
-            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
-            delete cloneData[i].Name__c;
-            delete cloneData[i].Category3__c;
-            delete cloneData[i].Category4__c;
-            delete cloneData[i].Category5__c;
-            delete cloneData[i].Box_Piece__c;
-        }
-
-        console.log("cloneData = " + JSON.stringify(cloneData));
-        searchConsumableorderdetails({
-            agencyProTypeLwc: this.agencyProType,
-            accountNameLwc: this.accountName,
-            userWorkLocationLwc: this.userWorkLocation,
-            outOutPattern: this.outOutPattern,
-            category1: this.consumableName,
-            category3: this.Category3,
-            category4: this.Category4,
-            category5: this.Category5,
-            editAbleLwc: this.EditAble,
-            pageRecordsLwcLwc: cloneData,
-            consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
-            arriveorderLwc: this.arriveorder,
-            pageSizeLWC: this.pageSize,
-            pageTokenLWC: this.currentPageToken
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-
-                //鍒嗛〉
-                console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
-                this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
-                this.totalRecords = r.entity.paginatedAccounts.totalRecords;
-                this.recordStart = r.entity.paginatedAccounts.recordStart;
-                this.recordEnd = r.entity.paginatedAccounts.recordEnd;
-                this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
-                console.log('this.totalPages = ' + this.totalPages);
-
-                this.hasHosPro = r.entity.hasHosPro;
-                console.log("this.hasHosPro = " + this.hasHosPro);
-
-                this.SearchDone = r.entity.SearchDone;
-                let tempData = [];
-                this.selectedRows = [];
-                tempData = r.entity.pageRecords;
-                for (var i in tempData) {
-                    let unitOptions = [];
-                    for (var key in tempData[i].boxorpieceMap) {
-                        let unitOption = {};
-                        unitOption["label"] = tempData[i].boxorpieceMap[key];
-                        unitOption["value"] = key;
-                        unitOptions.push(unitOption);
-                    }
-                    tempData[i]["unitOptions"] = unitOptions;
-                    tempData[i]["unitValue"] = tempData[i]["unitValue"] == null ? unitOptions[0].value : tempData[i]["unitValue"];
-                    if (this.EditAble) {
-                        tempData[i].orderdetails1["Box_Piece__c"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
-                        tempData[i]["unitValue"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
-                        tempData[i].orderdetails1["Shipment_Count__c"] = tempData[i].orderdetails1["Shipment_Count__c"] == null ? 0 : tempData[i].orderdetails1["Shipment_Count__c"];
-                        tempData[i].orderdetails1["Delivery_List_RMB__c"] = tempData[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : tempData[i].orderdetails1["Delivery_List_RMB__c"];
-                    } else {
-                        tempData[i]["InvoiceProNot_count__c"] =
-                            tempData[i].orderdetails1.InvoiceProNot_count__c;
-                        tempData[i]["RrturnPro_count__c"] =
-                            tempData[i].orderdetails1.RrturnPro_count__c;
-                        tempData[i]["Invoiced_Procount__c"] =
-                            tempData[i].orderdetails1.Invoiced_Procount__c;
-                    }
-                    tempData[i]["shipmentNumber"] = tempData[i].orderdetails1["Shipment_Count__c"];
-                    tempData[i]["shippingUnitPrice"] = tempData[i].orderdetails1["Delivery_List_RMB__c"];
-
-                    tempData[i]["Id"] = tempData[i].Prod.Id;
-
-                    console.log('tempData[i]["hospitalSpecialOffer"] = ' + tempData[i]["hospitalSpecialOffer"])
-                    if (this.hasHosPro) {
-                        if (tempData[i]["hospitalSpecialOffer"]) {
-                            tempData[i]["Id"] = tempData[i].Prod.Id + 'ishos';
-                        } else {
-                            tempData[i]["Id"] = tempData[i].Prod.Id + 'nothos';
-                        }
-                    }
-
-                    tempData[i]["recordId"] = tempData[i]["Id"];
-                    tempData[i]["Name__c"] = tempData[i].Prod.Name__c;
-                    tempData[i]["SFDA_Status__c"] = tempData[i].Prod.SFDA_Status__c;
-                    tempData[i]["Category3__c"] = tempData[i].Prod.Category3__c;
-                    tempData[i]["Category4__c"] = tempData[i].Prod.Category4__c;
-                    tempData[i]["Category5__c"] = tempData[i].Prod.Category5__c;
-                    tempData[i]["Box_Piece__c"] = tempData[i].orderdetails1.Box_Piece__c;
-                    tempData[i]["shipmentAmount"] = tempData[i].orderdetails1.Shipment_amount__c;
-                    tempData[i]["Shipment_amount__c"] = tempData[i].orderdetails1.Shipment_amount__c;
-                    tempData[i]["Shipment_Count__c"] = tempData[i].orderdetails1.Shipment_Count__c;
-
-                    if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
-                        tempData[i]["shipmentAmount"] = this.amend(
-                            tempData[i]["shipmentNumber"],
-                            tempData[i]["shippingUnitPrice"],
-                            "*"
-                        );
-
-                    if (tempData[i]['check']) {
-                        this.selectedRows.push(tempData[i].Id);
-                    }
-
-                }
-                this.data = tempData;
-
-                //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
-                console.log('this.hasHosPro = ' + this.hasHosPro);
-                if (this.hasHosPro) {
-                    let object1 = {
-                        label: "鍖婚櫌鐗逛环",
-                        fieldName: "hospitalSpecialOffer",
-                        type: 'boolean',
-                        initialWidth: 100,
-                        hideDefaultActions: true,
-                    };
-                    this.columns.push(object1);
-                    this.editColumns.push(object1);
-                }
-                this.columns = [...this.columns];
-                this.editColumns = [...this.editColumns];
-                console.log("this.columns = " + JSON.stringify(this.columns));
-                console.log("this.data = " + JSON.stringify(this.data));
-                console.log(" this.selectedRows = " + JSON.stringify(this.selectedRows));
-                //this.showTable = true;
-                this.isEditShowSpinner = false;
-            } else {
-                console.log("r = " + JSON.stringify(r));
-                this.showMyToast('鏌ヨ澶辫触', r.msg, 'Error');
-            }
-        });
-    }
-
-    searchHospitalNameModal() {
-        console.log("searchHospitalNameModal");
-        hospitalInit({
-            ctype: this.agencyProType,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.hospitalList = r.entity.at;
-                for (var i in this.hospitalList) {
-                    this.hospitalList[i]["stateMasterName"] =
-                        this.hospitalList[i].State_Master__r.Name;
-                }
-                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
-                this.isModalOpen = true;
-            }
-        });
-    }
-
-    searchHospital() {
-        console.log("this.searchHospitalName = " + this.searchHospitalName);
-        serContact({
-            searchName: this.searchHospitalName,
-            ctype: this.agencyProType,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.hospitalList = r.entity.at;
-                for (var i in this.hospitalList) {
-                    this.hospitalList[i]["stateMasterName"] =
-                        this.hospitalList[i].State_Master__r.Name;
-                }
-                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
-            }
-        });
-    }
-
-    searchHandleRowAction(event) {
-        console.log("searchHandleRowAction");
-        let row = event.detail.row;
-        this.OECId = row.Id;
-        this.HospitalName = row.Name;
-        console.log(
-            "this.OECId = " + this.OECId + " this.HospitalName = " + this.HospitalName
-        );
-        this.isModalOpen = false;
-        console.log("this.isModalOpen = " + this.isModalOpen);
-    }
-
-    clearAgencyI(event) {
-        this.HospitalName = event.target.value;
-        if (this.HospitalName == "" || this.HospitalName == null) {
-            this.OECId = "";
-        }
-        console.log("this.HospitalName = " + this.HospitalName);
-        console.log("this.OECId = " + this.OECId);
-        if (this.OECId != null && this.OECId != "") {
-            this.checkOutPattern();
-        }
-    }
-
-    checkOutPattern() {
-        //鏍规嵁鐢ㄦ埛閫変腑鐨勪骇鍝佺粰 鍑哄簱鍗曚笂鐨勬槸鍚﹀尰闄㈢壒浠峰嚭搴撳瓧娈佃祴鍊�
-        let ishos = 0;
-        for (var i in this.data) {
-            if (
-                this.data[i].check == true &&
-                this.data[i].hospitalSpecialOffer == true
-            ) {
-                ishos = ishos + 1;
-            }
-        }
-        if (ishos > 0) {
-            this.cocLwc["OutPattern__c"] = true;
-        } else {
-            this.cocLwc["OutPattern__c"] = false;
-        }
-    }
-
-    closeModal() {
-        this.isModalOpen = false;
-    }
-
-    handleUnitChange(event) {
-        console.log("handleUnitChange");
-        const unitDetail = event.detail;
-        console.log("unitDetail = " + JSON.stringify(unitDetail));
-        for (var i in this.data) {
-            if (this.data[i].Id == unitDetail.data.recordId) {
-                this.data[i].unitValue = unitDetail.data.unitValue;
-                this.data[i].orderdetails1["Box_Piece__c"] = unitDetail.data.unitValue;
-            }
-        }
-        console.log("this.data = " + JSON.stringify(this.data));
-    }
-
-    handleShipmentNumber(event) {
-        console.log("handleShipmentNumber");
-        const numberDetail = event.detail;
-        console.log("numberDetail = " + JSON.stringify(numberDetail));
-        let index = 0;
-        for (var i in this.data) {
-            if (this.data[i].Id == numberDetail.data.recordId) {
-                index = i;
-                this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
-                this.data[i].orderdetails1["Shipment_Count__c"] = Number(numberDetail.data.shipmentnumber);
-                console.log('this.data[i].orderdetails1["Shipment_Count__c"] = ' + this.data[i].orderdetails1["Shipment_Count__c"]);
-                console.log('this.selectedRows.indexOf(this.data[i].Id) = ' + this.selectedRows.indexOf(this.data[i].Id));
-                if (this.data[i].orderdetails1["Shipment_Count__c"] != '') {
-                    if (this.selectedRows.indexOf(this.data[i].Id) == -1) {
-                        this.selectedRows.push(this.data[i].Id);
-                    }
-                    this.data[i].check = true;
-                } else {
-                    if (this.selectedRows.indexOf(this.data[i].Id) != -1) {
-                        this.selectedRows.splice(this.selectedRows.indexOf(this.data[i].Id), 1);
-                    }
-                    this.data[i].check = false;
-                }
-                this.selectedRows = [...this.selectedRows];
-                console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows));
-            }
-        }
-        this.data = [...this.data];
-        this.ComputePrice(
-            index,
-            this.data[index].shipmentNumber,
-            this.data[index].shippingUnitPrice
-        );
-    }
-
-    handleShipmentUnitPrice(event) {
-        console.log("handleShipmentUnitPrice");
-        const priceDetail = event.detail;
-        let index = 0;
-        for (var i in this.data) {
-            if (this.data[i].Id == priceDetail.data.recordId) {
-                index = i;
-                this.data[i].shippingUnitPrice = Number(
-                    priceDetail.data.shipmentunitprice
-                );
-                this.data[i].orderdetails1["Delivery_List_RMB__c"] = Number(
-                    priceDetail.data.shipmentunitprice
-                );
-            }
-        }
-        this.ComputePrice(
-            index,
-            this.data[index].shipmentNumber,
-            this.data[index].shippingUnitPrice
-        );
-    }
-
-    ComputePrice(index, number, price) {
-        console.log("index = " + index);
-        console.log("number = " + number);
-        console.log("price = " + price);
-        let shipmentAmount = this.amend(number, price, "*");
-        console.log("shipmentAmount = " + shipmentAmount);
-        let sumPrice = 0.0;
-        this.data[index].shipmentAmount = shipmentAmount;
-        for (var i in this.data) {
-            if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
-        }
-        this.sumPrice = sumPrice.toFixed(2) + "鍏�";
-        //瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
-        // if (this.selectedRows.indexOf(this.data[index].Id) == -1)
-        //     this.selectedRows.push(this.data[index].Id);
-        // this.selectedRows = [];
-        // for (var i in this.data) {
-        //     if (this.data[i].check) {
-        //         this.selectedRows.push(this.data[i].Id);
-        //     }
-        // }
-        this.data = [...this.data];
-        // this.selectedRows = [...this.selectedRows]
-        // console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
-        console.log("this.data = " + JSON.stringify(this.data));
-    }
-
-    //num1 num2浼犲叆涓や釜鍊�  symbol +-*/绗﹀彿
-    amend(num1, num2, symbol) {
-        var str1 = num1.toString(),
-            str2 = num2.toString(),
-            result,
-            str1Length,
-            str2Length;
-        //瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
-        try {
-            str1Length = str1.split(".")[1].length;
-        } catch (error) {
-            str1Length = 0;
-        }
-        try {
-            str2Length = str2.split(".")[1].length;
-        } catch (error) {
-            str2Length = 0;
-        }
-        var step = Math.pow(10, Math.max(str1Length, str2Length));
-        //
-        console.log(step);
-        switch (symbol) {
-            case "+":
-                result = (num1 * step + num2 * step) / step;
-                break;
-            case "-":
-                result = (num1 * step - num2 * step) / step;
-                break;
-            case "*":
-                result = (num1 * step * (num2 * step)) / step / step;
-                break;
-            case "/":
-                result = (num1 * step) / (num2 * step);
-                break;
-            default:
-                break;
-        }
-        return result;
-    }
-
-    getSelectedRows(event) {
-        let selectedRowsEvent = event.detail.selectedRows;
-        console.log('selectedRowsEvent = ' + JSON.stringify(selectedRowsEvent))
-        this.selectedRows = [];
-        for (var i in selectedRowsEvent) {
-            this.selectedRows.push(selectedRowsEvent[i].Id)
-        }
-        // for (var i in this.data) {
-        //     for (var j in selectedRowsEvent) {
-        //         if (this.data[i].Id == selectedRowsEvent[j].Prod.Id) {
-        //             this.ComputePrice(
-        //                 i,
-        //                 this.data[i].shipmentNumber,
-        //                 this.data[i].shippingUnitPrice
-        //             );
-        //         }
-        //     }
-        // }
-        // this.ComputePrice(
-        //     index,
-        //     this.data[index].shipmentNumber,
-        //     this.data[index].shippingUnitPrice
-        // );
-        // const selectedRows = event.detail.selectedRows;
-        // console.log("this.selectedRows = " + this.selectedRows);
-        // for (var i in this.data) {
-        //     this.data[i]["check"] = false;
-        // }
-        // for (var i in this.data) {
-        //     for (var j in selectedRows) {
-        //         if (this.data[i].Id == selectedRows[j].Id) {
-        //             this.data[i]["check"] = true;
-        //         }
-        //     }
-        // }
-    }
-
-    saveConfirmJs() {
-        let msg = "鍑哄簱浠锋牸浠呭彲鎿嶄綔涓�娆″彉鏇达紝淇濆瓨鍚庡皢鏃犳硶淇敼銆俓n\n璇风‘璁わ紒";
-        if (this.SummonsStatus == "浠锋牸鏈畾") {
-            if (confirm(msg) == true) {
-                this.saveConfirm();
-            }
-        } else {
-            this.saveConfirm();
-        }
-    }
-
-    deepClone(obj) {
-        return JSON.parse(JSON.stringify(obj));
-    }
-
-    saveConfirm() {
-        this.isShowSpinner = true;
-
-        //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
-        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
-        console.log('selectedRows = ' + selectedRows);
-        for (var i in this.data) {
-            this.data[i]["check"] = false;
-        }
-        for (var i in this.data) {
-            for (var j in selectedRows) {
-                if (this.data[i].Id == selectedRows[j].Id) {
-                    this.data[i]["check"] = true;
-                }
-            }
-        }
-
-        let cloneData = this.deepClone(this.data);
-        for (var i in cloneData) {
-            cloneData[i]["Name"] = cloneData[i].Name__c;
-            cloneData[i]["Category3"] = cloneData[i].Category3__c;
-            cloneData[i]["Category4"] = cloneData[i].Category4__c;
-            cloneData[i]["Category5"] = cloneData[i].Category5__c;
-            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
-            //cloneData[i]["shippingUnitPrice"] = cloneData[i]["shippingUnitPrice"] == '' ? 0 : cloneData[i]["shippingUnitPrice"];
-            delete cloneData[i].Name__c;
-            delete cloneData[i].Category3__c;
-            delete cloneData[i].Category4__c;
-            delete cloneData[i].Category5__c;
-            delete cloneData[i].Box_Piece__c;
-        }
-        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-        console.log("this.OECId = " + this.OECId);
-        console.log("this.HospitalName = " + this.HospitalName);
-        console.log("this.secondaryDistributor = " + this.secondaryDistributor);
-        console.log("this.pageRecordsLwc = " + JSON.stringify(cloneData));
-        console.log("this.accountid = " + this.accountid);
-        console.log("this.ESetid = " + this.ESetid);
-        console.log(
-            "this.consumableproductdetailsRecords = " +
-            JSON.stringify(this.consumableproductdetailsRecords)
-        );
-        save({
-            cocLwc: this.cocLwc,
-            hospitalInfoLwc: this.OECId,
-            hospitalNameLwc: this.HospitalName,
-            secondaryDistributorLwc: this.secondaryDistributor,
-            pageRecordsLwc: cloneData,
-            accountidLwc: this.accountid,
-            ESetIdLwc: this.ESetid,
-            consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
-            agencyProTypeLwc: this.agencyProType,
-            userWorkLocationLwc: this.userWorkLocation
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            debugger
-            if (r.status == "Success") {
-                // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
-                // this[NavigationMixin.Navigate]({
-                //     type: "standard__webPage",
-                //     attributes: {
-                //         url: url,
-                //     },
-                // });
-                window.location.href = "/s/lexsummonscreat?ESetid=" + r.entity.ESetId;
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('淇濆瓨澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error));
-        });
-    }
-
-    //鎵撳嵃鎸囩ず鍗�
-    PraseToPDFJs() {
-        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-        console.log("this.ESetId = " + this.ESetid);
-        PraseToPDF({
-            cocLwc: this.cocLwc,
-            ESetId: this.ESetid,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId);
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('鎵撳嵃澶辫触', r.msg, 'Error');
-            }
-        });
-    }
-
-    //鏄剧ず鏄庣粏
-    openReportJs() {
-        console.log("openReportJs");
-        var reportId = this.ESetid;
-        reportId = reportId.substring(0, 15);
-        console.log("reportId = " + reportId);
-        let reportFilters = '[{"operator":"equals","value":"' + reportId + '","column":"FK_CUSTENT_ID"}]';
-        let reportUrl = this.label.ConsumableOutboundReportId;
-        console.log("reportUrl = " + reportUrl);
-        let url = "/s/report/" + reportUrl + "?reportFilters=" + encodeURIComponent(reportFilters);
-        console.log("url = " + url);
-        window.open(url);
-        // this[NavigationMixin.Navigate]({
-        //     type: "standard__webPage",
-        //     attributes: {
-        //         url: url,
-        //         target: '_blank'
-        //     },
-        // });
-    }
-
-    vpClear2Delay(event) {
-        console.log("vpClear2Delay");
-        if (this.summonsForDirction != "浜掔浉璋冭揣") {
-            this.cocLwc["Order_ForDealerText__c"] = event.target.value;
-            console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-        } else {
-            //console.log('Order_ForDealerTextID__c = ' + this.cocLwc['Order_ForDealerTextID__c'])
-            this.cocLwc["Order_ForDealerText__c"] =
-                this.cocLwc["Order_ForDealerTextID__c"] == "" ||
-                    this.cocLwc["Order_ForDealerTextID__c"] == null ||
-                    this.cocLwc["Order_ForDealerTextID__c"] == undefined
-                    ? ""
-                    : this.cocLwc["Order_ForDealerText__c"];
-            console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-            // console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
-            // this.ForDealerText = this.cocLwc['Order_ForDealerText__c'];
-            // event.target.value = this.cocLwc['Order_ForDealerText__c'];
-            // console.log('this.ForDealerText = ' + this.ForDealerText);
-        }
-    }
-    handleSearch(event) {
-        const lookupElement = event.target;
-        console.log("event.detail = " + JSON.stringify(event.detail));
-        apexSearch({
-            searchTerm: event.detail.searchTerm,
-        }).then((results) => {
-            lookupElement.setSearchResults(results);
-        }).catch((error) => {
-            console.log("error" + JSON.stringify(error));
-        });
-    }
-
-    handleSelectionChange(event) {
-        const selection = event.target.getSelection();
-        console.log("selection = " + JSON.stringify(selection));
-        this.cocLwc["Order_ForDealerTextID__c"] = selection[0].id;
-        this.cocLwc["Order_ForDealerText__c"] = selection[0].title;
-        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
-    }
-
-    handleFilesChange(event) {
-        console.log("handleFilesChange");
-        if (event.target.files.length > 0) {
-            this.filesUploaded = event.target.files;
-            this.fileName = event.target.files[0].name;
-        }
-    }
-
-    handleSave() {
-        console.log("saveFile");
-        if (this.filesUploaded.length > 0) {
-            this.file = this.filesUploaded[0];
-            if (this.file.size > this.MAX_FILE_SIZE) {
-                this.showMyToast('淇濆瓨澶辫触', '鏂囦欢杩囧ぇ', 'Error');
-                return;
-            }
-            this.showPopSpinner = true;
-            this.fileReader = new FileReader();
-
-            this.fileReader.onloadend = () => {
-                this.fileContents = this.fileReader.result;
-                let base64 = "base64,";
-                this.content = this.fileContents.indexOf(base64) + base64.length;
-                this.fileContents = this.fileContents.substring(this.content);
-                this.saveToFile();
+          //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
+          if (this.hasHosPro) {
+            let object1 = {
+              label: "鍖婚櫌鐗逛环",
+              fieldName: "hospitalSpecialOffer",
+              type: "boolean",
+              hideDefaultActions: true
             };
-            this.fileReader.readAsDataURL(this.file);
+            this.columns.push(object1);
+            this.editColumns.push(object1);
+          }
+          //鍑哄簱鍗曚俊鎭�
+          this.isSummonsFlag = r.entity.SummonsFlag == "visible" ? true : false;
+          console.log("r.entity.provinceOptsMap = " + r.entity.provinceOptsMap);
+          for (var key in r.entity.provinceOptsMap) {
+            let object = {};
+            object["label"] = r.entity.provinceOptsMap[key];
+            object["value"] = key;
+            this.secondaryDistributorOptions.push(object);
+          }
+          for (var key in r.entity.outOutPatternOptionMap) {
+            let object = {};
+            object["label"] = r.entity.outOutPatternOptionMap[key];
+            object["value"] = key;
+            this.outOutPatternOptionList.push(object);
+          }
+          console.log(
+            "this.secondaryDistributorOptions = " +
+              JSON.stringify(this.secondaryDistributorOptions)
+          );
+          this.HospitalName = r.entity.HospitalName;
+          this.sumPrice = r.entity.sumPrice.toFixed(2) + "鍏�";
+          debugger;
+          console.log("this.Existarrive = " + this.Existarrive);
+          console.log("this.EditAble = " + this.EditAble);
+          console.log(
+            "r.entity.coc.SummonsStatus_c__c = " +
+              r.entity.coc.SummonsStatus_c__c
+          );
+          if (
+            !this.Existarrive &&
+            this.EditAble &&
+            r.entity.coc.SummonsStatus_c__c != "浠锋牸鏈畾"
+          ) {
+            this.hideCheckboxColumn = false;
+          } else {
+            this.hideCheckboxColumn = true;
+          }
+          if (
+            !(
+              this.arriveorder == "" &&
+              this.Existarrive == false &&
+              this.EditAble &&
+              this.cocLwc.SummonsStatus_c__c != "浠锋牸鏈畾"
+            )
+          ) {
+            //璁╁崟浣嶏紝鍑鸿揣鏁伴噺 鍙樹负涓嶅彲閫夌殑text绫诲瀷
+            for (var i in this.columns) {
+              if (this.columns[i].label == "鍗曚綅") {
+                this.columns[i].type = "text";
+                this.columns[i].fieldName = "unitValue";
+              }
+              if (this.columns[i].label == "鍑鸿揣鏁伴噺") {
+                this.columns[i].type = "text";
+                this.columns[i].fieldName = "shipmentNumber";
+              }
+            }
+          }
+          this.isShowSpinner = false;
+          this.showTable = true;
+          console.log("ESetid = " + this.ESetid);
         } else {
-            this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
+          console.log("r = " + JSON.stringify(r));
+          this.showMyToast("鍒濆鍖栧け璐�", r.msg, "Error");
         }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+        this.showMyToast("閿欒", "鍒濆鍖栧け璐�", "Error");
+      });
+  }
+
+  ChangeDirction(event) {
+    let value = event.target.value;
+    this.summonsForDirction = value;
+    this.cocLwc["SummonsForDirction__c"] = value;
+    console.log("閫夋嫨浜� = " + value);
+    switch (value) {
+      case "鐩存帴閿�鍞粰鍖婚櫌":
+        this.isDisabledHospitalName = false;
+        this.isDisabledForCustomerText = false;
+        this.secondaryDistributor = "";
+        this.ForDealerText = "";
+        this.cocLwc["Order_ForDealerText__c"] = "";
+        this.isDisabledForDealerText = true;
+        this.isDisabledSecondaryDistributor = true;
+        this.isMutualTransferGoods = false;
+        break;
+      case "鍖婚櫌璇曠敤":
+        this.isDisabledHospitalName = false;
+        this.isDisabledForCustomerText = false;
+        this.isDisabledForDealerText = false;
+        this.isDisabledSecondaryDistributor = false;
+        this.isMutualTransferGoods = false;
+        break;
+      case "閿�鍞粰浜岀骇缁忛攢鍟�":
+        this.isDisabledHospitalName = false;
+        this.isDisabledForCustomerText = false;
+        this.isDisabledForDealerText = false;
+        this.isDisabledSecondaryDistributor = false;
+        this.isMutualTransferGoods = false;
+        break;
+      case "浜掔浉璋冭揣":
+        this.isDisabledHospitalName = true;
+        this.HospitalName = "";
+        this.OECId = "";
+        this.isDisabledForCustomerText = true;
+        this.ForCustomerText = "";
+        this.cocLwc["Order_ForCustomerText__c"] = "";
+        this.isDisabledForDealerText = false;
+        this.isDisabledSecondaryDistributor = false;
+        this.isMutualTransferGoods = true;
+        break;
+      default:
+        this.isDisabledHospitalName = false;
+        this.isDisabledForCustomerText = false;
+        this.isDisabledForDealerText = false;
+        this.isDisabledSecondaryDistributor = false;
+        this.isMutualTransferGoods = false;
+    }
+  }
+
+  dataChange(event) {
+    let fieldName = event.target.getAttribute("data-field");
+    let value = event.detail.value;
+    console.log("fieldName = " + fieldName + " value = " + value);
+    switch (fieldName) {
+      case "summonsForDirction":
+        this.summonsForDirction = value;
+        break;
+      case "secondaryDistributor":
+        this.secondaryDistributor = value;
+        break;
+      case "HospitalName":
+        this.HospitalName = value;
+        break;
+      case "outOutPattern":
+        this.outOutPattern = value;
+        break;
+      case "ForDealerText":
+        this.ForDealerText = value;
+        this.cocLwc["Order_ForDealerText__c"] = value;
+        break;
+      case "ForCustomerText":
+        this.cocLwc["Order_ForCustomerText__c"] = value;
+        this.ForCustomerText = value;
+        break;
+      case "sumPrice":
+        this.sumPrice = value.toFixed(2);
+        break;
+      case "NoConfirmedPrice":
+        this.NoConfirmedPrice = !this.NoConfirmedPrice;
+        this.cocLwc["NoConfirmedPrice__c"] = this.NoConfirmedPrice;
+        console.log("this.NoConfirmedPrice = " + this.NoConfirmedPrice);
+        break;
+      case "consumableName":
+        this.consumableName = value;
+        break;
+      case "Category3":
+        this.Category3 = value;
+        //璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
+        this.showAllCate();
+        if (this.Category3 == "") {
+          this.Category4 = "";
+          this.Category5 = "";
+        }
+        break;
+      case "Category4":
+        this.Category4 = value;
+        //璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
+        this.showCate();
+        if (this.Category4 == "") {
+          this.Category5 = "";
+        }
+        break;
+      case "Category5":
+        this.Category5 = value;
+        break;
+      case "searchHospitalName":
+        this.searchHospitalName = value;
+        break;
+      case "Barcode":
+        this.Barcode = value;
+        break;
+      case "Order_ForDealerText__c":
+        this.cocLwc["Order_ForDealerText__c"] = value;
+        break;
+    }
+  }
+
+  showAllCate() {
+    console.log("showAllCate");
+    categoryAllload({
+      category3Lwc: this.Category3
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.category4Options = [];
+          this.category5Options = [];
+          //绗�4鍒嗙被
+          for (var key in r.entity.category4OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category4OptionMap[key];
+            object["value"] = key;
+            this.category4Options.push(object);
+          }
+          console.log("this.category4Options = " + this.category4Options);
+          //绗�5鍒嗙被
+          for (var key in r.entity.category5OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category5OptionMap[key];
+            object["value"] = key;
+            this.category5Options.push(object);
+          }
+        } else {
+          console.log("r = " + JSON.stringify(r));
+          this.showMyToast("4/5鍒嗙被鏌ヨ澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error" + JSON.stringify(error));
+      });
+  }
+
+  showCate() {
+    console.log("showAllCate");
+    categoryload({
+      category3Lwc: this.Category3,
+      category4Lwc: this.Category4
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.category4Options = [];
+          this.category5Options = [];
+          //绗�4鍒嗙被
+          for (var key in r.entity.category4OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category4OptionMap[key];
+            object["value"] = key;
+            this.category4Options.push(object);
+          }
+          console.log("this.category4Options = " + this.category4Options);
+          //绗�5鍒嗙被
+          for (var key in r.entity.category5OptionMap) {
+            let object = {};
+            object["label"] = r.entity.category5OptionMap[key];
+            object["value"] = key;
+            this.category5Options.push(object);
+          }
+        } else {
+          console.log("r = " + JSON.stringify(r));
+          this.showMyToast("Error", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error" + JSON.stringify(error));
+      });
+  }
+
+  invoiceChange(event) {
+    this.invoiceId = event.target.value;
+    console.log("this.invoiceId = " + this.invoiceId);
+  }
+
+  showMyToast(title, message, variant) {
+    this.isShowSpinner = false;
+    this.showLoadingSpinner = false;
+    this.isEditShowSpinner = false;
+    console.log("show custom message");
+    var iconName = "";
+    var content = "";
+    if (variant.toLowerCase() == "success") {
+      iconName = "utility:check";
+    } else {
+      iconName = "utility:error";
+    }
+    if (message != "") {
+      content =
+        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
+    } else {
+      content = "<h2><strong>" + title + "<strong/></h2>";
+    }
+    this.template
+      .querySelector("c-common-toast")
+      .showToast(variant, content, iconName, 10000);
+  }
+
+  searchProductJs() {
+    this.isEditShowSpinner = true;
+    //this.showTable = false;
+    //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+    const selectedRows = this.template
+      .querySelector("c-lex-custom-lightning-datatable")
+      .getSelectedRows();
+    console.log("selectedRows = " + selectedRows);
+    for (var i in this.data) {
+      this.data[i]["check"] = false;
+    }
+    for (var i in this.data) {
+      for (var j in selectedRows) {
+        if (this.data[i].Id == selectedRows[j].Id) {
+          this.data[i]["check"] = true;
+        }
+      }
     }
 
-    saveToFile() {
-        console.log("saveToFile");
-        console.log("base64Data = " + encodeURIComponent(this.fileContents));
-        saveFile({
-            recordId: this.ESetid,
-            fileName: this.fileName,
-            base64Data: encodeURIComponent(this.fileContents),
-        }).then((r) => {
-            this.showPopSpinner = false;
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            this.closePop();
-            this.showMyToast('涓婁紶鎴愬姛', '', 'Success');
-            this.getFiles();
-        }).catch((error) => {
-            this.showPopSpinner = false;
-            console.log("error = " + error.message);
-            this.showMyToast('澶辫触', '涓婁紶澶辫触', 'Error');
-        });
+    let cloneData = this.deepClone(this.data);
+    for (var i in cloneData) {
+      cloneData[i]["Name"] = cloneData[i].Name__c;
+      cloneData[i]["Category3"] = cloneData[i].Category3__c;
+      cloneData[i]["Category4"] = cloneData[i].Category4__c;
+      cloneData[i]["Category5"] = cloneData[i].Category5__c;
+      cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+      delete cloneData[i].Name__c;
+      delete cloneData[i].Category3__c;
+      delete cloneData[i].Category4__c;
+      delete cloneData[i].Category5__c;
+      delete cloneData[i].Box_Piece__c;
     }
 
-    getFiles() {
-        console.log("getFiles");
-        this.showLoadingSpinner = true;
-        getFiles({
-            recordId: this.ESetid,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            this.fileData = r.entity.cvList;
-            console.log("this.fileData = " + JSON.stringify(this.fileData));
-            for (var i in this.fileData) {
-                this.fileData[i]["Id"] = this.fileData[i].Id;
-                this.fileData[i]["recordId"] = this.fileData[i].Id;
-                this.fileData[i]["url"] = "/" + this.fileData[i].Id;
-                this.fileData[i]["Title"] = this.fileData[i].Title;
-                this.fileData[i]["attUrl"] = '/' + this.fileData[i].Id;
-                this.fileData[i]['downloadUrl'] = '/sfc/servlet.shepherd/document/download/' + this.fileData[i].ContentDocumentId + '?operationContext=S1';
+    console.log("cloneData = " + JSON.stringify(cloneData));
+    searchConsumableorderdetails({
+      agencyProTypeLwc: this.agencyProType,
+      accountNameLwc: this.accountName,
+      userWorkLocationLwc: this.userWorkLocation,
+      outOutPattern: this.outOutPattern,
+      category1: this.consumableName,
+      category3: this.Category3,
+      category4: this.Category4,
+      category5: this.Category5,
+      editAbleLwc: this.EditAble,
+      pageRecordsLwcLwc: cloneData,
+      consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
+      arriveorderLwc: this.arriveorder,
+      pageSizeLWC: this.pageSize,
+      pageTokenLWC: this.currentPageToken
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      console.log("r = " + JSON.stringify(r));
+      if (r.status == "Success") {
+        //鍒嗛〉
+        console.log(
+          "r.entity.paginatedAccounts = " +
+            JSON.stringify(r.entity.paginatedAccounts)
+        );
+        this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
+        this.totalRecords = r.entity.paginatedAccounts.totalRecords;
+        this.recordStart = r.entity.paginatedAccounts.recordStart;
+        this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+        this.totalPages = Math.ceil(
+          r.entity.paginatedAccounts.totalRecords / this.pageSize
+        );
+        console.log("this.totalPages = " + this.totalPages);
+
+        this.hasHosPro = r.entity.hasHosPro;
+        console.log("this.hasHosPro = " + this.hasHosPro);
+
+        this.SearchDone = r.entity.SearchDone;
+        let tempData = [];
+        this.selectedRows = [];
+        tempData = r.entity.pageRecords;
+        for (var i in tempData) {
+          let unitOptions = [];
+          for (var key in tempData[i].boxorpieceMap) {
+            let unitOption = {};
+            unitOption["label"] = tempData[i].boxorpieceMap[key];
+            unitOption["value"] = key;
+            unitOptions.push(unitOption);
+          }
+          tempData[i]["unitOptions"] = unitOptions;
+          tempData[i]["unitValue"] =
+            tempData[i]["unitValue"] == null
+              ? unitOptions[0].value
+              : tempData[i]["unitValue"];
+          if (this.EditAble) {
+            tempData[i].orderdetails1["Box_Piece__c"] =
+              tempData[i].orderdetails1["Box_Piece__c"] == null
+                ? unitOptions[0].value
+                : tempData[i].orderdetails1["Box_Piece__c"];
+            tempData[i]["unitValue"] =
+              tempData[i].orderdetails1["Box_Piece__c"] == null
+                ? unitOptions[0].value
+                : tempData[i].orderdetails1["Box_Piece__c"];
+            tempData[i].orderdetails1["Shipment_Count__c"] =
+              tempData[i].orderdetails1["Shipment_Count__c"] == null
+                ? 0
+                : tempData[i].orderdetails1["Shipment_Count__c"];
+            tempData[i].orderdetails1["Delivery_List_RMB__c"] =
+              tempData[i].orderdetails1["Delivery_List_RMB__c"] == null
+                ? 0.0
+                : tempData[i].orderdetails1["Delivery_List_RMB__c"];
+          } else {
+            tempData[i]["InvoiceProNot_count__c"] =
+              tempData[i].orderdetails1.InvoiceProNot_count__c;
+            tempData[i]["RrturnPro_count__c"] =
+              tempData[i].orderdetails1.RrturnPro_count__c;
+            tempData[i]["Invoiced_Procount__c"] =
+              tempData[i].orderdetails1.Invoiced_Procount__c;
+          }
+          tempData[i]["shipmentNumber"] =
+            tempData[i].orderdetails1["Shipment_Count__c"];
+          tempData[i]["shippingUnitPrice"] =
+            tempData[i].orderdetails1["Delivery_List_RMB__c"];
+
+          tempData[i]["Id"] = tempData[i].Prod.Id;
+
+          console.log(
+            'tempData[i]["hospitalSpecialOffer"] = ' +
+              tempData[i]["hospitalSpecialOffer"]
+          );
+          if (this.hasHosPro) {
+            if (tempData[i]["hospitalSpecialOffer"]) {
+              tempData[i]["Id"] = tempData[i].Prod.Id + "ishos";
+            } else {
+              tempData[i]["Id"] = tempData[i].Prod.Id + "nothos";
             }
-            console.log("this.fileData = " + this.fileData);
-            this.showLoadingSpinner = false;
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('澶辫触', '鑾峰彇闄勪欢澶辫触', 'Error');
-        });
+          }
+
+          tempData[i]["recordId"] = tempData[i]["Id"];
+          tempData[i]["Name__c"] = tempData[i].Prod.Name__c;
+          tempData[i]["SFDA_Status__c"] = tempData[i].Prod.SFDA_Status__c;
+          tempData[i]["Category3__c"] = tempData[i].Prod.Category3__c;
+          tempData[i]["Category4__c"] = tempData[i].Prod.Category4__c;
+          tempData[i]["Category5__c"] = tempData[i].Prod.Category5__c;
+          tempData[i]["Box_Piece__c"] = tempData[i].orderdetails1.Box_Piece__c;
+          tempData[i]["shipmentAmount"] =
+            tempData[i].orderdetails1.Shipment_amount__c;
+          tempData[i]["Shipment_amount__c"] =
+            tempData[i].orderdetails1.Shipment_amount__c;
+          tempData[i]["Shipment_Count__c"] =
+            tempData[i].orderdetails1.Shipment_Count__c;
+
+          if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
+            tempData[i]["shipmentAmount"] = this.amend(
+              tempData[i]["shipmentNumber"],
+              tempData[i]["shippingUnitPrice"],
+              "*"
+            );
+
+          if (tempData[i]["check"]) {
+            this.selectedRows.push(tempData[i].Id);
+          }
+        }
+        this.data = tempData;
+
+        //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
+        console.log("this.hasHosPro = " + this.hasHosPro);
+        if (this.hasHosPro) {
+          let object1 = {
+            label: "鍖婚櫌鐗逛环",
+            fieldName: "hospitalSpecialOffer",
+            type: "boolean",
+            initialWidth: 100,
+            hideDefaultActions: true
+          };
+          this.columns.push(object1);
+          this.editColumns.push(object1);
+        }
+        this.columns = [...this.columns];
+        this.editColumns = [...this.editColumns];
+        console.log("this.columns = " + JSON.stringify(this.columns));
+        console.log("this.data = " + JSON.stringify(this.data));
+        console.log(
+          " this.selectedRows = " + JSON.stringify(this.selectedRows)
+        );
+        //this.showTable = true;
+        this.isEditShowSpinner = false;
+      } else {
+        console.log("r = " + JSON.stringify(r));
+        this.showMyToast("鏌ヨ澶辫触", r.msg, "Error");
+      }
+    });
+  }
+
+  searchHospitalNameModal() {
+    console.log("searchHospitalNameModal");
+    hospitalInit({
+      ctype: this.agencyProType
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      if (r.status == "Success") {
+        this.hospitalList = r.entity.at;
+        for (var i in this.hospitalList) {
+          this.hospitalList[i]["stateMasterName"] =
+            this.hospitalList[i].State_Master__r.Name;
+        }
+        console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+        this.isModalOpen = true;
+      }
+    });
+  }
+
+  searchHospital() {
+    console.log("this.searchHospitalName = " + this.searchHospitalName);
+    serContact({
+      searchName: this.searchHospitalName,
+      ctype: this.agencyProType
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      if (r.status == "Success") {
+        this.hospitalList = r.entity.at;
+        for (var i in this.hospitalList) {
+          this.hospitalList[i]["stateMasterName"] =
+            this.hospitalList[i].State_Master__r.Name;
+        }
+        console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
+      }
+    });
+  }
+
+  searchHandleRowAction(event) {
+    console.log("searchHandleRowAction");
+    let row = event.detail.row;
+    this.OECId = row.Id;
+    this.HospitalName = row.Name;
+    console.log(
+      "this.OECId = " + this.OECId + " this.HospitalName = " + this.HospitalName
+    );
+    this.isModalOpen = false;
+    console.log("this.isModalOpen = " + this.isModalOpen);
+  }
+
+  clearAgencyI(event) {
+    this.HospitalName = event.target.value;
+    if (this.HospitalName == "" || this.HospitalName == null) {
+      this.OECId = "";
+    }
+    console.log("this.HospitalName = " + this.HospitalName);
+    console.log("this.OECId = " + this.OECId);
+    if (this.OECId != null && this.OECId != "") {
+      this.checkOutPattern();
+    }
+  }
+
+  checkOutPattern() {
+    //鏍规嵁鐢ㄦ埛閫変腑鐨勪骇鍝佺粰 鍑哄簱鍗曚笂鐨勬槸鍚﹀尰闄㈢壒浠峰嚭搴撳瓧娈佃祴鍊�
+    let ishos = 0;
+    for (var i in this.data) {
+      if (
+        this.data[i].check == true &&
+        this.data[i].hospitalSpecialOffer == true
+      ) {
+        ishos = ishos + 1;
+      }
+    }
+    if (ishos > 0) {
+      this.cocLwc["OutPattern__c"] = true;
+    } else {
+      this.cocLwc["OutPattern__c"] = false;
+    }
+  }
+
+  closeModal() {
+    this.isModalOpen = false;
+  }
+
+  handleUnitChange(event) {
+    console.log("handleUnitChange");
+    const unitDetail = event.detail;
+    console.log("unitDetail = " + JSON.stringify(unitDetail));
+    for (var i in this.data) {
+      if (this.data[i].Id == unitDetail.data.recordId) {
+        this.data[i].unitValue = unitDetail.data.unitValue;
+        this.data[i].orderdetails1["Box_Piece__c"] = unitDetail.data.unitValue;
+      }
+    }
+    console.log("this.data = " + JSON.stringify(this.data));
+  }
+
+  handleShipmentNumber(event) {
+    console.log("handleShipmentNumber");
+    const numberDetail = event.detail;
+    console.log("numberDetail = " + JSON.stringify(numberDetail));
+    let index = 0;
+    for (var i in this.data) {
+      if (this.data[i].Id == numberDetail.data.recordId) {
+        index = i;
+        this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
+        this.data[i].orderdetails1["Shipment_Count__c"] = Number(
+          numberDetail.data.shipmentnumber
+        );
+        console.log(
+          'this.data[i].orderdetails1["Shipment_Count__c"] = ' +
+            this.data[i].orderdetails1["Shipment_Count__c"]
+        );
+        console.log(
+          "this.selectedRows.indexOf(this.data[i].Id) = " +
+            this.selectedRows.indexOf(this.data[i].Id)
+        );
+        if (this.data[i].orderdetails1["Shipment_Count__c"] != "") {
+          if (this.selectedRows.indexOf(this.data[i].Id) == -1) {
+            this.selectedRows.push(this.data[i].Id);
+          }
+          this.data[i].check = true;
+        } else {
+          if (this.selectedRows.indexOf(this.data[i].Id) != -1) {
+            this.selectedRows.splice(
+              this.selectedRows.indexOf(this.data[i].Id),
+              1
+            );
+          }
+          this.data[i].check = false;
+        }
+        this.selectedRows = [...this.selectedRows];
+        console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
+      }
+    }
+    this.data = [...this.data];
+    this.ComputePrice(
+      index,
+      this.data[index].shipmentNumber,
+      this.data[index].shippingUnitPrice
+    );
+  }
+
+  handleShipmentUnitPrice(event) {
+    console.log("handleShipmentUnitPrice");
+    const priceDetail = event.detail;
+    let index = 0;
+    for (var i in this.data) {
+      if (this.data[i].Id == priceDetail.data.recordId) {
+        index = i;
+        this.data[i].shippingUnitPrice = Number(
+          priceDetail.data.shipmentunitprice
+        );
+        this.data[i].orderdetails1["Delivery_List_RMB__c"] = Number(
+          priceDetail.data.shipmentunitprice
+        );
+      }
+    }
+    this.ComputePrice(
+      index,
+      this.data[index].shipmentNumber,
+      this.data[index].shippingUnitPrice
+    );
+  }
+
+  ComputePrice(index, number, price) {
+    console.log("index = " + index);
+    console.log("number = " + number);
+    console.log("price = " + price);
+    let shipmentAmount = this.amend(number, price, "*");
+    console.log("shipmentAmount = " + shipmentAmount);
+    let sumPrice = 0.0;
+    this.data[index].shipmentAmount = shipmentAmount;
+    for (var i in this.data) {
+      if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
+    }
+    this.sumPrice = sumPrice.toFixed(2) + "鍏�";
+    //瀛樹笅閫夋嫨琛岋紝涓嶄細琚竻绌�
+    // if (this.selectedRows.indexOf(this.data[index].Id) == -1)
+    //     this.selectedRows.push(this.data[index].Id);
+    // this.selectedRows = [];
+    // for (var i in this.data) {
+    //     if (this.data[i].check) {
+    //         this.selectedRows.push(this.data[i].Id);
+    //     }
+    // }
+    this.data = [...this.data];
+    // this.selectedRows = [...this.selectedRows]
+    // console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
+    console.log("this.data = " + JSON.stringify(this.data));
+  }
+
+  //num1 num2浼犲叆涓や釜鍊�  symbol +-*/绗﹀彿
+  amend(num1, num2, symbol) {
+    var str1 = num1.toString(),
+      str2 = num2.toString(),
+      result,
+      str1Length,
+      str2Length;
+    //瑙e喅鏁存暟娌℃湁灏忔暟鐐规柟娉�
+    try {
+      str1Length = str1.split(".")[1].length;
+    } catch (error) {
+      str1Length = 0;
+    }
+    try {
+      str2Length = str2.split(".")[1].length;
+    } catch (error) {
+      str2Length = 0;
+    }
+    var step = Math.pow(10, Math.max(str1Length, str2Length));
+    //
+    console.log(step);
+    switch (symbol) {
+      case "+":
+        result = (num1 * step + num2 * step) / step;
+        break;
+      case "-":
+        result = (num1 * step - num2 * step) / step;
+        break;
+      case "*":
+        result = (num1 * step * (num2 * step)) / step / step;
+        break;
+      case "/":
+        result = (num1 * step) / (num2 * step);
+        break;
+      default:
+        break;
+    }
+    return result;
+  }
+
+  getSelectedRows(event) {
+    let selectedRowsEvent = event.detail.selectedRows;
+    console.log("selectedRowsEvent = " + JSON.stringify(selectedRowsEvent));
+    this.selectedRows = [];
+    for (var i in selectedRowsEvent) {
+      this.selectedRows.push(selectedRowsEvent[i].Id);
+    }
+    // for (var i in this.data) {
+    //     for (var j in selectedRowsEvent) {
+    //         if (this.data[i].Id == selectedRowsEvent[j].Prod.Id) {
+    //             this.ComputePrice(
+    //                 i,
+    //                 this.data[i].shipmentNumber,
+    //                 this.data[i].shippingUnitPrice
+    //             );
+    //         }
+    //     }
+    // }
+    // this.ComputePrice(
+    //     index,
+    //     this.data[index].shipmentNumber,
+    //     this.data[index].shippingUnitPrice
+    // );
+    // const selectedRows = event.detail.selectedRows;
+    // console.log("this.selectedRows = " + this.selectedRows);
+    // for (var i in this.data) {
+    //     this.data[i]["check"] = false;
+    // }
+    // for (var i in this.data) {
+    //     for (var j in selectedRows) {
+    //         if (this.data[i].Id == selectedRows[j].Id) {
+    //             this.data[i]["check"] = true;
+    //         }
+    //     }
+    // }
+  }
+
+  saveConfirmJs() {
+    let msg = "鍑哄簱浠锋牸浠呭彲鎿嶄綔涓�娆″彉鏇达紝淇濆瓨鍚庡皢鏃犳硶淇敼銆俓n\n璇风‘璁わ紒";
+    if (this.SummonsStatus == "浠锋牸鏈畾") {
+      if (confirm(msg) == true) {
+        this.saveConfirm();
+      }
+    } else {
+      this.saveConfirm();
+    }
+  }
+
+  deepClone(obj) {
+    return JSON.parse(JSON.stringify(obj));
+  }
+
+  saveConfirm() {
+    this.isShowSpinner = true;
+
+    //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+    const selectedRows = this.template
+      .querySelector("c-lex-custom-lightning-datatable")
+      .getSelectedRows();
+    console.log("selectedRows = " + selectedRows);
+    for (var i in this.data) {
+      this.data[i]["check"] = false;
+    }
+    for (var i in this.data) {
+      for (var j in selectedRows) {
+        if (this.data[i].Id == selectedRows[j].Id) {
+          this.data[i]["check"] = true;
+        }
+      }
     }
 
-    GoodsDeliveryJs() {
-        this.isShowSpinner = true;
+    let cloneData = this.deepClone(this.data);
+    for (var i in cloneData) {
+      cloneData[i]["Name"] = cloneData[i].Name__c;
+      cloneData[i]["Category3"] = cloneData[i].Category3__c;
+      cloneData[i]["Category4"] = cloneData[i].Category4__c;
+      cloneData[i]["Category5"] = cloneData[i].Category5__c;
+      cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+      //cloneData[i]["shippingUnitPrice"] = cloneData[i]["shippingUnitPrice"] == '' ? 0 : cloneData[i]["shippingUnitPrice"];
+      delete cloneData[i].Name__c;
+      delete cloneData[i].Category3__c;
+      delete cloneData[i].Category4__c;
+      delete cloneData[i].Category5__c;
+      delete cloneData[i].Box_Piece__c;
+    }
+    console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+    console.log("this.OECId = " + this.OECId);
+    console.log("this.HospitalName = " + this.HospitalName);
+    console.log("this.secondaryDistributor = " + this.secondaryDistributor);
+    console.log("this.pageRecordsLwc = " + JSON.stringify(cloneData));
+    console.log("this.accountid = " + this.accountid);
+    console.log("this.ESetid = " + this.ESetid);
+    console.log(
+      "this.consumableproductdetailsRecords = " +
+        JSON.stringify(this.consumableproductdetailsRecords)
+    );
+    save({
+      cocLwc: this.cocLwc,
+      hospitalInfoLwc: this.OECId,
+      hospitalNameLwc: this.HospitalName,
+      secondaryDistributorLwc: this.secondaryDistributor,
+      pageRecordsLwc: cloneData,
+      accountidLwc: this.accountid,
+      ESetIdLwc: this.ESetid,
+      consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
+      agencyProTypeLwc: this.agencyProType,
+      userWorkLocationLwc: this.userWorkLocation
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        debugger;
+        if (r.status == "Success") {
+          // let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
+          // this[NavigationMixin.Navigate]({
+          //     type: "standard__webPage",
+          //     attributes: {
+          //         url: url,
+          //     },
+          // });
+          window.location.href = "/s/lexsummonscreat?ESetid=" + r.entity.ESetId;
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("淇濆瓨澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error));
+      });
+  }
 
-        //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
-        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
-        console.log('selectedRows = ' + selectedRows);
-        for (var i in this.data) {
-            this.data[i]["check"] = false;
-        }
-        for (var i in this.data) {
-            for (var j in selectedRows) {
-                if (this.data[i].Id == selectedRows[j].Id) {
-                    this.data[i]["check"] = true;
-                }
-            }
-        }
+  //鎵撳嵃鎸囩ず鍗�
+  PraseToPDFJs() {
+    console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+    console.log("this.ESetId = " + this.ESetid);
+    PraseToPDF({
+      cocLwc: this.cocLwc,
+      ESetId: this.ESetid
+    }).then((r) => {
+      r = JSON.parse(JSON.stringify(r));
+      console.log("r = " + JSON.stringify(r));
+      if (r.status == "Success") {
+        window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId);
+      } else {
+        console.log("r.msg = " + r.msg);
+        this.showMyToast("鎵撳嵃澶辫触", r.msg, "Error");
+      }
+    });
+  }
 
-        let cloneData = this.deepClone(this.data);
-        for (var i in cloneData) {
-            cloneData[i]["Name"] = cloneData[i].Name__c;
-            cloneData[i]["Category3"] = cloneData[i].Category3__c;
-            cloneData[i]["Category4"] = cloneData[i].Category4__c;
-            cloneData[i]["Category5"] = cloneData[i].Category5__c;
-            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
-            delete cloneData[i].Name__c;
-            delete cloneData[i].Category3__c;
-            delete cloneData[i].Category4__c;
-            delete cloneData[i].Category5__c;
-            delete cloneData[i].Box_Piece__c;
+  //鏄剧ず鏄庣粏
+  openReportJs() {
+    console.log("openReportJs");
+    var reportId = this.ESetid;
+    reportId = reportId.substring(0, 15);
+    console.log("reportId = " + reportId);
+    let reportFilters =
+      '[{"operator":"equals","value":"' +
+      reportId +
+      '","column":"FK_CUSTENT_ID"}]';
+    let reportUrl = this.label.ConsumableOutboundReportId;
+    console.log("reportUrl = " + reportUrl);
+    let url =
+      "/s/report/" +
+      reportUrl +
+      "?reportFilters=" +
+      encodeURIComponent(reportFilters);
+    console.log("url = " + url);
+    window.open(url);
+    // this[NavigationMixin.Navigate]({
+    //     type: "standard__webPage",
+    //     attributes: {
+    //         url: url,
+    //         target: '_blank'
+    //     },
+    // });
+  }
+
+  vpClear2Delay(event) {
+    console.log("vpClear2Delay");
+    if (this.summonsForDirction != "浜掔浉璋冭揣") {
+      this.cocLwc["Order_ForDealerText__c"] = event.target.value;
+      console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+    } else {
+      //console.log('Order_ForDealerTextID__c = ' + this.cocLwc['Order_ForDealerTextID__c'])
+      this.cocLwc["Order_ForDealerText__c"] =
+        this.cocLwc["Order_ForDealerTextID__c"] == "" ||
+        this.cocLwc["Order_ForDealerTextID__c"] == null ||
+        this.cocLwc["Order_ForDealerTextID__c"] == undefined
+          ? ""
+          : this.cocLwc["Order_ForDealerText__c"];
+      console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+      // console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
+      // this.ForDealerText = this.cocLwc['Order_ForDealerText__c'];
+      // event.target.value = this.cocLwc['Order_ForDealerText__c'];
+      // console.log('this.ForDealerText = ' + this.ForDealerText);
+    }
+  }
+  handleSearch(event) {
+    const lookupElement = event.target;
+    console.log("event.detail = " + JSON.stringify(event.detail));
+    apexSearch({
+      searchTerm: event.detail.searchTerm
+    })
+      .then((results) => {
+        lookupElement.setSearchResults(results);
+      })
+      .catch((error) => {
+        console.log("error" + JSON.stringify(error));
+      });
+  }
+
+  handleSelectionChange(event) {
+    const selection = event.target.getSelection();
+    console.log("selection = " + JSON.stringify(selection));
+    this.cocLwc["Order_ForDealerTextID__c"] = selection[0].id;
+    this.cocLwc["Order_ForDealerText__c"] = selection[0].title;
+    console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
+  }
+
+  handleFilesChange(event) {
+    console.log("handleFilesChange");
+    if (event.target.files.length > 0) {
+      this.filesUploaded = event.target.files;
+      this.fileName = event.target.files[0].name;
+    }
+  }
+
+  handleSave() {
+    console.log("saveFile");
+    if (this.filesUploaded.length > 0) {
+      this.file = this.filesUploaded[0];
+      if (this.file.size > this.MAX_FILE_SIZE) {
+        this.showMyToast("淇濆瓨澶辫触", "鏂囦欢杩囧ぇ", "Error");
+        return;
+      }
+      this.showPopSpinner = true;
+      this.fileReader = new FileReader();
+
+      this.fileReader.onloadend = () => {
+        this.fileContents = this.fileReader.result;
+        let base64 = "base64,";
+        this.content = this.fileContents.indexOf(base64) + base64.length;
+        this.fileContents = this.fileContents.substring(this.content);
+        this.saveToFile();
+      };
+      this.fileReader.readAsDataURL(this.file);
+    } else {
+      this.fileName = "閫夋嫨涓�涓枃浠朵笂浼�";
+    }
+  }
+
+  saveToFile() {
+    console.log("saveToFile");
+    console.log("base64Data = " + encodeURIComponent(this.fileContents));
+    saveFile({
+      recordId: this.ESetid,
+      fileName: this.fileName,
+      base64Data: encodeURIComponent(this.fileContents)
+    })
+      .then((r) => {
+        this.showPopSpinner = false;
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        this.closePop();
+        this.showMyToast("涓婁紶鎴愬姛", "", "Success");
+        this.getFiles();
+      })
+      .catch((error) => {
+        this.showPopSpinner = false;
+        console.log("error = " + error.message);
+        this.showMyToast("澶辫触", "涓婁紶澶辫触", "Error");
+      });
+  }
+
+  getFiles() {
+    console.log("getFiles");
+    this.showLoadingSpinner = true;
+    getFiles({
+      recordId: this.ESetid
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        this.fileData = r.entity.cvList;
+        console.log("this.fileData = " + JSON.stringify(this.fileData));
+        for (var i in this.fileData) {
+          this.fileData[i]["Id"] = this.fileData[i].Id;
+          this.fileData[i]["recordId"] = this.fileData[i].Id;
+          this.fileData[i]["url"] = "/" + this.fileData[i].Id;
+          this.fileData[i]["Title"] = this.fileData[i].Title;
+          this.fileData[i]["attUrl"] = "/" + this.fileData[i].Id;
+          this.fileData[i]["downloadUrl"] =
+            "/sfc/servlet.shepherd/document/download/" +
+            this.fileData[i].ContentDocumentId +
+            "?operationContext=S1";
         }
-        console.log("cloneData = " + JSON.stringify(cloneData));
-        GoodsDelivery({
-            cocLwc: this.cocLwc,
-            ESetId: this.ESetid,
-            pageRecordsLwcLwc: cloneData,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
+        console.log("this.fileData = " + this.fileData);
+        this.showLoadingSpinner = false;
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("澶辫触", "鑾峰彇闄勪欢澶辫触", "Error");
+      });
+  }
+
+  GoodsDeliveryJs() {
+    this.isShowSpinner = true;
+
+    //鏌ヨ鏈夊摢浜涢�夋嫨浜嗙殑鐒跺悗check
+    const selectedRows = this.template
+      .querySelector("c-lex-custom-lightning-datatable")
+      .getSelectedRows();
+    console.log("selectedRows = " + selectedRows);
+    for (var i in this.data) {
+      this.data[i]["check"] = false;
+    }
+    for (var i in this.data) {
+      for (var j in selectedRows) {
+        if (this.data[i].Id == selectedRows[j].Id) {
+          this.data[i]["check"] = true;
+        }
+      }
+    }
+
+    let cloneData = this.deepClone(this.data);
+    for (var i in cloneData) {
+      cloneData[i]["Name"] = cloneData[i].Name__c;
+      cloneData[i]["Category3"] = cloneData[i].Category3__c;
+      cloneData[i]["Category4"] = cloneData[i].Category4__c;
+      cloneData[i]["Category5"] = cloneData[i].Category5__c;
+      cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
+      delete cloneData[i].Name__c;
+      delete cloneData[i].Category3__c;
+      delete cloneData[i].Category4__c;
+      delete cloneData[i].Category5__c;
+      delete cloneData[i].Box_Piece__c;
+    }
+    console.log("cloneData = " + JSON.stringify(cloneData));
+    GoodsDelivery({
+      cocLwc: this.cocLwc,
+      ESetId: this.ESetid,
+      pageRecordsLwcLwc: cloneData
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          console.log(
+            "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
+          );
+          this.isSales =
+            this.cocLwc["Summons_Order_type__c"] == "閿�鍞�" ? true : false;
+          this.GoodsDeliveryInit();
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("閿欒", r.msg, "Error");
+        }
+        this.isShippingSales = true;
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("澶辫触", "璺宠浆澶辫触", "Error");
+      });
+  }
+
+  GoodsDeliveryInit() {
+    console.log("GoodsDeliveryInit");
+    GoodsDeliveryInit({
+      ESetId: this.ESetid
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          this.salesCoc = r.entity.coc;
+          this.salesAccountName = r.entity.accountName;
+          this.salesUserWorkLocation = r.entity.userWorkLocation;
+          this.salesAccountid = r.entity.accountid;
+          this.salesOrderdetails = r.entity.orderdetails;
+          console.log(
+            "this.salesOrderdetails = " + JSON.stringify(this.salesOrderdetails)
+          );
+          this.salesData = r.entity.consumableorderdetailsRecords;
+          console.log("this.salesData = " + JSON.stringify(this.salesData));
+          this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
+          this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap;
+          this.salesOrderpriceMap = r.entity.orderpriceMap;
+          this.salesOrderagencypriceMap = r.entity.orderagencypriceMap;
+          for (var i in this.salesData) {
+            this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id;
+            this.salesData[i]["Consumable_order_minor__c"] =
+              this.salesData[i].orderdetails2.Consumable_order_minor__r != null
+                ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name
+                : "";
+            this.salesData[i]["ConsumableorderminorUrl"] =
+              this.salesData[i].orderdetails2.Consumable_order_minor__c != null
+                ? "/" +
+                  this.salesData[i].orderdetails2.Consumable_order_minor__c
+                : "";
+            this.salesData[i]["orderdetails2Name"] =
+              this.salesData[i].orderdetails2.Name;
+            this.salesData[i]["orderdetails2NameUrl"] =
+              "/" + this.salesData[i].orderdetails2.Id;
+            this.salesData[i]["Box_Piece__c"] =
+              this.salesData[i].orderdetails2.Box_Piece__c;
+            this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
+            this.salesData[i]["Deliver_date__c"] =
+              this.salesData[i].orderdetails2.Deliver_date__c;
+            this.salesData[i]["Bar_Code__c"] =
+              this.salesData[i].orderdetails2.Bar_Code__c;
+            this.salesData[i]["Sterilization_limit__c"] =
+              this.salesData[i].orderdetails2.Sterilization_limit__c;
+            if (this.salesData[i]["Box_Piece__c"] == "鐩�") {
+              console.log(
+                "this.salesData[i] = " + JSON.stringify(this.salesData[i])
+              );
+              this.salesData[i]["outboundCount"] =
+                this.salesData[i].outboundCount;
+            } else {
+              for (var j in this.salesOrderdetails) {
                 console.log(
-                    "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
+                  "this.salesOrderdetails[j].Consumable_product__c = " +
+                    this.salesOrderdetails[j].Consumable_product__c
                 );
-                this.isSales = this.cocLwc["Summons_Order_type__c"] == "閿�鍞�" ? true : false;
-                this.GoodsDeliveryInit();
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('閿欒', r.msg, 'Error');
-            }
-            this.isShippingSales = true;
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('澶辫触', '璺宠浆澶辫触', 'Error');
-        });
-    }
-
-    GoodsDeliveryInit() {
-        console.log("GoodsDeliveryInit");
-        GoodsDeliveryInit({
-            ESetId: this.ESetid,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                this.salesCoc = r.entity.coc;
-                this.salesAccountName = r.entity.accountName;
-                this.salesUserWorkLocation = r.entity.userWorkLocation;
-                this.salesAccountid = r.entity.accountid;
-                this.salesOrderdetails = r.entity.orderdetails;
-                console.log('this.salesOrderdetails = ' + JSON.stringify(this.salesOrderdetails))
-                this.salesData = r.entity.consumableorderdetailsRecords;
-                this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
-                this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap;
-                this.salesOrderpriceMap = r.entity.orderpriceMap;
-                this.salesOrderagencypriceMap = r.entity.orderagencypriceMap;
-                this.isShowSpinner = false;
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('鍒濆鍖栧け璐�', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '鍒濆鍖栧け璐�', 'Error');
-        });
-    }
-
-    SalesearchProductJs() {
-        console.log("this.Barcode = " + this.Barcode);
-        this.isShowSpinner = true;
-        SearchPro({
-            cocLwc: this.salesCoc,
-            barcodeLwc: this.Barcode,
-            accountName: this.salesAccountName,
-            userWorkLocation: this.salesUserWorkLocation,
-            accountid: this.salesAccountid,
-            orderdetails: this.salesOrderdetails,
-            orderpieceorboxMap: this.salesOrderpieceorboxMap,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                console.log("SearchPro success");
-                this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
-                this.salesData = r.entity.consumableorderdetailsRecords;
-                for (var i in this.salesErrorData) {
-                    this.salesErrorData[i]["Id"] = this.salesErrorData[i].orderdetails2.Id;
-                    this.salesErrorData[i]["Consumable_order_minor__c"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r.Name : '';
-                    this.salesErrorData[i]["ConsumableorderminorUrl"] = this.salesErrorData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesErrorData[i].orderdetails2.Consumable_order_minor__c : '';
-                    this.salesErrorData[i]["orderdetails2Name"] = this.salesErrorData[i].orderdetails2.Name;
-                    this.salesErrorData[i]["ProdName"] = this.salesErrorData[i].Prod.Name;
-                    this.salesErrorData[i]["Box_Piece__c"] = this.salesErrorData[i].orderdetails2.Box_Piece__c;
-                    this.salesErrorData[i]["Bar_Code__c"] = this.salesErrorData[i].orderdetails2.Bar_Code__c;
-                    this.salesErrorData[i]["Sterilization_limit__c"] = this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
+                console.log(
+                  "this.salesData[i].orderdetails2.Consumable_product__c = " +
+                    this.salesData[i].orderdetails2.Consumable_product__c
+                );
+                if (
+                  this.salesOrderdetails[j].Consumable_product__c ==
+                  this.salesData[i].orderdetails2.Consumable_product__c
+                ) {
+                  this.salesData[i]["outboundCount"] =
+                    this.salesOrderdetails[j].Shipment_Count__c;
                 }
-                console.log('this.salesData = ' + JSON.stringify(this.salesData));
-                for (var i in this.salesData) {
-                    this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id;
-                    this.salesData[i]["Consumable_order_minor__c"] = this.salesData[i].orderdetails2.Consumable_order_minor__r != null ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name : '';
-                    this.salesData[i]["ConsumableorderminorUrl"] = this.salesData[i].orderdetails2.Consumable_order_minor__c != null ? "/" + this.salesData[i].orderdetails2.Consumable_order_minor__c : '';
-                    this.salesData[i]["orderdetails2Name"] = this.salesData[i].orderdetails2.Name;
-                    this.salesData[i]["orderdetails2NameUrl"] = "/" + this.salesData[i].orderdetails2.Id;
-                    this.salesData[i]["Box_Piece__c"] = this.salesData[i].orderdetails2.Box_Piece__c;
-                    this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
-                    this.salesData[i]["Deliver_date__c"] = this.salesData[i].orderdetails2.Deliver_date__c;
-                    this.salesData[i]["Bar_Code__c"] = this.salesData[i].orderdetails2.Bar_Code__c;
-                    this.salesData[i]["Sterilization_limit__c"] = this.salesData[i].orderdetails2.Sterilization_limit__c;
-                    if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
-                        console.log('this.salesData[i] = ' + JSON.stringify(this.salesData[i]))
-                        this.salesData[i]["outboundCount"] = this.salesData[i].outboundCount;
-                    } else {
-                        for (var j in this.salesOrderdetails) {
-                            console.log('this.salesOrderdetails[j].Consumable_product__c = ' + this.salesOrderdetails[j].Consumable_product__c);
-                            console.log('this.salesData[i].orderdetails2.Consumable_product__c = ' + this.salesData[i].orderdetails2.Consumable_product__c);
-                            if (this.salesOrderdetails[j].Consumable_product__c == this.salesData[i].orderdetails2.Consumable_product__c) {
-                                this.salesData[i]["outboundCount"] = this.salesOrderdetails[j].Shipment_Count__c;
-                            }
-                        }
-                    }
-
-                    //salescolomus
-                    // console.log('this.salesData[i]["Box_Piece__c"] = ' + this.salesData[i]["Box_Piece__c"])
-                    // if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
-                    //     this.salesData[i]["isDisable"] = true;
-                    //     this.salesData[i]["count"] = this.salesData[i].outboundCount;
-                    // }
-                    // if (this.salesData[i]["Box_Piece__c"] == '涓�') {
-                    //     this.salesData[i]["isDisable"] = false;
-                    // }
-                }
-                this.salesColumns = [...this.salesColumns];
-                this.isShowSpinner = false;
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('鑾峰彇澶辫触', r.msg, 'Error');
+              }
             }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error.message));
-        });
-    }
-
-    handleOutboundCount(event) {
-        let outboundDetail = event.detail;
-        for (var i in this.salesData) {
-            if (this.salesData[i].Id == outboundDetail.data.recordId) {
-                this.salesData[i]['outboundCount'] = outboundDetail.data.count
-            }
-        }
-        console.log('this.salesData = ' + JSON.stringify(this.salesData))
-    }
-
-    SaveP() {
-        let cloneSalesData = this.salesData;
-        for (var i in cloneSalesData) {
-            delete cloneSalesData[i].Consumable_order_minor__c;
-            delete cloneSalesData[i].ConsumableorderminorUrl;
-            delete cloneSalesData[i].orderdetails2Name;
-            delete cloneSalesData[i].orderdetails2NameUrl;
-            delete cloneSalesData[i].Box_Piece__c;
-            delete cloneSalesData[i].ProdName;
-            delete cloneSalesData[i].Deliver_date__c;
-            delete cloneSalesData[i].Bar_Code__c;
-            delete cloneSalesData[i].Sterilization_limit__c;
-            cloneSalesData[i]["ErrorReason"] = "";
-        }
-        this.isShowSpinner = true;
-        ProSale({
-            ESetIdLwc: this.ESetid,
-            cocLwc: this.salesCoc,
-            barcodeLwc: this.Barcode,
-            accountNameLwc: this.salesAccountName,
-            userWorkLocationLwc: this.salesUserWorkLocation,
-            consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
-            orderdetailsLwc: this.salesOrderdetails,
-            orderpriceMapLwc: this.salesOrderpriceMap,
-            orderagencypriceMapLwc: this.salesOrderagencypriceMap,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                console.log("ProdElivery success");
-                this.isShowSpinner = false;
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: "/lexsaleanddelivery",
-                    },
-                });
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('閿�鍞け璐�', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error.message));
-            this.showMyToast('閿欒', '閿�鍞け璐�', 'Error');
-        });
-    }
-
-    SaveE() {
-        let cloneSalesData = this.salesData;
-        for (var i in cloneSalesData) {
-            delete cloneSalesData[i].Consumable_order_minor__c;
-            delete cloneSalesData[i].orderdetails2Name;
-            delete cloneSalesData[i].orderdetails2NameUrl;
-            delete cloneSalesData[i].Box_Piece__c;
-            delete cloneSalesData[i].ProdName;
-            delete cloneSalesData[i].Deliver_date__c;
-            delete cloneSalesData[i].Bar_Code__c;
-            delete cloneSalesData[i].Sterilization_limit__c;
-            cloneSalesData[i]["ErrorReason"] = "";
-        }
-        this.isShowSpinner = true;
-        ProdElivery({
-            ESetIdLwc: this.ESetid,
-            cocLwc: this.salesCoc,
-            barcodeLwc: this.Barcode,
-            accountNameLwc: this.salesAccountName,
-            userWorkLocationLwc: this.salesUserWorkLocation,
-            consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
-            orderdetailsLwc: this.salesOrderdetails,
-            orderpriceMapLwc: this.salesOrderpriceMap,
-            orderagencypriceMapLwc: this.salesOrderagencypriceMap,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                console.log("ProdElivery success");
-                this.isShowSpinner = false;
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: "/lexsaleanddelivery",
-                    },
-                });
-            } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('鍑鸿揣澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            console.log("error = " + JSON.stringify(error.message));
-            this.showMyToast('閿欒', '鍑鸿揣澶辫触', 'Error');
-        });
-    }
-
-    //鍙戠エ
-    openToInvoiceJs() {
-        let url = '';
-        console.log('this.invoiceId = ' + this.invoiceId);
-        if (this.invoiceId.length > 0 && this.invoiceId != '000000000000000') {
-            url = "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&invoiceId=" + this.invoiceId + "&KeyWords=Redirect";
+          }
+          for (var i in this.salesErrorData) {
+            this.salesErrorData[i]["Id"] =
+              this.salesErrorData[i].orderdetails2.Id;
+            this.salesErrorData[i]["Consumable_order_minor__c"] =
+              this.salesErrorData[i].orderdetails2.Consumable_order_minor__r !=
+              null
+                ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r
+                    .Name
+                : "";
+            this.salesErrorData[i]["ConsumableorderminorUrl"] =
+              this.salesErrorData[i].orderdetails2.Consumable_order_minor__c !=
+              null
+                ? "/" +
+                  this.salesErrorData[i].orderdetails2.Consumable_order_minor__c
+                : "";
+            this.salesErrorData[i]["orderdetails2Name"] =
+              this.salesErrorData[i].orderdetails2.Name;
+            this.salesErrorData[i]["ProdName"] =
+              this.salesErrorData[i].Prod.Name;
+            this.salesErrorData[i]["Box_Piece__c"] =
+              this.salesErrorData[i].orderdetails2.Box_Piece__c;
+            this.salesErrorData[i]["Bar_Code__c"] =
+              this.salesErrorData[i].orderdetails2.Bar_Code__c;
+            this.salesErrorData[i]["Sterilization_limit__c"] =
+              this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
+          }
+          this.isShowSpinner = false;
         } else {
-            url = "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect";
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("鍒濆鍖栧け璐�", r.msg, "Error");
         }
-        window.open(url);
-        // this[NavigationMixin.Navigate]({
-        //     type: "standard__webPage",
-        //     attributes: {
-        //         url: url,
-        //         target:'_blank'
-        //     },
-        // });
-    }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "鍒濆鍖栧け璐�", "Error");
+      });
+  }
 
-    //鍒犻櫎
-    DeleteConsumable() {
-        this.isShowSpinner = true;
-        DelConsumable({
-            ESetId: this.ESetid,
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                let url = "/lexsaleanddelivery";
-                this[NavigationMixin.Navigate]({
-                    type: "standard__webPage",
-                    attributes: {
-                        url: url,
-                    },
-                });
+  SalesearchProductJs() {
+    console.log("this.Barcode = " + this.Barcode);
+    this.isShowSpinner = true;
+    SearchPro({
+      cocLwc: this.salesCoc,
+      barcodeLwc: this.Barcode,
+      accountName: this.salesAccountName,
+      userWorkLocation: this.salesUserWorkLocation,
+      accountid: this.salesAccountid,
+      orderdetails: this.salesOrderdetails,
+      orderpieceorboxMap: this.salesOrderpieceorboxMap
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          console.log("SearchPro success");
+          this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
+          this.salesData = r.entity.consumableorderdetailsRecords;
+          for (var i in this.salesErrorData) {
+            this.salesErrorData[i]["Id"] =
+              this.salesErrorData[i].orderdetails2.Id;
+            this.salesErrorData[i]["Consumable_order_minor__c"] =
+              this.salesErrorData[i].orderdetails2.Consumable_order_minor__r !=
+              null
+                ? this.salesErrorData[i].orderdetails2.Consumable_order_minor__r
+                    .Name
+                : "";
+            this.salesErrorData[i]["ConsumableorderminorUrl"] =
+              this.salesErrorData[i].orderdetails2.Consumable_order_minor__c !=
+              null
+                ? "/" +
+                  this.salesErrorData[i].orderdetails2.Consumable_order_minor__c
+                : "";
+            this.salesErrorData[i]["orderdetails2Name"] =
+              this.salesErrorData[i].orderdetails2.Name;
+            this.salesErrorData[i]["ProdName"] =
+              this.salesErrorData[i].Prod.Name;
+            this.salesErrorData[i]["Box_Piece__c"] =
+              this.salesErrorData[i].orderdetails2.Box_Piece__c;
+            this.salesErrorData[i]["Bar_Code__c"] =
+              this.salesErrorData[i].orderdetails2.Bar_Code__c;
+            this.salesErrorData[i]["Sterilization_limit__c"] =
+              this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
+          }
+          console.log("this.salesData = " + JSON.stringify(this.salesData));
+          for (var i in this.salesData) {
+            this.salesData[i]["Id"] = this.salesData[i].orderdetails2.Id;
+            this.salesData[i]["Consumable_order_minor__c"] =
+              this.salesData[i].orderdetails2.Consumable_order_minor__r != null
+                ? this.salesData[i].orderdetails2.Consumable_order_minor__r.Name
+                : "";
+            this.salesData[i]["ConsumableorderminorUrl"] =
+              this.salesData[i].orderdetails2.Consumable_order_minor__c != null
+                ? "/" +
+                  this.salesData[i].orderdetails2.Consumable_order_minor__c
+                : "";
+            this.salesData[i]["orderdetails2Name"] =
+              this.salesData[i].orderdetails2.Name;
+            this.salesData[i]["orderdetails2NameUrl"] =
+              "/" + this.salesData[i].orderdetails2.Id;
+            this.salesData[i]["Box_Piece__c"] =
+              this.salesData[i].orderdetails2.Box_Piece__c;
+            this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
+            this.salesData[i]["Deliver_date__c"] =
+              this.salesData[i].orderdetails2.Deliver_date__c;
+            this.salesData[i]["Bar_Code__c"] =
+              this.salesData[i].orderdetails2.Bar_Code__c;
+            this.salesData[i]["Sterilization_limit__c"] =
+              this.salesData[i].orderdetails2.Sterilization_limit__c;
+            if (this.salesData[i]["Box_Piece__c"] == "鐩�") {
+              console.log(
+                "this.salesData[i] = " + JSON.stringify(this.salesData[i])
+              );
+              this.salesData[i]["outboundCount"] =
+                this.salesData[i].outboundCount;
             } else {
-                console.log("r.msg = " + r.msg);
-                this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
+              for (var j in this.salesOrderdetails) {
+                console.log(
+                  "this.salesOrderdetails[j].Consumable_product__c = " +
+                    this.salesOrderdetails[j].Consumable_product__c
+                );
+                console.log(
+                  "this.salesData[i].orderdetails2.Consumable_product__c = " +
+                    this.salesData[i].orderdetails2.Consumable_product__c
+                );
+                if (
+                  this.salesOrderdetails[j].Consumable_product__c ==
+                  this.salesData[i].orderdetails2.Consumable_product__c
+                ) {
+                  this.salesData[i]["outboundCount"] =
+                    this.salesOrderdetails[j].Shipment_Count__c;
+                }
+              }
             }
-        }).catch((error) => {
-            console.log("error = " + error.message);
-            this.showMyToast('閿欒', '鍒犻櫎澶辫触', 'Error');
-        });
-    }
 
-    handleLoad() {
-        console.log('handleLoad')
-        try {
-            const style = document.createElement('style');
-            style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
-            this.template.querySelector('.hideHelpText').appendChild(style);
-        } catch (error) {
-            console.log(error);
+            //salescolomus
+            // console.log('this.salesData[i]["Box_Piece__c"] = ' + this.salesData[i]["Box_Piece__c"])
+            // if (this.salesData[i]["Box_Piece__c"] == '鐩�') {
+            //     this.salesData[i]["isDisable"] = true;
+            //     this.salesData[i]["count"] = this.salesData[i].outboundCount;
+            // }
+            // if (this.salesData[i]["Box_Piece__c"] == '涓�') {
+            //     this.salesData[i]["isDisable"] = false;
+            // }
+          }
+          this.salesColumns = [...this.salesColumns];
+          this.isShowSpinner = false;
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("鑾峰彇澶辫触", r.msg, "Error");
         }
-    }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error.message));
+      });
+  }
 
-    handleLoad2() {
-        console.log('handleLoad2')
-        try {
-            const style = document.createElement('style');
-            style.innerText = '.hehe-layoutItem .slds-button__icon {display: none;}';
-            this.template.querySelector('.hideHelpText').appendChild(style);
-
-            const style2 = document.createElement('style');
-            style2.innerText = '.hehe-layoutItem  .slds-form-element__label {padding : 0px}';
-            this.template.querySelector('.hideHelpText').appendChild(style2);
-        } catch (error) {
-            console.log(error);
-        }
+  handleOutboundCount(event) {
+    let outboundDetail = event.detail;
+    for (var i in this.salesData) {
+      if (this.salesData[i].Id == outboundDetail.data.recordId) {
+        this.salesData[i]["outboundCount"] = outboundDetail.data.count;
+      }
     }
-    //缂栬緫鍑哄簱鍗�
-    EditConsumable() {
-        let url = "/lexsummonscreat?ESetid=" + this.ESetid + "&KeyWords=Redirect";
-        this[NavigationMixin.Navigate]({
+    console.log("this.salesData = " + JSON.stringify(this.salesData));
+  }
+
+  SaveP() {
+    let cloneSalesData = this.salesData;
+    for (var i in cloneSalesData) {
+      delete cloneSalesData[i].Consumable_order_minor__c;
+      delete cloneSalesData[i].ConsumableorderminorUrl;
+      delete cloneSalesData[i].orderdetails2Name;
+      delete cloneSalesData[i].orderdetails2NameUrl;
+      delete cloneSalesData[i].Box_Piece__c;
+      delete cloneSalesData[i].ProdName;
+      delete cloneSalesData[i].Deliver_date__c;
+      delete cloneSalesData[i].Bar_Code__c;
+      delete cloneSalesData[i].Sterilization_limit__c;
+      cloneSalesData[i]["ErrorReason"] = "";
+    }
+    this.isShowSpinner = true;
+    ProSale({
+      ESetIdLwc: this.ESetid,
+      cocLwc: this.salesCoc,
+      barcodeLwc: this.Barcode,
+      accountNameLwc: this.salesAccountName,
+      userWorkLocationLwc: this.salesUserWorkLocation,
+      consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
+      orderdetailsLwc: this.salesOrderdetails,
+      orderpriceMapLwc: this.salesOrderpriceMap,
+      orderagencypriceMapLwc: this.salesOrderagencypriceMap
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          console.log("ProdElivery success");
+          this.isShowSpinner = false;
+          this[NavigationMixin.Navigate]({
             type: "standard__webPage",
             attributes: {
-                url: url,
-            },
-        });
-    }
-
-    //鏄剧ず涓婁紶闄勪欢
-    uploadOrder(event) {
-        this.showAttPop = true;
-    }
-
-    //闄勪欢change浜嬩欢
-    attChange(event) {
-        if (event.target.files.length > 0) {
-            this.filesUploaded = event.target.files;
-            this.fileName = event.target.files[0].name;
-            console.log('this.fileName:' + this.fileName);
-        }
-    }
-
-    //鏄惁鏄剧ず闄勪欢绉婚櫎
-    get attDelBtn() {
-        if (this.fileName != '' && this.fileName != null && this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�') {
-            return true;
-        } else {
-            return false;
-        }
-    }
-
-    //鍏抽棴闄勪欢寮圭獥
-    closePop() {
-        this.showAttPop = false;
-        this.filesUploaded = [];
-        this.fileName = null;
-    }
-
-    //绉婚櫎闄勪欢
-    removeAtt() {
-        this.filesUploaded = [];
-        this.fileName = '';
-    }
-
-    ClearJs() {
-        this.consumableName = '';
-        this.Category3 = '';
-        this.Category4 = '';
-        this.Category5 = '';
-        this.searchProductJs();
-    }
-
-    sortBy(field, reverse, primer) {
-        const key = primer
-            ? function (x) {
-                return primer(x[field]);
+              url: "/lexsaleanddelivery"
             }
-            : function (x) {
-                return x[field];
-            };
+          });
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("閿�鍞け璐�", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error.message));
+        this.showMyToast("閿欒", "閿�鍞け璐�", "Error");
+      });
+  }
 
-        return function (a, b) {
-            a = key(a);
-            b = key(b);
-            return reverse * ((a > b) - (b > a));
+  SaveE() {
+    let cloneSalesData = this.salesData;
+    for (var i in cloneSalesData) {
+      delete cloneSalesData[i].Consumable_order_minor__c;
+      delete cloneSalesData[i].orderdetails2Name;
+      delete cloneSalesData[i].orderdetails2NameUrl;
+      delete cloneSalesData[i].Box_Piece__c;
+      delete cloneSalesData[i].ProdName;
+      delete cloneSalesData[i].Deliver_date__c;
+      delete cloneSalesData[i].Bar_Code__c;
+      delete cloneSalesData[i].Sterilization_limit__c;
+      cloneSalesData[i]["ErrorReason"] = "";
+    }
+    this.isShowSpinner = true;
+    ProdElivery({
+      ESetIdLwc: this.ESetid,
+      cocLwc: this.salesCoc,
+      barcodeLwc: this.Barcode,
+      accountNameLwc: this.salesAccountName,
+      userWorkLocationLwc: this.salesUserWorkLocation,
+      consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
+      orderdetailsLwc: this.salesOrderdetails,
+      orderpriceMapLwc: this.salesOrderpriceMap,
+      orderagencypriceMapLwc: this.salesOrderagencypriceMap
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          console.log("ProdElivery success");
+          this.isShowSpinner = false;
+          this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+              url: "/lexsaleanddelivery"
+            }
+          });
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("鍑鸿揣澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + JSON.stringify(error.message));
+        this.showMyToast("閿欒", "鍑鸿揣澶辫触", "Error");
+      });
+  }
+
+  //鍙戠エ
+  openToInvoiceJs() {
+    let url = "";
+    console.log("this.invoiceId = " + this.invoiceId);
+    if (this.invoiceId.length > 0 && this.invoiceId != "000000000000000") {
+      url =
+        "/s/lexconinvoiceview?deliveryId=" +
+        this.ESetid +
+        "&invoiceId=" +
+        this.invoiceId +
+        "&KeyWords=Redirect";
+    } else {
+      url =
+        "/s/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect";
+    }
+    window.open(url);
+    // this[NavigationMixin.Navigate]({
+    //     type: "standard__webPage",
+    //     attributes: {
+    //         url: url,
+    //         target:'_blank'
+    //     },
+    // });
+  }
+
+  //鍒犻櫎
+  DeleteConsumable() {
+    this.isShowSpinner = true;
+    DelConsumable({
+      ESetId: this.ESetid
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          let url = "/lexsaleanddelivery";
+          this[NavigationMixin.Navigate]({
+            type: "standard__webPage",
+            attributes: {
+              url: url
+            }
+          });
+        } else {
+          console.log("r.msg = " + r.msg);
+          this.showMyToast("鍒犻櫎澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        console.log("error = " + error.message);
+        this.showMyToast("閿欒", "鍒犻櫎澶辫触", "Error");
+      });
+  }
+
+  handleLoad() {
+    console.log("handleLoad");
+    try {
+      const style = document.createElement("style");
+      style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}";
+      this.template.querySelector(".hideHelpText").appendChild(style);
+    } catch (error) {
+      console.log(error);
+    }
+  }
+
+  handleLoad2() {
+    console.log("handleLoad2");
+    try {
+      const style = document.createElement("style");
+      style.innerText = ".hehe-layoutItem .slds-button__icon {display: none;}";
+      this.template.querySelector(".hideHelpText").appendChild(style);
+
+      const style2 = document.createElement("style");
+      style2.innerText =
+        ".hehe-layoutItem  .slds-form-element__label {padding : 0px}";
+      this.template.querySelector(".hideHelpText").appendChild(style2);
+    } catch (error) {
+      console.log(error);
+    }
+  }
+  //缂栬緫鍑哄簱鍗�
+  EditConsumable() {
+    let url = "/lexsummonscreat?ESetid=" + this.ESetid + "&KeyWords=Redirect";
+    this[NavigationMixin.Navigate]({
+      type: "standard__webPage",
+      attributes: {
+        url: url
+      }
+    });
+  }
+
+  //鏄剧ず涓婁紶闄勪欢
+  uploadOrder(event) {
+    this.showAttPop = true;
+  }
+
+  //闄勪欢change浜嬩欢
+  attChange(event) {
+    if (event.target.files.length > 0) {
+      this.filesUploaded = event.target.files;
+      this.fileName = event.target.files[0].name;
+      console.log("this.fileName:" + this.fileName);
+    }
+  }
+
+  //鏄惁鏄剧ず闄勪欢绉婚櫎
+  get attDelBtn() {
+    if (
+      this.fileName != "" &&
+      this.fileName != null &&
+      this.fileName != "璇烽�夋嫨涓�涓枃浠朵笂浼�"
+    ) {
+      return true;
+    } else {
+      return false;
+    }
+  }
+
+  //鍏抽棴闄勪欢寮圭獥
+  closePop() {
+    this.showAttPop = false;
+    this.filesUploaded = [];
+    this.fileName = null;
+  }
+
+  //绉婚櫎闄勪欢
+  removeAtt() {
+    this.filesUploaded = [];
+    this.fileName = "";
+  }
+
+  ClearJs() {
+    this.consumableName = "";
+    this.Category3 = "";
+    this.Category4 = "";
+    this.Category5 = "";
+    this.searchProductJs();
+  }
+
+  sortBy(field, reverse, primer) {
+    const key = primer
+      ? function (x) {
+          return primer(x[field]);
+        }
+      : function (x) {
+          return x[field];
         };
-    }
 
-    onHandleSort(event) {
+    return function (a, b) {
+      a = key(a);
+      b = key(b);
+      return reverse * ((a > b) - (b > a));
+    };
+  }
 
-        //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
-        if (this.EditAble) {
-            const { fieldName: sortedBy, sortDirection } = event.detail;
-            const cloneData = [...this.data];
-            cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
-            let index = 0;
-            let selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
-            let selectedRowsIds = [];
-            for (var i in selectedRows) {
-                selectedRowsIds.push(selectedRows[i].Id);
-            }
-            console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds));
-            for (var i = 0; i < cloneData.length; i++) {
-                if (selectedRowsIds.indexOf(cloneData[i].Id) != -1) {
-                    if (i != 0) {
-                        let temp = cloneData[index];
-                        cloneData[index] = cloneData[i];
-                        cloneData[i] = temp;
-                    }
-                    index++;
-                }
-            }
-            this.data = cloneData;
-            this.sortDirection = sortDirection;
-            this.sortedBy = sortedBy;
-        } else {
-            const { fieldName: sortedBy, sortDirection } = event.detail;
-            const cloneData = [...this.editData];
-            cloneData.sort(this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1));
-            this.editData = cloneData;
-            this.sortDirection = sortDirection;
-            this.sortedBy = sortedBy;
+  onHandleSort(event) {
+    //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
+    if (this.EditAble) {
+      const { fieldName: sortedBy, sortDirection } = event.detail;
+      const cloneData = [...this.data];
+      cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1));
+      let index = 0;
+      let selectedRows = this.template
+        .querySelector("c-lex-custom-lightning-datatable")
+        .getSelectedRows();
+      let selectedRowsIds = [];
+      for (var i in selectedRows) {
+        selectedRowsIds.push(selectedRows[i].Id);
+      }
+      console.log("selectedRowsIds = " + JSON.stringify(selectedRowsIds));
+      for (var i = 0; i < cloneData.length; i++) {
+        if (selectedRowsIds.indexOf(cloneData[i].Id) != -1) {
+          if (i != 0) {
+            let temp = cloneData[index];
+            cloneData[index] = cloneData[i];
+            cloneData[i] = temp;
+          }
+          index++;
         }
+      }
+      this.data = cloneData;
+      this.sortDirection = sortDirection;
+      this.sortedBy = sortedBy;
+    } else {
+      const { fieldName: sortedBy, sortDirection } = event.detail;
+      const cloneData = [...this.editData];
+      cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1));
+      this.editData = cloneData;
+      this.sortDirection = sortDirection;
+      this.sortedBy = sortedBy;
     }
+  }
 
-    handlePrevious() {
-        this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
-        this.searchProductJs();
-    }
+  handlePrevious() {
+    this.currentPageToken =
+      Number(this.currentPageToken) - Number(this.pageSize);
+    this.searchProductJs();
+  }
 
-    handleNext() {
-        this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
-        this.searchProductJs();
-    }
-    handleFirst() {
-        this.currentPageToken = 0;
-        this.searchProductJs();
-    }
+  handleNext() {
+    this.currentPageToken =
+      Number(this.currentPageToken) + Number(this.pageSize);
+    this.searchProductJs();
+  }
+  handleFirst() {
+    this.currentPageToken = 0;
+    this.searchProductJs();
+  }
 
-    handleLast() {
-        this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-        this.searchProductJs();
-    }
+  handleLast() {
+    this.currentPageToken =
+      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+    this.searchProductJs();
+  }
 
-    handlePageschange(event) {
-        console.log(event.detail);
-        this.pageSize = event.detail;
-        this.currentPageToken = 0;
-        this.searchProductJs();
-    }
+  handlePageschange(event) {
+    console.log(event.detail);
+    this.pageSize = event.detail;
+    this.currentPageToken = 0;
+    this.searchProductJs();
+  }
 
+  editHandlePrevious() {
+    this.currentPageToken =
+      Number(this.currentPageToken) - Number(this.pageSize);
+    this.searchEditProductJs();
+  }
 
+  editHandleNext() {
+    this.currentPageToken =
+      Number(this.currentPageToken) + Number(this.pageSize);
+    this.searchEditProductJs();
+  }
+  editHandleFirst() {
+    this.currentPageToken = 0;
+    this.searchEditProductJs();
+  }
 
-    editHandlePrevious() {
-        this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
-        this.searchEditProductJs();
-    }
+  editHandleLast() {
+    this.currentPageToken =
+      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+    this.searchEditProductJs();
+  }
 
-    editHandleNext() {
-        this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
-        this.searchEditProductJs();
-    }
-    editHandleFirst() {
-        this.currentPageToken = 0;
-        this.searchEditProductJs();
-    }
+  editHandlePageschange(event) {
+    console.log(event.detail);
+    this.pageSize = event.detail;
+    this.currentPageToken = 0;
+    this.searchEditProductJs();
+  }
 
-    editHandleLast() {
-        this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-        this.searchEditProductJs();
-    }
+  searchEditProductJs() {
+    this.isEditShowSpinner = true;
+    this.showTable = false;
+    init({
+      ESetidJs: this.ESetid,
+      statusEdit: this.statusEdit,
+      pageSizeLWC: this.pageSize,
+      pageTokenLWC: this.currentPageToken
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        console.log("r = " + JSON.stringify(r));
+        if (r.status == "Success") {
+          //鍒嗛〉
+          console.log(
+            "r.entity.paginatedAccounts = " +
+              JSON.stringify(r.entity.paginatedAccounts)
+          );
+          this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
+          this.totalRecords = r.entity.paginatedAccounts.totalRecords;
+          this.recordStart = r.entity.paginatedAccounts.recordStart;
+          this.recordEnd = r.entity.paginatedAccounts.recordEnd;
+          this.totalPages = Math.ceil(
+            r.entity.paginatedAccounts.totalRecords / this.pageSize
+          );
+          console.log("this.totalPages = " + this.totalPages);
 
-    editHandlePageschange(event) {
-        console.log(event.detail);
-        this.pageSize = event.detail;
-        this.currentPageToken = 0;
-        this.searchEditProductJs();
-    }
+          this.editData = r.entity.pageRecords;
+          console.log("this.data start = " + JSON.stringify(this.data));
+          for (var i in this.editData) {
+            this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
+            this.editData[i]["InvoiceProNot_count__c"] =
+              this.editData[i].orderdetails1.InvoiceProNot_count__c;
+            this.editData[i]["RrturnPro_count__c"] =
+              this.editData[i].orderdetails1.RrturnPro_count__c;
+            this.editData[i]["Invoiced_Procount__c"] =
+              this.editData[i].orderdetails1.Invoiced_Procount__c;
+            this.editData[i]["shipmentNumber"] =
+              this.editData[i].orderdetails1["Shipment_Count__c"];
+            this.editData[i]["shippingUnitPrice"] =
+              this.editData[i].orderdetails1["Delivery_List_RMB__c"];
 
-    searchEditProductJs() {
-        this.isEditShowSpinner = true;
-        this.showTable = false;
-        init({
-            ESetidJs: this.ESetid,
-            statusEdit: this.statusEdit,
-            pageSizeLWC: this.pageSize,
-            pageTokenLWC: this.currentPageToken
-        }).then((r) => {
-            r = JSON.parse(JSON.stringify(r));
-            console.log("r = " + JSON.stringify(r));
-            if (r.status == "Success") {
-                //鍒嗛〉
-                console.log('r.entity.paginatedAccounts = ' + JSON.stringify(r.entity.paginatedAccounts));
-                this.nextPageToken = r.entity.paginatedAccounts.nextPageToken;
-                this.totalRecords = r.entity.paginatedAccounts.totalRecords;
-                this.recordStart = r.entity.paginatedAccounts.recordStart;
-                this.recordEnd = r.entity.paginatedAccounts.recordEnd;
-                this.totalPages = Math.ceil(r.entity.paginatedAccounts.totalRecords / this.pageSize);
-                console.log('this.totalPages = ' + this.totalPages);
+            this.editData[i]["recordId"] = this.editData[i].Prod.Id;
+            this.editData[i]["Id"] = this.editData[i].Prod.Id;
+            this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
+            this.editData[i]["SFDA_Status__c"] =
+              this.editData[i].Prod.SFDA_Status__c;
+            this.editData[i]["Category3__c"] =
+              this.editData[i].Prod.Category3__c;
+            this.editData[i]["Category4__c"] =
+              this.editData[i].Prod.Category4__c;
+            this.editData[i]["Category5__c"] =
+              this.editData[i].Prod.Category5__c;
+            this.editData[i]["Box_Piece__c"] =
+              this.editData[i].orderdetails1.Box_Piece__c;
+            this.editData[i]["shipmentAmount"] =
+              this.editData[i].orderdetails1.Shipment_amount__c;
+            //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
+            this.editData[i]["Delivery_List_RMB__c"] =
+              this.editData[i].orderdetails1.Delivery_List_RMB__c;
+            this.editData[i]["Shipment_Count__c"] =
+              this.editData[i].orderdetails1.Shipment_Count__c;
+          }
+          this.showTable = true;
+          this.isEditShowSpinner = false;
+        } else {
+          console.log("r = " + JSON.stringify(r));
+          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        this.showMyToast("閿欒", "鎼滅储澶辫触", "Error");
+      });
+  }
 
-                this.editData = r.entity.pageRecords;
-                console.log("this.data start = " + JSON.stringify(this.data));
-                for (var i in this.editData) {
-                    this.editData[i]["unitValue"] = this.editData[i]["unitValue"];
-                    this.editData[i]["InvoiceProNot_count__c"] = this.editData[i].orderdetails1.InvoiceProNot_count__c;
-                    this.editData[i]["RrturnPro_count__c"] = this.editData[i].orderdetails1.RrturnPro_count__c;
-                    this.editData[i]["Invoiced_Procount__c"] = this.editData[i].orderdetails1.Invoiced_Procount__c;
-                    this.editData[i]["shipmentNumber"] = this.editData[i].orderdetails1["Shipment_Count__c"];
-                    this.editData[i]["shippingUnitPrice"] = this.editData[i].orderdetails1["Delivery_List_RMB__c"];
+  get previousButtonDisabled() {
+    return this.currentPageToken === 0;
+  }
 
-                    this.editData[i]["recordId"] = this.editData[i].Prod.Id;
-                    this.editData[i]["Id"] = this.editData[i].Prod.Id;
-                    this.editData[i]["Name__c"] = this.editData[i].Prod.Name__c;
-                    this.editData[i]["SFDA_Status__c"] = this.editData[i].Prod.SFDA_Status__c;
-                    this.editData[i]["Category3__c"] = this.editData[i].Prod.Category3__c;
-                    this.editData[i]["Category4__c"] = this.editData[i].Prod.Category4__c;
-                    this.editData[i]["Category5__c"] = this.editData[i].Prod.Category5__c;
-                    this.editData[i]["Box_Piece__c"] = this.editData[i].orderdetails1.Box_Piece__c;
-                    this.editData[i]["shipmentAmount"] = this.editData[i].orderdetails1.Shipment_amount__c;
-                    //this.editData[i]["Shipment_amount__c"] = this.editData[i].orderdetails1.Shipment_amount__c;
-                    this.editData[i]["Delivery_List_RMB__c"] = this.editData[i].orderdetails1.Delivery_List_RMB__c;
-                    this.editData[i]["Shipment_Count__c"] = this.editData[i].orderdetails1.Shipment_Count__c;
-                }
-                this.showTable = true;
-                this.isEditShowSpinner = false;
-            } else {
-                console.log("r = " + JSON.stringify(r));
-                this.showMyToast('鎼滅储澶辫触', r.msg, 'Error');
-            }
-        }).catch((error) => {
-            this.showMyToast('閿欒', '鎼滅储澶辫触', 'Error');
-        });
-    }
+  get nextButtonDisabled() {
+    return this.nextPageToken === undefined;
+  }
 
-    get previousButtonDisabled() {
-        return this.currentPageToken === 0;
-    }
-
-    get nextButtonDisabled() {
-        return this.nextPageToken === undefined;
-    }
-
-    //鍒犻櫎闄勪欢
-    deleteAtt(event) {
-        this.isShowSpinner = true;
-        //var recordId = event.detail.data.recordId;
-        var recordId = event.target.getAttribute("data-fileid");
-        console.log('attid:' + recordId);
-        deleteAtt({
-            contentVersionId: recordId
-        }).then(r => {
-            r = JSON.parse(JSON.stringify(r));
-            if (r.status == "Success") {
-                this.showMyToast('鍒犻櫎鎴愬姛', '', 'Success');
-                this.getFiles();
-            } else {
-                this.showMyToast('鍒犻櫎澶辫触', r.msg, 'Error');
-            }
-        }).catch(error => {
-            this.showMyToast('閿欒', error.message, 'Error');
-        })
-    }
-}
\ No newline at end of file
+  //鍒犻櫎闄勪欢
+  deleteAtt(event) {
+    this.isShowSpinner = true;
+    //var recordId = event.detail.data.recordId;
+    var recordId = event.target.getAttribute("data-fileid");
+    console.log("attid:" + recordId);
+    deleteAtt({
+      contentVersionId: recordId
+    })
+      .then((r) => {
+        r = JSON.parse(JSON.stringify(r));
+        if (r.status == "Success") {
+          this.showMyToast("鍒犻櫎鎴愬姛", "", "Success");
+          this.getFiles();
+        } else {
+          this.showMyToast("鍒犻櫎澶辫触", r.msg, "Error");
+        }
+      })
+      .catch((error) => {
+        this.showMyToast("閿欒", error.message, "Error");
+      });
+  }
+}
diff --git a/force-app/main/default/lwc/lexTopPage/lexTopPage.html b/force-app/main/default/lwc/lexTopPage/lexTopPage.html
index e7b4de8..a1c10bd 100644
--- a/force-app/main/default/lwc/lexTopPage/lexTopPage.html
+++ b/force-app/main/default/lwc/lexTopPage/lexTopPage.html
@@ -1,17 +1,20 @@
 <template>
-    <template if:true={showSpinner}>
-        <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
-        <div class="slds-spinner_container">
-            <div role="status" class="slds-spinner slds-spinner_medium slds-spinner_brand">
-                <span class="slds-assistive-text">Loading</span>
-                <div class="slds-spinner__dot-a"></div>
-                <div class="slds-spinner__dot-b"></div>
-            </div>
-        </div>
-    </template>
-    <c-common-toast></c-common-toast>
-    <template if:true={showPage}>
-        <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
+  <template if:true={showSpinner}>
+    <!-- <lightning-spinner size="medium" variant="brand"></lightning-spinner> -->
+    <div class="slds-spinner_container">
+      <div
+        role="status"
+        class="slds-spinner slds-spinner_medium slds-spinner_brand"
+      >
+        <span class="slds-assistive-text">Loading</span>
+        <div class="slds-spinner__dot-a"></div>
+        <div class="slds-spinner__dot-b"></div>
+      </div>
+    </div>
+  </template>
+  <c-common-toast></c-common-toast>
+  <template if:true={showPage}>
+    <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;">
             <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
                 <lightning-layout>
                     <lightning-layout-item padding="around-small">
@@ -26,43 +29,70 @@
                 <p style="height: 10px;"></p>
             </div>
         </div> -->
-        <!-- 鏈叏閮ㄥ彂璐ц鍗曟槑缁� -->
-        <template if:true={over_view}>
-            <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                    <lightning-layout>
-                        <lightning-layout-item padding="around-small">
-                            <p style="font-size: 18px">
-                                <strong>鏈叏閮ㄥ彂璐ц鍗曟槑缁�</strong>
-                            </p>
-                        </lightning-layout-item>
-                    </lightning-layout>
-                    <!-- <p style="font-size: 16px;"><strong>鏈叏閮ㄥ彂璐ц鍗曟槑缁�</strong></p> -->
-                </div>
-                <div style="padding:10px;">
-                    <c-lex-custom-lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="Id" data={raesList} columns={colms} onclicklink={clickLick}></c-lex-custom-lightning-datatable>
-                </div>
-            </div>
-        </template>
-        <!-- 浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧 -->
-        <template if:true={overlimit}>
-            <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-                <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                    <lightning-layout>
-                        <lightning-layout-item padding="around-small">
-                            <p style="font-size: 18px">
-                                <strong>浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧</strong>
-                            </p>
-                        </lightning-layout-item>
-                    </lightning-layout>
-                    <!-- <p style="font-size: 16px;"><strong>浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧</strong></p> -->
-                </div>
-                <div style="padding:10px;">
-                    <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={overlimitdateorderdetails} columns={colm3}></lightning-datatable>
-                </div>
-            </div>
-        </template>
-        <!-- 缁忛攢鍟嗕俊鎭�
+    <!-- 鏈叏閮ㄥ彂璐ц鍗曟槑缁� -->
+    <template if:true={over_view}>
+      <div
+        style="
+          border: 1px solid #d4d4d4;
+          border-top: 3px solid #51606e;
+          border-radius: 5px;
+          margin-bottom: 7px;
+        "
+      >
+        <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+          <lightning-layout>
+            <lightning-layout-item padding="around-small">
+              <p style="font-size: 18px">
+                <strong>鏈叏閮ㄥ彂璐ц鍗曟槑缁�</strong>
+              </p>
+            </lightning-layout-item>
+          </lightning-layout>
+          <!-- <p style="font-size: 16px;"><strong>鏈叏閮ㄥ彂璐ц鍗曟槑缁�</strong></p> -->
+        </div>
+        <div style="padding: 10px">
+          <c-lex-custom-lightning-datatable
+            class="wrapped-header-datatable"
+            hide-checkbox-column
+            key-field="Id"
+            data={raesList}
+            columns={colms}
+            onclicklink={clickLick}
+          ></c-lex-custom-lightning-datatable>
+        </div>
+      </div>
+    </template>
+    <!-- 浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧 -->
+    <template if:true={overlimit}>
+      <div
+        style="
+          border: 1px solid #d4d4d4;
+          border-top: 3px solid #51606e;
+          border-radius: 5px;
+          margin-bottom: 7px;
+        "
+      >
+        <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+          <lightning-layout>
+            <lightning-layout-item padding="around-small">
+              <p style="font-size: 18px">
+                <strong>浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧</strong>
+              </p>
+            </lightning-layout-item>
+          </lightning-layout>
+          <!-- <p style="font-size: 16px;"><strong>浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧</strong></p> -->
+        </div>
+        <div style="padding: 10px">
+          <lightning-datatable
+            class="wrapped-header-datatable"
+            hide-checkbox-column
+            key-field="prodName"
+            data={overlimitdateorderdetails}
+            columns={colm3}
+          ></lightning-datatable>
+        </div>
+      </div>
+    </template>
+    <!-- 缁忛攢鍟嗕俊鎭�
         <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
             <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
                 <lightning-layout>
@@ -146,29 +176,48 @@
                 </lightning-accordion>
             </div>
         </div> -->
-        <!--缁忛攢鍟嗗簱瀛樹笂涓嬮檺 -->
-        <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
-            <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
-                <lightning-layout>
-                    <lightning-layout-item padding="around-small">
-                        <p style="font-size: 18px">
-                            <strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺</strong>
-                        </p>
-                    </lightning-layout-item>
-                </lightning-layout>
-                <!-- <p style="font-size: 16px;"><strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺</strong></p> -->
-            </div>
-            <div style="padding:10px;">
-                <div lwc:dom="manual" id="resultDiv" class="resultDiv"></div>
-                <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodName" data={productLimitRecords} columns={colm4}></lightning-datatable>
-                <p style="height: 10px;"></p>
-                <div draggable="false" >
-                    <button class="slds-button slds-button_neutral slds-button_stretch lexBorder" style="width: 220px;" onclick={editProductLimit}>缁忛攢鍟嗕骇鍝佷笂涓嬮檺缂栬緫</button>
-                </div>
-            </div>
+    <!--缁忛攢鍟嗗簱瀛樹笂涓嬮檺 -->
+    <div
+      style="
+        border: 1px solid #d4d4d4;
+        border-top: 3px solid #51606e;
+        border-radius: 5px;
+        margin-bottom: 7px;
+      "
+    >
+      <div style="border-bottom: 1px solid #d4d4d4; padding: 3px">
+        <lightning-layout>
+          <lightning-layout-item padding="around-small">
+            <p style="font-size: 18px">
+              <strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺</strong>
+            </p>
+          </lightning-layout-item>
+        </lightning-layout>
+        <!-- <p style="font-size: 16px;"><strong>缁忛攢鍟嗗簱瀛樹笂涓嬮檺</strong></p> -->
+      </div>
+      <div style="padding: 10px">
+        <div lwc:dom="manual" id="resultDiv" class="resultDiv"></div>
+        <lightning-datatable
+          class="wrapped-header-datatable"
+          hide-checkbox-column
+          key-field="prodName"
+          data={productLimitRecords}
+          columns={colm4}
+        ></lightning-datatable>
+        <p style="height: 10px"></p>
+        <div draggable="false">
+          <button
+            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+            style="width: 220px"
+            onclick={editProductLimit}
+          >
+            缁忛攢鍟嗕骇鍝佷笂涓嬮檺缂栬緫
+          </button>
         </div>
-        <!-- 鍦ㄥ簱鍟嗗搧搴撳瓨涓�瑙� -->
-        <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
+      </div>
+    </div>
+    <!-- 鍦ㄥ簱鍟嗗搧搴撳瓨涓�瑙� -->
+    <!-- <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-bottom:7px;">
             <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
                 <lightning-layout>
                     <lightning-layout-item padding="around-small">
@@ -192,30 +241,68 @@
                 record-start={recordStart} record-end={recordEnd} total-records={totalRecords}></c-paginator>
             </div>
         </div> -->
-        <!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
-        <template if:true={showPop}>
-            <section role="dialog" tabindex="-1" aria-labelledby="modal-heading-01" aria-modal="true" aria-describedby="modal-content-id-1" class="slds-modal slds-fade-in-open slds-modal_small" style="border: 1px solid #D4D4D4;">
-                <div class="slds-modal__container">
-                    <header class="slds-modal__header" style="background-color: #F3F3F3;">
-                        <button style="" class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse" title="Close" onclick={closePop}>
-                            <lightning-icon icon-name="utility:close"
-                                alternative-text="close"
-                                variant="inverse"
-                                size="small" ></lightning-icon>
-                            <span class="slds-assistive-text">Close</span>
-                        </button>
-                        <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">{popTitle}</h2>
-                    </header>
-                    <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1" style="border: 1px solid #F3F3F3;">
-                        <lightning-datatable class="wrapped-header-datatable" hide-checkbox-column key-field="prodModel" columns={colms2}  data={recordList}></lightning-datatable>
-                    </div>
-                    <footer class="slds-modal__footer">
-                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
-                        <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}>鍏抽棴</button>
-                    </footer>
-                </div>
-            </section>
-            <div class="slds-backdrop slds-backdrop_open"></div>
-        </template>
+    <!-- 璁㈠崟鍚勭鏁伴噺淇℃伅寮圭獥 -->
+    <template if:true={showPop}>
+      <section
+        role="dialog"
+        tabindex="-1"
+        aria-labelledby="modal-heading-01"
+        aria-modal="true"
+        aria-describedby="modal-content-id-1"
+        class="slds-modal slds-fade-in-open slds-modal_small"
+        style="border: 1px solid #d4d4d4"
+      >
+        <div class="slds-modal__container">
+          <header class="slds-modal__header" style="background-color: #f3f3f3">
+            <button
+              style=""
+              class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+              title="Close"
+              onclick={closePop}
+            >
+              <lightning-icon
+                icon-name="utility:close"
+                alternative-text="close"
+                variant="inverse"
+                size="small"
+              ></lightning-icon>
+              <span class="slds-assistive-text">Close</span>
+            </button>
+            <h2
+              id="modal-heading-01"
+              class="slds-text-heading_medium slds-hyphenate"
+            >
+              {popTitle}
+            </h2>
+          </header>
+          <div
+            class="slds-modal__content slds-p-around_medium"
+            id="modal-content-id-1"
+            style="border: 1px solid #f3f3f3"
+          >
+            <lightning-datatable
+              class="wrapped-header-datatable"
+              hide-checkbox-column
+              key-field="prodModel"
+              columns={colms2}
+              data={recordList}
+            ></lightning-datatable>
+          </div>
+          <footer class="slds-modal__footer">
+            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍏抽棴" onclick={closePop}></lightning-button> -->
+            <button
+              class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+              style="margin-left: 10px"
+              variant="neutral"
+              label="鍏抽棴"
+              onclick={closePop}
+            >
+              鍏抽棴
+            </button>
+          </footer>
+        </div>
+      </section>
+      <div class="slds-backdrop slds-backdrop_open"></div>
     </template>
-</template>
\ No newline at end of file
+  </template>
+</template>
diff --git a/force-app/main/default/lwc/lexTopPage/lexTopPage.js b/force-app/main/default/lwc/lexTopPage/lexTopPage.js
index 777d6e7..12f470e 100644
--- a/force-app/main/default/lwc/lexTopPage/lexTopPage.js
+++ b/force-app/main/default/lwc/lexTopPage/lexTopPage.js
@@ -1,667 +1,771 @@
-import { LightningElement, wire, api, track } from 'lwc';
-import { ShowToastEvent } from 'lightning/platformShowToastEvent';
-import { NavigationMixin } from 'lightning/navigation';
-import initPage from '@salesforce/apex/LexTopPageController.initPage';
-import initTotalNum from '@salesforce/apex/LexConsumableGoodsInfo.initTotalNum';
-import initArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initArrDet';
-import initArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll';
-import initDeliveryDet from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet';
-import initDeliveryDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll';
-import initNotArrDet from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet';
-import initNotArrDetAll from '@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll';
-import initMoreThan7 from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7';
-import initMoreThan7All from '@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All';
-//table css 
+import { LightningElement, wire, api, track } from "lwc";
+import { ShowToastEvent } from "lightning/platformShowToastEvent";
+import { NavigationMixin } from "lightning/navigation";
+import initPage from "@salesforce/apex/LexTopPageController.initPage";
+import initTotalNum from "@salesforce/apex/LexConsumableGoodsInfo.initTotalNum";
+import initArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initArrDet";
+import initArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initArrDetAll";
+import initDeliveryDet from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDet";
+import initDeliveryDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initDeliveryDetAll";
+import initNotArrDet from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDet";
+import initNotArrDetAll from "@salesforce/apex/LexConsumableGoodsInfo.initNotArrDetAll";
+import initMoreThan7 from "@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7";
+import initMoreThan7All from "@salesforce/apex/LexConsumableGoodsInfo.initMoreThan7All";
+//table css
 import { loadStyle } from "lightning/platformResourceLoader";
 import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
 
 export default class LexTopPage extends NavigationMixin(LightningElement) {
-    @track title = [];
-    @track raesList = [];
-    @track column = [];
-    @track overlimitdateorderdetails = [];
-    @track productLimitRecords = [];
-    @track accountInfo;
-    @track accountId;
-    @track userPro_Type;
-    @track pageRecords = [];
-    @track csvData = [];
-    @track product_Limit;
-    @track over_view = false;
-    @track overlimit = false;
-    @track hasHos = false;
-    @track activeSections = ['A', 'B', 'C'];
-    @track isRender = false;
-    @track consumableorderdetailsRecordsview;
-    @track showSpinner = true;
-    @track showPage = false;
-    //
-    @track showPop = false;
-    @track popTitle;
-    @track totalNum;
-    @track orderNumberArrived;
-    @track deliveryDetailCount;
-    @track orderNumberNotarrive;
-    @track moreThanSevenDays;
-    stylesLoaded = false;
+  @track title = [];
+  @track raesList = [];
+  @track column = [];
+  @track overlimitdateorderdetails = [];
+  @track productLimitRecords = [];
+  @track accountInfo;
+  @track accountId;
+  @track userPro_Type;
+  @track pageRecords = [];
+  @track csvData = [];
+  @track product_Limit;
+  @track over_view = false;
+  @track overlimit = false;
+  @track hasHos = false;
+  @track activeSections = ["A", "B", "C"];
+  @track isRender = false;
+  @track consumableorderdetailsRecordsview;
+  @track showSpinner = true;
+  @track showPage = false;
+  //
+  @track showPop = false;
+  @track popTitle;
+  @track totalNum;
+  @track orderNumberArrived;
+  @track deliveryDetailCount;
+  @track orderNumberNotarrive;
+  @track moreThanSevenDays;
+  stylesLoaded = false;
 
-    @track showTable = false;
-    @track hidecheckboxcolumn = true;
-    //鎺掑簭
-    defaultSortDirection = "asc";
-    sortDirection = "asc";
-    sortedBy;
+  @track showTable = false;
+  @track hidecheckboxcolumn = true;
+  //鎺掑簭
+  defaultSortDirection = "asc";
+  sortDirection = "asc";
+  sortedBy;
 
-    //鍒嗛〉start
-    @track sortBy = "";
-    @track pageSize = 10;
-    error;
-    records;
-    currentPageToken = 0;
-    nextPageToken = this.pageSize;
-    @track totalRecords = 0;
-    @track loader = false;
-    @track pageNumber = 1;
-    @track paginationVisibility = false;
-    @track totalPages = 1;
-    pageSizeOptions = [10, 25, 50, 100];
-    @track recordStart = 0;
-    @track recordEnd = 0;
-    //end
+  //鍒嗛〉start
+  @track sortBy = "";
+  @track pageSize = 10;
+  error;
+  records;
+  currentPageToken = 0;
+  nextPageToken = this.pageSize;
+  @track totalRecords = 0;
+  @track loader = false;
+  @track pageNumber = 1;
+  @track paginationVisibility = false;
+  @track totalPages = 1;
+  pageSizeOptions = [10, 25, 50, 100];
+  @track recordStart = 0;
+  @track recordEnd = 0;
+  //end
 
-    //鏄惁涓�鐩存樉绀烘彁绀�
-    @track isNoteStay = true;
+  //鏄惁涓�鐩存樉绀烘彁绀�
+  @track isNoteStay = true;
 
-    //鏈叏閮ㄥ彂璐ц鍗曟槑缁哻ol
-    @track colms = [
-        {
-            label: '娑堣�楀搧璁㈠崟鍚嶇О',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Name" },
-                type: 'Title',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true,initialWidth: 200
-        },
-        { label: 'SAP鍚堝悓鍙�', fieldName: 'ContractNo__c', hideDefaultActions: true,initialWidth:180},
-        {
-            label: '璁㈠崟鎬绘暟',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Total_num__c" },
-                type: 'TotalNum',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 100
-        },
-        {
-            label: '宸插埌璐ф暟閲�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "OrderNumber_arrived__c" },
-                type: 'ArrDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 110
-        },
-        {
-            label: '寰呯郴缁熸搷浣滃叆搴撴暟閲�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "Delivery_detail_count__c" },
-                type: 'DeliveryDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 180
-        },
-        {
-            label: '杩樻病鍙戣揣鏁伴噺',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "OrderNumber_notarrive__c" },
-                type: 'NotArrDet',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 120
-        },
-        {
-            label: '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�',
-            type: "customOutputGood",
-            typeAttributes: {
-                outputValue: { fieldName: "More_than_seven_days__c" },
-                type: 'MoreThan7',
-                recordId: { fieldName: "Id" }
-            },
-            hideDefaultActions: true, initialWidth: 180
-        },
-        { label: '鏈�鏂板彂璐ф棩鏈�', fieldName: 'Shipment_date__c', hideDefaultActions: true , initialWidth: 140},
-        { label: '棣栨鍙戣揣鏃ユ湡', fieldName: 'First_Delivery__c', hideDefaultActions: true , initialWidth: 140}
-    ];
-
-    @track colms2 = [
-        { label: '浜у搧鍨嬪彿', fieldName: 'prodModel', hideDefaultActions: true },
-        { label: '鏁伴噺', fieldName: 'recordCount', hideDefaultActions: true ,initialWidth: 60,cellAttributes: { alignment: "center" }}
-    ];
-
-    //浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧col
-    @track colm3 = [
-        { label: '浜у搧鍨嬪彿', fieldName: 'prodName', hideDefaultActions: true },
-        { label: '鏁伴噺', fieldName: 'countid', hideDefaultActions: true ,cellAttributes: { alignment: "left" }},
-        { label: '鍗曚綅', fieldName: 'BoxPiece', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}
-    ];
-
-    //缁忛攢鍟嗗簱瀛樹笂涓嬮檺col
-    @track colm4 = [
-        { label: '浜у搧鍨嬪彿', fieldName: 'prodName', hideDefaultActions: true },
-        { label: '搴撳瓨涓嬮檺', fieldName: 'limitLow', hideDefaultActions: true ,cellAttributes: { alignment: "left" }},
-        { label: '搴撳瓨涓婇檺', fieldName: 'limitUp', hideDefaultActions: true ,cellAttributes: { alignment: "left" }}
-    ];
-    @track columns = [
-        {
-            label: "娑堣�楀搧鍚嶇О",
-            fieldName: "Name__c",
-            type: "Name",
-            sortable: true,
-            hideDefaultActions: true,
-            wrapText: true,
-            cellAttributes: { alignment: "left" }
-        },
-        {
-            label: "瑙勬牸",
-            fieldName: "packing_list",
-            cellAttributes: { alignment: "right" },
-            initialWidth: 50,
-            wrapText: true,
-            hideDefaultActions: true,
-        },
-        {
-            label: "绗笁鍒嗙被",
-            fieldName: "Category3__c",
-            initialWidth: 85,
-            cellAttributes: { alignment: "left" },
-            hideDefaultActions: true,
-            wrapText: true,
-        },
-        {
-            label: "绗洓鍒嗙被",
-            fieldName: "Category4__c",
-            cellAttributes: { alignment: "left" },
-            initialWidth: 85,
-            hideDefaultActions: true,
-            wrapText: true,
-
-        },
-        {
-            label: "绗簲鍒嗙被",
-            fieldName: "Category5__c",
-            cellAttributes: { alignment: "left" },
-            initialWidth: 85,
-            hideDefaultActions: true,
-            wrapText: true,
-            sortable: true,
-
-        },
-        {
-            label: "CFDA鐘舵��",
-            fieldName: "SFDA_Status__c",
-            cellAttributes: { alignment: "left" },
-            initialWidth: 80,
-            hideDefaultActions: true,
-        },
-        {
-            label: "娉ㄥ唽璇佺紪鐮佸彿",
-            fieldName: "approbation_No",
-            cellAttributes: { alignment: "left" },
-            wrapText: true,
-            initialWidth: 155,
-            hideDefaultActions: true,
-        },
-        {
-            label: "娉ㄥ唽璇佹晥鏈�",
-            fieldName: "expiration_Date",
-            cellAttributes: { alignment: "left" },
-            wrapText: true,
-            hideDefaultActions: true,
-            initialWidth: 100
-        },
-        {
-            label: "浜у搧鏁伴噺涓嬮檺",
-            fieldName: "lowerlimit",
-            cellAttributes: { alignment: "right" },
-            wrapText: true,
-            hideDefaultActions: true,
-            initialWidth: 100
-        },
-        {
-            label: "浣跨敤鏈熼檺",
-            fieldName: "guaranteeperiod",
-            cellAttributes: { alignment: "left" },
-            hideDefaultActions: true,
-            initialWidth: 95
-        },
-
-        {
-            label: '鏈夋晥鏈熷唴搴撳瓨',
-            type: "customInventoryColor",
-            cellAttributes: { alignment: "right" },
-            typeAttributes: {
-                value: { fieldName: "limitCount" },
-                upperlimit: { fieldName: "upperlimit" },
-                lowerlimit: { fieldName: "lowerlimit" },
-                boxPrice: { fieldName: "BoxPiece" },
-            },
-            hideDefaultActions: true,
-
-            initialWidth: 95
-        },
-        {
-            label: "杩囨湡搴撳瓨",
-            fieldName: "overlimitCount",
-            hideDefaultActions: true,
-            cellAttributes: { alignment: "right" },
-            initialWidth: 75
-        },
-        {
-            label: "鍗曚綅",
-            fieldName: "BoxPiece",
-            cellAttributes: { alignment: "left" },
-            initialWidth: 50,
-            wrapText: true,
-            hideDefaultActions: true,
-        },
-
-    ];
-
-    renderedCallback() {
-        if (!this.stylesLoaded) {
-            Promise.all([loadStyle(this, WrappedHeaderTable)])
-                .then(() => {
-                    console.log("Custom styles loaded");
-                    this.stylesLoaded = true;
-                })
-                .catch((error) => {
-                    console.error("Error loading custom styles");
-                });
-        }
+  //鏈叏閮ㄥ彂璐ц鍗曟槑缁哻ol
+  @track colms = [
+    {
+      label: "娑堣�楀搧璁㈠崟鍚嶇О",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Name" },
+        type: "Title",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      // initialWidth: 200,
+      wrapText: true
+    },
+    {
+      label: "SAP鍚堝悓鍙�",
+      fieldName: "ContractNo__c",
+      hideDefaultActions: true,
+      wrapText: true,
+      initialWidth: 180
+    },
+    {
+      label: "璁㈠崟鎬绘暟",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Total_num__c" },
+        type: "TotalNum",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 100
+    },
+    {
+      label: "宸插埌璐ф暟閲�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "OrderNumber_arrived__c" },
+        type: "ArrDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 100
+    },
+    {
+      label: "寰呯郴缁熸搷浣滃叆搴撴暟閲�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "Delivery_detail_count__c" },
+        type: "DeliveryDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 150
+    },
+    {
+      label: "杩樻病鍙戣揣鏁伴噺",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "OrderNumber_notarrive__c" },
+        type: "NotArrDet",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 120
+    },
+    {
+      label: "鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�",
+      type: "customOutputGood",
+      typeAttributes: {
+        outputValue: { fieldName: "More_than_seven_days__c" },
+        type: "MoreThan7",
+        recordId: { fieldName: "Id" }
+      },
+      hideDefaultActions: true,
+      initialWidth: 150
+    },
+    {
+      label: "鏈�鏂板彂璐ф棩鏈�",
+      fieldName: "Shipment_date__c",
+      hideDefaultActions: true,
+      initialWidth: 105
+    },
+    {
+      label: "棣栨鍙戣揣鏃ユ湡",
+      fieldName: "First_Delivery__c",
+      hideDefaultActions: true,
+      initialWidth: 105
     }
+  ];
 
-    connectedCallback() {
-        this.loader = true;
-        this.init();
+  @track colms2 = [
+    { label: "浜у搧鍨嬪彿", fieldName: "prodModel", hideDefaultActions: true },
+    {
+      label: "鏁伴噺",
+      fieldName: "recordCount",
+      hideDefaultActions: true,
+      initialWidth: 60,
+      cellAttributes: { alignment: "center" }
     }
-    init() {
-        this.showSpinner = true;
-        initPage({
-            pageSizeLWC: this.pageSize,
-            pageTokenLWC: this.currentPageToken,
+  ];
+
+  //浣跨敤鏈熼檺灏忎簬涓�骞寸殑浜у搧col
+  @track colm3 = [
+    { label: "浜у搧鍨嬪彿", fieldName: "prodName", hideDefaultActions: true },
+    {
+      label: "鏁伴噺",
+      fieldName: "countid",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "left" }
+    },
+    {
+      label: "鍗曚綅",
+      fieldName: "BoxPiece",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "left" }
+    }
+  ];
+
+  //缁忛攢鍟嗗簱瀛樹笂涓嬮檺col
+  @track colm4 = [
+    { label: "浜у搧鍨嬪彿", fieldName: "prodName", hideDefaultActions: true },
+    {
+      label: "搴撳瓨涓嬮檺",
+      fieldName: "limitLow",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "left" }
+    },
+    {
+      label: "搴撳瓨涓婇檺",
+      fieldName: "limitUp",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "left" }
+    }
+  ];
+  @track columns = [
+    {
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "Name__c",
+      type: "Name",
+      sortable: true,
+      hideDefaultActions: true,
+      wrapText: true,
+      cellAttributes: { alignment: "left" }
+    },
+    {
+      label: "瑙勬牸",
+      fieldName: "packing_list",
+      cellAttributes: { alignment: "right" },
+      initialWidth: 50,
+      wrapText: true,
+      hideDefaultActions: true
+    },
+    {
+      label: "绗笁鍒嗙被",
+      fieldName: "Category3__c",
+      initialWidth: 85,
+      cellAttributes: { alignment: "left" },
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "绗洓鍒嗙被",
+      fieldName: "Category4__c",
+      cellAttributes: { alignment: "left" },
+      initialWidth: 85,
+      hideDefaultActions: true,
+      wrapText: true
+    },
+    {
+      label: "绗簲鍒嗙被",
+      fieldName: "Category5__c",
+      cellAttributes: { alignment: "left" },
+      initialWidth: 85,
+      hideDefaultActions: true,
+      wrapText: true,
+      sortable: true
+    },
+    {
+      label: "CFDA鐘舵��",
+      fieldName: "SFDA_Status__c",
+      cellAttributes: { alignment: "left" },
+      initialWidth: 80,
+      hideDefaultActions: true
+    },
+    {
+      label: "娉ㄥ唽璇佺紪鐮佸彿",
+      fieldName: "approbation_No",
+      cellAttributes: { alignment: "left" },
+      wrapText: true,
+      initialWidth: 155,
+      hideDefaultActions: true
+    },
+    {
+      label: "娉ㄥ唽璇佹晥鏈�",
+      fieldName: "expiration_Date",
+      cellAttributes: { alignment: "left" },
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 100
+    },
+    {
+      label: "浜у搧鏁伴噺涓嬮檺",
+      fieldName: "lowerlimit",
+      cellAttributes: { alignment: "right" },
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 100
+    },
+    {
+      label: "浣跨敤鏈熼檺",
+      fieldName: "guaranteeperiod",
+      cellAttributes: { alignment: "left" },
+      hideDefaultActions: true,
+      initialWidth: 95
+    },
+
+    {
+      label: "鏈夋晥鏈熷唴搴撳瓨",
+      type: "customInventoryColor",
+      cellAttributes: { alignment: "right" },
+      typeAttributes: {
+        value: { fieldName: "limitCount" },
+        upperlimit: { fieldName: "upperlimit" },
+        lowerlimit: { fieldName: "lowerlimit" },
+        boxPrice: { fieldName: "BoxPiece" }
+      },
+      hideDefaultActions: true,
+
+      initialWidth: 95
+    },
+    {
+      label: "杩囨湡搴撳瓨",
+      fieldName: "overlimitCount",
+      hideDefaultActions: true,
+      cellAttributes: { alignment: "right" },
+      initialWidth: 75
+    },
+    {
+      label: "鍗曚綅",
+      fieldName: "BoxPiece",
+      cellAttributes: { alignment: "left" },
+      initialWidth: 50,
+      wrapText: true,
+      hideDefaultActions: true
+    }
+  ];
+
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
         })
-            .then(result => {
-                this.isNoteStay = result.isNoteStay;
-                console.log('isNoteStay:'+result.isNoteStay);
-                if (result.result == 'Success') {
-                    //鍒嗛〉start
-                    this.nextPageToken = result.paginatedAccounts.nextPageToken;
-                    this.totalRecords = result.paginatedAccounts.totalRecords;
-                    this.recordStart = result.paginatedAccounts.recordStart;
-                    this.recordEnd = result.paginatedAccounts.recordEnd;
-                    this.totalPages = Math.ceil(result.paginatedAccounts.totalRecords / this.pageSize);
-                    console.log('this.totalPages = ' + this.totalPages);
-                    this.paginationVisibility = this.totalPages > 1 ? true : false;
-                    console.log('this.sortDirection = ' + this.sortDirection);
-                    this.loader = false;
-                    //鍒嗛〉end
-                    this.title = result.title;
-                    this.totalNum = result.totalNum;
-                    this.orderNumberArrived = result.orderNumberArrived;
-                    this.deliveryDetailCount = result.deliveryDetailCount;
-                    this.orderNumberNotarrive = result.orderNumberNotarrive;
-                    this.moreThanSevenDays = result.moreThanSevenDays;
-                    this.raesList = result.raesList;
-                    this.raesList.push({ Id: '1', Name: '寰呮搷浣滃叆搴撹鍗曟眹鎬�', Total_num__c: this.totalNum, OrderNumber_arrived__c: this.orderNumberArrived, Delivery_detail_count__c: this.deliveryDetailCount, OrderNumber_notarrive__c: this.orderNumberNotarrive, More_than_seven_days__c: this.moreThanSevenDays });
-                    this.column = result.column;
-                    this.accountInfo = result.accountInfo;
-                    this.accountId = result.accountInfo.Id;
-                    this.pageRecords = result.pageRecords;
-                    this.overlimitdateorderdetails = result.overlimitdateorderdetails;
-                    this.over_view = result.over_view;
-                    this.overlimit = result.overlimit;
-                    this.hasHos = result.hasHos;
-                    this.product_Limit = result.product_Limit;
-                    console.log('result==>' + JSON.stringify(result));
-                    for (var i in this.pageRecords) {
-                        this.pageRecords[i]["Name__c"] = this.pageRecords[i].Prod.Name__c;
-                        this.pageRecords[i]["Category3__c"] = this.pageRecords[i].Prod.Category3__c;
-                        this.pageRecords[i]["Category4__c"] = this.pageRecords[i].Prod.Category3__c;
-                        this.pageRecords[i]["Category5__c"] = this.pageRecords[i].Prod.Category3__c;
-                        this.pageRecords[i]["SFDA_Status__c"] = this.pageRecords[i].Prod.SFDA_Status__c;
-                    }
-                    //hasHos = true 鍖婚櫌鐗逛环
-                    if (this.hasHos) {
-                        let object1 = {
-                            label: "鍖婚櫌鐗逛环",
-                            fieldName: "hospitalSpecialOffer",
-                            hideDefaultActions: true,
-                            type: 'boolean',
-                            cellAttributes: { alignment: "left" },
-                            initialWidth: 75
-
-                        };
-                        this.columns.push(object1);
-                        console.log(' this.columns' + this.columns);
-                        for (var j in this.pageRecords) {
-                            this.pageRecords[j]["Name__c"] = this.pageRecords[j].Prod.Name__c;
-                            this.pageRecords[j]["Category3__c"] = this.pageRecords[j].Prod.Category3__c;
-                            this.pageRecords[j]["Category4__c"] = this.pageRecords[j].Prod.Category3__c;
-                            this.pageRecords[j]["Category5__c"] = this.pageRecords[j].Prod.Category3__c;
-                            this.pageRecords[j]["SFDA_Status__c"] = this.pageRecords[j].Prod.SFDA_Status__c;
-                            this.pageRecords[j]["hospitalSpecialOffer__c"] = this.pageRecords[j].hospitalSpecialOffer;
-                        }
-                    }
-                    this.showTable = true;
-                    if (this.product_Limit != null && this.product_Limit != '') {
-                        var records = this.product_Limit.split(",");
-                        for (var i in records) {
-                            var parms = records[i].split("|");
-                            var record = new Object();
-                            record["prodName"] = parms[0];
-                            record["limitLow"] = parms[1];
-                            record["limitUp"] = parms[2];
-                            this.productLimitRecords.push(record);
-                        }
-                    }
-                    // this.productLimitRecords = records;
-                    console.log("productLimitRecords:" + JSON.stringify(this.productLimitRecords));
-                    console.log("product_Limit:" + this.product_Limit);
-                    this.consumableorderdetailsRecordsview = result.consumableorderdetailsRecordsview;
-                    //add by WangXueqin 2023/05/05
-                    this.userPro_Type = result.userPro_Type;
-                    console.log('this.accountId:' + this.accountId);
-                    console.log('this.accountInfo:' + JSON.stringify(this.accountInfo));
-                    this.showSpinner = false;
-                    this.showPage = true;
-                    // this.showMyToast('鍒濆鍖栭〉闈㈡垚鍔�', '', 'success');
-                } else {
-                    this.showPage = true;
-                    this.showSpinner = false;
-                    console.log("Error:" + result.errorMsg);
-                    this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', result.errorMsg, 'error');
-                }
-            })
-            .catch(error => {
-                this.showSpinner = false;
-                console.log("Error:" + error);
-                this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', JSON.stringify(error), 'error');
-            })
-    }
-
-    //鐐瑰嚮閾炬帴
-    clickLick(event) {
-        var outputValue = event.detail.data.value;
-        var outputType = event.detail.data.type;
-        var recordId = event.detail.data.recordId;
-        console.log("click:" + outputValue + "---" + outputType + "---" + recordId);
-        if (outputType == 'Title') {
-            const config = {
-                type: 'standard__webPage',
-                attributes: {
-                    url: '/lexarrivegoods?ESetId=' + recordId
-                }
-            };
-            this[NavigationMixin.Navigate](config);
-        } else if (outputType == 'TotalNum') {
-            this.popTitle = '鎵�鏈変骇鍝佷竴瑙�';
-            initTotalNum({ ordId: recordId, type: '' })
-                .then(result => {
-                    if (result.result == 'Success') {
-                        this.recordList = result.recordList;
-                        console.log('data:' + JSON.stringify(this.recordList));
-                        this.showPop = true;
-                    } else {
-                        this.showMyToast('鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                    }
-                })
-        } else if (outputType == 'ArrDet') {
-            if (recordId == '1') {
-                this.popTitle = '鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�';
-                initArrDetAll({ type: '' })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            } else {
-                this.popTitle = '宸插埌璐т骇鍝佷竴瑙�';
-                initArrDet({ orderId: recordId })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            }
-        } else if (outputType == 'DeliveryDet') {
-            if (recordId == '1') {
-                this.popTitle = '鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�';
-                initDeliveryDetAll({ type: '' })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            } else {
-                this.popTitle = '鏈埌璐т骇鍝佷竴瑙�';
-                initDeliveryDet({ orderId: recordId })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            }
-        } else if (outputType == 'NotArrDet') {
-            if (recordId == '1') {
-                this.popTitle = '鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�';
-                initNotArrDetAll({ type: '' })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            } else {
-                this.popTitle = '杩樻病鍙戣揣鏁伴噺';
-                initNotArrDet({ orderId: recordId })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触', result.errorMsg, 'error');
-                        }
-                    })
-            }
-
-        } else if (outputType == 'MoreThan7') {
-            if (recordId == '1') {
-                this.popTitle = '鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟';
-                initMoreThan7All({ type: '' })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触', result.errorMsg, 'error');
-                        }
-                    })
-            } else {
-                this.popTitle = '鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�';
-                initMoreThan7({ orderId: recordId })
-                    .then(result => {
-                        if (result.result == 'Success') {
-                            this.recordList = result.recordList;
-                            console.log('data:' + JSON.stringify(this.recordList));
-                            this.showPop = true;
-                        } else {
-                            this.showMyToast('鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�', result.errorMsg, 'error');
-                        }
-                    })
-            }
-        }
-    }
-
-    //鍏抽棴寮圭獥
-    closePop() {
-        this.showPop = false;
-    }
-
-    editProductLimit(event) {
-        //add by Wang Xueqin 2023/05/05
-        let url = "/lexproductlimitedit?accountid=" + this.accountId + "&userPro_Type=" + this.userPro_Type;
-        const config = {
-            type: 'standard__webPage',
-            attributes: {
-                url: url
-            }
-        };
-        this[NavigationMixin.Navigate](config);
-    }
-
-    //鏂板缓娑堣�楀搧璁㈠崟
-    newOrder() {
-        this[NavigationMixin.Navigate]({
-            type: 'standard__objectPage',
-            attributes: {
-                objectApiName: 'Consumable_order__c',
-                actionName: 'new'
-            },
-            state: {
-                useRecordTypeCheck: 1
-            }
+        .catch((error) => {
+          console.error("Error loading custom styles");
         });
     }
+  }
 
-    showMyToast(title, message, variant) {
-        console.log('show custom message');
-        var iconName = '';
-        var content = '';
-        if(variant == 'success'){
-           iconName = 'utility:check';
-        }else{
-           iconName = 'utility:error';
-        }
-        if(message != ''){
-           content = '<h2><strong>'+title+'<strong/></h2><h5>'+message+'</h5>';
-        }else{
-           content = '<h2><strong>'+title+'<strong/></h2>';
-        }
-        this.template.querySelector('c-common-toast').
-        showToast(variant,content,iconName,10000);
-        // var mode;
-        // if(this.isNoteStay){
-        //     mode ='sticky';
-        // }else{
-        //     mode = 'dismissable';
-        // }
-        // const evt = new ShowToastEvent({
-        //     title: title,
-        //     message: message,
-        //     variant: variant,
-        //     mode: mode
-        // });
-        // this.dispatchEvent(evt);
-     }
-    //鎺掑簭
-
-    sortByMethod(field, reverse, primer) {
-        const key = primer
-            ? function (x) {
-                return primer(x[field]);
-            }
-            : function (x) {
-                return x[field];
+  connectedCallback() {
+    this.loader = true;
+    this.init();
+  }
+  init() {
+    this.showSpinner = true;
+    initPage({
+      pageSizeLWC: this.pageSize,
+      pageTokenLWC: this.currentPageToken
+    })
+      .then((result) => {
+        this.isNoteStay = result.isNoteStay;
+        console.log("isNoteStay:" + result.isNoteStay);
+        if (result.result == "Success") {
+          //鍒嗛〉start
+          this.nextPageToken = result.paginatedAccounts.nextPageToken;
+          this.totalRecords = result.paginatedAccounts.totalRecords;
+          this.recordStart = result.paginatedAccounts.recordStart;
+          this.recordEnd = result.paginatedAccounts.recordEnd;
+          this.totalPages = Math.ceil(
+            result.paginatedAccounts.totalRecords / this.pageSize
+          );
+          console.log("this.totalPages = " + this.totalPages);
+          this.paginationVisibility = this.totalPages > 1 ? true : false;
+          console.log("this.sortDirection = " + this.sortDirection);
+          this.loader = false;
+          //鍒嗛〉end
+          this.title = result.title;
+          this.totalNum = result.totalNum;
+          this.orderNumberArrived = result.orderNumberArrived;
+          this.deliveryDetailCount = result.deliveryDetailCount;
+          this.orderNumberNotarrive = result.orderNumberNotarrive;
+          this.moreThanSevenDays = result.moreThanSevenDays;
+          this.raesList = result.raesList;
+          this.raesList.push({
+            Id: "1",
+            Name: "寰呮搷浣滃叆搴撹鍗曟眹鎬�",
+            Total_num__c: this.totalNum,
+            OrderNumber_arrived__c: this.orderNumberArrived,
+            Delivery_detail_count__c: this.deliveryDetailCount,
+            OrderNumber_notarrive__c: this.orderNumberNotarrive,
+            More_than_seven_days__c: this.moreThanSevenDays
+          });
+          this.column = result.column;
+          this.accountInfo = result.accountInfo;
+          this.accountId = result.accountInfo.Id;
+          this.pageRecords = result.pageRecords;
+          this.overlimitdateorderdetails = result.overlimitdateorderdetails;
+          this.over_view = result.over_view;
+          this.overlimit = result.overlimit;
+          this.hasHos = result.hasHos;
+          this.product_Limit = result.product_Limit;
+          console.log("result==>" + JSON.stringify(result));
+          for (var i in this.pageRecords) {
+            this.pageRecords[i]["Name__c"] = this.pageRecords[i].Prod.Name__c;
+            this.pageRecords[i]["Category3__c"] =
+              this.pageRecords[i].Prod.Category3__c;
+            this.pageRecords[i]["Category4__c"] =
+              this.pageRecords[i].Prod.Category3__c;
+            this.pageRecords[i]["Category5__c"] =
+              this.pageRecords[i].Prod.Category3__c;
+            this.pageRecords[i]["SFDA_Status__c"] =
+              this.pageRecords[i].Prod.SFDA_Status__c;
+          }
+          //hasHos = true 鍖婚櫌鐗逛环
+          if (this.hasHos) {
+            let object1 = {
+              label: "鍖婚櫌鐗逛环",
+              fieldName: "hospitalSpecialOffer",
+              hideDefaultActions: true,
+              type: "boolean",
+              cellAttributes: { alignment: "left" },
+              initialWidth: 75
             };
-
-        return function (a, b) {
-            a = key(a);
-            b = key(b);
-            return reverse * ((a > b) - (b > a));
-        };
-    }
-
-    onHandleSort(event) {
-        console.log("Sort");
-        this.sortBy = event.detail.fieldName;
-        this.sortDirection = event.detail.sortDirection;
-        this.currentPageToken = 0;
-        console.log('this.sortBy = ' + this.sortBy)
-        console.log('this.sortDirection = ' + this.sortDirection)
-        const { fieldName: sortedBy, sortDirection } = event.detail;
-        const cloneData = [...this.pageRecords];
-        cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
-        this.pageRecords = cloneData;
-        this.sortDirection = sortDirection;
-        this.sortedBy = sortedBy;
-    }
-    //鍒嗛〉
-    handlePaginatorChange(event) {
-        this.recordsToDisplay = event.detail.recordsToDisplay;
-        this.preSelected = event.detail.preSelected;
-        if (this.recordsToDisplay && this.recordsToDisplay > 0) {
-            this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
+            this.columns.push(object1);
+            console.log(" this.columns" + this.columns);
+            for (var j in this.pageRecords) {
+              this.pageRecords[j]["Name__c"] = this.pageRecords[j].Prod.Name__c;
+              this.pageRecords[j]["Category3__c"] =
+                this.pageRecords[j].Prod.Category3__c;
+              this.pageRecords[j]["Category4__c"] =
+                this.pageRecords[j].Prod.Category3__c;
+              this.pageRecords[j]["Category5__c"] =
+                this.pageRecords[j].Prod.Category3__c;
+              this.pageRecords[j]["SFDA_Status__c"] =
+                this.pageRecords[j].Prod.SFDA_Status__c;
+              this.pageRecords[j]["hospitalSpecialOffer__c"] =
+                this.pageRecords[j].hospitalSpecialOffer;
+            }
+          }
+          this.showTable = true;
+          if (this.product_Limit != null && this.product_Limit != "") {
+            var records = this.product_Limit.split(",");
+            for (var i in records) {
+              var parms = records[i].split("|");
+              var record = new Object();
+              record["prodName"] = parms[0];
+              record["limitLow"] = parms[1];
+              record["limitUp"] = parms[2];
+              this.productLimitRecords.push(record);
+            }
+          }
+          // this.productLimitRecords = records;
+          console.log(
+            "productLimitRecords:" + JSON.stringify(this.productLimitRecords)
+          );
+          console.log("product_Limit:" + this.product_Limit);
+          this.consumableorderdetailsRecordsview =
+            result.consumableorderdetailsRecordsview;
+          //add by WangXueqin 2023/05/05
+          this.userPro_Type = result.userPro_Type;
+          console.log("this.accountId:" + this.accountId);
+          console.log("this.accountInfo:" + JSON.stringify(this.accountInfo));
+          this.showSpinner = false;
+          this.showPage = true;
+          // this.showMyToast('鍒濆鍖栭〉闈㈡垚鍔�', '', 'success');
         } else {
-            this.rowNumberOffset = 0;
+          this.showPage = true;
+          this.showSpinner = false;
+          console.log("Error:" + result.errorMsg);
+          this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", result.errorMsg, "error");
         }
-    }
-    handlePrevious() {
-        this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
-        this.init();
-    }
+      })
+      .catch((error) => {
+        this.showSpinner = false;
+        console.log("Error:" + error);
+        this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", JSON.stringify(error), "error");
+      });
+  }
 
-    handleNext() {
-        this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
-        this.init();
+  //鐐瑰嚮閾炬帴
+  clickLick(event) {
+    var outputValue = event.detail.data.value;
+    var outputType = event.detail.data.type;
+    var recordId = event.detail.data.recordId;
+    console.log("click:" + outputValue + "---" + outputType + "---" + recordId);
+    if (outputType == "Title") {
+      const config = {
+        type: "standard__webPage",
+        attributes: {
+          url: "/lexarrivegoods?ESetId=" + recordId
+        }
+      };
+      this[NavigationMixin.Navigate](config);
+    } else if (outputType == "TotalNum") {
+      this.popTitle = "鎵�鏈変骇鍝佷竴瑙�";
+      initTotalNum({ ordId: recordId, type: "" }).then((result) => {
+        if (result.result == "Success") {
+          this.recordList = result.recordList;
+          console.log("data:" + JSON.stringify(this.recordList));
+          this.showPop = true;
+        } else {
+          this.showMyToast(
+            "鍔犺浇鎵�鏈変骇鍝佷竴瑙堥〉闈㈠け璐�",
+            result.errorMsg,
+            "error"
+          );
+        }
+      });
+    } else if (outputType == "ArrDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊凡鍒拌揣浜у搧涓�瑙�";
+        initArrDetAll({ type: "" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊凡鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "宸插埌璐т骇鍝佷竴瑙�";
+        initArrDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇宸插埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "DeliveryDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙�";
+        initDeliveryDetAll({ type: "" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊凡鍙戣揣杩樻病鍒拌揣浜у搧涓�瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "鏈埌璐т骇鍝佷竴瑙�";
+        initDeliveryDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鏈埌璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "NotArrDet") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙�";
+        initNotArrDetAll({ type: "" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夎繕娌″彂璐т骇鍝佷竴瑙堥〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "杩樻病鍙戣揣鏁伴噺";
+        initNotArrDet({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇杩樻病鍙戣揣鏁伴噺椤甸潰澶辫触",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
+    } else if (outputType == "MoreThan7") {
+      if (recordId == "1") {
+        this.popTitle = "鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟";
+        initMoreThan7All({ type: "" }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鎵�鏈夊彂璐т竷澶╄繕鏈埌璐ф暟椤甸潰澶辫触",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      } else {
+        this.popTitle = "鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁�";
+        initMoreThan7({ orderId: recordId }).then((result) => {
+          if (result.result == "Success") {
+            this.recordList = result.recordList;
+            console.log("data:" + JSON.stringify(this.recordList));
+            this.showPop = true;
+          } else {
+            this.showMyToast(
+              "鍔犺浇鍙戣揣涓冨ぉ杩樻湭鍒拌揣鏁伴〉闈㈠け璐�",
+              result.errorMsg,
+              "error"
+            );
+          }
+        });
+      }
     }
-    handleFirst() {
-        this.currentPageToken = 0;
-        this.init();
-    }
+  }
 
-    handleLast() {
-        this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-        this.init();
-    }
+  //鍏抽棴寮圭獥
+  closePop() {
+    this.showPop = false;
+  }
 
-    handlePageschange(event) {
-        console.log(event.detail);
-        this.pageSize = event.detail;
-        this.currentPageToken = 0;
-        this.init();
-    }
-    get previousButtonDisabled() {
-        return this.currentPageToken === 0;
-    }
+  editProductLimit(event) {
+    //add by Wang Xueqin 2023/05/05
+    let url =
+      "/LexProductLimitEdit?accountid=" +
+      this.accountId +
+      "&userPro_Type=" +
+      this.userPro_Type;
+    const config = {
+      type: "standard__webPage",
+      attributes: {
+        url: url
+      }
+    };
+    this[NavigationMixin.Navigate](config);
+  }
 
-    get nextButtonDisabled() {
-        return this.nextPageToken === undefined;
+  //鏂板缓娑堣�楀搧璁㈠崟
+  newOrder() {
+    this[NavigationMixin.Navigate]({
+      type: "standard__objectPage",
+      attributes: {
+        objectApiName: "Consumable_order__c",
+        actionName: "new"
+      },
+      state: {
+        useRecordTypeCheck: 1
+      }
+    });
+  }
+
+  showMyToast(title, message, variant) {
+    console.log("show custom message");
+    var iconName = "";
+    var content = "";
+    if (variant == "success") {
+      iconName = "utility:check";
+    } else {
+      iconName = "utility:error";
     }
-}
\ No newline at end of file
+    if (message != "") {
+      content =
+        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
+    } else {
+      content = "<h2><strong>" + title + "<strong/></h2>";
+    }
+    this.template
+      .querySelector("c-common-toast")
+      .showToast(variant, content, iconName, 10000);
+    // var mode;
+    // if(this.isNoteStay){
+    //     mode ='sticky';
+    // }else{
+    //     mode = 'dismissable';
+    // }
+    // const evt = new ShowToastEvent({
+    //     title: title,
+    //     message: message,
+    //     variant: variant,
+    //     mode: mode
+    // });
+    // this.dispatchEvent(evt);
+  }
+  //鎺掑簭
+
+  sortByMethod(field, reverse, primer) {
+    const key = primer
+      ? function (x) {
+          return primer(x[field]);
+        }
+      : function (x) {
+          return x[field];
+        };
+
+    return function (a, b) {
+      a = key(a);
+      b = key(b);
+      return reverse * ((a > b) - (b > a));
+    };
+  }
+
+  onHandleSort(event) {
+    console.log("Sort");
+    this.sortBy = event.detail.fieldName;
+    this.sortDirection = event.detail.sortDirection;
+    this.currentPageToken = 0;
+    console.log("this.sortBy = " + this.sortBy);
+    console.log("this.sortDirection = " + this.sortDirection);
+    const { fieldName: sortedBy, sortDirection } = event.detail;
+    const cloneData = [...this.pageRecords];
+    cloneData.sort(
+      this.sortByMethod(sortedBy, sortDirection === "asc" ? 1 : -1)
+    );
+    this.pageRecords = cloneData;
+    this.sortDirection = sortDirection;
+    this.sortedBy = sortedBy;
+  }
+  //鍒嗛〉
+  handlePaginatorChange(event) {
+    this.recordsToDisplay = event.detail.recordsToDisplay;
+    this.preSelected = event.detail.preSelected;
+    if (this.recordsToDisplay && this.recordsToDisplay > 0) {
+      this.rowNumberOffset = this.recordsToDisplay[0].rowNumber - 1;
+    } else {
+      this.rowNumberOffset = 0;
+    }
+  }
+  handlePrevious() {
+    this.currentPageToken =
+      Number(this.currentPageToken) - Number(this.pageSize);
+    this.init();
+  }
+
+  handleNext() {
+    this.currentPageToken =
+      Number(this.currentPageToken) + Number(this.pageSize);
+    this.init();
+  }
+  handleFirst() {
+    this.currentPageToken = 0;
+    this.init();
+  }
+
+  handleLast() {
+    this.currentPageToken =
+      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+    this.init();
+  }
+
+  handlePageschange(event) {
+    console.log(event.detail);
+    this.pageSize = event.detail;
+    this.currentPageToken = 0;
+    this.init();
+  }
+  get previousButtonDisabled() {
+    return this.currentPageToken === 0;
+  }
+
+  get nextButtonDisabled() {
+    return this.nextPageToken === undefined;
+  }
+}
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
index d0a5172..4854e6c 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
@@ -64,14 +64,14 @@
       type: "Name",
       sortable: true,
       hideDefaultActions: true,
-      initialWidth: 300,
+      // initialWidth: 200,
       wrapText: true,
       cellAttributes: { alignment: "left" }
     },
     {
       label: "绗笁鍒嗙被",
       fieldName: "Category3__c",
-      initialWidth: 120,
+      initialWidth: 84,
       cellAttributes: { alignment: "left" },
       hideDefaultActions: true,
       sortable: true,
@@ -81,7 +81,7 @@
       label: "绗洓鍒嗙被",
       fieldName: "Category4__c",
       cellAttributes: { alignment: "left" },
-      initialWidth: 120,
+      initialWidth: 84,
       hideDefaultActions: true,
       wrapText: true,
       sortable: true
@@ -90,7 +90,7 @@
       label: "绗簲鍒嗙被",
       fieldName: "Category5__c",
       cellAttributes: { alignment: "left" },
-      initialWidth: 120,
+      initialWidth: 84,
       hideDefaultActions: true,
       wrapText: true,
       sortable: true
@@ -100,7 +100,7 @@
       label: "瑙勬牸",
       fieldName: "packing_list",
       cellAttributes: { alignment: "right" },
-      initialWidth: 55,
+      initialWidth: 50,
       wrapText: true,
       hideDefaultActions: true
     },
@@ -108,7 +108,7 @@
       label: "鍗曚綅",
       fieldName: "BoxPiece",
       cellAttributes: { alignment: "left" },
-      initialWidth: 55,
+      initialWidth: 50,
       wrapText: true,
       hideDefaultActions: true
     },
@@ -117,7 +117,7 @@
       fieldName: "approbation_No",
       cellAttributes: { alignment: "left" },
       wrapText: true,
-      initialWidth: 200,
+      initialWidth: 104,
       hideDefaultActions: true
     },
     {
@@ -126,13 +126,13 @@
       cellAttributes: { alignment: "left" },
       wrapText: true,
       hideDefaultActions: true,
-      initialWidth: 110
+      initialWidth: 95
     },
     {
       label: "CFDA鐘舵��",
       fieldName: "SFDA_Status__c",
       cellAttributes: { alignment: "left" },
-      initialWidth: 95,
+      initialWidth: 84,
       wrapText: true,
       hideDefaultActions: true
     },
@@ -156,7 +156,7 @@
         boxPrice: { fieldName: "BoxPiece" }
       },
       hideDefaultActions: true,
-      initialWidth: 150
+      initialWidth: 120
     },
 
     {
diff --git a/manifest/package.xml b/manifest/package.xml
index 052747c..52e4572 100644
--- a/manifest/package.xml
+++ b/manifest/package.xml
@@ -1,12 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
-        <members>lexConsumable</members>
+        <members>lexSaleAndDelivery</members>
         <name>LightningComponentBundle</name>
     </types>
-    <types>
-        <members>lexdatatable</members>
-        <name>StaticResource</name>
-    </types> 
     <version>52.0</version>
 </Package>

--
Gitblit v1.9.1