From a046b3fe914e46147334d33bbdcb21e2759a3c43 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期四, 13 七月 2023 12:03:33 +0800
Subject: [PATCH] backup0712

---
 force-app/main/default/lwc/lexConsumable/lexConsumable.html             | 1911 +++---
 .sf/config.json                                                         |    2 
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css          |   54 
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html         | 2583 +++-----
 force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js           | 5262 ++++++++---------
 force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html |  556 
 force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js | 1643 +++--
 force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js   | 1352 ++--
 force-app/main/default/lwc/lexConsumable/lexConsumable.js               | 3381 ++++++-----
 9 files changed, 8,119 insertions(+), 8,625 deletions(-)

diff --git a/.sf/config.json b/.sf/config.json
index 4c476fc..090aeab 100644
--- a/.sf/config.json
+++ b/.sf/config.json
@@ -1,3 +1,3 @@
 {
   "target-org": "OlympusProd"
-}
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.html b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
index 60b46d7..0b6d4b0 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.html
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
@@ -1,191 +1,196 @@
 <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">
-        <!-- 鎸夐挳 -->
-        <template if:true={showEditBtn}>
-          <!-- <lightning-button style="margin: 5px;" label="缂栬緫" disabled={disabledEditBtn} onclick={editOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            disabled={disabledEditBtn}
-            onclick={editOrder}
-          >
-            缂栬緫
-          </button>
-        </template>
-        <template if:true={showPrintSheetBtn}>
-          <!-- <lightning-button style="margin: 5px;" label="鎵撳嵃閰嶇疆鍗�" onclick={printOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="鎵撳嵃閰嶇疆鍗�"
-            onclick={printOrder}
-          >
-            鎵撳嵃閰嶇疆鍗�
-          </button>
-        </template>
-        <template if:true={showUploadSheetBtn}>
-          <!-- <lightning-button style="margin: 5px;" label="涓婁紶閰嶇疆鍗�" disabled={disabledUploadSheetBtn} onclick={uploadOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="涓婁紶閰嶇疆鍗�"
-            disabled={disabledUploadSheetBtn}
-            onclick={uploadOrder}
-          >
-            涓婁紶閰嶇疆鍗�
-          </button>
-        </template>
-        <template if:true={showSubOrderbtn}>
-          <!-- <lightning-button style="margin: 5px;" label="鎻愪氦璁㈠崟" disabled={disabledSubOrderbtn} onclick={submitOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="鎻愪氦璁㈠崟"
-            disabled={disabledSubOrderbtn}
-            onclick={submitOrder}
-          >
-            鎻愪氦璁㈠崟
-          </button>
-        </template>
-        <template if:true={showSaveOrderbtn1}>
-          <!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={saveOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="淇濆瓨璁㈠崟"
-            onclick={saveOrder}
-          >
-            淇濆瓨璁㈠崟
-          </button>
-        </template>
-        <template if:true={showSaveOrderbtn2}>
-          <!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={orderCopy}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="淇濆瓨璁㈠崟"
-            onclick={orderCopy}
-          >
-            淇濆瓨璁㈠崟
-          </button>
-        </template>
-        <template if:true={showDeleteBtn}>
-          <!-- <lightning-button style="margin: 5px;" label="鍒犻櫎" disabled={disabledDeleteBtn} onclick={deleteOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="鍒犻櫎"
-            disabled={disabledDeleteBtn}
-            onclick={deleteOrder}
-          >
-            鍒犻櫎
-          </button>
-        </template>
-        <!-- <template if:true={showOfferPriceInputBtn}>
+    <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">
+                <!-- 鎸夐挳 -->
+                <template if:true={showEditBtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="缂栬緫" disabled={disabledEditBtn} onclick={editOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        disabled={disabledEditBtn}
+                        onclick={editOrder}
+                    >
+                        缂栬緫
+                    </button>
+                </template>
+                <template if:true={showPrintSheetBtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="鎵撳嵃閰嶇疆鍗�" onclick={printOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="鎵撳嵃閰嶇疆鍗�"
+                        onclick={printOrder}
+                    >
+                        鎵撳嵃閰嶇疆鍗�
+                    </button>
+                </template>
+                <template if:true={showUploadSheetBtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="涓婁紶閰嶇疆鍗�" disabled={disabledUploadSheetBtn} onclick={uploadOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="涓婁紶閰嶇疆鍗�"
+                        disabled={disabledUploadSheetBtn}
+                        onclick={uploadOrder}
+                    >
+                        涓婁紶閰嶇疆鍗�
+                    </button>
+                </template>
+                <template if:true={showSubOrderbtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="鎻愪氦璁㈠崟" disabled={disabledSubOrderbtn} onclick={submitOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="鎻愪氦璁㈠崟"
+                        disabled={disabledSubOrderbtn}
+                        onclick={submitOrder}
+                    >
+                        鎻愪氦璁㈠崟
+                    </button>
+                </template>
+                <template if:true={showSaveOrderbtn1}>
+                    <!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={saveOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="淇濆瓨璁㈠崟"
+                        onclick={saveOrder}
+                    >
+                        淇濆瓨璁㈠崟
+                    </button>
+                </template>
+                <template if:true={showSaveOrderbtn2}>
+                    <!-- <lightning-button style="margin: 5px;" label="淇濆瓨璁㈠崟" onclick={orderCopy}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="淇濆瓨璁㈠崟"
+                        onclick={orderCopy}
+                    >
+                        淇濆瓨璁㈠崟
+                    </button>
+                </template>
+                <template if:true={showDeleteBtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="鍒犻櫎" disabled={disabledDeleteBtn} onclick={deleteOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="鍒犻櫎"
+                        disabled={disabledDeleteBtn}
+                        onclick={deleteOrder}
+                    >
+                        鍒犻櫎
+                    </button>
+                </template>
+                <!-- <template if:true={showOfferPriceInputBtn}>
                     <lightning-button style="margin: 5px;" label="鐗逛环閲戦褰曞叆" disabled={disabledOfferPriceInputBtn} onclick={inputOfferPrice}></lightning-button>
                     <lightning-button style="margin: 5px;" label="鐗逛环閲戦褰曞叆" disabled={disabledOfferPriceInputBtn} onclick={inputOfferPrice}></lightning-button>
                 </template> -->
-        <template if:true={showReapplyBtn}>
-          <!-- <lightning-button style="margin: 5px;" label="鍐嶇敵璇�" onclick={reapplyOrder}></lightning-button> -->
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            style="margin: 5px"
-            label="鍐嶇敵璇�"
-            onclick={reapplyOrder}
-          >
-            鍐嶇敵璇�
-          </button>
-        </template>
-        <p style="height: 10px"></p>
-        <!-- 璁㈠崟淇℃伅 -->
-        <template if:false={editAble}>
-          <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-record-view-form
-                record-id={cocId}
-                object-api-name="Consumable_order__c"
-              >
-                <table style="width: 100%">
-                  <tbody>
-                    <tr>
-                      <td style="width: 10%"></td>
-                      <td style="width: 40%">
-                        <lightning-output-field
-                          class="outputfont"
-                          field-name="Name"
-                        ></lightning-output-field>
-                      </td>
-                      <td style="width: 40%">
-                        <lightning-output-field
-                          field-name="Order_status__c"
-                        ></lightning-output-field>
-                      </td>
-                      <td style="width: 10%"></td>
-                    </tr>
-                    <tr>
-                      <td></td>
-                      <td>
-                        <template if:false={editAble}>
-                          <lightning-output-field
-                            field-name="Total_amount__c"
-                          ></lightning-output-field>
-                        </template>
-                      </td>
-                      <td>
-                        <!-- <div class="slds-grid slds-grid_vertical-align-center">
+                <template if:true={showReapplyBtn}>
+                    <!-- <lightning-button style="margin: 5px;" label="鍐嶇敵璇�" onclick={reapplyOrder}></lightning-button> -->
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        style="margin: 5px"
+                        label="鍐嶇敵璇�"
+                        onclick={reapplyOrder}
+                    >
+                        鍐嶇敵璇�
+                    </button>
+                </template>
+                <p style="height: 10px"></p>
+                <!-- 璁㈠崟淇℃伅 -->
+                <template if:false={editAble}>
+                    <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-record-view-form
+                                record-id={cocId}
+                                object-api-name="Consumable_order__c"
+                            >
+                                <table style="width: 100%">
+                                    <tbody>
+                                        <tr>
+                                            <td style="width: 10%"></td>
+                                            <td style="width: 40%">
+                                                <lightning-output-field
+                                                    class="outputfont"
+                                                    field-name="Name"
+                                                ></lightning-output-field>
+                                            </td>
+                                            <td style="width: 40%">
+                                                <lightning-output-field
+                                                    field-name="Order_status__c"
+                                                ></lightning-output-field>
+                                            </td>
+                                            <td style="width: 10%"></td>
+                                        </tr>
+                                        <tr>
+                                            <td></td>
+                                            <td>
+                                                <template if:false={editAble}>
+                                                    <lightning-output-field
+                                                        field-name="Total_amount__c"
+                                                    ></lightning-output-field>
+                                                </template>
+                                            </td>
+                                            <td>
+                                                <!-- <div class="slds-grid slds-grid_vertical-align-center">
                                                     <div class="slds-form-element__label"><lightning-formatted-text value={contractLabel}></lightning-formatted-text>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</div>
                                                     <lightning-formatted-text value={contractName}></lightning-formatted-text>
                                                 </div> -->
-                        <!-- style="pointer-events: none;" -->
-                        <lightning-output-field
-                          class="showContract"
-                          field-name="Order_effective_contact__c"
-                        ></lightning-output-field>
-                      </td>
-                      <!-- <td>鍚堝悓锛�<lightning-formatted-text value={coc.Order_effective_contact__r.Name}></lightning-formatted-text></td> -->
-                      <td></td>
-                    </tr>
-                    <tr>
-                      <td></td>
-                      <!-- <td>
+                                                <!-- style="pointer-events: none;" -->
+                                                <lightning-output-field
+                                                    class="showContract"
+                                                    field-name="Order_effective_contact__c"
+                                                ></lightning-output-field>
+                                            </td>
+                                            <!-- <td>鍚堝悓锛�<lightning-formatted-text value={coc.Order_effective_contact__r.Name}></lightning-formatted-text></td> -->
+                                            <td></td>
+                                        </tr>
+                                        <tr>
+                                            <td></td>
+                                            <!-- <td>
                                                 <template if:false={edoffersPrice}>
                                                     <lightning-output-field id="sumPrice_buttom1" field-name="Offers_Price__c"></lightning-output-field>
                                                 </template>
@@ -193,16 +198,18 @@
                                                     <lightning-input label="鐗逛环鎬婚噾棰�" variant="label-inline" id="sumPrice_buttom2" value={coc.Offers_Price__c} onchange={offerPriceChange}></lightning-input>
                                                 </template>
                                             </td> -->
-                      <td>
-                        <template if:true={showAttUploadDate}>
-                          <lightning-output-field
-                            field-name="Consumable_pdf_insert_day__c"
-                          ></lightning-output-field>
-                        </template>
-                      </td>
-                      <td></td>
-                    </tr>
-                    <!-- <tr>
+                                            <td>
+                                                <template
+                                                    if:true={showAttUploadDate}
+                                                >
+                                                    <lightning-output-field
+                                                        field-name="Consumable_pdf_insert_day__c"
+                                                    ></lightning-output-field>
+                                                </template>
+                                            </td>
+                                            <td></td>
+                                        </tr>
+                                        <!-- <tr>
                                             <td></td>
                                             <td>
                                                 <template if:true={showAttUploadDate}>
@@ -212,103 +219,119 @@
                                             <td></td>
                                             <td></td>
                                         </tr> -->
-                    <tr>
-                      <td></td>
-                      <td>
-                        <template if:true={showOrderDate}>
-                          <lightning-output-field
-                            field-name="Order_date__c"
-                          ></lightning-output-field>
-                        </template>
-                      </td>
-                      <td></td>
-                      <td></td>
-                    </tr>
-                    <tr>
-                      <td></td>
-                      <td colspan="2">
-                        <lightning-card
-                          class="attListTitle"
-                          variant="Narrow"
-                          title="闄勪欢鍒楄〃"
-                          icon-name="utility:attach"
-                        >
-                          <lightning-layout slot="footer" multiple-rows="true">
-                            <template
-                              for:each={attachmentRecoeds}
-                              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.fileFullName}
-                                  style="margin-left: 20px"
-                                  icon-name="doctype:gform"
-                                  alternative-text={item.fileFullName}
-                                  size="large"
-                                ></lightning-icon
-                                ><br />
-                                <!-- <span style="word-wrap:break-word; word-break:break-all;width:80px;display:flex;" title={item.fileFullName}>
+                                        <tr>
+                                            <td></td>
+                                            <td>
+                                                <template
+                                                    if:true={showOrderDate}
+                                                >
+                                                    <lightning-output-field
+                                                        field-name="Order_date__c"
+                                                    ></lightning-output-field>
+                                                </template>
+                                            </td>
+                                            <td></td>
+                                            <td></td>
+                                        </tr>
+                                        <tr>
+                                            <td></td>
+                                            <td colspan="2">
+                                                <lightning-card
+                                                    class="attListTitle"
+                                                    variant="Narrow"
+                                                    title="闄勪欢鍒楄〃"
+                                                    icon-name="utility:attach"
+                                                >
+                                                    <lightning-layout
+                                                        slot="footer"
+                                                        multiple-rows="true"
+                                                    >
+                                                        <template
+                                                            for:each={attachmentRecoeds}
+                                                            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.fileFullName}
+                                                                    style="
+                                                                        margin-left: 20px;
+                                                                    "
+                                                                    icon-name="doctype:gform"
+                                                                    alternative-text={item.fileFullName}
+                                                                    size="large"
+                                                                ></lightning-icon
+                                                                ><br />
+                                                                <!-- <span style="word-wrap:break-word; word-break:break-all;width:80px;display:flex;" title={item.fileFullName}>
                                                                     {item.fileName}
                                                                 </span> -->
-                                <div
-                                  title={item.fileFullName}
-                                  style="
-                                    width: 100px;
-                                    text-overflow: ellipsis;
-                                    overflow: hidden;
-                                    white-space: nowrap;
-                                  "
-                                >
-                                  {item.fileName}
-                                </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.recordId}
-                                    onclick={deleteAtt}
-                                  >
-                                    鍒犻櫎
-                                  </a>
-                                </p>
-                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
-                              </lightning-layout-item>
-                            </template>
-                          </lightning-layout>
-                        </lightning-card>
-                      </td>
-                      <td></td>
-                    </tr>
-                  </tbody>
-                </table>
-              </lightning-record-view-form>
-            </div>
-          </div>
-        </template>
-        <!-- searchBlock -->
-        <template if:true={editAble}>
-          <div
-            style="
-              border: 1px solid #d4d4d4;
-              border-top: 3px solid #51606e;
-              border-radius: 5px;
-              margin-bottom: 7px;
-            "
-          >
-            <div style="padding: 10px">
-              <table>
-                <tbody>
-                  <!-- <tr>
+                                                                <div
+                                                                    title={item.fileFullName}
+                                                                    style="
+                                                                        width: 100px;
+                                                                        text-overflow: ellipsis;
+                                                                        overflow: hidden;
+                                                                        white-space: nowrap;
+                                                                    "
+                                                                >
+                                                                    {item.fileName}
+                                                                </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.recordId}
+                                                                        onclick={deleteAtt}
+                                                                    >
+                                                                        鍒犻櫎
+                                                                    </a>
+                                                                </p>
+                                                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
+                                                            </lightning-layout-item>
+                                                        </template>
+                                                    </lightning-layout>
+                                                </lightning-card>
+                                            </td>
+                                            <td></td>
+                                        </tr>
+                                    </tbody>
+                                </table>
+                            </lightning-record-view-form>
+                        </div>
+                    </div>
+                </template>
+                <!-- searchBlock -->
+                <template if:true={editAble}>
+                    <div
+                        style="
+                            border: 1px solid #d4d4d4;
+                            border-top: 3px solid #51606e;
+                            border-radius: 5px;
+                            margin-bottom: 7px;
+                        "
+                    >
+                        <div style="padding: 10px">
+                            <table>
+                                <tbody>
+                                    <!-- <tr>
                                         <td style="width: 100px;">
                                             <div style="color:#696969;font-size:16px;"><span style="color: red;">*&nbsp;</span>鍚堝悓</div>
                                         </td>
@@ -338,309 +361,365 @@
                                             <button class="slds-button slds-button_neutral slds-button_stretch lexclearStyle" style="width:80px;height:32px;" label="娓呯┖" onclick={clear}>娓呯┖</button>
                                         </td>
                                     </tr> -->
-                  <!-- <tr style="height: 10px;"></tr> -->
-                  <tr>
-                    <td>
-                      <div style="color: #696969; font-size: 16px">
-                        娑堣�楀搧鍚嶇О
-                      </div>
-                    </td>
-                    <td>
-                      <lightning-input
-                        class="inputFont"
-                        variant="label-hidden"
-                        label="娑堣�楀搧鍚嶇О"
-                        value={category1}
-                        onchange={category1Change}
-                      ></lightning-input>
-                    </td>
-                    <td></td>
-                    <td>
-                      <div style="color: #696969; font-size: 16px">绗�3鍒嗙被</div>
-                    </td>
-                    <td>
-                      <lightning-combobox
-                        class="inputFont"
-                        variant="label-hidden"
-                        label="绗�3鍒嗙被"
-                        value={category3}
-                        options={category3Option}
-                        onchange={category3Change}
-                      ></lightning-combobox>
-                    </td>
-                    <td style="width: 30px"></td>
-                    <td style="width: 66px">
-                      <div style="color: #696969; font-size: 16px">绗�4鍒嗙被</div>
-                    </td>
-                    <td>
-                      <lightning-combobox
-                        class="inputFont"
-                        variant="label-hidden"
-                        label="绗�4鍒嗙被"
-                        value={category4}
-                        options={category4Option}
-                        onchange={category4Change}
-                      ></lightning-combobox>
-                    </td>
-                    <td></td>
-                    <td style="width: 66px">
-                      <div style="color: #696969; font-size: 16px">绗�5鍒嗙被</div>
-                    </td>
-                    <td style="width: 160px">
-                      <lightning-combobox
-                        class="inputFont"
-                        variant="label-hidden"
-                        label="绗�5鍒嗙被"
-                        value={category5}
-                        options={category5Option}
-                        onchange={category5Change}
-                      ></lightning-combobox>
-                    </td>
-                  </tr>
-                  <tr style="height: 10px"></tr>
-                  <tr>
-                    <td style="width: 100px">
-                      <div style="color: #696969; font-size: 16px">
-                        <span style="color: red">*&nbsp;</span>鍚堝悓
-                      </div>
-                    </td>
-                    <td style="width: 320px">
-                      <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
-                          class="inputFont"
-                          variant="label-hidden"
-                          label="鍚堝悓"
-                          placeholder="璇烽�夋嫨鍚堝悓"
-                          value={contractName}
-                          onchange={changeCon}
-                          onclick={showSearchCon}
-                        ></lightning-input>
-                      </div>
-                    </td>
-                    <td style="width: 30px"></td>
-                    <td style="width: 66px">
-                      <template if:true={showHospital}>
-                        <div style="color: #696969; font-size: 16px">
-                          <span style="color: red">*&nbsp;</span>鍖婚櫌
+                                    <!-- <tr style="height: 10px;"></tr> -->
+                                    <tr>
+                                        <td>
+                                            <div
+                                                style="
+                                                    color: #696969;
+                                                    font-size: 16px;
+                                                "
+                                            >
+                                                娑堣�楀搧鍚嶇О
+                                            </div>
+                                        </td>
+                                        <td>
+                                            <lightning-input
+                                                class="inputFont"
+                                                variant="label-hidden"
+                                                label="娑堣�楀搧鍚嶇О"
+                                                value={category1}
+                                                onchange={category1Change}
+                                            ></lightning-input>
+                                        </td>
+                                        <td></td>
+                                        <td>
+                                            <div
+                                                style="
+                                                    color: #696969;
+                                                    font-size: 16px;
+                                                "
+                                            >
+                                                绗�3鍒嗙被
+                                            </div>
+                                        </td>
+                                        <td>
+                                            <lightning-combobox
+                                                class="inputFont"
+                                                variant="label-hidden"
+                                                label="绗�3鍒嗙被"
+                                                value={category3}
+                                                options={category3Option}
+                                                onchange={category3Change}
+                                            ></lightning-combobox>
+                                        </td>
+                                        <td style="width: 30px"></td>
+                                        <td style="width: 66px">
+                                            <div
+                                                style="
+                                                    color: #696969;
+                                                    font-size: 16px;
+                                                "
+                                            >
+                                                绗�4鍒嗙被
+                                            </div>
+                                        </td>
+                                        <td>
+                                            <lightning-combobox
+                                                class="inputFont"
+                                                variant="label-hidden"
+                                                label="绗�4鍒嗙被"
+                                                value={category4}
+                                                options={category4Option}
+                                                onchange={category4Change}
+                                            ></lightning-combobox>
+                                        </td>
+                                        <td></td>
+                                        <td style="width: 66px">
+                                            <div
+                                                style="
+                                                    color: #696969;
+                                                    font-size: 16px;
+                                                "
+                                            >
+                                                绗�5鍒嗙被
+                                            </div>
+                                        </td>
+                                        <td style="width: 160px">
+                                            <lightning-combobox
+                                                class="inputFont"
+                                                variant="label-hidden"
+                                                label="绗�5鍒嗙被"
+                                                value={category5}
+                                                options={category5Option}
+                                                onchange={category5Change}
+                                            ></lightning-combobox>
+                                        </td>
+                                    </tr>
+                                    <tr style="height: 10px"></tr>
+                                    <tr>
+                                        <td style="width: 100px">
+                                            <div
+                                                style="
+                                                    color: #696969;
+                                                    font-size: 16px;
+                                                "
+                                            >
+                                                <span style="color: red"
+                                                    >*&nbsp;</span
+                                                >鍚堝悓
+                                            </div>
+                                        </td>
+                                        <td style="width: 320px">
+                                            <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
+                                                    class="inputFont"
+                                                    variant="label-hidden"
+                                                    label="鍚堝悓"
+                                                    placeholder="璇烽�夋嫨鍚堝悓"
+                                                    value={contractName}
+                                                    onchange={changeCon}
+                                                    onclick={showSearchCon}
+                                                ></lightning-input>
+                                            </div>
+                                        </td>
+                                        <td style="width: 30px"></td>
+                                        <td style="width: 66px">
+                                            <template if:true={showHospital}>
+                                                <div
+                                                    style="
+                                                        color: #696969;
+                                                        font-size: 16px;
+                                                    "
+                                                >
+                                                    <span style="color: red"
+                                                        >*&nbsp;</span
+                                                    >鍖婚櫌
+                                                </div>
+                                            </template>
+                                        </td>
+                                        <td
+                                            colspan="4"
+                                            style="
+                                                padding-bottom: 5px;
+                                                padding-top: 5px;
+                                            "
+                                        >
+                                            <template if:true={showHospital}>
+                                                <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
+                                                        class="inputFont"
+                                                        variant="label-hidden"
+                                                        label="鍖婚櫌"
+                                                        placeholder="璇烽�夋嫨鍖婚櫌"
+                                                        value={hospitalName}
+                                                        onclick={showSearchHos}
+                                                        onchange={changeHos}
+                                                    ></lightning-input>
+                                                </div>
+                                            </template>
+                                        </td>
+                                        <td style="width: 30px"></td>
+                                        <td colspan="2">
+                                            <button
+                                                class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                                                style="
+                                                    width: 130px;
+                                                    height: 32px;
+                                                    margin-right: 10px;
+                                                "
+                                                label="娑堣�楀搧鎼滅储"
+                                                onclick={searchProduct}
+                                            >
+                                                娑堣�楀搧鎼滅储
+                                            </button>
+                                            <button
+                                                class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                                                style="
+                                                    width: 80px;
+                                                    height: 32px;
+                                                "
+                                                label="娓呯┖"
+                                                onclick={clear}
+                                            >
+                                                娓呯┖
+                                            </button>
+                                        </td>
+                                    </tr>
+                                </tbody>
+                            </table>
                         </div>
-                      </template>
-                    </td>
-                    <td
-                      colspan="4"
-                      style="padding-bottom: 5px; padding-top: 5px"
+                    </div>
+                </template>
+                <!-- 璀﹀憡鎻愰啋 -->
+                <template if:true={hasWarning}>
+                    <div
+                        style="
+                            border: 1px solid #d4d4d4;
+                            border-radius: 5px;
+                            margin-bottom: 7px;
+                        "
                     >
-                      <template if:true={showHospital}>
                         <div
-                          class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
+                            style="
+                                border-bottom: 1px solid #d4d4d4;
+                                border-radius: 5px;
+                                margin-bottom: 7px;
+                                color: #ff6a00;
+                                font-size: 17px;
+                            "
                         >
-                          <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
-                            class="inputFont"
-                            variant="label-hidden"
-                            label="鍖婚櫌"
-                            placeholder="璇烽�夋嫨鍖婚櫌"
-                            value={hospitalName}
-                            onclick={showSearchHos}
-                            onchange={changeHos}
-                          ></lightning-input>
+                            <lightning-icon
+                                style="margin: 3px"
+                                icon-name="utility:warning"
+                                size="small"
+                            ></lightning-icon>
+                            <strong>&nbsp;&nbsp;&nbsp;璀﹀憡</strong>
                         </div>
-                      </template>
-                    </td>
-                    <td style="width: 30px"></td>
-                    <td colspan="2">
-                      <button
-                        class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-                        style="width: 130px; height: 32px; margin-right: 10px"
-                        label="娑堣�楀搧鎼滅储"
-                        onclick={searchProduct}
-                      >
-                        娑堣�楀搧鎼滅储
-                      </button>
-                      <button
-                        class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-                        style="width: 80px; height: 32px"
-                        label="娓呯┖"
-                        onclick={clear}
-                      >
-                        娓呯┖
-                      </button>
-                    </td>
-                  </tr>
-                </tbody>
-              </table>
+                        <template for:each={warningMsgs} for:item="msg">
+                            <p
+                                key={msg}
+                                style="
+                                    color: #ff6a00;
+                                    padding-left: 7px;
+                                    font-size: 16px;
+                                    margin-bottom: 7px;
+                                "
+                            >
+                                &nbsp;&nbsp;&nbsp;銉�&nbsp;{msg}
+                            </p>
+                        </template>
+                    </div>
+                </template>
+                <!-- 鎶ラ敊鎻愰啋 -->
+                <template if:true={hasError}>
+                    <div
+                        style="
+                            border: 1px solid #d4d4d4;
+                            border-radius: 5px;
+                            margin-bottom: 7px;
+                        "
+                    >
+                        <div
+                            style="
+                                border-bottom: 1px solid #d4d4d4;
+                                border-radius: 5px;
+                                margin-bottom: 7px;
+                                color: red;
+                                font-size: 17px;
+                            "
+                        >
+                            <lightning-icon
+                                style="margin: 3px"
+                                icon-name="utility:error"
+                                size="small"
+                            ></lightning-icon>
+                            <strong>&nbsp;&nbsp;&nbsp;閿欒</strong>
+                        </div>
+                        <template for:each={errorMsgs} for:item="msg">
+                            <p
+                                key={msg}
+                                style="
+                                    color: red;
+                                    padding-left: 7px;
+                                    font-size: 16px;
+                                    margin-bottom: 7px;
+                                "
+                            >
+                                &nbsp;&nbsp;&nbsp;銉�&nbsp;{msg}
+                            </p>
+                        </template>
+                    </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>
+                            <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">
+                        <template if:true={editAble}>
+                            <c-lex-custom-lightning-datatable
+                                class="wrapped-header-datatable"
+                                style="
+                                    word-wrap: break-word;
+                                    word-break: break-all;
+                                "
+                                key-field="recordId"
+                                data={currentRecord}
+                                columns={cols}
+                                selected-rows={selectRows}
+                                onrowselection={checkRows}
+                                onchangevalue={conCountChange}
+                                onvalueblur={conCountBlur}
+                                default-sort-direction="asc"
+                                sorted-direction={sortDirection}
+                                sorted-by={sortedBy}
+                                onsort={onHandleSort}
+                            ></c-lex-custom-lightning-datatable>
+                            <c-paginator
+                                onprevious={prePageClick}
+                                onnext={nextPageClick}
+                                onpageschange={pageSizeChange}
+                                onfirst={goFirstPage}
+                                onlast={goLastPage}
+                                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}>
+                            <c-lex-custom-lightning-datatable
+                                class="wrapped-header-datatable"
+                                style="
+                                    word-wrap: break-word;
+                                    word-break: break-all;
+                                "
+                                hide-checkbox-column
+                                key-field="recordId"
+                                data={consumableorderdetailsRecordsview}
+                                columns={cols}
+                            ></c-lex-custom-lightning-datatable>
+                            <c-paginator
+                                onprevious={prePageClick}
+                                onnext={nextPageClick}
+                                onpageschange={pageSizeChange}
+                                onfirst={goFirstPage}
+                                onlast={goLastPage}
+                                page-size-options={pageSizeOptions}
+                                previous-button-disabled={previousButtonDisabled}
+                                next-button-disabled={nextButtonDisabled}
+                                record-start={recordStart}
+                                record-end={recordEnd}
+                                total-records={totalRecords}
+                            ></c-paginator>
+                        </template>
+                    </div>
+                </div>
             </div>
-          </div>
-        </template>
-        <!-- 璀﹀憡鎻愰啋 -->
-        <template if:true={hasWarning}>
-          <div
-            style="
-              border: 1px solid #d4d4d4;
-              border-radius: 5px;
-              margin-bottom: 7px;
-            "
-          >
-            <div
-              style="
-                border-bottom: 1px solid #d4d4d4;
-                border-radius: 5px;
-                margin-bottom: 7px;
-                color: #ff6a00;
-                font-size: 17px;
-              "
-            >
-              <lightning-icon
-                style="margin: 3px"
-                icon-name="utility:warning"
-                size="small"
-              ></lightning-icon>
-              <strong>&nbsp;&nbsp;&nbsp;璀﹀憡</strong>
-            </div>
-            <template for:each={warningMsgs} for:item="msg">
-              <p
-                key={msg}
-                style="
-                  color: #ff6a00;
-                  padding-left: 7px;
-                  font-size: 16px;
-                  margin-bottom: 7px;
-                "
-              >
-                &nbsp;&nbsp;&nbsp;銉�&nbsp;{msg}
-              </p>
-            </template>
-          </div>
-        </template>
-        <!-- 鎶ラ敊鎻愰啋 -->
-        <template if:true={hasError}>
-          <div
-            style="
-              border: 1px solid #d4d4d4;
-              border-radius: 5px;
-              margin-bottom: 7px;
-            "
-          >
-            <div
-              style="
-                border-bottom: 1px solid #d4d4d4;
-                border-radius: 5px;
-                margin-bottom: 7px;
-                color: red;
-                font-size: 17px;
-              "
-            >
-              <lightning-icon
-                style="margin: 3px"
-                icon-name="utility:error"
-                size="small"
-              ></lightning-icon>
-              <strong>&nbsp;&nbsp;&nbsp;閿欒</strong>
-            </div>
-            <template for:each={errorMsgs} for:item="msg">
-              <p
-                key={msg}
-                style="
-                  color: red;
-                  padding-left: 7px;
-                  font-size: 16px;
-                  margin-bottom: 7px;
-                "
-              >
-                &nbsp;&nbsp;&nbsp;銉�&nbsp;{msg}
-              </p>
-            </template>
-          </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>
-              <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">
-            <template if:true={editAble}>
-              <c-lex-custom-lightning-datatable
-                class="wrapped-header-datatable"
-                style="word-wrap: break-word; word-break: break-all"
-                key-field="recordId"
-                data={currentRecord}
-                columns={cols}
-                selected-rows={selectRows}
-                onrowselection={checkRows}
-                onchangevalue={conCountChange}
-                onvalueblur={conCountBlur}
-                default-sort-direction="asc"
-                sorted-direction={sortDirection}
-                sorted-by={sortedBy}
-                onsort={onHandleSort}
-              ></c-lex-custom-lightning-datatable>
-              <c-paginator
-                onprevious={prePageClick}
-                onnext={nextPageClick}
-                onpageschange={pageSizeChange}
-                onfirst={goFirstPage}
-                onlast={goLastPage}
-                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}>
-              <c-lex-custom-lightning-datatable
-                class="wrapped-header-datatable"
-                style="word-wrap: break-word; word-break: break-all"
-                hide-checkbox-column
-                key-field="recordId"
-                data={consumableorderdetailsRecordsview}
-                columns={cols}
-              ></c-lex-custom-lightning-datatable>
-              <c-paginator
-                onprevious={prePageClick}
-                onnext={nextPageClick}
-                onpageschange={pageSizeChange}
-                onfirst={goFirstPage}
-                onlast={goLastPage}
-                page-size-options={pageSizeOptions}
-                previous-button-disabled={previousButtonDisabled}
-                next-button-disabled={nextButtonDisabled}
-                record-start={recordStart}
-                record-end={recordEnd}
-                total-records={totalRecords}
-              ></c-paginator>
-            </template>
-          </div>
         </div>
-      </div>
-    </div>
-    <!-- 闄勪欢 -->
-    <!-- <template if:false={editAble}>
+        <!-- 闄勪欢 -->
+        <!-- <template if:false={editAble}>
             <div style="border: 1px solid #D4D4D4;border-top: 3px solid #51606E;border-radius:5px;margin-top:10px;">
                 <div style="border-bottom: 1px solid #D4D4D4;padding:3px;">
                     <lightning-layout>
@@ -656,332 +735,366 @@
                 </div>
             </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}
+        <!-- 涓婁紶闄勪欢寮圭獥 -->
+        <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"
             >
-              <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"
-          >
-            <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 if:true={showPopSpinner}>
+                    <lightning-spinner
+                        size="medium"
+                        variant="brand"
+                    ></lightning-spinner>
                 </template>
-              </p>
-            </div>
-          </div>
-          <footer class="slds-modal__footer">
-            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closePop}></lightning-button>
+                <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"
+                        >
+                            涓婁紶閰嶇疆鍗�
+                        </h2>
+                    </header>
+                    <div
+                        class="slds-modal__content slds-p-around_medium"
+                        id="modal-content-id-1"
+                        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={uploadAtt}></lightning-button> -->
-            <button
-              class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-              style="margin-left: 10px"
-              variant="neutral"
-              label="鍙栨秷"
-              onclick={closePop}
+                        <button
+                            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                            style="margin-left: 10px"
+                            variant="neutral"
+                            label="鍙栨秷"
+                            onclick={closePop}
+                        >
+                            鍙栨秷
+                        </button>
+                        <button
+                            class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                            style="margin-left: 10px"
+                            variant="neutral"
+                            label="涓婁紶"
+                            onclick={uploadAtt}
+                        >
+                            涓婁紶
+                        </button>
+                    </footer>
+                </div>
+            </section>
+            <div class="slds-backdrop slds-backdrop_open"></div>
+        </template>
+        <!-- 鎼滅储鍖婚櫌 -->
+        <template if:true={showAttHosPop}>
+            <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"
             >
-              鍙栨秷
-            </button>
-            <button
-              class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-              style="margin-left: 10px"
-              variant="neutral"
-              label="涓婁紶"
-              onclick={uploadAtt}
-            >
-              涓婁紶
-            </button>
-          </footer>
-        </div>
-      </section>
-      <div class="slds-backdrop slds-backdrop_open"></div>
-    </template>
-    <!-- 鎼滅储鍖婚櫌 -->
-    <template if:true={showAttHosPop}>
-      <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={closeHospitalPop}
-            >
-              <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"
-          >
-            <table style="width: 100%">
-              <tbody>
-                <tr>
-                  <td style="width: 74px">
+                <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={closeHospitalPop}
+                        >
+                            <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
-                      style="color: #696969; font-size: 16px; text-align: left"
+                        class="slds-modal__content slds-p-around_medium"
+                        id="modal-content-id-2"
+                        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={searchNameHos}
+                                            onchange={searchNameHosChange}
+                                        ></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={searchHos}
+                                        >
+                                            鎼滅储
+                                        </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>
+                            </div>
+                        </div>
                     </div>
-                  </td>
-                  <td style="width: 60%">
-                    <lightning-input
-                      class="inputFont"
-                      label="鍖婚櫌鍚嶇О"
-                      variant="label-hidden"
-                      placeholder="璇疯緭鍏ュ尰闄㈠悕绉�"
-                      value={searchNameHos}
-                      onchange={searchNameHosChange}
-                    ></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={searchHos}
+                    <footer class="slds-modal__footer">
+                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeHospitalPop}></lightning-button> -->
+                        <button
+                            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                            label="鍙栨秷"
+                            onclick={closeHospitalPop}
+                        >
+                            鍙栨秷
+                        </button>
+                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmHospital}></lightning-button> -->
+                    </footer>
+                </div>
+            </section>
+            <div class="slds-backdrop slds-backdrop_open"></div>
+        </template>
+        <!-- 鎼滅储鍚堝悓 -->
+        <template if:true={showConPop}>
+            <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>
-                  </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>
-              </div>
-            </div>
-          </div>
-          <footer class="slds-modal__footer">
-            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeHospitalPop}></lightning-button> -->
-            <button
-              class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-              label="鍙栨秷"
-              onclick={closeHospitalPop}
-            >
-              鍙栨秷
-            </button>
-            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmHospital}></lightning-button> -->
-          </footer>
-        </div>
-      </section>
-      <div class="slds-backdrop slds-backdrop_open"></div>
-    </template>
-    <!-- 鎼滅储鍚堝悓 -->
-    <template if:true={showConPop}>
-      <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={closeContractPop}
-            >
-              <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-03"
-              class="slds-text-heading_medium slds-hyphenate"
-            >
-              鍚堝悓妫�绱�
-            </h2>
-          </header>
-          <div
-            class="slds-modal__content slds-p-around_medium"
-            id="modal-content-id-3"
-            style="border: 1px solid #f3f3f3"
-          >
-            <table style="width: 100%">
-              <tbody>
-                <tr>
-                  <td style="width: 74px">
+                        <button
+                            style=""
+                            class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
+                            title="Close"
+                            onclick={closeContractPop}
+                        >
+                            <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-03"
+                            class="slds-text-heading_medium slds-hyphenate"
+                        >
+                            鍚堝悓妫�绱�
+                        </h2>
+                    </header>
                     <div
-                      style="color: #696969; font-size: 16px; text-align: left"
+                        class="slds-modal__content slds-p-around_medium"
+                        id="modal-content-id-3"
+                        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={searchNameCon}
+                                            onchange={searchNameConChange}
+                                        ></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={searchCon}
+                                        >
+                                            鎼滅储
+                                        </button>
+                                    </td>
+                                    <!-- <td><lightning-button label="鎼滅储" onclick={searchCon}></lightning-button></td> -->
+                                </tr>
+                            </tbody>
+                        </table>
+                        <p style="height: 10px"></p>
+                        <!-- <p>宸查�夋嫨鍚堝悓锛歿chooseContract}</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>
+                            </div>
+                            <div style="padding: 20px">
+                                <lightning-datatable
+                                    class="wrapped-header-datatable"
+                                    key-field="id"
+                                    hide-checkbox-column="true"
+                                    data={contractList}
+                                    columns={conCols}
+                                    onrowaction={chooseCon}
+                                ></lightning-datatable>
+                            </div>
+                        </div>
                     </div>
-                  </td>
-                  <td style="width: 60%">
-                    <lightning-input
-                      class="inputFont"
-                      label="鍚堝悓鍚嶇О"
-                      variant="label-hidden"
-                      placeholder="璇疯緭鍏ュ悎鍚屽悕绉�"
-                      value={searchNameCon}
-                      onchange={searchNameConChange}
-                    ></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={searchCon}
-                    >
-                      鎼滅储
-                    </button>
-                  </td>
-                  <!-- <td><lightning-button label="鎼滅储" onclick={searchCon}></lightning-button></td> -->
-                </tr>
-              </tbody>
-            </table>
-            <p style="height: 10px"></p>
-            <!-- <p>宸查�夋嫨鍚堝悓锛歿chooseContract}</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>
-              </div>
-              <div style="padding: 20px">
-                <lightning-datatable
-                  class="wrapped-header-datatable"
-                  key-field="id"
-                  hide-checkbox-column="true"
-                  data={contractList}
-                  columns={conCols}
-                  onrowaction={chooseCon}
-                ></lightning-datatable>
-              </div>
-            </div>
-          </div>
-          <footer class="slds-modal__footer">
-            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeContractPop}></lightning-button> -->
-            <button
-              class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-              label="鍙栨秷"
-              onclick={closeContractPop}
-            >
-              鍙栨秷
-            </button>
-            <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmContract}></lightning-button> -->
-          </footer>
-        </div>
-      </section>
-      <div class="slds-backdrop slds-backdrop_open"></div>
+                    <footer class="slds-modal__footer">
+                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="鍙栨秷" onclick={closeContractPop}></lightning-button> -->
+                        <button
+                            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                            label="鍙栨秷"
+                            onclick={closeContractPop}
+                        >
+                            鍙栨秷
+                        </button>
+                        <!-- <lightning-button style="margin-left: 10px;" variant="neutral" label="纭" onclick={confirmContract}></lightning-button> -->
+                    </footer>
+                </div>
+            </section>
+            <div class="slds-backdrop slds-backdrop_open"></div>
+        </template>
     </template>
-  </template>
-</template>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.js b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
index 9d361ec..4091a4a 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.js
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
@@ -1,1703 +1,1778 @@
-import { LightningElement, wire, api, track } from "lwc";
-import { CurrentPageReference } from "lightning/navigation";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import { NavigationMixin } from "lightning/navigation";
-import initPage from "@salesforce/apex/LexConsumableController.init";
-import categoryAllload from "@salesforce/apex/LexConsumableController.categoryAllload";
-import categoryload from "@salesforce/apex/LexConsumableController.categoryload";
-import searchConsumableorderdetails from "@salesforce/apex/LexConsumableController.searchConsumableorderdetails";
-import searchorderdetails from "@salesforce/apex/LexConsumableController.searchorderdetails";
-import save from "@salesforce/apex/LexConsumableController.save";
-import ordrCopy from "@salesforce/apex/LexConsumableController.ordrCopy";
-import setEditAble from "@salesforce/apex/LexConsumableController.setEditAble";
-import backOrder from "@salesforce/apex/LexConsumableController.backOrder";
-import delConsumable from "@salesforce/apex/LexConsumableController.delConsumable";
-import sorder from "@salesforce/apex/LexConsumableController.sorder";
-import filesUpload from "@salesforce/apex/LexConsumableController.filesUpload";
-import initHospital from "@salesforce/apex/LexSearchHospitalController.init";
-import searchHospital from "@salesforce/apex/LexSearchHospitalController.searchHospital";
-import initContract from "@salesforce/apex/LexSearchContractController.init";
-import searchContract from "@salesforce/apex/LexSearchContractController.searchContract";
-import deleteAtt from "@salesforce/apex/LexConsumableController.deleteAtt";
+import { LightningElement, wire, api, track } from 'lwc';
+import { CurrentPageReference } from 'lightning/navigation';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import { NavigationMixin } from 'lightning/navigation';
+import initPage from '@salesforce/apex/LexConsumableController.init';
+import categoryAllload from '@salesforce/apex/LexConsumableController.categoryAllload';
+import categoryload from '@salesforce/apex/LexConsumableController.categoryload';
+import searchConsumableorderdetails from '@salesforce/apex/LexConsumableController.searchConsumableorderdetails';
+import searchorderdetails from '@salesforce/apex/LexConsumableController.searchorderdetails';
+import save from '@salesforce/apex/LexConsumableController.save';
+import ordrCopy from '@salesforce/apex/LexConsumableController.ordrCopy';
+import setEditAble from '@salesforce/apex/LexConsumableController.setEditAble';
+import backOrder from '@salesforce/apex/LexConsumableController.backOrder';
+import delConsumable from '@salesforce/apex/LexConsumableController.delConsumable';
+import sorder from '@salesforce/apex/LexConsumableController.sorder';
+import filesUpload from '@salesforce/apex/LexConsumableController.filesUpload';
+import initHospital from '@salesforce/apex/LexSearchHospitalController.init';
+import searchHospital from '@salesforce/apex/LexSearchHospitalController.searchHospital';
+import initContract from '@salesforce/apex/LexSearchContractController.init';
+import searchContract from '@salesforce/apex/LexSearchContractController.searchContract';
+import deleteAtt from '@salesforce/apex/LexConsumableController.deleteAtt';
 //table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
 
 export default class LexConsumable extends NavigationMixin(LightningElement) {
-  //椤甸潰鍩虹鏁版嵁
-  @track editAble;
-  @track pageType;
-  @track esetId;
-  @track keyWords;
-  @track coc;
-  @track cocId;
-  @track userWorkLocation;
-  @track accountName;
-  @track accountid;
-  @track specialCampaign = false;
-  @track dealerProductId = [];
-  @track category1;
-  @track category3 = "";
-  @track category4 = "";
-  @track category5 = "";
-  @track category_Goods;
-  @track category3Option = [];
-  @track category4Option = [];
-  @track category5Option = [];
-  @track consumableorderdetailsRecordsview = [];
-  @track currentRecord = []; //鍒嗛〉
-  @track selectRows = [];
-  @track attachmentRecoeds = [];
-  @track contactDealer = [];
-  @track proLimitAndDate = [];
-  @track agencyProType;
-  @track agencyProType1;
-  @track OSHFLG = false;
-  @track bargainPrice;
-  @track showOrderDate = false;
-  @track showAttUploadDate = false;
-  @track edoffersPrice = false;
-  @track editDelCommitBtnDisabled = false;
-  @track showEditBtn = false;
-  @track disabledEditBtn = false;
-  @track showPrintSheetBtn = false;
-  @track showUploadSheetBtn = false;
-  @track disabledUploadSheetBtn = false;
-  @track showSubOrderbtn = false;
-  @track disabledSubOrderbtn = false;
-  @track showSaveOrderbtn1 = false;
-  @track showSaveOrderbtn2 = false;
-  @track showDeleteBtn = false;
-  @track disabledDeleteBtn = false;
-  @track showOfferPriceInputBtn = false;
-  @track disabledOfferPriceInputBtn = false;
-  @track showReapplyBtn = false;
-  @track showHospital = false;
-  @track showPage = false;
-  @track cansee = false;
-  @track showSpinner = true;
-  @track showPopSpinner = false;
-  stylesLoaded = false;
-  //鏄惁涓�鐩存樉绀烘彁绀�
-  @track isNoteStay = true;
-  //鎺掑簭鐩稿叧
-  @track sortDirection = "asc";
-  @track sortedBy;
-  //鍒嗛〉
-  @track currentPage = 1;
-  @track pageSize = 10;
-  // @track totalPage = 0;
-  @track pageSizeOptions = [10, 25, 50, 100];
-  @track recordStart = 0;
-  @track recordEnd = 0;
-  //鎶ラ敊鎻愰啋
-  // @track hasError = false;
-  @track errorMsgs = [];
-  // @track hasWarning = false;
-  @track warningMsgs = [];
-  //闄勪欢涓婁紶
-  @track showAttPop = false;
-  @track filesUploaded = [];
-  @track fileName;
-  file;
-  fileContents;
-  fileReader;
-  content;
-  //鍖婚櫌鎼滅储
-  @track showAttHosPop = false;
-  @track hospitalList = [];
-  @track searchNameHos;
-  @track chooseHospital;
-  @track chooseHospitalId;
-  @track hospitalId;
-  @track hospitalName;
-  @track tempidHp;
-  @track hosCols = [
-    // {label:'鍖婚櫌鍚嶇О',fieldName:'Name',type:'button',typeAttributes:{label:{fieldName:'Name'},variant:'base'}},
-    {
-      label: "",
-      type: "button",
-      typeAttributes: { label: "閫夋嫨" },
-      initialWidth: 90,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍖婚櫌鍚嶇О",
-      fieldName: "Name",
-      initialWidth: 380,
-      wrapText: true,
-      hideDefaultActions: true
-    },
-    {
-      label: "鐪佷唤",
-      fieldName: "StateMaster",
-      initialWidth: 80,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍦板潃",
-      fieldName: "Address__c",
-      hideDefaultActions: true,
-      wrapText: true
-    }
-  ];
-  //鍚堝悓鎼滅储
-  @track contractLabel;
-  @track showConPop = false;
-  @track contractList = [];
-  @track searchNameCon;
-  @track chooseContract;
-  @track chooseContractId;
-  @track contractId;
-  @track contractName;
-  @track tempidPp;
-  @track conCols = [
-    {
-      label: "",
-      type: "button",
-      typeAttributes: { label: "閫夋嫨" },
-      initialWidth: 90,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍚堝悓鍚嶇О",
-      fieldName: "Name",
-      wrapText: true,
-      hideDefaultActions: true
-    },
-    {
-      label: "鐪佷唤",
-      fieldName: "StateMaster",
-      initialWidth: 80,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鐢宠閿�鍞",
-      fieldName: "Sales_Section__c",
-      initialWidth: 160,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍏佽鎶ヤ环鏈熼棿(寮�濮嬫棩)",
-      fieldName: "Contract_Decide_Start_Date__c",
-      initialWidth: 175,
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍏佽鎶ヤ环鏈熼棿(缁撴潫鏃�)",
-      fieldName: "Contract_Decide_End_Date__c",
-      initialWidth: 175,
-      hideDefaultActions: true,
-      wrapText: true
-    }
-  ];
-
-  //娑堣�楀搧鏁版嵁col
-  get cols() {
-    var cols = [];
-    cols.push({
-      label: "娑堣�楀搧鍚嶇О",
-      fieldName: "prodName",
-      wrapText: true,
-      hideDefaultActions: true,
-      sortable: true
-      // initialWidth: 136
-    });
-    cols.push({
-      label: "瑙勬牸",
-      fieldName: "packing_list",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 50,
-      cellAttributes: { alignment: "right" }
-    });
-    cols.push({
-      label: "CFDA鐘舵��",
-      fieldName: "prodSFDAStatus",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 84
-    });
-    cols.push({
-      label: "娉ㄥ唽璇佺紪鐮佸彿",
-      fieldName: "approbation_No",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 104
-    });
-    cols.push({
-      label: "娉ㄥ唽璇佹晥鏈�",
-      fieldName: "expiration_Date",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 95
-    });
-    cols.push({
-      label: "绗�3鍒嗙被",
-      fieldName: "prodCategory3",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 84,
-      sortable: true
-    });
-    cols.push({
-      label: "绗�4鍒嗙被",
-      fieldName: "prodCategory4",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 84,
-      sortable: true
-    });
-    cols.push({
-      label: "绗�5鍒嗙被",
-      fieldName: "prodCategory5",
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 84,
-      sortable: true
-    });
-    if (this.cansee) {
-      cols.push({
-        label: "鏍囧噯鍗曚环",
-        type: "number",
-        typeAttributes: { minimumFractionDigits: 2 },
-        fieldName: "prodIntraTradeList",
-        hideDefaultActions: true,
-        initialWidth: 78
-      });
-    }
-    if (this.editAble) {
-      cols.push({
-        label: "閲囪喘鏁伴噺",
-        type: "customTableInput",
-        typeAttributes: {
-          recordId: { fieldName: "recordId" },
-          inputValue: { fieldName: "consumableCount" },
-          upperLimit: { fieldName: "upperlimit" },
-          lowerLimit: { fieldName: "lowerlimit" },
-          allnumber: { fieldName: "allnumber" },
-          valueType: "Number"
+    //椤甸潰鍩虹鏁版嵁
+    @track editAble;
+    @track pageType;
+    @track esetId;
+    @track keyWords;
+    @track coc;
+    @track cocId;
+    @track userWorkLocation;
+    @track accountName;
+    @track accountid;
+    @track specialCampaign = false;
+    @track dealerProductId = [];
+    @track category1;
+    @track category3 = '';
+    @track category4 = '';
+    @track category5 = '';
+    @track category_Goods;
+    @track category3Option = [];
+    @track category4Option = [];
+    @track category5Option = [];
+    @track consumableorderdetailsRecordsview = [];
+    @track currentRecord = []; //鍒嗛〉
+    @track selectRows = [];
+    @track attachmentRecoeds = [];
+    @track contactDealer = [];
+    @track proLimitAndDate = [];
+    @track agencyProType;
+    @track agencyProType1;
+    @track OSHFLG = false;
+    @track bargainPrice;
+    @track showOrderDate = false;
+    @track showAttUploadDate = false;
+    @track edoffersPrice = false;
+    @track editDelCommitBtnDisabled = false;
+    @track showEditBtn = false;
+    @track disabledEditBtn = false;
+    @track showPrintSheetBtn = false;
+    @track showUploadSheetBtn = false;
+    @track disabledUploadSheetBtn = false;
+    @track showSubOrderbtn = false;
+    @track disabledSubOrderbtn = false;
+    @track showSaveOrderbtn1 = false;
+    @track showSaveOrderbtn2 = false;
+    @track showDeleteBtn = false;
+    @track disabledDeleteBtn = false;
+    @track showOfferPriceInputBtn = false;
+    @track disabledOfferPriceInputBtn = false;
+    @track showReapplyBtn = false;
+    @track showHospital = false;
+    @track showPage = false;
+    @track cansee = false;
+    @track showSpinner = true;
+    @track showPopSpinner = false;
+    stylesLoaded = false;
+    //鏄惁涓�鐩存樉绀烘彁绀�
+    @track isNoteStay = true;
+    //鎺掑簭鐩稿叧
+    @track sortDirection = 'asc';
+    @track sortedBy;
+    //鍒嗛〉
+    @track currentPage = 1;
+    @track pageSize = 10;
+    // @track totalPage = 0;
+    @track pageSizeOptions = [10, 25, 50, 100];
+    @track recordStart = 0;
+    @track recordEnd = 0;
+    //鎶ラ敊鎻愰啋
+    // @track hasError = false;
+    @track errorMsgs = [];
+    // @track hasWarning = false;
+    @track warningMsgs = [];
+    //闄勪欢涓婁紶
+    @track showAttPop = false;
+    @track filesUploaded = [];
+    @track fileName;
+    file;
+    fileContents;
+    fileReader;
+    content;
+    //鍖婚櫌鎼滅储
+    @track showAttHosPop = false;
+    @track hospitalList = [];
+    @track searchNameHos;
+    @track chooseHospital;
+    @track chooseHospitalId;
+    @track hospitalId;
+    @track hospitalName;
+    @track tempidHp;
+    @track hosCols = [
+        // {label:'鍖婚櫌鍚嶇О',fieldName:'Name',type:'button',typeAttributes:{label:{fieldName:'Name'},variant:'base'}},
+        {
+            label: '',
+            type: 'button',
+            typeAttributes: { label: '閫夋嫨' },
+            initialWidth: 90,
+            hideDefaultActions: true,
+            wrapText: true
         },
-        hideDefaultActions: true,
-        initialWidth: 78
-      });
-    } else {
-      cols.push({
-        label: "閲囪喘鏁伴噺",
-        fieldName: "consumableCount",
-        hideDefaultActions: true,
-        initialWidth: 78,
-        cellAttributes: { alignment: "right" }
-      });
-    }
-    cols.push({
-      label: "鍦ㄥ簱鏁颁笅闄�",
-      fieldName: "lowerlimit",
-      hideDefaultActions: true,
-      initialWidth: 86,
-      cellAttributes: { alignment: "right" }
-    });
-    cols.push({
-      label: "鍦ㄥ簱鏁颁笂闄�",
-      fieldName: "upperlimit",
-      hideDefaultActions: true,
-      initialWidth: 86,
-      cellAttributes: { alignment: "right" }
-    });
-    // cols.push({label:'鏈夋晥鏈熷簱瀛�(鐩�)',fieldName:'allnumber',hideDefaultActions: true,initialWidth:105,sortable: true});
-    cols.push({
-      label: "鏈夋晥鏈熷簱瀛�(鐩�)",
-      type: "customInventoryColor",
-      fieldName: "allnumber",
-      typeAttributes: {
-        value: { fieldName: "allnumber" },
-        upperlimit: { fieldName: "upperlimit" },
-        lowerlimit: { fieldName: "lowerlimit" },
-        boxPrice: "鐩�"
-      },
-      hideDefaultActions: true,
-      initialWidth: 122,
-      sortable: true
-    });
-    cols.push({
-      label: "鏈夋晥鏈熷簱瀛�(涓�)",
-      fieldName: "allnumber_piece",
-      hideDefaultActions: true,
-      initialWidth: 112,
-      cellAttributes: { alignment: "right" }
-    });
-    return cols;
-  }
-
-  //闄勪欢cols
-  @track attCols = [
-    {
-      label: "鏍囬",
-      fieldName: "attUrl",
-      type: "url",
-      typeAttributes: {
-        label: { fieldName: "fileName" },
-        target: "_blank"
-      },
-      hideDefaultActions: true
-    },
-    {
-      label: "鍒涘缓浜�",
-      fieldName: "ownerUrl",
-      type: "url",
-      typeAttributes: {
-        label: { fieldName: "ownerName" },
-        target: "_blank"
-      },
-      hideDefaultActions: true
-    },
-    {
-      label: "涓婁紶鏃ユ湡",
-      fieldName: "updateDate",
-      hideDefaultActions: true
-    },
-    {
-      label: "",
-      type: "tableCellIcon",
-      typeAttributes: {
-        iconName: "utility:delete",
-        recordId: { fieldName: "recordId" }
-      },
-      initialWidth: 50,
-      hideDefaultActions: true
-    }
-  ];
-
-  //鍙栧緱鎵�鏈夎鍕鹃�夌殑浜у搧id
-  getAllChecked() {
-    this.selectRows = [];
-    for (var i in this.currentRecord) {
-      if (this.currentRecord[i].check) {
-        this.selectRows.push(this.currentRecord[i].recordId);
-      }
-    }
-  }
-
-  //鍕鹃�夋搷浣�
-  checkRows(event) {
-    this.selectRows = [];
-    const selectedRows = event.detail.selectedRows;
-    for (var i in this.consumableorderdetailsRecordsview) {
-      var count = 0;
-      for (var j in selectedRows) {
-        if (
-          this.consumableorderdetailsRecordsview[i].recordId ==
-          selectedRows[j].recordId
-        ) {
-          count++;
-          console.log(
-            "checkId:" +
-              selectedRows[j].recordId +
-              "---" +
-              this.consumableorderdetailsRecordsview[i].prodName
-          );
+        {
+            label: '鍖婚櫌鍚嶇О',
+            fieldName: 'Name',
+            initialWidth: 380,
+            wrapText: true,
+            hideDefaultActions: true
+        },
+        {
+            label: '鐪佷唤',
+            fieldName: 'StateMaster',
+            initialWidth: 80,
+            hideDefaultActions: true,
+            wrapText: true
+        },
+        {
+            label: '鍦板潃',
+            fieldName: 'Address__c',
+            hideDefaultActions: true,
+            wrapText: true
         }
-      }
-      if (count == 0) {
-        this.consumableorderdetailsRecordsview[i].check = false;
-      } else {
-        this.consumableorderdetailsRecordsview[i].check = true;
-        this.selectRows.push(
-          this.consumableorderdetailsRecordsview[i].recordId
-        );
-      }
-    }
-    for (var i in this.selectRows) {
-      console.log("checkId1:" + this.selectRows[i]);
-      for (var i in this.currentRecord) {
-        if (this.currentRecord[i].recordId == this.selectRows[i]) {
-          console.log("currentRecord:" + this.selectRows[i]);
+    ];
+    //鍚堝悓鎼滅储
+    @track contractLabel;
+    @track showConPop = false;
+    @track contractList = [];
+    @track searchNameCon;
+    @track chooseContract;
+    @track chooseContractId;
+    @track contractId;
+    @track contractName;
+    @track tempidPp;
+    @track conCols = [
+        {
+            label: '',
+            type: 'button',
+            typeAttributes: { label: '閫夋嫨' },
+            initialWidth: 90,
+            hideDefaultActions: true,
+            wrapText: true
+        },
+        {
+            label: '鍚堝悓鍚嶇О',
+            fieldName: 'Name',
+            wrapText: true,
+            hideDefaultActions: true
+        },
+        {
+            label: '鐪佷唤',
+            fieldName: 'StateMaster',
+            initialWidth: 80,
+            hideDefaultActions: true,
+            wrapText: true
+        },
+        {
+            label: '鐢宠閿�鍞',
+            fieldName: 'Sales_Section__c',
+            initialWidth: 160,
+            hideDefaultActions: true,
+            wrapText: true
+        },
+        {
+            label: '鍏佽鎶ヤ环鏈熼棿(寮�濮嬫棩)',
+            fieldName: 'Contract_Decide_Start_Date__c',
+            initialWidth: 175,
+            hideDefaultActions: true,
+            wrapText: true
+        },
+        {
+            label: '鍏佽鎶ヤ环鏈熼棿(缁撴潫鏃�)',
+            fieldName: 'Contract_Decide_End_Date__c',
+            initialWidth: 175,
+            hideDefaultActions: true,
+            wrapText: true
         }
-      }
-    }
-  }
+    ];
 
-  //閲囪喘鏁伴噺鑾峰彇
-  conCountChange(event) {
-    var recordId = event.detail.data.recordId;
-    var conCount = event.detail.data.value;
-    console.log("countChange:" + recordId + "---" + conCount);
-    for (var i in this.consumableorderdetailsRecordsview) {
-      if (this.consumableorderdetailsRecordsview[i].recordId == recordId) {
-        this.consumableorderdetailsRecordsview[i].esd.Consumable_count__c =
-          conCount;
-        this.consumableorderdetailsRecordsview[i].consumableCount = conCount;
-        if (conCount != null && conCount != 0 && conCount != "") {
-          this.consumableorderdetailsRecordsview[i].check = true;
+    //娑堣�楀搧鏁版嵁col
+    get cols() {
+        var cols = [];
+        cols.push({
+            label: '娑堣�楀搧鍚嶇О',
+            fieldName: 'prodName',
+            wrapText: true,
+            hideDefaultActions: true,
+            sortable: true
+            // initialWidth: 136
+        });
+        cols.push({
+            label: '瑙勬牸',
+            fieldName: 'packing_list',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 50,
+            cellAttributes: { alignment: 'right' }
+        });
+        cols.push({
+            label: 'CFDA鐘舵��',
+            fieldName: 'prodSFDAStatus',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 84
+        });
+        cols.push({
+            label: '娉ㄥ唽璇佺紪鐮佸彿',
+            fieldName: 'approbation_No',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 104
+        });
+        cols.push({
+            label: '娉ㄥ唽璇佹晥鏈�',
+            fieldName: 'expiration_Date',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 95
+        });
+        cols.push({
+            label: '绗�3鍒嗙被',
+            fieldName: 'prodCategory3',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 84,
+            sortable: true
+        });
+        cols.push({
+            label: '绗�4鍒嗙被',
+            fieldName: 'prodCategory4',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 84,
+            sortable: true
+        });
+        cols.push({
+            label: '绗�5鍒嗙被',
+            fieldName: 'prodCategory5',
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 84,
+            sortable: true
+        });
+        if (this.cansee) {
+            cols.push({
+                label: '鏍囧噯鍗曚环',
+                type: 'number',
+                typeAttributes: { minimumFractionDigits: 2 },
+                fieldName: 'prodIntraTradeList',
+                hideDefaultActions: true,
+                initialWidth: 78
+            });
+        }
+        if (this.editAble) {
+            cols.push({
+                label: '閲囪喘鏁伴噺',
+                type: 'customTableInput',
+                typeAttributes: {
+                    recordId: { fieldName: 'recordId' },
+                    inputValue: { fieldName: 'consumableCount' },
+                    upperLimit: { fieldName: 'upperlimit' },
+                    lowerLimit: { fieldName: 'lowerlimit' },
+                    allnumber: { fieldName: 'allnumber' },
+                    valueType: 'Number'
+                },
+                hideDefaultActions: true,
+                initialWidth: 78
+            });
         } else {
-          this.consumableorderdetailsRecordsview[i].check = false;
-          this.consumableorderdetailsRecordsview[i].esd.Consumable_count__c =
-            null;
-          this.consumableorderdetailsRecordsview[i].consumableCount = null;
+            cols.push({
+                label: '閲囪喘鏁伴噺',
+                fieldName: 'consumableCount',
+                hideDefaultActions: true,
+                initialWidth: 78,
+                cellAttributes: { alignment: 'right' }
+            });
         }
-      }
+        cols.push({
+            label: '鍦ㄥ簱鏁颁笅闄�',
+            fieldName: 'lowerlimit',
+            hideDefaultActions: true,
+            initialWidth: 86,
+            cellAttributes: { alignment: 'right' }
+        });
+        cols.push({
+            label: '鍦ㄥ簱鏁颁笂闄�',
+            fieldName: 'upperlimit',
+            hideDefaultActions: true,
+            initialWidth: 86,
+            cellAttributes: { alignment: 'right' }
+        });
+        // cols.push({label:'鏈夋晥鏈熷簱瀛�(鐩�)',fieldName:'allnumber',hideDefaultActions: true,initialWidth:105,sortable: true});
+        cols.push({
+            label: '鏈夋晥鏈熷簱瀛�(鐩�)',
+            type: 'customInventoryColor',
+            fieldName: 'allnumber',
+            typeAttributes: {
+                value: { fieldName: 'allnumber' },
+                upperlimit: { fieldName: 'upperlimit' },
+                lowerlimit: { fieldName: 'lowerlimit' },
+                boxPrice: '鐩�'
+            },
+            hideDefaultActions: true,
+            initialWidth: 122,
+            sortable: true
+        });
+        cols.push({
+            label: '鏈夋晥鏈熷簱瀛�(涓�)',
+            fieldName: 'allnumber_piece',
+            hideDefaultActions: true,
+            initialWidth: 112,
+            cellAttributes: { alignment: 'right' }
+        });
+        return cols;
     }
-    this.getAllChecked();
-    for (var i in this.currentRecord) {
-      if (this.currentRecord[i].recordId == recordId) {
+
+    //闄勪欢cols
+    @track attCols = [
+        {
+            label: '鏍囬',
+            fieldName: 'attUrl',
+            type: 'url',
+            typeAttributes: {
+                label: { fieldName: 'fileName' },
+                target: '_blank'
+            },
+            hideDefaultActions: true
+        },
+        {
+            label: '鍒涘缓浜�',
+            fieldName: 'ownerUrl',
+            type: 'url',
+            typeAttributes: {
+                label: { fieldName: 'ownerName' },
+                target: '_blank'
+            },
+            hideDefaultActions: true
+        },
+        {
+            label: '涓婁紶鏃ユ湡',
+            fieldName: 'updateDate',
+            hideDefaultActions: true
+        },
+        {
+            label: '',
+            type: 'tableCellIcon',
+            typeAttributes: {
+                iconName: 'utility:delete',
+                recordId: { fieldName: 'recordId' }
+            },
+            initialWidth: 50,
+            hideDefaultActions: true
+        }
+    ];
+
+    //鍙栧緱鎵�鏈夎鍕鹃�夌殑浜у搧id
+    getAllChecked() {
+        this.selectRows = [];
+        for (var i in this.currentRecord) {
+            if (this.currentRecord[i].check) {
+                this.selectRows.push(this.currentRecord[i].recordId);
+            }
+        }
+    }
+
+    //鍕鹃�夋搷浣�
+    checkRows(event) {
+        this.selectRows = [];
+        const selectedRows = event.detail.selectedRows;
+        for (var i in this.consumableorderdetailsRecordsview) {
+            var count = 0;
+            for (var j in selectedRows) {
+                if (
+                    this.consumableorderdetailsRecordsview[i].recordId ==
+                    selectedRows[j].recordId
+                ) {
+                    count++;
+                    console.log(
+                        'checkId:' +
+                            selectedRows[j].recordId +
+                            '---' +
+                            this.consumableorderdetailsRecordsview[i].prodName
+                    );
+                }
+            }
+            if (count == 0) {
+                this.consumableorderdetailsRecordsview[i].check = false;
+            } else {
+                this.consumableorderdetailsRecordsview[i].check = true;
+                this.selectRows.push(
+                    this.consumableorderdetailsRecordsview[i].recordId
+                );
+            }
+        }
+        for (var i in this.selectRows) {
+            console.log('checkId1:' + this.selectRows[i]);
+            for (var i in this.currentRecord) {
+                if (this.currentRecord[i].recordId == this.selectRows[i]) {
+                    console.log('currentRecord:' + this.selectRows[i]);
+                }
+            }
+        }
+    }
+
+    //閲囪喘鏁伴噺鑾峰彇
+    conCountChange(event) {
+        var recordId = event.detail.data.recordId;
+        var conCount = event.detail.data.value;
+        console.log('countChange:' + recordId + '---' + conCount);
+        for (var i in this.consumableorderdetailsRecordsview) {
+            if (
+                this.consumableorderdetailsRecordsview[i].recordId == recordId
+            ) {
+                this.consumableorderdetailsRecordsview[
+                    i
+                ].esd.Consumable_count__c = conCount;
+                this.consumableorderdetailsRecordsview[i].consumableCount =
+                    conCount;
+                if (conCount != null && conCount != 0 && conCount != '') {
+                    this.consumableorderdetailsRecordsview[i].check = true;
+                } else {
+                    this.consumableorderdetailsRecordsview[i].check = false;
+                    this.consumableorderdetailsRecordsview[
+                        i
+                    ].esd.Consumable_count__c = null;
+                    this.consumableorderdetailsRecordsview[i].consumableCount =
+                        null;
+                }
+            }
+        }
+        this.getAllChecked();
+        for (var i in this.currentRecord) {
+            if (this.currentRecord[i].recordId == recordId) {
+                console.log(
+                    'currentRecord1:' +
+                        this.currentRecord[i].esd.Consumable_count__c
+                );
+            }
+        }
+    }
+
+    //閲囪喘鏁伴噺澶辩劍
+    conCountBlur(event) {
+        var conCount = event.detail.data.value;
+        var allnumber = event.detail.data.allnumber;
+        var upperLimit = event.detail.data.upperLimit;
+        var lowerLimit = event.detail.data.lowerLimit;
         console.log(
-          "currentRecord1:" + this.currentRecord[i].esd.Consumable_count__c
+            'limit:' +
+                conCount +
+                '---' +
+                allnumber +
+                '---' +
+                lowerLimit +
+                '---' +
+                allnumber
         );
-      }
+        if (
+            upperLimit != null &&
+            lowerLimit != null &&
+            conCount != null &&
+            allnumber != null
+        ) {
+            if (parseInt(allnumber) + parseInt(conCount) > upperLimit) {
+                // window.alert("璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒");
+                this.showMyToast('璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒', '', 'error');
+            }
+            if (parseInt(allnumber) + parseInt(conCount) < lowerLimit) {
+                // window.alert("璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒");
+                this.showMyToast('璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒', '', 'error');
+            }
+        }
     }
-  }
 
-  //閲囪喘鏁伴噺澶辩劍
-  conCountBlur(event) {
-    var conCount = event.detail.data.value;
-    var allnumber = event.detail.data.allnumber;
-    var upperLimit = event.detail.data.upperLimit;
-    var lowerLimit = event.detail.data.lowerLimit;
-    console.log(
-      "limit:" +
-        conCount +
-        "---" +
-        allnumber +
-        "---" +
-        lowerLimit +
-        "---" +
-        allnumber
-    );
-    if (
-      upperLimit != null &&
-      lowerLimit != null &&
-      conCount != null &&
-      allnumber != null
-    ) {
-      if (parseInt(allnumber) + parseInt(conCount) > upperLimit) {
-        // window.alert("璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒");
-        this.showMyToast("璇ヤ骇鍝佽璐暟閲忚秴鍑哄簱瀛樹笂闄愶紒", "", "error");
-      }
-      if (parseInt(allnumber) + parseInt(conCount) < lowerLimit) {
-        // window.alert("璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒");
-        this.showMyToast("璇ヤ骇鍝佽璐暟閲忎綆浜庡簱瀛樹笅闄愶紒", "", "error");
-      }
+    @wire(CurrentPageReference)
+    getStateParameters(currentPageReference) {
+        console.log('CurrentPageReference');
+        if (currentPageReference) {
+            this.pageType = currentPageReference.state?.type;
+            this.esetId = currentPageReference.state?.ESetid;
+            this.keyWords = currentPageReference.state?.KeyWords;
+            console.log('type:' + this.pageType);
+            console.log('esetId:' + this.esetId);
+            console.log('keyWords:' + this.keyWords);
+        }
     }
-  }
 
-  @wire(CurrentPageReference)
-  getStateParameters(currentPageReference) {
-    console.log("CurrentPageReference");
-    if (currentPageReference) {
-      this.pageType = currentPageReference.state?.type;
-      this.esetId = currentPageReference.state?.ESetid;
-      this.keyWords = currentPageReference.state?.KeyWords;
-      console.log("type:" + this.pageType);
-      console.log("esetId:" + this.esetId);
-      console.log("keyWords:" + this.keyWords);
+    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');
+                });
+        }
     }
-  }
 
-  renderedCallback() {
-    if (!this.stylesLoaded) {
-      Promise.all([loadStyle(this, WrappedHeaderTable)])
-        .then(() => {
-          console.log("Custom styles loaded");
-          this.stylesLoaded = true;
+    //椤甸潰鍒濆鍖�
+    connectedCallback() {
+        this.showSpinner = true;
+        initPage({
+            type: this.pageType,
+            esetId: this.esetId,
+            keywordStr: this.keyWords
         })
-        .catch((error) => {
-          console.error("Error loading custom styles");
+            .then((result) => {
+                this.isNoteStay = result.isNoteStay;
+                if (result.result == 'Success') {
+                    this.editAble = result.editAble;
+                    this.edoffersPrice = result.edoffersPrice;
+                    this.cansee = result.cansee;
+                    this.editDelCommitBtnDisabled =
+                        result.editDelCommitBtnDisabled;
+                    this.category3Option = result.category3Option;
+                    this.category4Option = result.category4Option;
+                    this.category5Option = result.category5Option;
+                    this.agencyProType = result.agencyProType;
+                    this.agencyProType1 = result.agencyProType1;
+                    this.OSHFLG = result.OSHFLG;
+                    this.hospitalName = result.hospitalName;
+                    this.contractName = result.contractName;
+                    this.contractLabel = '缁忛攢鍟嗘湁鏁堝悎鍚�';
+                    this.consumableorderdetailsRecordsview =
+                        result.consumableorderdetailsRecordsview;
+                    this.currentPage = 1;
+                    this.showCurrentReocrd();
+                    this.getAllChecked();
+                    this.attachmentRecoeds = result.attachmentRecoeds;
+                    console.log('attSize:' + this.attachmentRecoeds.length);
+                    for (var i in this.attachmentRecoeds) {
+                        this.attachmentRecoeds[i]['recordId'] =
+                            this.attachmentRecoeds[i].Concc.Id;
+                        this.attachmentRecoeds[i]['documentId'] =
+                            this.attachmentRecoeds[i].Concc.ContentDocumentId;
+                        this.attachmentRecoeds[i]['fileFullName'] =
+                            this.attachmentRecoeds[i].Concc.Title;
+                        var contractionName =
+                            this.attachmentRecoeds[i].Concc.Title;
+                        // var contractionName = '闀挎枃浠堕暱鏂囦欢闀挎枃浠堕暱鏂囦欢';
+                        if (contractionName.length > 25) {
+                            contractionName =
+                                contractionName.substr(0, 21) + '...';
+                        }
+                        this.attachmentRecoeds[i]['fileName'] = contractionName;
+                        this.attachmentRecoeds[i]['ownerName'] =
+                            this.attachmentRecoeds[i].Concc.Owner.Name;
+                        this.attachmentRecoeds[i]['downloadUrl'] =
+                            '/sfc/servlet.shepherd/document/download/' +
+                            this.attachmentRecoeds[i].Concc.ContentDocumentId +
+                            '?operationContext=S1';
+                        // var date = this.attachmentRecoeds[i].Concc.CreatedDate;
+                        // var year = date.getFullYear();
+                        // var month = date.getMonth();
+                        // var day = date.getDay();
+                        // console.log(year+'-'+month+'-'+day);
+                        this.attachmentRecoeds[i]['updateDate'] = new Date(
+                            Date.parse(
+                                this.attachmentRecoeds[i].Concc.CreatedDate
+                            )
+                        ).toLocaleString();
+                        this.attachmentRecoeds[i]['attUrl'] =
+                            '/' + this.attachmentRecoeds[i].Concc.Id;
+                        this.attachmentRecoeds[i]['ownerUrl'] =
+                            '/' + this.attachmentRecoeds[i].Concc.OwnerId;
+                    }
+                    this.errorMsgs = result.errorMsgList;
+                    this.warningMsgs = result.warningMsgList;
+                    this.userWorkLocation = result.userWorkLocation;
+                    this.accountName = result.accountName;
+                    this.accountid = result.accountid;
+                    this.hospitalId = result.hospitalId;
+                    this.contractId = result.contractId;
+                    this.category_Goods = result.category_Goods;
+                    this.specialCampaign = result.specialCampaign;
+                    this.dealerProductId = result.dealerProductId;
+                    this.contactDealer = result.contactDealer;
+                    this.pageType = result.methodType;
+                    this.proLimitAndDate = result.proLimitAndDate;
+                    console.log(
+                        'proLimitAndDate:' +
+                            JSON.stringify(this.proLimitAndDate)
+                    );
+                    this.coc = result.coc;
+                    this.cocId = this.coc.Id;
+                    if (
+                        this.pageType == 'hospitalorder' &&
+                        this.agencyProType != 'ET'
+                    ) {
+                        this.showHospital = true;
+                    }
+                    if (
+                        this.coc.Order_status__c == '宸叉彁浜�' ||
+                        this.coc.Order_status__c == '鎵瑰噯'
+                    ) {
+                        this.showOrderDate = true;
+                    }
+                    if (this.coc.Consumable_pdf_insert_day__c != null) {
+                        this.showAttUploadDate = true;
+                    }
+                    if (!(this.editAble || this.edoffersPrice)) {
+                        this.showEditBtn = true;
+                        this.showOfferPriceInputBtn = true;
+                    }
+                    if (
+                        this.coc.Order_status__c == '宸叉彁浜�' ||
+                        this.coc.Order_status__c == '鎵瑰噯' ||
+                        this.coc.Order_status__c == '椹冲洖'
+                    ) {
+                        this.disabledEditBtn = true;
+                        this.disabledUploadSheetBtn = true;
+                        this.disabledSubOrderbtn = true;
+                        this.disabledDeleteBtn = true;
+                        this.disabledOfferPriceInputBtn = true;
+                    }
+                    if (
+                        !(
+                            this.editDelCommitBtnDisabled ||
+                            this.editAble ||
+                            this.edoffersPrice
+                        )
+                    ) {
+                        this.showPrintSheetBtn = true;
+                        this.showUploadSheetBtn = true;
+                        this.showSubOrderbtn = true;
+                        this.showDeleteBtn = true;
+                    }
+                    if (
+                        (this.editDelCommitBtnDisabled ||
+                            this.editAble ||
+                            this.edoffersPrice) &&
+                        this.coc.Order_status__c != '椹冲洖'
+                    ) {
+                        this.showSaveOrderbtn1 = true;
+                    }
+                    if (this.coc.Order_status__c == '椹冲洖' && this.editAble) {
+                        this.showSaveOrderbtn2 = true;
+                    }
+                    if (this.coc.Order_status__c == '椹冲洖' && !this.editAble) {
+                        this.showReapplyBtn = true;
+                    }
+                    this.showSpinner = false;
+                    this.showPage = true;
+                } else {
+                    this.showSpinner = false;
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast(
+                        '鍒濆鍖栭〉闈㈠け璐�',
+                        result.errorMsg,
+                        'error'
+                    );
+                }
+            })
+            .catch((error) => {
+                this.showSpinner = false;
+                console.log('error:' + error);
+                this.showMyToast('鍒濆鍖栭〉闈㈠け璐�', error, 'error');
+            });
+    }
+
+    //鎺掑簭
+    onHandleSort(event) {
+        //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
+        console.log('sort');
+        if (this.editAble) {
+            const { fieldName: sortedBy, sortDirection } = event.detail;
+            const cloneData = [...this.currentRecord];
+            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].recordId);
+            }
+            console.log('selectedRowsIds = ' + JSON.stringify(selectedRowsIds));
+            for (var i = 0; i < cloneData.length; i++) {
+                if (selectedRowsIds.indexOf(cloneData[i].recordId) != -1) {
+                    if (i != 0) {
+                        let temp = cloneData[index];
+                        cloneData[index] = cloneData[i];
+                        cloneData[i] = temp;
+                    }
+                    index++;
+                }
+            }
+            this.currentRecord = cloneData;
+            this.sortDirection = sortDirection;
+            this.sortedBy = sortedBy;
+        } else {
+            const { fieldName: sortedBy, sortDirection } = event.detail;
+            const cloneData = [...this.currentRecord];
+            cloneData.sort(
+                this.sortBy(sortedBy, sortDirection === 'asc' ? 1 : -1)
+            );
+            this.currentRecord = 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));
+        };
+    }
+
+    //鏄惁鏈夎鍛�
+    get hasWarning() {
+        if (this.warningMsgs == null || this.warningMsgs.length == 0) {
+            return false;
+        }
+        if (this.warningMsgs.length > 0) {
+            return true;
+        }
+    }
+
+    //鏄惁鏈夐敊璇�
+    get hasError() {
+        if (this.errorMsgs == null || this.errorMsgs.length == 0) {
+            return false;
+        }
+        if (this.errorMsgs.length > 0) {
+            return true;
+        }
+    }
+
+    //鐗逛环change浜嬩欢
+    offerPriceChange(event) {
+        this.coc.Offers_Price__c = event.detail.value;
+    }
+
+    //娑堣�楀搧鍚嶇Оchange浜嬩欢
+    category1Change(event) {
+        this.category1 = event.detail.value;
+    }
+
+    //绗笁鍒嗙被change浜嬩欢
+    category3Change(event) {
+        this.showSpinner = true;
+        this.category3 = event.detail.value;
+        this.category4 = '';
+        this.category5 = '';
+        categoryAllload({
+            agencyProTypeStr: this.agencyProType,
+            category3Str: this.category3
+        }).then((result) => {
+            if (result.result == 'Success') {
+                this.category4Option = result.category4Option;
+                this.category5Option = result.category5Option;
+                this.showSpinner = false;
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('鍔犺浇鍒嗙被澶辫触', result.errorMsg, 'error');
+            }
         });
     }
-  }
 
-  //椤甸潰鍒濆鍖�
-  connectedCallback() {
-    this.showSpinner = true;
-    initPage({
-      type: this.pageType,
-      esetId: this.esetId,
-      keywordStr: this.keyWords
-    })
-      .then((result) => {
-        this.isNoteStay = result.isNoteStay;
-        if (result.result == "Success") {
-          this.editAble = result.editAble;
-          this.edoffersPrice = result.edoffersPrice;
-          this.cansee = result.cansee;
-          this.editDelCommitBtnDisabled = result.editDelCommitBtnDisabled;
-          this.category3Option = result.category3Option;
-          this.category4Option = result.category4Option;
-          this.category5Option = result.category5Option;
-          this.agencyProType = result.agencyProType;
-          this.agencyProType1 = result.agencyProType1;
-          this.OSHFLG = result.OSHFLG;
-          this.hospitalName = result.hospitalName;
-          this.contractName = result.contractName;
-          this.contractLabel = "缁忛攢鍟嗘湁鏁堝悎鍚�";
-          this.consumableorderdetailsRecordsview =
-            result.consumableorderdetailsRecordsview;
-          this.currentPage = 1;
-          this.showCurrentReocrd();
-          this.getAllChecked();
-          this.attachmentRecoeds = result.attachmentRecoeds;
-          console.log("attSize:" + this.attachmentRecoeds.length);
-          for (var i in this.attachmentRecoeds) {
-            this.attachmentRecoeds[i]["recordId"] =
-              this.attachmentRecoeds[i].Concc.Id;
-            this.attachmentRecoeds[i]["documentId"] =
-              this.attachmentRecoeds[i].Concc.ContentDocumentId;
-            this.attachmentRecoeds[i]["fileFullName"] =
-              this.attachmentRecoeds[i].Concc.Title;
-            var contractionName = this.attachmentRecoeds[i].Concc.Title;
-            // var contractionName = '闀挎枃浠堕暱鏂囦欢闀挎枃浠堕暱鏂囦欢';
-            if (contractionName.length > 25) {
-              contractionName = contractionName.substr(0, 21) + "...";
+    //绗洓鍒嗙被change浜嬩欢
+    category4Change(event) {
+        this.showSpinner = true;
+        this.category4 = event.detail.value;
+        this.category5 = '';
+        categoryload({
+            agencyProTypeStr: this.agencyProType,
+            category3Str: this.category3,
+            category4Str: this.category4
+        }).then((result) => {
+            if (result.result == 'Success') {
+                this.category4Option = result.category4Option;
+                this.category5Option = result.category5Option;
+                this.showSpinner = false;
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('鍔犺浇鍒嗙被澶辫触', result.errorMsg, 'error');
             }
-            this.attachmentRecoeds[i]["fileName"] = contractionName;
-            this.attachmentRecoeds[i]["ownerName"] =
-              this.attachmentRecoeds[i].Concc.Owner.Name;
-            this.attachmentRecoeds[i]["downloadUrl"] =
-              "/sfc/servlet.shepherd/document/download/" +
-              this.attachmentRecoeds[i].Concc.ContentDocumentId +
-              "?operationContext=S1";
-            // var date = this.attachmentRecoeds[i].Concc.CreatedDate;
-            // var year = date.getFullYear();
-            // var month = date.getMonth();
-            // var day = date.getDay();
-            // console.log(year+'-'+month+'-'+day);
-            this.attachmentRecoeds[i]["updateDate"] = new Date(
-              Date.parse(this.attachmentRecoeds[i].Concc.CreatedDate)
-            ).toLocaleString();
-            this.attachmentRecoeds[i]["attUrl"] =
-              "/" + this.attachmentRecoeds[i].Concc.Id;
-            this.attachmentRecoeds[i]["ownerUrl"] =
-              "/" + this.attachmentRecoeds[i].Concc.OwnerId;
-          }
-          this.errorMsgs = result.errorMsgList;
-          this.warningMsgs = result.warningMsgList;
-          this.userWorkLocation = result.userWorkLocation;
-          this.accountName = result.accountName;
-          this.accountid = result.accountid;
-          this.hospitalId = result.hospitalId;
-          this.contractId = result.contractId;
-          this.category_Goods = result.category_Goods;
-          this.specialCampaign = result.specialCampaign;
-          this.dealerProductId = result.dealerProductId;
-          this.contactDealer = result.contactDealer;
-          this.pageType = result.methodType;
-          this.proLimitAndDate = result.proLimitAndDate;
-          console.log(
-            "proLimitAndDate:" + JSON.stringify(this.proLimitAndDate)
-          );
-          this.coc = result.coc;
-          this.cocId = this.coc.Id;
-          if (this.pageType == "hospitalorder" && this.agencyProType != "ET") {
-            this.showHospital = true;
-          }
-          if (
-            this.coc.Order_status__c == "宸叉彁浜�" ||
-            this.coc.Order_status__c == "鎵瑰噯"
-          ) {
-            this.showOrderDate = true;
-          }
-          if (this.coc.Consumable_pdf_insert_day__c != null) {
-            this.showAttUploadDate = true;
-          }
-          if (!(this.editAble || this.edoffersPrice)) {
+        });
+    }
+
+    //绗簲鍒嗙被change浜嬩欢
+    category5Change(event) {
+        this.category5 = event.detail.value;
+    }
+
+    //鎼滅储浜у搧
+    searchProduct(event) {
+        this.showSpinner = true;
+        searchConsumableorderdetails({
+            userWorkLocationStr: this.userWorkLocation,
+            agencyProTypeStr: this.agencyProType,
+            accountNameStr: this.accountName,
+            accountIdStr: this.accountid,
+            contractIdStr: this.contractId,
+            hospitalIdStr: this.hospitalId,
+            category1Str: this.category1,
+            category3Str: this.category3,
+            category4Str: this.category4,
+            category5Str: this.category5,
+            category_GoodStr: this.category_Goods,
+            specialCampaignStr: this.specialCampaign,
+            dealerProductIdStr: JSON.stringify(this.dealerProductId),
+            methodTypeStr: this.pageType,
+            editAbleStr: this.editAble,
+            consumableorderdetailsRecordsviewStr: JSON.stringify(
+                this.consumableorderdetailsRecordsview
+            ),
+            proLimitAndDateList: this.proLimitAndDate
+        })
+            .then((result) => {
+                if (result.result == 'Success') {
+                    this.consumableorderdetailsRecordsview =
+                        result.consumableorderdetailsRecordsview;
+                    this.currentPage = 1;
+                    this.currentRecord = [];
+                    this.showCurrentReocrd();
+                    this.getAllChecked();
+                    this.showSpinner = false;
+                    this.errorMsgs = result.errorMsgList;
+                    this.warningMsgs = result.warningMsgList;
+                    // this.hasError = result.hasError;
+                    // this.hasWarning = result.hasWarning;
+                    this.showMyToast('鎼滅储鎴愬姛', result.errorMsg, 'success');
+                } else {
+                    this.showSpinner = false;
+                    console.log('Error:' + result.errorMsg);
+                    if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+                        this.showMyToast(result.errorMsg, '', 'error');
+                    } else {
+                        this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+                    }
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+            });
+    }
+
+    //娓呴櫎鎼滅储鏍�
+    clear(event) {
+        this.category1 = '';
+        this.category3 = '';
+        this.category4 = '';
+        this.category5 = '';
+        this.showSpinner = true;
+        searchConsumableorderdetails({
+            userWorkLocationStr: this.userWorkLocation,
+            agencyProTypeStr: this.agencyProType,
+            accountNameStr: this.accountName,
+            accountIdStr: this.accountid,
+            contractIdStr: this.contractId,
+            hospitalIdStr: this.hospitalId,
+            category1Str: this.category1,
+            category3Str: this.category3,
+            category4Str: this.category4,
+            category5Str: this.category5,
+            category_GoodStr: this.category_Goods,
+            specialCampaignStr: this.specialCampaign,
+            dealerProductIdStr: JSON.stringify(this.dealerProductId),
+            methodTypeStr: this.pageType,
+            editAbleStr: this.editAble,
+            consumableorderdetailsRecordsviewStr: JSON.stringify(
+                this.consumableorderdetailsRecordsview
+            ),
+            proLimitAndDateList: this.proLimitAndDate
+        }).then((result) => {
+            if (result.result == 'Success') {
+                this.consumableorderdetailsRecordsview =
+                    result.consumableorderdetailsRecordsview;
+                this.currentPage = 1;
+                this.currentRecord = [];
+                this.showCurrentReocrd();
+                this.getAllChecked();
+                this.showSpinner = false;
+                this.showMyToast('鎼滅储鎴愬姛', result.errorMsg, 'success');
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+                    this.showMyToast(result.errorMsg, '', 'error');
+                } else {
+                    this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+                }
+            }
+        });
+    }
+
+    //閫夋嫨鎵�鏈�
+    checkAll(event) {
+        for (
+            let i = 0, len = this.consumableorderdetailsRecordsview.length;
+            i < len;
+            i++
+        ) {
+            this.consumableorderdetailsRecordsview[i].check =
+                event.target.checked;
+        }
+    }
+
+    //閫夋嫨
+    check(event) {
+        let index = event.target.getAttribute('data-index');
+        this.consumableorderdetailsRecordsview[index].check =
+            event.target.checked;
+    }
+
+    //閲囪喘鏁伴噺change浜嬩欢
+    // consumableCountChange(event){
+    //    let index = event.target.getAttribute("data-index");
+    //    var value = event.target.value;
+    //    this.consumableorderdetailsRecordsview[index].esd.Consumable_count__c = value;
+    //    if(isNaN(value)){
+    //       value=0.00;
+    //    }
+    //    if(value != null && value !=0 && value!=''){
+    //       this.consumableorderdetailsRecordsview[index].check = true;
+    //    }else{
+    //       this.consumableorderdetailsRecordsview[index].check = false;
+    //    }
+    // }
+
+    //淇濆瓨璁㈠崟
+    saveOrder(event) {
+        this.showSpinner = true;
+        console.log('start save');
+        save({
+            contractNameStr: this.contractName,
+            cocStr: JSON.stringify(this.coc),
+            agencyProTypeStr: this.agencyProType,
+            accountidStr: this.accountid,
+            consumableorderdetailsRecordsviewStr: JSON.stringify(
+                this.consumableorderdetailsRecordsview
+            ),
+            contactDealerStr: JSON.stringify(this.contactDealer),
+            methodTypeStr: this.pageType,
+            eSetIdStr: this.esetId,
+            hospitalIdStr: this.hospitalId,
+            contractIdStr: this.contractId,
+            agencyProType1Str: this.agencyProType1,
+            OSHFLGStr: this.OSHFLG
+        }).then((result) => {
+            this.showSpinner = false;
+            if (result.result == 'Success') {
+                this.esetId = result.eSetId;
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url:
+                            '/lexconsumable?ESetid=' +
+                            this.esetId +
+                            '&type=' +
+                            this.pageType
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('淇濆瓨澶辫触', result.errorMsg, 'error');
+            }
+        });
+    }
+
+    //淇濆瓨璁㈠崟锛堥┏鍥烇級
+    orderCopy(event) {
+        this.showSpinner = true;
+        ordrCopy({
+            contractNameStr: this.contractName,
+            cocStr: JSON.stringify(this.coc),
+            agencyProTypeStr: this.agencyProType,
+            accountidStr: this.accountid,
+            consumableorderdetailsRecordsviewStr: JSON.stringify(
+                this.consumableorderdetailsRecordsview
+            ),
+            contactDealerStr: JSON.stringify(this.contactDealer),
+            methodTypeStr: this.pageType,
+            hospitalIdStr: this.hospitalId,
+            contractIdStr: this.contractId,
+            agencyProType1Str: this.agencyProType1,
+            OSHFLGStr: this.OSHFLG
+        }).then((result) => {
+            this.showSpinner = false;
+            if (result.result == 'Success') {
+                this.esetId = result.eSetId;
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url:
+                            '/lexconsumable?ESetid=' +
+                            this.esetId +
+                            '&type=' +
+                            this.pageType
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('淇濆瓨澶辫触', result.errorMsg, 'error');
+            }
+        });
+    }
+
+    //缂栬緫
+    editOrder(event) {
+        setEditAble({ eSetidStr: this.esetId }).then((result) => {
+            if (result.result == 'Success') {
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url: result.url
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('缂栬緫澶辫触', result.errorMsg, 'error');
+            }
+        });
+    }
+
+    //鎵撳嵃閰嶇疆鍗�
+    printOrder(event) {
+        var site = window.location.origin;
+        const config = {
+            type: 'standard__webPage',
+            attributes: {
+                url:
+                    site + '/consumable/PrintConsumblePDF?ESetid=' + this.esetId
+            }
+        };
+        this[NavigationMixin.Navigate](config);
+    }
+
+    //涓婁紶閰嶇疆鍗�
+    uploadOrder(event) {
+        this.showAttPop = true;
+    }
+
+    //鎻愪氦璁㈠崟
+    submitOrder(event) {
+        sorder({ eSetidStr: this.esetId, accountidStr: this.accountid })
+            .then((result) => {
+                if (result.result == 'Success') {
+                    const config = {
+                        type: 'standard__webPage',
+                        attributes: {
+                            url: result.url
+                        }
+                    };
+                    this[NavigationMixin.Navigate](config);
+                } else {
+                    this.showSpinner = false;
+                    this.errorMsgs = result.errorMsgList;
+                    this.warningMsgs = result.warningMsgList;
+                    console.log('Error:' + result.errorMsg);
+                    if (result.errorMsg.indexOf('璇蜂笂浼犺璐ч厤缃崟闄勪欢') != -1) {
+                        result.errorMsg = '璇蜂笂浼犺璐ч厤缃崟闄勪欢';
+                    }
+                    this.showMyToast('鎻愪氦澶辫触', result.errorMsg, 'error');
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+            });
+    }
+
+    //鍒犻櫎璁㈠崟
+    deleteOrder(event) {
+        if (!window.confirm('鍒犻櫎鏄笉鍙仮澶嶇殑锛屼綘纭瑕佸垹闄ゅ悧锛�')) {
+            return;
+        }
+        delConsumable({ eSetidStr: this.esetId }).then((result) => {
+            if (result.result == 'Success') {
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url: result.url
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('鍒犻櫎澶辫触', result.errorMsg, 'error');
+            }
+        });
+    }
+
+    //鐗逛环閲戦褰曞叆
+    inputOfferPrice(event) {
+        this.edoffersPrice = true;
+        if (!(this.editAble || this.edoffersPrice)) {
             this.showEditBtn = true;
             this.showOfferPriceInputBtn = true;
-          }
-          if (
-            this.coc.Order_status__c == "宸叉彁浜�" ||
-            this.coc.Order_status__c == "鎵瑰噯" ||
-            this.coc.Order_status__c == "椹冲洖"
-          ) {
-            this.disabledEditBtn = true;
-            this.disabledUploadSheetBtn = true;
-            this.disabledSubOrderbtn = true;
-            this.disabledDeleteBtn = true;
-            this.disabledOfferPriceInputBtn = true;
-          }
-          if (
+        } else {
+            this.showEditBtn = false;
+            this.showOfferPriceInputBtn = false;
+        }
+        if (
             !(
-              this.editDelCommitBtnDisabled ||
-              this.editAble ||
-              this.edoffersPrice
+                this.editDelCommitBtnDisabled ||
+                this.editAble ||
+                this.edoffersPrice
             )
-          ) {
+        ) {
             this.showPrintSheetBtn = true;
             this.showUploadSheetBtn = true;
             this.showSubOrderbtn = true;
             this.showDeleteBtn = true;
-          }
-          if (
+        } else {
+            this.showPrintSheetBtn = false;
+            this.showUploadSheetBtn = false;
+            this.showSubOrderbtn = false;
+            this.showDeleteBtn = false;
+        }
+        if (
             (this.editDelCommitBtnDisabled ||
-              this.editAble ||
-              this.edoffersPrice) &&
-            this.coc.Order_status__c != "椹冲洖"
-          ) {
+                this.editAble ||
+                this.edoffersPrice) &&
+            this.coc.Order_status__c != '椹冲洖'
+        ) {
             this.showSaveOrderbtn1 = true;
-          }
-          if (this.coc.Order_status__c == "椹冲洖" && this.editAble) {
-            this.showSaveOrderbtn2 = true;
-          }
-          if (this.coc.Order_status__c == "椹冲洖" && !this.editAble) {
-            this.showReapplyBtn = true;
-          }
-          this.showSpinner = false;
-          this.showPage = true;
         } else {
-          this.showSpinner = false;
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", result.errorMsg, "error");
+            this.showSaveOrderbtn1 = false;
         }
-      })
-      .catch((error) => {
-        this.showSpinner = false;
-        console.log("error:" + error);
-        this.showMyToast("鍒濆鍖栭〉闈㈠け璐�", error, "error");
-      });
-  }
+    }
 
-  //鎺掑簭
-  onHandleSort(event) {
-    //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
-    console.log("sort");
-    if (this.editAble) {
-      const { fieldName: sortedBy, sortDirection } = event.detail;
-      const cloneData = [...this.currentRecord];
-      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].recordId);
-      }
-      console.log("selectedRowsIds = " + JSON.stringify(selectedRowsIds));
-      for (var i = 0; i < cloneData.length; i++) {
-        if (selectedRowsIds.indexOf(cloneData[i].recordId) != -1) {
-          if (i != 0) {
-            let temp = cloneData[index];
-            cloneData[index] = cloneData[i];
-            cloneData[i] = temp;
-          }
-          index++;
+    //鍐嶇敵璇�
+    reapplyOrder(event) {
+        backOrder({ eSetidStr: this.esetId }).then((result) => {
+            if (result.result == 'Success') {
+                const config = {
+                    type: 'standard__webPage',
+                    attributes: {
+                        url: result.url
+                    }
+                };
+                this[NavigationMixin.Navigate](config);
+            } else {
+                this.showSpinner = false;
+                console.log('Error:' + result.errorMsg);
+                this.showMyToast('鍐嶇敵璇峰け璐�', result.errorMsg, 'error');
+            }
+        });
+    }
+
+    //闄勪欢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);
         }
-      }
-      this.currentRecord = cloneData;
-      this.sortDirection = sortDirection;
-      this.sortedBy = sortedBy;
-    } else {
-      const { fieldName: sortedBy, sortDirection } = event.detail;
-      const cloneData = [...this.currentRecord];
-      cloneData.sort(this.sortBy(sortedBy, sortDirection === "asc" ? 1 : -1));
-      this.currentRecord = 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));
-    };
-  }
-
-  //鏄惁鏈夎鍛�
-  get hasWarning() {
-    if (this.warningMsgs == null || this.warningMsgs.length == 0) {
-      return false;
-    }
-    if (this.warningMsgs.length > 0) {
-      return true;
-    }
-  }
-
-  //鏄惁鏈夐敊璇�
-  get hasError() {
-    if (this.errorMsgs == null || this.errorMsgs.length == 0) {
-      return false;
-    }
-    if (this.errorMsgs.length > 0) {
-      return true;
-    }
-  }
-
-  //鐗逛环change浜嬩欢
-  offerPriceChange(event) {
-    this.coc.Offers_Price__c = event.detail.value;
-  }
-
-  //娑堣�楀搧鍚嶇Оchange浜嬩欢
-  category1Change(event) {
-    this.category1 = event.detail.value;
-  }
-
-  //绗笁鍒嗙被change浜嬩欢
-  category3Change(event) {
-    this.showSpinner = true;
-    this.category3 = event.detail.value;
-    this.category4 = "";
-    this.category5 = "";
-    categoryAllload({
-      agencyProTypeStr: this.agencyProType,
-      category3Str: this.category3
-    }).then((result) => {
-      if (result.result == "Success") {
-        this.category4Option = result.category4Option;
-        this.category5Option = result.category5Option;
-        this.showSpinner = false;
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("鍔犺浇鍒嗙被澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //绗洓鍒嗙被change浜嬩欢
-  category4Change(event) {
-    this.showSpinner = true;
-    this.category4 = event.detail.value;
-    this.category5 = "";
-    categoryload({
-      agencyProTypeStr: this.agencyProType,
-      category3Str: this.category3,
-      category4Str: this.category4
-    }).then((result) => {
-      if (result.result == "Success") {
-        this.category4Option = result.category4Option;
-        this.category5Option = result.category5Option;
-        this.showSpinner = false;
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("鍔犺浇鍒嗙被澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //绗簲鍒嗙被change浜嬩欢
-  category5Change(event) {
-    this.category5 = event.detail.value;
-  }
-
-  //鎼滅储浜у搧
-  searchProduct(event) {
-    this.showSpinner = true;
-    searchConsumableorderdetails({
-      userWorkLocationStr: this.userWorkLocation,
-      agencyProTypeStr: this.agencyProType,
-      accountNameStr: this.accountName,
-      accountIdStr: this.accountid,
-      contractIdStr: this.contractId,
-      hospitalIdStr: this.hospitalId,
-      category1Str: this.category1,
-      category3Str: this.category3,
-      category4Str: this.category4,
-      category5Str: this.category5,
-      category_GoodStr: this.category_Goods,
-      specialCampaignStr: this.specialCampaign,
-      dealerProductIdStr: JSON.stringify(this.dealerProductId),
-      methodTypeStr: this.pageType,
-      editAbleStr: this.editAble,
-      consumableorderdetailsRecordsviewStr: JSON.stringify(
-        this.consumableorderdetailsRecordsview
-      ),
-      proLimitAndDateList: this.proLimitAndDate
-    })
-      .then((result) => {
-        if (result.result == "Success") {
-          this.consumableorderdetailsRecordsview =
-            result.consumableorderdetailsRecordsview;
-          this.currentPage = 1;
-          this.currentRecord = [];
-          this.showCurrentReocrd();
-          this.getAllChecked();
-          this.showSpinner = false;
-          this.errorMsgs = result.errorMsgList;
-          this.warningMsgs = result.warningMsgList;
-          // this.hasError = result.hasError;
-          // this.hasWarning = result.hasWarning;
-          this.showMyToast("鎼滅储鎴愬姛", result.errorMsg, "success");
+    //鏄惁鏄剧ず闄勪欢绉婚櫎
+    get attDelBtn() {
+        if (
+            this.fileName != '' &&
+            this.fileName != null &&
+            this.fileName != '璇烽�夋嫨涓�涓枃浠朵笂浼�'
+        ) {
+            return true;
         } else {
-          this.showSpinner = false;
-          console.log("Error:" + result.errorMsg);
-          if (result.errorMsg == "娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�") {
-            this.showMyToast(result.errorMsg, "", "error");
-          } else {
-            this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
-          }
+            return false;
         }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-      });
-  }
+    }
 
-  //娓呴櫎鎼滅储鏍�
-  clear(event) {
-    this.category1 = "";
-    this.category3 = "";
-    this.category4 = "";
-    this.category5 = "";
-    this.showSpinner = true;
-    searchConsumableorderdetails({
-      userWorkLocationStr: this.userWorkLocation,
-      agencyProTypeStr: this.agencyProType,
-      accountNameStr: this.accountName,
-      accountIdStr: this.accountid,
-      contractIdStr: this.contractId,
-      hospitalIdStr: this.hospitalId,
-      category1Str: this.category1,
-      category3Str: this.category3,
-      category4Str: this.category4,
-      category5Str: this.category5,
-      category_GoodStr: this.category_Goods,
-      specialCampaignStr: this.specialCampaign,
-      dealerProductIdStr: JSON.stringify(this.dealerProductId),
-      methodTypeStr: this.pageType,
-      editAbleStr: this.editAble,
-      consumableorderdetailsRecordsviewStr: JSON.stringify(
-        this.consumableorderdetailsRecordsview
-      ),
-      proLimitAndDateList: this.proLimitAndDate
-    }).then((result) => {
-      if (result.result == "Success") {
-        this.consumableorderdetailsRecordsview =
-          result.consumableorderdetailsRecordsview;
+    //鍏抽棴闄勪欢寮圭獥
+    closePop() {
+        this.showAttPop = false;
+        this.filesUploaded = [];
+        this.fileName = null;
+    }
+
+    //绉婚櫎闄勪欢
+    removeAtt() {
+        this.filesUploaded = [];
+        this.fileName = '';
+    }
+
+    //涓婁紶闄勪欢
+    uploadAtt(event) {
+        if (this.filesUploaded.length > 0) {
+            this.file = this.filesUploaded[0];
+            if (this.file.size > this.MAX_FILE_SIZE) {
+                window.console.log('鏂囦欢杩囧ぇ');
+                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() {
+        this.showPopSpinner = true;
+        filesUpload({
+            pId: this.esetId,
+            fileName: this.file.name,
+            base64Data: encodeURIComponent(this.fileContents)
+        })
+            .then((result) => {
+                this.showPopSpinner = false;
+                if (result.result == 'Success') {
+                    this.closePop();
+                    window.location.reload();
+                } else {
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast('涓婁紶澶辫触', result.errorMsg, 'error');
+                }
+            })
+            .catch((error) => {
+                this.showPopSpinner = false;
+                this.showMyToast('涓婁紶澶辫触', error, 'error');
+            });
+    }
+
+    //鍒犻櫎闄勪欢
+    deleteAtt(event) {
+        this.showSpinner = true;
+        var recordId = event.target.getAttribute('data-fileid');
+        console.log('attid:' + recordId);
+        deleteAtt({ contentVersionId: recordId, cocId: this.esetId })
+            .then((result) => {
+                this.showSpinner = false;
+                if (result.result == 'Success') {
+                    window.location.reload();
+                } else {
+                    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');
+            });
+    }
+
+    //棰勮闄勪欢
+    previweAtt(event) {
+        var recordId = event.target.getAttribute('data-fileid');
+        console.log(recordId);
+        this[NavigationMixin.Navigate]({
+            type: 'standard__namedPage',
+            attributes: {
+                pageName: 'filePreview'
+            },
+            state: {
+                recordIds: recordId,
+                selectedRecordId: recordId
+            }
+        });
+    }
+
+    //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
+    showSearchHos(event) {
+        initHospital()
+            .then((result) => {
+                if (result.result == 'Success') {
+                    this.showAttHosPop = true;
+                    this.hospitalList = result.attList;
+                    for (var i in this.hospitalList) {
+                        if (this.hospitalList[i].State_Master__c) {
+                            this.hospitalList[i]['StateMaster'] =
+                                this.hospitalList[i].State_Master__r.Name;
+                        }
+                    }
+                } else {
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast(
+                        '鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�',
+                        result.errorMsg,
+                        'error'
+                    );
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+                this.showMyToast('鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�', error, 'error');
+            });
+    }
+
+    //妫�绱㈠尰闄�
+    searchHos(event) {
+        searchHospital({
+            searchName: this.searchNameHos,
+            accountId: this.accountid
+        })
+            .then((result) => {
+                if (result.result == 'Success') {
+                    this.hospitalList = result.attList;
+                    for (var i in this.hospitalList) {
+                        if (this.hospitalList[i].State_Master__c) {
+                            this.hospitalList[i]['StateMaster'] =
+                                this.hospitalList[i].State_Master__r.Name;
+                        }
+                    }
+                } else {
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+                this.showMyToast('鎼滅储澶辫触', error, 'error');
+            });
+    }
+
+    //鍖婚櫌鍚嶇Оchange
+    searchNameHosChange(event) {
+        this.searchNameHos = event.detail.value;
+    }
+
+    //鍏抽棴寮圭獥
+    closeHospitalPop() {
+        this.showAttHosPop = false;
+        this.chooseHospital = '';
+        this.chooseHospitalId = '';
+    }
+
+    // //閫夋嫨鍖婚櫌
+    // chooseHos(event){
+    //    var hosName = event.target.getAttribute("data-name");
+    //    var hosid = event.target.getAttribute("data-hosid");
+    //    console.log('hos:'+hosName+'---'+hosid);
+    //    this.chooseHospital = hosName;
+    //    this.chooseHospitalId = hosid;
+    // }
+
+    changeHos(event) {
+        this.hospitalName = event.detail.value;
+    }
+
+    changeCon(event) {
+        this.contractName = event.detail.value;
+    }
+
+    chooseHos(event) {
+        const row = event.detail.row;
+        this.chooseHospitalId = row.Id;
+        this.chooseHospital = row.Name;
+        console.log('row.Id:' + row.Id);
+        console.log('row.Name:' + row.Name);
+        this.confirmHospital();
+    }
+
+    //纭閫夋嫨鍖婚櫌
+    confirmHospital() {
+        if (this.chooseHospital != '' && this.chooseHospital != null) {
+            this.hospitalId = this.chooseHospitalId;
+            this.tempidHp = this.chooseHospitalId;
+            this.hospitalName = this.chooseHospital;
+            this.closeHospitalPop();
+            //娑堥櫎璀﹀憡
+            var arr = [];
+            for (var i in this.warningMsgs) {
+                if (this.warningMsgs[i] != '璇烽�夋嫨鍖婚櫌') {
+                    arr.push(this.warningMsgs[i]);
+                }
+            }
+            this.warningMsgs = arr;
+            if (this.tempidHp != 'tempId' && this.tempidHp != '') {
+                searchorderdetails({
+                    methodTypeStr: this.pageType,
+                    accountIdStr: this.accountid,
+                    hospitalIdStr: this.hospitalId,
+                    contractIdStr: this.contractId,
+                    userWorkLocationStr: this.userWorkLocation,
+                    accountNameStr: this.accountName,
+                    proLimitAndDateList: this.proLimitAndDate,
+                    editAbleStr: this.editAble
+                })
+                    .then((result) => {
+                        if (result.result == 'Success') {
+                            this.consumableorderdetailsRecordsview =
+                                result.consumableorderdetailsRecordsview;
+                            this.currentPage = 1;
+                            this.currentRecord = [];
+                            this.showCurrentReocrd();
+                            this.getAllChecked();
+                            this.showMyToast(
+                                '鎼滅储鎴愬姛',
+                                result.errorMsg,
+                                'success'
+                            );
+                        } else {
+                            console.log('Error:' + result.errorMsg);
+                            if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+                                this.showMyToast(result.errorMsg, '', 'error');
+                            } else {
+                                this.showMyToast(
+                                    '鎼滅储浜у搧澶辫触',
+                                    result.errorMsg,
+                                    'error'
+                                );
+                            }
+                        }
+                    })
+                    .catch((error) => {
+                        console.log('Error:' + error);
+                        this.showMyToast('鎼滅储浜у搧澶辫触', error, 'error');
+                    });
+                this.tempidHp = 'tempId';
+            }
+        } else {
+            this.showMyToast('璇烽�夋嫨鍖婚櫌', '', 'error');
+        }
+    }
+
+    //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
+    showSearchCon() {
+        initContract({ ctype: this.agencyProType1 })
+            .then((result) => {
+                if (result.result == 'Success') {
+                    this.showConPop = true;
+                    this.contractList = result.attList;
+                    for (var i in this.contractList) {
+                        if (this.contractList[i].State_Master__c) {
+                            this.contractList[i]['StateMaster'] =
+                                this.contractList[i].State_Master__r.Name;
+                        }
+                    }
+                } else {
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast(
+                        '鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�',
+                        result.errorMsg,
+                        'error'
+                    );
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+                this.showMyToast('鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�', error, 'error');
+            });
+    }
+
+    //妫�绱㈠悎鍚�
+    searchCon() {
+        searchContract({
+            searchName: this.searchNameCon,
+            accountId: this.accountid,
+            ctype: this.agencyProType1,
+            OSHFLGStr: this.OSHFLG
+        })
+            .then((result) => {
+                if (result.result == 'Success') {
+                    this.contractList = result.attList;
+                    for (var i in this.contractList) {
+                        if (this.contractList[i].State_Master__c) {
+                            this.contractList[i]['StateMaster'] =
+                                this.contractList[i].State_Master__r.Name;
+                        }
+                    }
+                } else {
+                    console.log('Error:' + result.errorMsg);
+                    this.showMyToast('鎼滅储澶辫触', result.errorMsg, 'error');
+                }
+            })
+            .catch((error) => {
+                console.log('Error:' + error);
+                this.showMyToast('鎼滅储澶辫触', error, 'error');
+            });
+    }
+
+    searchNameConChange(event) {
+        this.searchNameCon = event.detail.value;
+    }
+
+    //鍏抽棴寮圭獥
+    closeContractPop() {
+        this.showConPop = false;
+        this.chooseContract = '';
+        this.chooseContractId = '';
+    }
+
+    //閫夋嫨鍚堝悓
+    // chooseCon(event){
+    //    var conName = event.target.getAttribute("data-name");
+    //    var conid = event.target.getAttribute("data-hosid");
+    //    console.log('hos:'+conName+'---'+conid);
+    //    this.chooseContract = conName;
+    //    this.chooseContractId = conid;
+    // }
+
+    chooseCon(event) {
+        const row = event.detail.row;
+        this.chooseContractId = row.Id;
+        this.chooseContract = row.Name;
+        console.log('row.Id:' + row.Id);
+        console.log('row.Name:' + row.Name);
+        this.confirmContract();
+    }
+
+    //纭閫夋嫨鍚堝悓
+    confirmContract() {
+        if (this.chooseContract != '' && this.chooseContract != null) {
+            this.contractId = this.chooseContractId;
+            this.tempidPp = this.chooseContractId;
+            this.contractName = this.chooseContract;
+            this.closeContractPop();
+            if (
+                this.tempidPp != 'tempId' &&
+                this.tempidPp != '' &&
+                this.contractId != '' &&
+                this.pageType == 'promotionorder'
+            ) {
+                searchorderdetails({
+                    methodTypeStr: this.pageType,
+                    accountIdStr: this.accountid,
+                    hospitalIdStr: this.hospitalId,
+                    contractIdStr: this.contractId,
+                    userWorkLocationStr: this.userWorkLocation,
+                    accountNameStr: this.accountName,
+                    proLimitAndDateList: this.proLimitAndDate,
+                    editAbleStr: this.editAble
+                })
+                    .then((result) => {
+                        if (result.result == 'Success') {
+                            this.consumableorderdetailsRecordsview =
+                                result.consumableorderdetailsRecordsview;
+                            this.currentPage = 1;
+                            this.currentRecord = [];
+                            this.showCurrentReocrd();
+                            this.getAllChecked();
+                            this.showMyToast(
+                                '鎼滅储鎴愬姛',
+                                result.errorMsg,
+                                'success'
+                            );
+                        } else {
+                            console.log('Error:' + result.errorMsg);
+                            if (result.errorMsg == '娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�') {
+                                this.showMyToast(result.errorMsg, '', 'error');
+                            } else {
+                                this.showMyToast(
+                                    '鎼滅储浜у搧澶辫触',
+                                    result.errorMsg,
+                                    'error'
+                                );
+                            }
+                        }
+                    })
+                    .catch((error) => {
+                        console.log('Error:' + error);
+                        this.showMyToast('鎼滅储浜у搧澶辫触', error, 'error');
+                    });
+                this.tempidPp = 'tempId';
+            }
+        } else {
+            this.showMyToast('璇烽�夋嫨鍚堝悓', '', 'error');
+        }
+    }
+
+    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);
+    }
+
+    //鍒嗛〉
+    showCurrentReocrd() {
+        var startIndex = 0;
+        var endIndex = 0;
+        console.log('len:' + this.consumableorderdetailsRecordsview.length);
+        if (
+            this.consumableorderdetailsRecordsview != null &&
+            this.consumableorderdetailsRecordsview.length > 0
+        ) {
+            var currentRecord = [];
+            var currentCount = 0;
+            var mu =
+                this.consumableorderdetailsRecordsview.length % this.pageSize;
+            if (this.currentPage == this.totalPage) {
+                if (mu != 0) {
+                    currentCount = mu;
+                } else {
+                    currentCount = this.pageSize;
+                }
+            } else {
+                currentCount = this.pageSize;
+            }
+            console.log('this.totalPage:' + this.totalPage);
+            console.log('this.pageSize:' + this.pageSize);
+            console.log('mu:' + mu);
+            console.log('currentCount:' + currentCount);
+            startIndex = (this.currentPage - 1) * this.pageSize;
+            endIndex = parseInt(startIndex) + parseInt(currentCount) - 1;
+            console.log('startIndex:' + startIndex);
+            console.log('endIndex:' + endIndex);
+            if (this.editAble) {
+                for (var i in this.currentRecord) {
+                    if (this.currentRecord[i].check) {
+                        currentRecord.push(this.currentRecord[i]);
+                    }
+                }
+            }
+            for (var i = startIndex; i <= endIndex; i++) {
+                var count = 0;
+                for (var j in this.currentRecord) {
+                    if (
+                        this.consumableorderdetailsRecordsview[i].recordId ==
+                        this.currentRecord[j].recordId
+                    ) {
+                        count++;
+                    }
+                }
+                if (count == 0) {
+                    currentRecord.push(
+                        this.consumableorderdetailsRecordsview[i]
+                    );
+                }
+            }
+            this.recordStart = startIndex + 1;
+            this.recordEnd = endIndex + 1;
+            this.currentRecord = currentRecord;
+        } else {
+            this.currentPage = 0;
+            this.currentRecord = [];
+        }
+    }
+
+    get prePage() {
+        return this.currentPage - 1;
+    }
+
+    get nextPage() {
+        return this.currentPage + 1;
+    }
+
+    get totalPage() {
+        if (
+            this.consumableorderdetailsRecordsview.length % this.pageSize ==
+            0
+        ) {
+            return Math.trunc(
+                this.consumableorderdetailsRecordsview.length / this.pageSize
+            );
+        } else {
+            return (
+                Math.trunc(
+                    this.consumableorderdetailsRecordsview.length /
+                        this.pageSize
+                ) + 1
+            );
+        }
+    }
+
+    get totalRecords() {
+        return this.consumableorderdetailsRecordsview.length;
+    }
+
+    //绗竴椤�
+    goFirstPage() {
+        this.currentPage = 1;
+        this.showCurrentReocrd();
+    }
+
+    //鏈�鍚庝竴椤�
+    goLastPage() {
+        this.currentPage = this.totalPage;
+        this.showCurrentReocrd();
+    }
+
+    //涓婁竴椤�
+    prePageClick() {
+        this.currentPage = this.currentPage - 1;
+        this.showCurrentReocrd();
+    }
+
+    //涓嬩竴椤�
+    nextPageClick() {
+        this.currentPage = this.currentPage + 1;
+        this.showCurrentReocrd();
+    }
+
+    //page size change
+    pageSizeChange(event) {
+        console.log('pagesize:' + event.detail);
+        this.pageSize = event.detail;
         this.currentPage = 1;
         this.currentRecord = [];
         this.showCurrentReocrd();
-        this.getAllChecked();
-        this.showSpinner = false;
-        this.showMyToast("鎼滅储鎴愬姛", result.errorMsg, "success");
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        if (result.errorMsg == "娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�") {
-          this.showMyToast(result.errorMsg, "", "error");
-        } else {
-          this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
-        }
-      }
-    });
-  }
-
-  //閫夋嫨鎵�鏈�
-  checkAll(event) {
-    for (
-      let i = 0, len = this.consumableorderdetailsRecordsview.length;
-      i < len;
-      i++
-    ) {
-      this.consumableorderdetailsRecordsview[i].check = event.target.checked;
     }
-  }
 
-  //閫夋嫨
-  check(event) {
-    let index = event.target.getAttribute("data-index");
-    this.consumableorderdetailsRecordsview[index].check = event.target.checked;
-  }
-
-  //閲囪喘鏁伴噺change浜嬩欢
-  // consumableCountChange(event){
-  //    let index = event.target.getAttribute("data-index");
-  //    var value = event.target.value;
-  //    this.consumableorderdetailsRecordsview[index].esd.Consumable_count__c = value;
-  //    if(isNaN(value)){
-  //       value=0.00;
-  //    }
-  //    if(value != null && value !=0 && value!=''){
-  //       this.consumableorderdetailsRecordsview[index].check = true;
-  //    }else{
-  //       this.consumableorderdetailsRecordsview[index].check = false;
-  //    }
-  // }
-
-  //淇濆瓨璁㈠崟
-  saveOrder(event) {
-    this.showSpinner = true;
-    console.log("start save");
-    save({
-      contractNameStr: this.contractName,
-      cocStr: JSON.stringify(this.coc),
-      agencyProTypeStr: this.agencyProType,
-      accountidStr: this.accountid,
-      consumableorderdetailsRecordsviewStr: JSON.stringify(
-        this.consumableorderdetailsRecordsview
-      ),
-      contactDealerStr: JSON.stringify(this.contactDealer),
-      methodTypeStr: this.pageType,
-      eSetIdStr: this.esetId,
-      hospitalIdStr: this.hospitalId,
-      contractIdStr: this.contractId,
-      agencyProType1Str: this.agencyProType1,
-      OSHFLGStr: this.OSHFLG
-    }).then((result) => {
-      this.showSpinner = false;
-      if (result.result == "Success") {
-        this.esetId = result.eSetId;
-        const config = {
-          type: "standard__webPage",
-          attributes: {
-            url:
-              "/lexconsumable?ESetid=" + this.esetId + "&type=" + this.pageType
-          }
-        };
-        this[NavigationMixin.Navigate](config);
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("淇濆瓨澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //淇濆瓨璁㈠崟锛堥┏鍥烇級
-  orderCopy(event) {
-    this.showSpinner = true;
-    ordrCopy({
-      contractNameStr: this.contractName,
-      cocStr: JSON.stringify(this.coc),
-      agencyProTypeStr: this.agencyProType,
-      accountidStr: this.accountid,
-      consumableorderdetailsRecordsviewStr: JSON.stringify(
-        this.consumableorderdetailsRecordsview
-      ),
-      contactDealerStr: JSON.stringify(this.contactDealer),
-      methodTypeStr: this.pageType,
-      hospitalIdStr: this.hospitalId,
-      contractIdStr: this.contractId,
-      agencyProType1Str: this.agencyProType1,
-      OSHFLGStr: this.OSHFLG
-    }).then((result) => {
-      this.showSpinner = false;
-      if (result.result == "Success") {
-        this.esetId = result.eSetId;
-        const config = {
-          type: "standard__webPage",
-          attributes: {
-            url:
-              "/lexconsumable?ESetid=" + this.esetId + "&type=" + this.pageType
-          }
-        };
-        this[NavigationMixin.Navigate](config);
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("淇濆瓨澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //缂栬緫
-  editOrder(event) {
-    setEditAble({ eSetidStr: this.esetId }).then((result) => {
-      if (result.result == "Success") {
-        const config = {
-          type: "standard__webPage",
-          attributes: {
-            url: result.url
-          }
-        };
-        this[NavigationMixin.Navigate](config);
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("缂栬緫澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //鎵撳嵃閰嶇疆鍗�
-  printOrder(event) {
-    var site = window.location.origin;
-    const config = {
-      type: "standard__webPage",
-      attributes: {
-        url: site + "/consumable/PrintConsumblePDF?ESetid=" + this.esetId
-      }
-    };
-    this[NavigationMixin.Navigate](config);
-  }
-
-  //涓婁紶閰嶇疆鍗�
-  uploadOrder(event) {
-    this.showAttPop = true;
-  }
-
-  //鎻愪氦璁㈠崟
-  submitOrder(event) {
-    sorder({ eSetidStr: this.esetId, accountidStr: this.accountid })
-      .then((result) => {
-        if (result.result == "Success") {
-          const config = {
-            type: "standard__webPage",
-            attributes: {
-              url: result.url
-            }
-          };
-          this[NavigationMixin.Navigate](config);
-        } else {
-          this.showSpinner = false;
-          this.errorMsgs = result.errorMsgList;
-          this.warningMsgs = result.warningMsgList;
-          console.log("Error:" + result.errorMsg);
-          if (result.errorMsg.indexOf("璇蜂笂浼犺璐ч厤缃崟闄勪欢") != -1) {
-            result.errorMsg = "璇蜂笂浼犺璐ч厤缃崟闄勪欢";
-          }
-          this.showMyToast("鎻愪氦澶辫触", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-      });
-  }
-
-  //鍒犻櫎璁㈠崟
-  deleteOrder(event) {
-    if (!window.confirm("鍒犻櫎鏄笉鍙仮澶嶇殑锛屼綘纭瑕佸垹闄ゅ悧锛�")) {
-      return;
+    //涓婁竴椤垫寜閽槸鍚isable
+    get previousButtonDisabled() {
+        return this.currentPage == 1 || this.currentPage == 0;
     }
-    delConsumable({ eSetidStr: this.esetId }).then((result) => {
-      if (result.result == "Success") {
-        const config = {
-          type: "standard__webPage",
-          attributes: {
-            url: result.url
-          }
-        };
-        this[NavigationMixin.Navigate](config);
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("鍒犻櫎澶辫触", result.errorMsg, "error");
-      }
-    });
-  }
 
-  //鐗逛环閲戦褰曞叆
-  inputOfferPrice(event) {
-    this.edoffersPrice = true;
-    if (!(this.editAble || this.edoffersPrice)) {
-      this.showEditBtn = true;
-      this.showOfferPriceInputBtn = true;
-    } else {
-      this.showEditBtn = false;
-      this.showOfferPriceInputBtn = false;
+    //涓嬩竴椤垫寜閽槸鍚isable
+    get nextButtonDisabled() {
+        return this.currentPage == this.totalPage;
     }
-    if (
-      !(this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice)
-    ) {
-      this.showPrintSheetBtn = true;
-      this.showUploadSheetBtn = true;
-      this.showSubOrderbtn = true;
-      this.showDeleteBtn = true;
-    } else {
-      this.showPrintSheetBtn = false;
-      this.showUploadSheetBtn = false;
-      this.showSubOrderbtn = false;
-      this.showDeleteBtn = false;
-    }
-    if (
-      (this.editDelCommitBtnDisabled || this.editAble || this.edoffersPrice) &&
-      this.coc.Order_status__c != "椹冲洖"
-    ) {
-      this.showSaveOrderbtn1 = true;
-    } else {
-      this.showSaveOrderbtn1 = false;
-    }
-  }
-
-  //鍐嶇敵璇�
-  reapplyOrder(event) {
-    backOrder({ eSetidStr: this.esetId }).then((result) => {
-      if (result.result == "Success") {
-        const config = {
-          type: "standard__webPage",
-          attributes: {
-            url: result.url
-          }
-        };
-        this[NavigationMixin.Navigate](config);
-      } else {
-        this.showSpinner = false;
-        console.log("Error:" + result.errorMsg);
-        this.showMyToast("鍐嶇敵璇峰け璐�", result.errorMsg, "error");
-      }
-    });
-  }
-
-  //闄勪欢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 = "";
-  }
-
-  //涓婁紶闄勪欢
-  uploadAtt(event) {
-    if (this.filesUploaded.length > 0) {
-      this.file = this.filesUploaded[0];
-      if (this.file.size > this.MAX_FILE_SIZE) {
-        window.console.log("鏂囦欢杩囧ぇ");
-        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() {
-    this.showPopSpinner = true;
-    filesUpload({
-      pId: this.esetId,
-      fileName: this.file.name,
-      base64Data: encodeURIComponent(this.fileContents)
-    })
-      .then((result) => {
-        this.showPopSpinner = false;
-        if (result.result == "Success") {
-          this.closePop();
-          window.location.reload();
-        } else {
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("涓婁紶澶辫触", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        this.showPopSpinner = false;
-        this.showMyToast("涓婁紶澶辫触", error, "error");
-      });
-  }
-
-  //鍒犻櫎闄勪欢
-  deleteAtt(event) {
-    this.showSpinner = true;
-    var recordId = event.target.getAttribute("data-fileid");
-    console.log("attid:" + recordId);
-    deleteAtt({ contentVersionId: recordId, cocId: this.esetId })
-      .then((result) => {
-        this.showSpinner = false;
-        if (result.result == "Success") {
-          window.location.reload();
-        } else {
-          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");
-      });
-  }
-
-  //棰勮闄勪欢
-  previweAtt(event) {
-    var recordId = event.target.getAttribute("data-fileid");
-    console.log(recordId);
-    this[NavigationMixin.Navigate]({
-      type: "standard__namedPage",
-      attributes: {
-        pageName: "filePreview"
-      },
-      state: {
-        recordIds: recordId,
-        selectedRecordId: recordId
-      }
-    });
-  }
-
-  //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
-  showSearchHos(event) {
-    initHospital()
-      .then((result) => {
-        if (result.result == "Success") {
-          this.showAttHosPop = true;
-          this.hospitalList = result.attList;
-          for (var i in this.hospitalList) {
-            if (this.hospitalList[i].State_Master__c) {
-              this.hospitalList[i]["StateMaster"] =
-                this.hospitalList[i].State_Master__r.Name;
-            }
-          }
-        } else {
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-        this.showMyToast("鍒濆鍖栨绱㈠尰闄㈤〉闈㈠け璐�", error, "error");
-      });
-  }
-
-  //妫�绱㈠尰闄�
-  searchHos(event) {
-    searchHospital({
-      searchName: this.searchNameHos,
-      accountId: this.accountid
-    })
-      .then((result) => {
-        if (result.result == "Success") {
-          this.hospitalList = result.attList;
-          for (var i in this.hospitalList) {
-            if (this.hospitalList[i].State_Master__c) {
-              this.hospitalList[i]["StateMaster"] =
-                this.hospitalList[i].State_Master__r.Name;
-            }
-          }
-        } else {
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-        this.showMyToast("鎼滅储澶辫触", error, "error");
-      });
-  }
-
-  //鍖婚櫌鍚嶇Оchange
-  searchNameHosChange(event) {
-    this.searchNameHos = event.detail.value;
-  }
-
-  //鍏抽棴寮圭獥
-  closeHospitalPop() {
-    this.showAttHosPop = false;
-    this.chooseHospital = "";
-    this.chooseHospitalId = "";
-  }
-
-  // //閫夋嫨鍖婚櫌
-  // chooseHos(event){
-  //    var hosName = event.target.getAttribute("data-name");
-  //    var hosid = event.target.getAttribute("data-hosid");
-  //    console.log('hos:'+hosName+'---'+hosid);
-  //    this.chooseHospital = hosName;
-  //    this.chooseHospitalId = hosid;
-  // }
-
-  changeHos(event) {
-    this.hospitalName = event.detail.value;
-  }
-
-  changeCon(event) {
-    this.contractName = event.detail.value;
-  }
-
-  chooseHos(event) {
-    const row = event.detail.row;
-    this.chooseHospitalId = row.Id;
-    this.chooseHospital = row.Name;
-    console.log("row.Id:" + row.Id);
-    console.log("row.Name:" + row.Name);
-    this.confirmHospital();
-  }
-
-  //纭閫夋嫨鍖婚櫌
-  confirmHospital() {
-    if (this.chooseHospital != "" && this.chooseHospital != null) {
-      this.hospitalId = this.chooseHospitalId;
-      this.tempidHp = this.chooseHospitalId;
-      this.hospitalName = this.chooseHospital;
-      this.closeHospitalPop();
-      //娑堥櫎璀﹀憡
-      var arr = [];
-      for (var i in this.warningMsgs) {
-        if (this.warningMsgs[i] != "璇烽�夋嫨鍖婚櫌") {
-          arr.push(this.warningMsgs[i]);
-        }
-      }
-      this.warningMsgs = arr;
-      if (this.tempidHp != "tempId" && this.tempidHp != "") {
-        searchorderdetails({
-          methodTypeStr: this.pageType,
-          accountIdStr: this.accountid,
-          hospitalIdStr: this.hospitalId,
-          contractIdStr: this.contractId,
-          userWorkLocationStr: this.userWorkLocation,
-          accountNameStr: this.accountName,
-          proLimitAndDateList: this.proLimitAndDate,
-          editAbleStr: this.editAble
-        })
-          .then((result) => {
-            if (result.result == "Success") {
-              this.consumableorderdetailsRecordsview =
-                result.consumableorderdetailsRecordsview;
-              this.currentPage = 1;
-              this.currentRecord = [];
-              this.showCurrentReocrd();
-              this.getAllChecked();
-              this.showMyToast("鎼滅储鎴愬姛", result.errorMsg, "success");
-            } else {
-              console.log("Error:" + result.errorMsg);
-              if (result.errorMsg == "娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�") {
-                this.showMyToast(result.errorMsg, "", "error");
-              } else {
-                this.showMyToast("鎼滅储浜у搧澶辫触", result.errorMsg, "error");
-              }
-            }
-          })
-          .catch((error) => {
-            console.log("Error:" + error);
-            this.showMyToast("鎼滅储浜у搧澶辫触", error, "error");
-          });
-        this.tempidHp = "tempId";
-      }
-    } else {
-      this.showMyToast("璇烽�夋嫨鍖婚櫌", "", "error");
-    }
-  }
-
-  //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
-  showSearchCon() {
-    initContract({ ctype: this.agencyProType1 })
-      .then((result) => {
-        if (result.result == "Success") {
-          this.showConPop = true;
-          this.contractList = result.attList;
-          for (var i in this.contractList) {
-            if (this.contractList[i].State_Master__c) {
-              this.contractList[i]["StateMaster"] =
-                this.contractList[i].State_Master__r.Name;
-            }
-          }
-        } else {
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-        this.showMyToast("鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�", error, "error");
-      });
-  }
-
-  //妫�绱㈠悎鍚�
-  searchCon() {
-    searchContract({
-      searchName: this.searchNameCon,
-      accountId: this.accountid,
-      ctype: this.agencyProType1,
-      OSHFLGStr: this.OSHFLG
-    })
-      .then((result) => {
-        if (result.result == "Success") {
-          this.contractList = result.attList;
-          for (var i in this.contractList) {
-            if (this.contractList[i].State_Master__c) {
-              this.contractList[i]["StateMaster"] =
-                this.contractList[i].State_Master__r.Name;
-            }
-          }
-        } else {
-          console.log("Error:" + result.errorMsg);
-          this.showMyToast("鎼滅储澶辫触", result.errorMsg, "error");
-        }
-      })
-      .catch((error) => {
-        console.log("Error:" + error);
-        this.showMyToast("鎼滅储澶辫触", error, "error");
-      });
-  }
-
-  searchNameConChange(event) {
-    this.searchNameCon = event.detail.value;
-  }
-
-  //鍏抽棴寮圭獥
-  closeContractPop() {
-    this.showConPop = false;
-    this.chooseContract = "";
-    this.chooseContractId = "";
-  }
-
-  //閫夋嫨鍚堝悓
-  // chooseCon(event){
-  //    var conName = event.target.getAttribute("data-name");
-  //    var conid = event.target.getAttribute("data-hosid");
-  //    console.log('hos:'+conName+'---'+conid);
-  //    this.chooseContract = conName;
-  //    this.chooseContractId = conid;
-  // }
-
-  chooseCon(event) {
-    const row = event.detail.row;
-    this.chooseContractId = row.Id;
-    this.chooseContract = row.Name;
-    console.log("row.Id:" + row.Id);
-    console.log("row.Name:" + row.Name);
-    this.confirmContract();
-  }
-
-  //纭閫夋嫨鍚堝悓
-  confirmContract() {
-    if (this.chooseContract != "" && this.chooseContract != null) {
-      this.contractId = this.chooseContractId;
-      this.tempidPp = this.chooseContractId;
-      this.contractName = this.chooseContract;
-      this.closeContractPop();
-      if (
-        this.tempidPp != "tempId" &&
-        this.tempidPp != "" &&
-        this.contractId != "" &&
-        this.pageType == "promotionorder"
-      ) {
-        searchorderdetails({
-          methodTypeStr: this.pageType,
-          accountIdStr: this.accountid,
-          hospitalIdStr: this.hospitalId,
-          contractIdStr: this.contractId,
-          userWorkLocationStr: this.userWorkLocation,
-          accountNameStr: this.accountName,
-          proLimitAndDateList: this.proLimitAndDate,
-          editAbleStr: this.editAble
-        })
-          .then((result) => {
-            if (result.result == "Success") {
-              this.consumableorderdetailsRecordsview =
-                result.consumableorderdetailsRecordsview;
-              this.currentPage = 1;
-              this.currentRecord = [];
-              this.showCurrentReocrd();
-              this.getAllChecked();
-              this.showMyToast("鎼滅储鎴愬姛", result.errorMsg, "success");
-            } else {
-              console.log("Error:" + result.errorMsg);
-              if (result.errorMsg == "娌℃湁鎼滅储鍒扮浉鍏虫暟鎹�") {
-                this.showMyToast(result.errorMsg, "", "error");
-              } else {
-                this.showMyToast("鎼滅储浜у搧澶辫触", result.errorMsg, "error");
-              }
-            }
-          })
-          .catch((error) => {
-            console.log("Error:" + error);
-            this.showMyToast("鎼滅储浜у搧澶辫触", error, "error");
-          });
-        this.tempidPp = "tempId";
-      }
-    } else {
-      this.showMyToast("璇烽�夋嫨鍚堝悓", "", "error");
-    }
-  }
-
-  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);
-  }
-
-  //鍒嗛〉
-  showCurrentReocrd() {
-    var startIndex = 0;
-    var endIndex = 0;
-    console.log("len:" + this.consumableorderdetailsRecordsview.length);
-    if (
-      this.consumableorderdetailsRecordsview != null &&
-      this.consumableorderdetailsRecordsview.length > 0
-    ) {
-      var currentRecord = [];
-      var currentCount = 0;
-      var mu = this.consumableorderdetailsRecordsview.length % this.pageSize;
-      if (this.currentPage == this.totalPage) {
-        if (mu != 0) {
-          currentCount = mu;
-        } else {
-          currentCount = this.pageSize;
-        }
-      } else {
-        currentCount = this.pageSize;
-      }
-      console.log("this.totalPage:" + this.totalPage);
-      console.log("this.pageSize:" + this.pageSize);
-      console.log("mu:" + mu);
-      console.log("currentCount:" + currentCount);
-      startIndex = (this.currentPage - 1) * this.pageSize;
-      endIndex = parseInt(startIndex) + parseInt(currentCount) - 1;
-      console.log("startIndex:" + startIndex);
-      console.log("endIndex:" + endIndex);
-      if (this.editAble) {
-        for (var i in this.currentRecord) {
-          if (this.currentRecord[i].check) {
-            currentRecord.push(this.currentRecord[i]);
-          }
-        }
-      }
-      for (var i = startIndex; i <= endIndex; i++) {
-        var count = 0;
-        for (var j in this.currentRecord) {
-          if (
-            this.consumableorderdetailsRecordsview[i].recordId ==
-            this.currentRecord[j].recordId
-          ) {
-            count++;
-          }
-        }
-        if (count == 0) {
-          currentRecord.push(this.consumableorderdetailsRecordsview[i]);
-        }
-      }
-      this.recordStart = startIndex + 1;
-      this.recordEnd = endIndex + 1;
-      this.currentRecord = currentRecord;
-    } else {
-      this.currentPage = 0;
-      this.currentRecord = [];
-    }
-  }
-
-  get prePage() {
-    return this.currentPage - 1;
-  }
-
-  get nextPage() {
-    return this.currentPage + 1;
-  }
-
-  get totalPage() {
-    if (this.consumableorderdetailsRecordsview.length % this.pageSize == 0) {
-      return Math.trunc(
-        this.consumableorderdetailsRecordsview.length / this.pageSize
-      );
-    } else {
-      return (
-        Math.trunc(
-          this.consumableorderdetailsRecordsview.length / this.pageSize
-        ) + 1
-      );
-    }
-  }
-
-  get totalRecords() {
-    return this.consumableorderdetailsRecordsview.length;
-  }
-
-  //绗竴椤�
-  goFirstPage() {
-    this.currentPage = 1;
-    this.showCurrentReocrd();
-  }
-
-  //鏈�鍚庝竴椤�
-  goLastPage() {
-    this.currentPage = this.totalPage;
-    this.showCurrentReocrd();
-  }
-
-  //涓婁竴椤�
-  prePageClick() {
-    this.currentPage = this.currentPage - 1;
-    this.showCurrentReocrd();
-  }
-
-  //涓嬩竴椤�
-  nextPageClick() {
-    this.currentPage = this.currentPage + 1;
-    this.showCurrentReocrd();
-  }
-
-  //page size change
-  pageSizeChange(event) {
-    console.log("pagesize:" + event.detail);
-    this.pageSize = event.detail;
-    this.currentPage = 1;
-    this.currentRecord = [];
-    this.showCurrentReocrd();
-  }
-
-  //涓婁竴椤垫寜閽槸鍚isable
-  get previousButtonDisabled() {
-    return this.currentPage == 1 || this.currentPage == 0;
-  }
-
-  //涓嬩竴椤垫寜閽槸鍚isable
-  get nextButtonDisabled() {
-    return this.currentPage == this.totalPage;
-  }
-}
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
index f18743e..a73cdb4 100644
--- a/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
+++ b/force-app/main/default/lwc/lexConsumableAccount/lexConsumableAccount.js
@@ -1,822 +1,867 @@
-import { LightningElement, wire, api, track } from "lwc";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import init from "@salesforce/apex/LexConsumableAccountController.init";
-import changeFiscalYearView from "@salesforce/apex/LexConsumableAccountController.changeFiscalYearView";
-import changelistView from "@salesforce/apex/LexConsumableAccountController.changelistView";
-import accountInit from "@salesforce/apex/LexConsumableAccountInfoController.init";
+import { LightningElement, wire, api, track } from 'lwc';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import init from '@salesforce/apex/LexConsumableAccountController.init';
+import changeFiscalYearView from '@salesforce/apex/LexConsumableAccountController.changeFiscalYearView';
+import changelistView from '@salesforce/apex/LexConsumableAccountController.changelistView';
+import accountInit from '@salesforce/apex/LexConsumableAccountInfoController.init';
 //table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
 
 const columns = [
-  {
-    label: "瀹㈡埛鍚�",
-    fieldName: "NameUrl",
-    hideDefaultActions: true,
-    wrapText: true,
-    initialWidth: 200,
-    sortable: true,
-    type: "url",
-    typeAttributes: {
-      label: {
-        fieldName: "Name"
-      },
-      target: "_blank"
+    {
+        label: '瀹㈡埛鍚�',
+        fieldName: 'NameUrl',
+        hideDefaultActions: true,
+        wrapText: true,
+        initialWidth: 200,
+        sortable: true,
+        type: 'url',
+        typeAttributes: {
+            label: {
+                fieldName: 'Name'
+            },
+            target: '_blank'
+        }
+    },
+    // {
+    //     label: "鐪�",
+    //     fieldName: "StateMasterUrl",
+    //     hideDefaultActions: true,
+    //     wrapText: true,
+    //     sortable: true,
+    //     type: "url",
+    //     typeAttributes: {
+    //         label: {
+    //             fieldName: "StateMasterName",
+    //         },
+    //         target: "_blank",
+    //     },
+    // },
+    {
+        label: '鐪�',
+        fieldName: 'StateMasterName',
+        hideDefaultActions: true,
+        wrapText: true,
+        sortable: true
+    },
+    {
+        label: '閿�鍞湰閮ㄥ尰闄�',
+        fieldName: 'Salesdepartment_HP__c',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
+    },
+    {
+        label: '鍒涘缓鏃ユ湡',
+        fieldName: 'CreatedDate',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true,
+        type: 'date',
+        typeAttributes: {
+            timeZone: 'Asia/Shanghai',
+            day: 'numeric',
+            month: 'numeric',
+            year: 'numeric'
+        }
+    },
+    {
+        label: '鏈夋晥/鏃犳晥',
+        fieldName: 'Is_Active__c',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
+    },
+    // {
+    //     label: "瀹㈡埛璁板綍绫诲瀷",
+    //     fieldName: "RecordTypeName",
+    //     hideDefaultActions: true,
+    //     sortable: true,
+    //     wrapText: true,
+    //     initialWidth: 130,
+    // },
+    {
+        label: '鏀垮簻绛夌骇',
+        fieldName: 'Grade__c',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
+    },
+    // {
+    //     label: "OCSM鍒嗙被(鍖婚櫌)",
+    //     fieldName: "OCM_Category__c",
+    //     hideDefaultActions: true,
+    //     sortable: true,
+    //     wrapText: true,
+    // },
+    // {
+    //     label: "甯�",
+    //     fieldName: "CityMasterNameUrl",
+    //     hideDefaultActions: true,
+    //     sortable: true,
+    //     wrapText: true,
+    //     type: "url",
+    //     typeAttributes: {
+    //         label: {
+    //             fieldName: "CityMasterName",
+    //         },
+    //         target: "_blank",
+    //     },
+    // },
+    {
+        label: '甯�',
+        fieldName: 'CityMasterName',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
+    },
+    {
+        label: '鍘�/鍖�',
+        fieldName: 'Town__c',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
+    },
+    {
+        label: '瀹㈡埛鐢佃瘽',
+        fieldName: 'Phone',
+        hideDefaultActions: true,
+        sortable: true,
+        wrapText: true
     }
-  },
-  // {
-  //     label: "鐪�",
-  //     fieldName: "StateMasterUrl",
-  //     hideDefaultActions: true,
-  //     wrapText: true,
-  //     sortable: true,
-  //     type: "url",
-  //     typeAttributes: {
-  //         label: {
-  //             fieldName: "StateMasterName",
-  //         },
-  //         target: "_blank",
-  //     },
-  // },
-  {
-    label: "鐪�",
-    fieldName: "StateMasterName",
-    hideDefaultActions: true,
-    wrapText: true,
-    sortable: true
-  },
-  {
-    label: "閿�鍞湰閮ㄥ尰闄�",
-    fieldName: "Salesdepartment_HP__c",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  },
-  {
-    label: "鍒涘缓鏃ユ湡",
-    fieldName: "CreatedDate",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true,
-    type: "date",
-    typeAttributes: {
-      timeZone: "Asia/Shanghai",
-      day: "numeric",
-      month: "numeric",
-      year: "numeric"
-    }
-  },
-  {
-    label: "鏈夋晥/鏃犳晥",
-    fieldName: "Is_Active__c",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  },
-  // {
-  //     label: "瀹㈡埛璁板綍绫诲瀷",
-  //     fieldName: "RecordTypeName",
-  //     hideDefaultActions: true,
-  //     sortable: true,
-  //     wrapText: true,
-  //     initialWidth: 130,
-  // },
-  {
-    label: "鏀垮簻绛夌骇",
-    fieldName: "Grade__c",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  },
-  // {
-  //     label: "OCSM鍒嗙被(鍖婚櫌)",
-  //     fieldName: "OCM_Category__c",
-  //     hideDefaultActions: true,
-  //     sortable: true,
-  //     wrapText: true,
-  // },
-  // {
-  //     label: "甯�",
-  //     fieldName: "CityMasterNameUrl",
-  //     hideDefaultActions: true,
-  //     sortable: true,
-  //     wrapText: true,
-  //     type: "url",
-  //     typeAttributes: {
-  //         label: {
-  //             fieldName: "CityMasterName",
-  //         },
-  //         target: "_blank",
-  //     },
-  // },
-  {
-    label: "甯�",
-    fieldName: "CityMasterName",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  },
-  {
-    label: "鍘�/鍖�",
-    fieldName: "Town__c",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  },
-  {
-    label: "瀹㈡埛鐢佃瘽",
-    fieldName: "Phone",
-    hideDefaultActions: true,
-    sortable: true,
-    wrapText: true
-  }
 ];
 
 const topColumns = [
-  {
-    label: "瀹㈡埛鍚�",
-    hideDefaultActions: true,
-    fieldName: "accountName",
-    wrapText: true,
-    type: "customShowAccountUrl",
-    typeAttributes: {
-      accountName: { fieldName: "accountName" },
-      accountUrl: { fieldName: "accountUrl" },
-      isDisable: { fieldName: "isDisable" }
-    }
-  },
-  // {
-  //     label: "甯�",
-  //     fieldName: "CityMasterName",
-  //     hideDefaultActions: true,
-  //     wrapText: true,
-  //     type: "customShowAccountUrl",
-  //     typeAttributes: {
-  //         accountName: { fieldName: "CityMasterName" },
-  //         accountUrl: { fieldName: "CityMasterNameUrl" },
-  //         isDisable: { fieldName: "isDisable" },
-  //     },
-  // },
-  {
-    label: "甯�",
-    fieldName: "CityMasterName",
-    hideDefaultActions: true,
-    wrapText: true
-  },
-  {
-    label: "鍘�/鍖�",
-    fieldName: "Town__c",
-    hideDefaultActions: true,
-    wrapText: true
-  },
-  {
-    label: "閿�閲忓崰姣�",
-    fieldName: "proportion",
-    hideDefaultActions: true,
-    wrapText: true,
-    initialWidth: 100,
-    cellAttributes: { alignment: "right" }
-  },
-  {
-    label: "鎿嶄綔",
-    fieldName: "Town__c",
-    type: "weeklyReport",
-    initialWidth: 150,
-    typeAttributes: {
-      recordId: { fieldName: "Id" },
-      hospitalName: { fieldName: "Name" },
-      isShowButton: { fieldName: "isShowButton" }
+    {
+        label: '瀹㈡埛鍚�',
+        hideDefaultActions: true,
+        fieldName: 'accountName',
+        wrapText: true,
+        type: 'customShowAccountUrl',
+        typeAttributes: {
+            accountName: { fieldName: 'accountName' },
+            accountUrl: { fieldName: 'accountUrl' },
+            isDisable: { fieldName: 'isDisable' }
+        }
     },
-    hideDefaultActions: true
-  }
+    // {
+    //     label: "甯�",
+    //     fieldName: "CityMasterName",
+    //     hideDefaultActions: true,
+    //     wrapText: true,
+    //     type: "customShowAccountUrl",
+    //     typeAttributes: {
+    //         accountName: { fieldName: "CityMasterName" },
+    //         accountUrl: { fieldName: "CityMasterNameUrl" },
+    //         isDisable: { fieldName: "isDisable" },
+    //     },
+    // },
+    {
+        label: '甯�',
+        fieldName: 'CityMasterName',
+        hideDefaultActions: true,
+        wrapText: true
+    },
+    {
+        label: '鍘�/鍖�',
+        fieldName: 'Town__c',
+        hideDefaultActions: true,
+        wrapText: true
+    },
+    {
+        label: '閿�閲忓崰姣�',
+        fieldName: 'proportion',
+        hideDefaultActions: true,
+        wrapText: true,
+        initialWidth: 100,
+        cellAttributes: { alignment: 'right' }
+    },
+    {
+        label: '鎿嶄綔',
+        fieldName: 'Town__c',
+        type: 'weeklyReport',
+        initialWidth: 150,
+        typeAttributes: {
+            recordId: { fieldName: 'Id' },
+            hospitalName: { fieldName: 'Name' },
+            isShowButton: { fieldName: 'isShowButton' }
+        },
+        hideDefaultActions: true
+    }
 ];
 export default class LexConsumableAccount extends LightningElement {
-  columns = columns;
-  topColumns = topColumns;
-  @track isShowSpinner = false;
-  @track pageRecords = [];
-  @track accountId = "";
-  @track agencyProType = "";
-  @track agencyProTypestr = "";
-  @track listViewOptions = [
-    {
-      label: "01. 鍖婚櫌_Hospital",
-      value: "01. 鍖婚櫌_Hospital"
-    },
-    // {
-    //     label: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
-    //     value: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
-    // },
-    // {
-    //     label: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
-    //     value: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
-    // },
-    {
-      label: "63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�",
-      value: "63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�"
-    }
-  ];
-  @track viewOption = "01. 鍖婚櫌_Hospital";
-
-  @track isShowAccountInfo = false;
-  @track topAccountData = [];
-
-  //鍓嶇鎺掑簭
-  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
-
-  @track AccId = "";
-  @track printUrl = "";
-  @track accountDataInfo = {
-    name: "",
-    ownerName: "",
-    site: "",
-    isActive: "",
-    aliasName2: "",
-    banOnUseReason: "",
-    grade: "",
-    attributeType: "",
-    oCMCategory: "",
-    specialityType: "",
-    stateMasterName: "",
-    phone: "",
-    cityMasterName: "",
-    phoneCall: "",
-    town: "",
-    fax: "",
-    street: "",
-    postalCode: "",
-    address: "",
-    parentName: ""
-  };
-
-  stylesLoaded = false;
-
-  //璐㈠勾
-  @track fiscalYearOptions = [
-    { label: "鏈储骞�", value: "thisYear" },
-    { label: "涓婁竴璐㈠勾", value: "lastYear" },
-    { label: "涓婁竴璐㈠勾+鏈储骞�", value: "allYear" }
-  ];
-  @track fiscalYearOption = "thisYear";
-  @track topInfo = [];
-
-  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.isShowSpinner = true;
-    this.AccId = this.getQueryString("AccId");
-    this.AccId = this.AccId == null ? "" : this.AccId;
-    if (this.AccId != "") {
-      console.log("this.AccId = " + this.AccId);
-      accountInit({
-        accId: this.AccId
-      })
-        .then((r) => {
-          r = JSON.parse(JSON.stringify(r));
-          console.log("r = " + JSON.stringify(r));
-          if (r.status == "Success") {
-            console.log("r.entity.obj = " + JSON.stringify(r.entity.obj));
-            this.accountDataInfo.name = r.entity.obj.Name;
-            this.accountDataInfo.ownerName =
-              r.entity.obj.Owner == null ? "" : r.entity.obj.Owner.Name;
-            this.accountDataInfo.site = r.entity.obj.site;
-            this.accountDataInfo.isActive = r.entity.obj.Is_Active__c;
-            this.accountDataInfo.aliasName2 = r.entity.obj.Alias_Name2__c;
-            this.accountDataInfo.banOnUseReason =
-              r.entity.obj.Ban_On_Use_Reason__c;
-            this.accountDataInfo.grade = r.entity.obj.Grade__c;
-            this.accountDataInfo.attributeType = r.entity.obj.Attribute_Type__c;
-            this.accountDataInfo.oCMCategory = r.entity.obj.OCM_Category__c;
-            this.accountDataInfo.specialityType =
-              r.entity.obj.Speciality_Type__c;
-            this.accountDataInfo.stateMasterName =
-              r.entity.obj.State_Master__r == null
-                ? ""
-                : r.entity.obj.State_Master__r.Name;
-            this.accountDataInfo.phone = r.entity.obj.Phone;
-            this.accountDataInfo.cityMasterName =
-              r.entity.obj.City_Master__r == null
-                ? ""
-                : r.entity.obj.City_Master__r.Name;
-            this.accountDataInfo.phoneCall = r.entity.obj.PhoneCall__c;
-            this.accountDataInfo.town = r.entity.obj.Town__c;
-            this.accountDataInfo.fax = r.entity.obj.Fax;
-            this.accountDataInfo.street = r.entity.obj.Street__c;
-            this.accountDataInfo.postalCode = r.entity.obj.Postal_Code__c;
-            this.accountDataInfo.address = r.entity.obj.Address__c;
-            this.accountDataInfo.parentName =
-              r.entity.obj.Parent == null ? "" : r.entity.obj.Parent.Name;
-            console.log(
-              "this.accountDataInfo = " + JSON.stringify(this.accountDataInfo)
-            );
-            this.printUrl =
-              "/lexconsumableaccountinfoprint?AccId=" + this.AccId;
-            this.isShowAccountInfo = true;
-            this.isShowSpinner = false;
-          } else {
-            console.log("r = " + JSON.stringify(r));
-            this.showMyToast("Error", r.msg, "Error");
-          }
-        })
-        .catch((error) => {
-          console.log("error = " + JSON.stringify(error));
-          this.showMyToast("Error", "鍒濆鍖栧け璐�", "Error");
-        });
-    } else {
-      init({
-        pageSizeLWC: this.pageSize,
-        pageTokenLWC: this.currentPageToken,
-        fiscalYear: this.fiscalYearOption
-      })
-        .then((r) => {
-          r = JSON.parse(JSON.stringify(r));
-          console.log("r = " + JSON.stringify(r));
-          if (r.status == "Success") {
-            //鍒嗛〉
-            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.paginationVisibility = this.totalPages > 1 ? true : false;
-
-            this.pageRecords = r.entity.pageRecords;
-            this.accountId = r.entity.accountId;
-            this.agencyProType = r.entity.agencyProType;
-            this.agencyProTypestr = r.entity.agencyProTypestr;
-            console.log("this.agencyProTypestr = " + this.agencyProTypestr);
-            for (var i in this.pageRecords) {
-              this.pageRecords[i]["Is_Active__c"] = this.pageRecords[
-                i
-              ].Is_Active__c.replace("鍔�", "鏁�");
-              this.pageRecords[i]["NameUrl"] =
-                "/s/lexconsumableaccount?AccId=" + this.pageRecords[i].Id;
-              this.pageRecords[i]["StateMasterName"] =
-                this.pageRecords[i].State_Master__r.Name;
-              this.pageRecords[i]["StateMasterUrl"] =
-                "/" + this.pageRecords[i].State_Master__c;
-              this.pageRecords[i]["CityMasterName"] =
-                this.pageRecords[i].City_Master__r.Name;
-              this.pageRecords[i]["CityMasterNameUrl"] =
-                "/" + this.pageRecords[i].City_Master__c;
-              this.pageRecords[i]["RecordTypeName"] =
-                this.pageRecords[i].RecordType.Name;
-            }
-            console.log(
-              "this.listViewOptions = " + JSON.stringify(this.listViewOptions)
-            );
-
-            console.log(
-              "r.entity.topInfo = " + JSON.stringify(r.entity.topInfo)
-            );
-            //top10瀹㈡埛
-            this.topInfo = r.entity.topInfo;
-            console.log("this.topInfo = " + JSON.stringify(this.topInfo));
-            this.topAccountData = this.topInfo.acList;
-            console.log(
-              "this.topAccountData = " + JSON.stringify(this.topAccountData)
-            );
-            console.log(
-              "9/3 = " +
-                this.keepTwoDecimalStr(this.amend(9, 3, "/").toFixed(2))
-            );
-            let total = 100;
-            try {
-              for (var i in this.topAccountData) {
-                this.topAccountData[i]["accountName"] =
-                  this.topAccountData[i].Name;
-                this.topAccountData[i]["accountUrl"] =
-                  "/s/lexconsumableaccount?AccId=" + this.topAccountData[i].Id;
-                this.topAccountData[i]["isDisable"] = false;
-                this.topAccountData[i]["StateMasterName"] =
-                  this.topAccountData[i].State_Master__r.Name;
-                this.topAccountData[i]["StateMasterUrl"] =
-                  "/" + this.topAccountData[i].State_Master__c;
-                this.topAccountData[i]["CityMasterName"] =
-                  this.topAccountData[i].City_Master__r.Name;
-                this.topAccountData[i]["CityMasterNameUrl"] =
-                  "/" + this.topAccountData[i].City_Master__c;
-                this.topAccountData[i]["RecordTypeName"] =
-                  this.topAccountData[i].RecordType.Name;
-                this.topAccountData[i]["isShowButton"] = true;
-                let number = this.keepTwoDecimalStr(
-                  (
-                    this.amend(
-                      this.topInfo.deList[i],
-                      this.topInfo.saleAmount,
-                      "/"
-                    ) * 100
-                  ).toFixed(2)
-                );
-                console.log(
-                  "this.amend = " +
-                    this.amend(
-                      this.topInfo.deList[i],
-                      this.topInfo.saleAmount,
-                      "/"
-                    ) *
-                      100
-                );
-                total -= number;
-                this.topAccountData[i]["proportion"] = number + "%";
-              }
-
-              console.log(
-                "this.topAccountData = " + JSON.stringify(this.topAccountData)
-              );
-
-              //鍏朵粬
-              console.log(
-                "(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = " +
-                  (total.toFixed(2) > 0.0 ? total.toFixed(2) : "0.00")
-              );
-              if (total != 100) {
-                this.topAccountData.push({
-                  accountName: "...",
-                  accountUrl: "/s/lexconsumableaccount",
-                  isDisable: true,
-                  proportion:
-                    (total.toFixed(2) > 0.0 ? total.toFixed(2) : "0.00") + "%",
-                  CityMasterName: "...",
-                  CityMasterNameUrl: "/lexconsumableaccount",
-                  Town__c: "...",
-                  isShowButton: false
-                });
-              } else {
-                let title = "";
-                for (var key in this.fiscalYearOptions) {
-                  if (
-                    this.fiscalYearOption == this.fiscalYearOptions[key].value
-                  )
-                    title = this.fiscalYearOptions[key].label;
-                }
-                this.showMyToast(title, "鏃犳暟鎹�", "Error");
-              }
-              this.isShowSpinner = false;
-            } catch (error) {
-              console.log("error = " + error.message);
-            }
-          } else {
-            console.log("r = " + JSON.stringify(r));
-            this.showMyToast("Error", r.msg, "Error");
-          }
-        })
-        .catch((error) => {
-          console.log("error = " + JSON.stringify(error));
-          this.showMyToast("Error", "閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触", "Error");
-        });
-    }
-  }
-
-  amend(num1, num2, symbol) {
-    console.log("num1 = " + num1);
-    console.log("num2 = " + num2);
-    console.log("symbol = " + 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;
-  }
-
-  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 "viewOption":
-        this.viewOption = value;
-        this.changelistView();
-        break;
-      case "fiscalYearOption":
-        this.fiscalYearOption = value;
-        this.changeFiscalYear();
-        break;
-    }
-  }
-
-  changeFiscalYear() {
-    this.isShowSpinner = true;
-    changeFiscalYearView({
-      fiscalYear: this.fiscalYearOption
-    })
-      .then((r) => {
-        r = JSON.parse(JSON.stringify(r));
-        console.log("r = " + JSON.stringify(r));
-        if (r.status == "Success") {
-          //top10瀹㈡埛
-          this.topInfo = r.entity.topInfo;
-          console.log("this.topInfo = " + JSON.stringify(this.topInfo));
-          this.topAccountData = this.topInfo.acList;
-          console.log(
-            "this.topAccountData = " + JSON.stringify(this.topAccountData)
-          );
-          let total = 100;
-          for (var i in this.topAccountData) {
-            console.log("i = " + i);
-            this.topAccountData[i]["accountName"] = this.topAccountData[i].Name;
-            this.topAccountData[i]["accountUrl"] =
-              "/s/lexconsumableaccount?AccId=" + this.topAccountData[i].Id;
-            this.topAccountData[i]["isDisable"] = false;
-            this.topAccountData[i]["StateMasterName"] =
-              this.topAccountData[i].State_Master__r.Name;
-            this.topAccountData[i]["StateMasterUrl"] =
-              "/" + this.topAccountData[i].State_Master__c;
-            this.topAccountData[i]["CityMasterName"] =
-              this.topAccountData[i].City_Master__r.Name;
-            this.topAccountData[i]["CityMasterNameUrl"] =
-              "/" + this.topAccountData[i].City_Master__c;
-            this.topAccountData[i]["RecordTypeName"] =
-              this.topAccountData[i].RecordType.Name;
-            this.topAccountData[i]["isShowButton"] = true;
-            let number = this.keepTwoDecimalStr(
-              (
-                this.amend(
-                  this.topInfo.deList[i],
-                  this.topInfo.saleAmount,
-                  "/"
-                ) * 100
-              ).toFixed(2)
-            );
-            total -= number;
-            this.topAccountData[i]["proportion"] = number + "%";
-          }
-
-          // //鍏朵粬
-          if (total != 100) {
-            this.topAccountData.push({
-              accountName: "...",
-              accountUrl: "/s/lexconsumableaccount",
-              isDisable: true,
-              proportion:
-                (total.toFixed(2) > 0.0 ? total.toFixed(2) : "0.00") + "%",
-              CityMasterName: "...",
-              CityMasterNameUrl: "/lexconsumableaccount",
-              Town__c: "...",
-              isShowButton: false
-            });
-          } else {
-            let title = "";
-            for (var key in this.fiscalYearOptions) {
-              if (this.fiscalYearOption == this.fiscalYearOptions[key].value)
-                title = this.fiscalYearOptions[key].label;
-            }
-            this.showMyToast(title, "鏃犳暟鎹�", "Error");
-          }
-
-          this.isShowSpinner = false;
-        } else {
-          console.log("r = " + JSON.stringify(r));
-          this.showMyToast("Error", r.msg, "Error");
+    columns = columns;
+    topColumns = topColumns;
+    @track isShowSpinner = false;
+    @track pageRecords = [];
+    @track accountId = '';
+    @track agencyProType = '';
+    @track agencyProTypestr = '';
+    @track listViewOptions = [
+        {
+            label: '01. 鍖婚櫌_Hospital',
+            value: '01. 鍖婚櫌_Hospital'
+        },
+        // {
+        //     label: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
+        //     value: "61. 鍖婚櫌_Hospital鑽夋涓殑鍖婚櫌",
+        // },
+        // {
+        //     label: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
+        //     value: "62. 鍖婚櫌_Hospital鐢宠涓殑鍖婚櫌",
+        // },
+        {
+            label: '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�',
+            value: '63. 鍖婚櫌_Hospital涓婂懆鍒涘缓鐨勫尰闄�'
         }
-      })
-      .catch((error) => {
-        console.log("error = " + JSON.stringify(error));
-        this.showMyToast("Error", "閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触", "Error");
-      });
-  }
+    ];
+    @track viewOption = '01. 鍖婚櫌_Hospital';
 
-  changelistView() {
-    this.isShowSpinner = true;
-    changelistView({
-      filterNameLwc: this.viewOption,
-      accountIdLwc: this.accountId,
-      agencyProTypeLwc: this.agencyProType,
-      pageSizeLWC: this.pageSize,
-      pageTokenLWC: this.currentPageToken,
-      sortFieldLWC: this.sortBy,
-      sortOrderLWC: this.sortDirection
-    })
-      .then((r) => {
-        r = JSON.parse(JSON.stringify(r));
-        console.log("r = " + JSON.stringify(r));
-        if (r.status == "Success") {
-          //鍒嗛〉
-          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.paginationVisibility = this.totalPages > 1 ? true : false;
+    @track isShowAccountInfo = false;
+    @track topAccountData = [];
 
-          this.pageRecords = r.entity.pageRecords;
-          console.log("this.pageRecords = " + JSON.stringify(this.pageRecords));
-          for (var i in this.pageRecords) {
-            this.pageRecords[i]["Is_Active__c"] = this.pageRecords[
-              i
-            ].Is_Active__c.replace("鍔�", "鏁�");
-            this.pageRecords[i]["NameUrl"] =
-              "/s/lexconsumableaccount?AccId=" + this.pageRecords[i].Id;
-            this.pageRecords[i]["StateMasterName"] =
-              this.pageRecords[i].State_Master__r.Name;
-            this.pageRecords[i]["StateMasterUrl"] =
-              "/" + this.pageRecords[i].State_Master__c;
-            this.pageRecords[i]["CityMasterName"] =
-              this.pageRecords[i].City_Master__r.Name;
-            this.pageRecords[i]["CityMasterNameUrl"] =
-              "/" + this.pageRecords[i].City_Master__c;
-            this.pageRecords[i]["RecordTypeName"] =
-              this.pageRecords[i].RecordType.Name;
-          }
-          this.isShowSpinner = false;
-        } else {
-          this.showMyToast("Error", r.msg, "Error");
-        }
-      })
-      .catch((error) => {
-        console.log("error = " + JSON.stringify(error.message));
-      });
-  }
+    //鍓嶇鎺掑簭
+    defaultSortDirection = 'asc';
+    sortDirection = 'asc';
+    sortedBy;
 
-  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);
-  }
+    //鍒嗛〉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
 
-  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));
+    @track AccId = '';
+    @track printUrl = '';
+    @track accountDataInfo = {
+        name: '',
+        ownerName: '',
+        site: '',
+        isActive: '',
+        aliasName2: '',
+        banOnUseReason: '',
+        grade: '',
+        attributeType: '',
+        oCMCategory: '',
+        specialityType: '',
+        stateMasterName: '',
+        phone: '',
+        cityMasterName: '',
+        phoneCall: '',
+        town: '',
+        fax: '',
+        street: '',
+        postalCode: '',
+        address: '',
+        parentName: ''
     };
-  }
 
-  onHandleSort(event) {
-    console.log("event.detail.fieldName = " + event.detail.fieldName);
-    this.sortBy = event.detail.fieldName;
-    switch (this.sortBy) {
-      case "NameUrl":
-        this.sortBy = "Name";
-        break;
-      case "StateMasterName":
-        this.sortBy = "State_Master__r.Name";
-        break;
-      case "RecordTypeName":
-        this.sortBy = "RecordType.Name";
-        break;
-      case "CityMasterName":
-        this.sortBy = "City_Master__r.Name";
-        break;
+    stylesLoaded = false;
+
+    //璐㈠勾
+    @track fiscalYearOptions = [
+        { label: '鏈储骞�', value: 'thisYear' },
+        { label: '涓婁竴璐㈠勾', value: 'lastYear' },
+        { label: '涓婁竴璐㈠勾+鏈储骞�', value: 'allYear' }
+    ];
+    @track fiscalYearOption = 'thisYear';
+    @track topInfo = [];
+
+    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');
+                });
+        }
     }
-    this.sortDirection = event.detail.sortDirection;
-    this.currentPageToken = 0;
-    console.log("this.sortBy = " + this.sortBy);
-    console.log("this.sortDirection = " + this.sortDirection);
-    this.changelistView();
-    const { fieldName: sortedBy, sortDirection } = event.detail;
-    this.sortByMethod(sortedBy, sortDirection === "asc" ? 1 : -1);
-    this.sortDirection = sortDirection;
-    this.sortedBy = sortedBy;
-  }
 
-  handlePrevious() {
-    this.currentPageToken =
-      Number(this.currentPageToken) - Number(this.pageSize);
-    this.changelistView();
-  }
+    //鑾峰彇閾炬帴鍙傛暟
+    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;
+    }
 
-  handleNext() {
-    this.currentPageToken =
-      Number(this.currentPageToken) + Number(this.pageSize);
-    this.changelistView();
-  }
-  handleFirst() {
-    this.currentPageToken = 0;
-    this.changelistView();
-  }
+    connectedCallback() {
+        this.isShowSpinner = true;
+        this.AccId = this.getQueryString('AccId');
+        this.AccId = this.AccId == null ? '' : this.AccId;
+        if (this.AccId != '') {
+            console.log('this.AccId = ' + this.AccId);
+            accountInit({
+                accId: this.AccId
+            })
+                .then((r) => {
+                    r = JSON.parse(JSON.stringify(r));
+                    console.log('r = ' + JSON.stringify(r));
+                    if (r.status == 'Success') {
+                        console.log(
+                            'r.entity.obj = ' + JSON.stringify(r.entity.obj)
+                        );
+                        this.accountDataInfo.name = r.entity.obj.Name;
+                        this.accountDataInfo.ownerName =
+                            r.entity.obj.Owner == null
+                                ? ''
+                                : r.entity.obj.Owner.Name;
+                        this.accountDataInfo.site = r.entity.obj.site;
+                        this.accountDataInfo.isActive =
+                            r.entity.obj.Is_Active__c;
+                        this.accountDataInfo.aliasName2 =
+                            r.entity.obj.Alias_Name2__c;
+                        this.accountDataInfo.banOnUseReason =
+                            r.entity.obj.Ban_On_Use_Reason__c;
+                        this.accountDataInfo.grade = r.entity.obj.Grade__c;
+                        this.accountDataInfo.attributeType =
+                            r.entity.obj.Attribute_Type__c;
+                        this.accountDataInfo.oCMCategory =
+                            r.entity.obj.OCM_Category__c;
+                        this.accountDataInfo.specialityType =
+                            r.entity.obj.Speciality_Type__c;
+                        this.accountDataInfo.stateMasterName =
+                            r.entity.obj.State_Master__r == null
+                                ? ''
+                                : r.entity.obj.State_Master__r.Name;
+                        this.accountDataInfo.phone = r.entity.obj.Phone;
+                        this.accountDataInfo.cityMasterName =
+                            r.entity.obj.City_Master__r == null
+                                ? ''
+                                : r.entity.obj.City_Master__r.Name;
+                        this.accountDataInfo.phoneCall =
+                            r.entity.obj.PhoneCall__c;
+                        this.accountDataInfo.town = r.entity.obj.Town__c;
+                        this.accountDataInfo.fax = r.entity.obj.Fax;
+                        this.accountDataInfo.street = r.entity.obj.Street__c;
+                        this.accountDataInfo.postalCode =
+                            r.entity.obj.Postal_Code__c;
+                        this.accountDataInfo.address = r.entity.obj.Address__c;
+                        this.accountDataInfo.parentName =
+                            r.entity.obj.Parent == null
+                                ? ''
+                                : r.entity.obj.Parent.Name;
+                        console.log(
+                            'this.accountDataInfo = ' +
+                            JSON.stringify(this.accountDataInfo)
+                        );
+                        this.printUrl =
+                            '/lexconsumableaccountinfoprint?AccId=' +
+                            this.AccId;
+                        this.isShowAccountInfo = true;
+                        this.isShowSpinner = false;
+                    } else {
+                        console.log('r = ' + JSON.stringify(r));
+                        this.showMyToast('Error', r.msg, 'Error');
+                    }
+                })
+                .catch((error) => {
+                    console.log('error = ' + JSON.stringify(error));
+                    this.showMyToast('Error', '鍒濆鍖栧け璐�', 'Error');
+                });
+        } else {
+            init({
+                pageSizeLWC: this.pageSize,
+                pageTokenLWC: this.currentPageToken,
+                fiscalYear: this.fiscalYearOption
+            })
+                .then((r) => {
+                    r = JSON.parse(JSON.stringify(r));
+                    console.log('r = ' + JSON.stringify(r));
+                    if (r.status == 'Success') {
+                        //鍒嗛〉
+                        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.paginationVisibility =
+                            this.totalPages > 1 ? true : false;
 
-  handleLast() {
-    this.currentPageToken =
-      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-    this.changelistView();
-  }
+                        this.pageRecords = r.entity.pageRecords;
+                        this.accountId = r.entity.accountId;
+                        this.agencyProType = r.entity.agencyProType;
+                        this.agencyProTypestr = r.entity.agencyProTypestr;
+                        console.log(
+                            'this.agencyProTypestr = ' + this.agencyProTypestr
+                        );
+                        for (var i in this.pageRecords) {
+                            this.pageRecords[i]['Is_Active__c'] =
+                                this.pageRecords[i].Is_Active__c.replace(
+                                    '鍔�',
+                                    '鏁�'
+                                );
+                            this.pageRecords[i]['NameUrl'] =
+                                '/s/lexconsumableaccount?AccId=' +
+                                this.pageRecords[i].Id;
+                            this.pageRecords[i]['StateMasterName'] =
+                                this.pageRecords[i].State_Master__r.Name;
+                            this.pageRecords[i]['StateMasterUrl'] =
+                                '/' + this.pageRecords[i].State_Master__c;
+                            this.pageRecords[i]['CityMasterName'] =
+                                this.pageRecords[i].City_Master__r.Name;
+                            this.pageRecords[i]['CityMasterNameUrl'] =
+                                '/' + this.pageRecords[i].City_Master__c;
+                            this.pageRecords[i]['RecordTypeName'] =
+                                this.pageRecords[i].RecordType.Name;
+                        }
+                        console.log(
+                            'this.listViewOptions = ' +
+                            JSON.stringify(this.listViewOptions)
+                        );
 
-  handlePageschange(event) {
-    console.log(event.detail);
-    this.pageSize = event.detail;
-    this.currentPageToken = 0;
-    this.changelistView();
-  }
-  get previousButtonDisabled() {
-    return this.currentPageToken === 0;
-  }
+                        console.log(
+                            'r.entity.topInfo = ' +
+                            JSON.stringify(r.entity.topInfo)
+                        );
+                        //top10瀹㈡埛
+                        this.topInfo = r.entity.topInfo;
+                        console.log(
+                            'this.topInfo = ' + JSON.stringify(this.topInfo)
+                        );
+                        this.topAccountData = this.topInfo.acList;
+                        console.log(
+                            'this.topAccountData = ' +
+                            JSON.stringify(this.topAccountData)
+                        );
+                        console.log(
+                            '9/3 = ' +
+                            this.keepTwoDecimalStr(
+                                this.amend(9, 3, '/').toFixed(2)
+                            )
+                        );
+                        let total = 100;
+                        try {
+                            for (var i in this.topAccountData) {
+                                this.topAccountData[i]['accountName'] =
+                                    this.topAccountData[i].Name;
+                                this.topAccountData[i]['accountUrl'] =
+                                    '/s/lexconsumableaccount?AccId=' +
+                                    this.topAccountData[i].Id;
+                                this.topAccountData[i]['isDisable'] = false;
+                                this.topAccountData[i]['StateMasterName'] =
+                                    this.topAccountData[i].State_Master__r.Name;
+                                this.topAccountData[i]['StateMasterUrl'] =
+                                    '/' +
+                                    this.topAccountData[i].State_Master__c;
+                                this.topAccountData[i]['CityMasterName'] =
+                                    this.topAccountData[i].City_Master__r.Name;
+                                this.topAccountData[i]['CityMasterNameUrl'] =
+                                    '/' + this.topAccountData[i].City_Master__c;
+                                this.topAccountData[i]['RecordTypeName'] =
+                                    this.topAccountData[i].RecordType.Name;
+                                this.topAccountData[i]['isShowButton'] = true;
+                                let number = this.keepTwoDecimalStr(
+                                    (
+                                        this.amend(
+                                            this.topInfo.deList[i],
+                                            this.topInfo.saleAmount,
+                                            '/'
+                                        ) * 100
+                                    ).toFixed(2)
+                                );
+                                console.log('this.amend = ' +  this.amend(this.topInfo.deList[i],this.topInfo.saleAmount,'/') * 100);
+                                total -= number;
+                                this.topAccountData[i]['proportion'] =
+                                    number + '%';
+                            }
 
-  get nextButtonDisabled() {
-    return this.nextPageToken === undefined;
-  }
-}
+                            console.log(
+                                'this.topAccountData = ' +
+                                JSON.stringify(this.topAccountData)
+                            );
+
+                            //鍏朵粬
+                            console.log('(total.toFixed(2) > 0.00 ? total.toFixed(2) : 0.00) = ' + (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00'))
+                            if (total != 100) {
+                                this.topAccountData.push({
+                                    accountName: '...',
+                                    accountUrl: '/s/lexconsumableaccount',
+                                    isDisable: true,
+                                    proportion: (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00') + '%',
+                                    CityMasterName: '...',
+                                    CityMasterNameUrl: '/lexconsumableaccount',
+                                    Town__c: '...',
+                                    isShowButton: false
+                                });
+                            } else {
+                                let title = '';
+                                for (var key in this.fiscalYearOptions) {
+                                    if (
+                                        this.fiscalYearOption ==
+                                        this.fiscalYearOptions[key].value
+                                    )
+                                        title =
+                                            this.fiscalYearOptions[key].label;
+                                }
+                                this.showMyToast(title, '鏃犳暟鎹�', 'Error');
+                            }
+                            this.isShowSpinner = false;
+                        } catch (error) {
+                            console.log('error = ' + error.message);
+                        }
+                    } else {
+                        console.log('r = ' + JSON.stringify(r));
+                        this.showMyToast('Error', r.msg, 'Error');
+                    }
+                })
+                .catch((error) => {
+                    console.log('error = ' + JSON.stringify(error));
+                    this.showMyToast(
+                        'Error',
+                        '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触',
+                        'Error'
+                    );
+                });
+        }
+    }
+
+    amend(num1, num2, symbol) {
+        console.log('num1 = ' + num1);
+        console.log('num2 = ' + num2);
+        console.log('symbol = ' + 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;
+    }
+
+    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 'viewOption':
+                this.viewOption = value;
+                this.changelistView();
+                break;
+            case 'fiscalYearOption':
+                this.fiscalYearOption = value;
+                this.changeFiscalYear();
+                break;
+        }
+    }
+
+    changeFiscalYear() {
+        this.isShowSpinner = true;
+        changeFiscalYearView({
+            fiscalYear: this.fiscalYearOption
+        })
+            .then((r) => {
+                r = JSON.parse(JSON.stringify(r));
+                console.log('r = ' + JSON.stringify(r));
+                if (r.status == 'Success') {
+                    //top10瀹㈡埛
+                    this.topInfo = r.entity.topInfo;
+                    console.log(
+                        'this.topInfo = ' + JSON.stringify(this.topInfo)
+                    );
+                    this.topAccountData = this.topInfo.acList;
+                    console.log(
+                        'this.topAccountData = ' +
+                        JSON.stringify(this.topAccountData)
+                    );
+                    let total = 100;
+                    for (var i in this.topAccountData) {
+                        console.log('i = ' + i);
+                        this.topAccountData[i]['accountName'] =
+                            this.topAccountData[i].Name;
+                        this.topAccountData[i]['accountUrl'] =
+                            '/s/lexconsumableaccount?AccId=' +
+                            this.topAccountData[i].Id;
+                        this.topAccountData[i]['isDisable'] = false;
+                        this.topAccountData[i]['StateMasterName'] =
+                            this.topAccountData[i].State_Master__r.Name;
+                        this.topAccountData[i]['StateMasterUrl'] =
+                            '/' + this.topAccountData[i].State_Master__c;
+                        this.topAccountData[i]['CityMasterName'] =
+                            this.topAccountData[i].City_Master__r.Name;
+                        this.topAccountData[i]['CityMasterNameUrl'] =
+                            '/' + this.topAccountData[i].City_Master__c;
+                        this.topAccountData[i]['RecordTypeName'] =
+                            this.topAccountData[i].RecordType.Name;
+                        this.topAccountData[i]['isShowButton'] = true;
+                        let number = this.keepTwoDecimalStr(
+                            (
+                                this.amend(
+                                    this.topInfo.deList[i],
+                                    this.topInfo.saleAmount,
+                                    '/'
+                                ) * 100
+                            ).toFixed(2)
+                        );
+                        total -= number;
+                        this.topAccountData[i]['proportion'] = number + '%';
+                    }
+
+                    // //鍏朵粬
+                    if (total != 100) {
+                        this.topAccountData.push({
+                            accountName: '...',
+                            accountUrl: '/s/lexconsumableaccount',
+                            isDisable: true,
+                            proportion: (total.toFixed(2) > 0.00 ? total.toFixed(2) : '0.00') + '%',
+                            CityMasterName: '...',
+                            CityMasterNameUrl: '/lexconsumableaccount',
+                            Town__c: '...',
+                            isShowButton: false
+                        });
+                    } else {
+                        let title = '';
+                        for (var key in this.fiscalYearOptions) {
+                            if (
+                                this.fiscalYearOption ==
+                                this.fiscalYearOptions[key].value
+                            )
+                                title = this.fiscalYearOptions[key].label;
+                        }
+                        this.showMyToast(title, '鏃犳暟鎹�', 'Error');
+                    }
+
+                    this.isShowSpinner = false;
+                } else {
+                    console.log('r = ' + JSON.stringify(r));
+                    this.showMyToast('Error', r.msg, 'Error');
+                }
+            })
+            .catch((error) => {
+                console.log('error = ' + JSON.stringify(error));
+                this.showMyToast('Error', '閿�閲忓墠鍗佸鎴峰垵濮嬪寲澶辫触', 'Error');
+            });
+    }
+
+    changelistView() {
+        this.isShowSpinner = true;
+        changelistView({
+            filterNameLwc: this.viewOption,
+            accountIdLwc: this.accountId,
+            agencyProTypeLwc: this.agencyProType,
+            pageSizeLWC: this.pageSize,
+            pageTokenLWC: this.currentPageToken,
+            sortFieldLWC: this.sortBy,
+            sortOrderLWC: this.sortDirection
+        })
+            .then((r) => {
+                r = JSON.parse(JSON.stringify(r));
+                console.log('r = ' + JSON.stringify(r));
+                if (r.status == 'Success') {
+                    //鍒嗛〉
+                    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.paginationVisibility =
+                        this.totalPages > 1 ? true : false;
+
+                    this.pageRecords = r.entity.pageRecords;
+                    console.log(
+                        'this.pageRecords = ' + JSON.stringify(this.pageRecords)
+                    );
+                    for (var i in this.pageRecords) {
+                        this.pageRecords[i]['Is_Active__c'] = this.pageRecords[
+                            i
+                        ].Is_Active__c.replace('鍔�', '鏁�');
+                        this.pageRecords[i]['NameUrl'] =
+                            '/s/lexconsumableaccount?AccId=' +
+                            this.pageRecords[i].Id;
+                        this.pageRecords[i]['StateMasterName'] =
+                            this.pageRecords[i].State_Master__r.Name;
+                        this.pageRecords[i]['StateMasterUrl'] =
+                            '/' + this.pageRecords[i].State_Master__c;
+                        this.pageRecords[i]['CityMasterName'] =
+                            this.pageRecords[i].City_Master__r.Name;
+                        this.pageRecords[i]['CityMasterNameUrl'] =
+                            '/' + this.pageRecords[i].City_Master__c;
+                        this.pageRecords[i]['RecordTypeName'] =
+                            this.pageRecords[i].RecordType.Name;
+                    }
+                    this.isShowSpinner = false;
+                } else {
+                    this.showMyToast('Error', r.msg, 'Error');
+                }
+            })
+            .catch((error) => {
+                console.log('error = ' + JSON.stringify(error.message));
+            });
+    }
+
+    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);
+    }
+
+    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('event.detail.fieldName = ' + event.detail.fieldName)
+        this.sortBy = event.detail.fieldName;
+        switch (this.sortBy) {
+            case 'NameUrl':
+                this.sortBy = 'Name';
+                break;
+            case 'StateMasterName':
+                this.sortBy = 'State_Master__r.Name';
+                break;
+            case 'RecordTypeName':
+                this.sortBy = 'RecordType.Name';
+                break;
+            case 'CityMasterName':
+                this.sortBy = 'City_Master__r.Name';
+                break;
+        }
+        this.sortDirection = event.detail.sortDirection;
+        this.currentPageToken = 0;
+        console.log('this.sortBy = ' + this.sortBy);
+        console.log('this.sortDirection = ' + this.sortDirection);
+        this.changelistView();
+        const { fieldName: sortedBy, sortDirection } = event.detail;
+        this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1);
+        this.sortDirection = sortDirection;
+        this.sortedBy = sortedBy;
+    }
+
+    handlePrevious() {
+        this.currentPageToken =
+            Number(this.currentPageToken) - Number(this.pageSize);
+        this.changelistView();
+    }
+
+    handleNext() {
+        this.currentPageToken =
+            Number(this.currentPageToken) + Number(this.pageSize);
+        this.changelistView();
+    }
+    handleFirst() {
+        this.currentPageToken = 0;
+        this.changelistView();
+    }
+
+    handleLast() {
+        this.currentPageToken =
+            this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+        this.changelistView();
+    }
+
+    handlePageschange(event) {
+        console.log(event.detail);
+        this.pageSize = event.detail;
+        this.currentPageToken = 0;
+        this.changelistView();
+    }
+    get previousButtonDisabled() {
+        return this.currentPageToken === 0;
+    }
+
+    get nextButtonDisabled() {
+        return this.nextPageToken === undefined;
+    }
+}
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
index ce905ad..0315bed 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.css
@@ -1,43 +1,43 @@
-@import "c/lexCssUtility";
-.outerBorderCss {
-  border: 1px solid #d4d4d4;
-  border-radius: 5px;
-  border-top: 3px solid #565959;
+@import 'c/lexCssUtility';
+.outerBorderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    border-top : 3px solid #565959;
 }
-.borderCss {
-  border: 1px solid #d4d4d4;
-  border-radius: 5px;
-  margin-bottom: 7px;
-  border-top: 3px solid #565959;
+.borderCss{
+    border: 1px solid #D4D4D4;
+    border-radius : 5px;
+    margin-bottom : 7px;
+    border-top : 3px solid #565959;
 }
-.headerDorderCss {
-  border-top: 1px solid #565959;
-  border-bottom: 1px solid #d4d4d4;
-  padding: 3px;
+.headerDorderCss{
+    border-top: 1px solid #565959;
+    border-bottom: 1px solid #D4D4D4;
+    padding:3px;
 }
-.centerCss {
-  text-align: center;
+.centerCss{
+    text-align: center;
 }
-.centerCss .left {
-  margin-left: 100px;
+.centerCss .left{
+    margin-left: 100px;
 }
 .datatable {
-  max-height: 400px !important;
+    max-height: 400px !important;
 }
 .tableColumn {
-  margin-top: 5px !important;
-  overflow-x: auto;
+    margin-top: 5px !important;
+    overflow-x: auto;
 }
 :host {
-  --lwc-inputStaticFontSize: 16px;
-  --lwc-formLabelFontSize: 16px;
+    --lwc-inputStaticFontSize: 16px;
+    --lwc-formLabelFontSize: 16px;
 }
 
 .fileUpload {
-  font-size: 16px;
-  --lwc-formLabelFontSize: 16px;
+    font-size: 16px;
+    --lwc-formLabelFontSize:16px;
 }
 
 .disable-row-selection .slds-is-selected {
-  outline: none !important;
-}
+    outline: none !important;
+  }
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
index 650d183..62abe5a 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
@@ -1,1299 +1,901 @@
 <!-- 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>
+                            <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>
-          </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>
+        </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>
-
-        <!-- 鍑哄簱鍗曚俊鎭� 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
-                          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-output-field
-                          field-name="SummonsForDirction__c"
-                          class="searchName"
-                        ></lightning-output-field>
-                      </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 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 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
-                          class="hideHelpText"
-                          field-name="ShipmentAccount__c"
-                        ></lightning-output-field>
-                      </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>
+                                            <button
+                                                class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                                                onclick={DeleteConsumable} disabled={isDeleteDisabled}>鍒犻櫎</button>
+                                        </template>
+                                    </td>
+                                    <td></td>
+                                </tr>
+                            </table>
                         </div>
-                      </lightning-layout-item>
+                    </div>
+                </div>
 
-                      <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>
+                <!-- 鍑哄簱鍗曚俊鎭� 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="1"></lightning-layout-item>
-                    </lightning-layout>
+                                                <lightning-layout-item size="5">
+                                                    <lightning-output-field field-name="Name"
+                                                        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 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">
-                        <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>
 
-                      <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>
+                                            </template>
+                                        </lightning-layout>
 
-                    <!-- 娌℃湁纭畾浠锋牸 -->
-                    <lightning-layout multiple-rows="true">
-                      <lightning-layout-item size="1"></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-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>
+                                            <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 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 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 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 class="hideHelpText"
+                                                    field-name="ShipmentAccount__c"></lightning-output-field>
+                                            </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>
                 </template>
-              </div>
-            </div>
-          </div>
-        </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>
-            </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>
+                <!-- 鍑哄簱鍗曚俊鎭� 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 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
-                        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 size="1"></lightning-layout-item>
-                    </template>
-                  </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 size="5">
-                      <lightning-output-field
-                        field-name="SummonsForDirction__c"
-                        class="hehe-layoutItem"
-                      ></lightning-output-field>
-                    </lightning-layout-item>
+                                            <lightning-layout-item size="1"></lightning-layout-item>
+                                        </template>
+                                    </lightning-layout>
 
-                    <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 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>
 
-                  <!-- 浜岀骇缁忛攢鍟� -->
-                  <template if:true={isSummonsForDirctionTwoShow}>
-                    <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="5">
-                        <lightning-output-field
-                          field-name="Order_Dealer_Info__c"
-                          class="hehe-layoutItem"
-                        ></lightning-output-field>
-                      </lightning-layout-item>
-                    </lightning-layout>
-                  </template>
+                                        <lightning-layout-item size="1"></lightning-layout-item>
 
-                  <!-- 瀹㈡埛鍚� 鍙戠エ-->
-                  <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>
+                                    </lightning-layout>
 
-                    <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>
+                                    <!-- 浜岀骇缁忛攢鍟� -->
+                                    <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>
+                                            <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 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" class="hehe-layoutItem">
+                                            <lightning-output-field class="hideHelpText"
+                                                field-name="ShipmentAccount__c"></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>
+                                        <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-item size="1"></lightning-layout-item>
 
-                  <!-- 娌℃湁纭畾浠锋牸 -->
-                  <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>
+                                    </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>
+                                    <!-- 绉戝 鍑哄簱閲戦 -->
+                                    <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>
+                </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>
+
+                                    </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>
+
+                                <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>
-                                <!-- <p>{item.updateDate} 路 {item.ownerName}</p> -->
-                              </lightning-layout-item>
+                            </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>
-                          </lightning-layout>
-                        </lightning-card>
-                      </lightning-layout-item>
-                    </lightning-layout>
-                  </template>
-                </lightning-record-edit-form>
-              </div>
-            </div>
-          </div>
-        </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: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>
-                  </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}>
+                            <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>
 
-                <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>
+                        <template if:true={isEditShowSpinner}>
+                            <lightning-spinner alternative-text="Uploading now"></lightning-spinner>
+                        </template>
                     </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>
+
+                <!-- 鍑哄簱浜у搧鏄庣粏 -->
+                <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>
-                        <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 style="padding: 7px">
+                            <lightning-datatable key-field="id" data={consumableorderdetails2Records}
+                                columns={consumableorderdetails2RecordsColumns} hide-checkbox-column
+                                class="wrapped-header-datatable">
+                            </lightning-datatable>
+                        </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}>
+                <!-- 涓婁紶闄勪欢 -->
+                <!-- <template if:false={EditAble}>
                     <div class="borderCss">
                         <div class="headerDorderCss">
                             <lightning-layout>
@@ -1329,319 +931,236 @@
                         </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}
-                                            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>
-
-              <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
-                                                            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
-                                                            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>
-
-                <template if:true={isBarcode}>
-                  <div class="borderCss">
+            <!-- 鍑鸿揣/閿�鍞� -->
+            <template if:true={isShippingSales}>
+                <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>
                             <lightning-layout-item padding="around-small">
-                              <!-- <lightning-textarea name="Barcode" label="BarCode鍙�"
+                                <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>
+
+                            <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
+                                                            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
+                                                            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>
+
+                                <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"
-                      >
-                      </c-lex-custom-lightning-datatable>
-                    </div>
-                  </div>
-                </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>
 
-                <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>
+                                <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>
+                                <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>
     </div>
-  </div>
-</template>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
index f801425..7b3c02d 100644
--- a/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
+++ b/force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -19,1087 +19,1124 @@
 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 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: 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
-    }
-  ];
-  @track editColumns = [
-    {
-      label: "娑堣�楀搧鍚嶇О",
-      fieldName: "Name__c",
-      hideDefaultActions: true,
-      wrapText: true,
-      sortable: true
-    },
-    {
-      label: "瑙勬牸",
-      fieldName: "packinglist",
-      initialWidth: 50,
-      cellAttributes: { alignment: "right" },
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "CFDA鐘舵��",
-      fieldName: "SFDA_Status__c",
-      hideDefaultActions: true,
-      initialWidth: 100,
-      wrapText: true
-    },
-    {
-      label: "娉ㄥ唽璇佺紪鐮佸彿",
-      fieldName: "approbation_No",
-      hideDefaultActions: true,
-      initialWidth: 170,
-      wrapText: true
-    },
-    {
-      label: "娉ㄥ唽璇佹晥鏈�",
-      fieldName: "expiration_Date",
-      hideDefaultActions: true,
-      initialWidth: 100,
-      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",
-      initialWidth: 90,
-      cellAttributes: { alignment: "right" },
-      hideDefaultActions: true,
-      wrapText: true
-    },
-    {
-      label: "鍑鸿揣鍗曚环(鍏�)",
-      fieldName: "shippingUnitPrice",
-      type: "number",
-      initialWidth: 100,
-      typeAttributes: {
-        minimumFractionDigits: 2
-      },
-      hideDefaultActions: true,
-      wrapText: true
-    }
-  ];
-  @track editData = [];
+    @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: 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,
+        },
+    ];
+    @track editColumns = [
+        {
+            label: "娑堣�楀搧鍚嶇О",
+            fieldName: "Name__c",
+            hideDefaultActions: true,
+            wrapText: true,
+            sortable: true,
+        },
+        {
+            label: "瑙勬牸",
+            fieldName: "packinglist",
+            initialWidth: 50,
+            cellAttributes: { alignment: "right" },
+            hideDefaultActions: true,
+            wrapText: true,
+        },
+        {
+            label: "CFDA鐘舵��",
+            fieldName: "SFDA_Status__c",
+            hideDefaultActions: true,
+            initialWidth: 100,
+            wrapText: true,
+        },
+        {
+            label: "娉ㄥ唽璇佺紪鐮佸彿",
+            fieldName: "approbation_No",
+            hideDefaultActions: true,
+            initialWidth: 170,
+            wrapText: true,
+        },
+        {
+            label: "娉ㄥ唽璇佹晥鏈�",
+            fieldName: "expiration_Date",
+            hideDefaultActions: true,
+            initialWidth: 100,
+            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",
+            initialWidth: 90,
+            cellAttributes: { alignment: "right" },
+            hideDefaultActions: true,
+            wrapText: true,
+        },
+        {
+            label: "鍑鸿揣鍗曚环(鍏�)",
+            fieldName: "shippingUnitPrice",
+            type: "number",
+            initialWidth: 100,
+            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"
+    @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,
         }
-      },
-      initialWidth: 50,
-      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'
+                }
+            },
+            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");
+                });
+        }
     }
-  ];
-  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");
+    //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",
+                        initialWidth: 105,
+                        typeAttributes: {
+                            minimumFractionDigits: 2,
+                        },
+                        hideDefaultActions: true,
+                    };
+                    let object2 = {
+                        label: this.RrturnProLabel,
+                        fieldName: "RrturnPro_count__c",
+                        cellAttributes: { alignment: "right" },
+                        initialWidth: 100,
+                        hideDefaultActions: true,
+                    };
+                    let object3 = {
+                        label: this.InvoicedLabel,
+                        fieldName: "Invoiced_Procount__c",
+                        type: "number",
+                        initialWidth: 100,
+                        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: "鍖婚櫌鐗逛环",
+                        initialWidth: 80,
+                        fieldName: "hospitalSpecialOffer",
+                        type: 'boolean',
+                        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');
         });
     }
-  }
 
-  //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",
-              initialWidth: 105,
-              typeAttributes: {
-                minimumFractionDigits: 2
-              },
-              hideDefaultActions: true
-            };
-            let object2 = {
-              label: this.RrturnProLabel,
-              fieldName: "RrturnPro_count__c",
-              cellAttributes: { alignment: "right" },
-              initialWidth: 100,
-              hideDefaultActions: true
-            };
-            let object3 = {
-              label: this.InvoicedLabel,
-              fieldName: "Invoiced_Procount__c",
-              type: "number",
-              initialWidth: 100,
-              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 "鐩存帴閿�鍞粰鍖婚櫌":
+    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.accountValue = "";
-                this.cocLwc["Order_ForDealerText__c"] = "";
+                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 = "";
@@ -1110,1788 +1147,1449 @@
                 this.isDisabledSecondaryDistributor = false;
                 this.isMutualTransferGoods = true;
                 break;
-              default:
+            default:
                 this.isDisabledHospitalName = false;
                 this.isDisabledForCustomerText = false;
                 this.isDisabledForDealerText = false;
                 this.isDisabledSecondaryDistributor = false;
-            }
-          }
-
-          //濡傛灉hasHosPro = true 鍖婚櫌鐗逛环
-          if (this.hasHosPro) {
-            let object1 = {
-              label: "鍖婚櫌鐗逛环",
-              initialWidth: 80,
-              fieldName: "hospitalSpecialOffer",
-              type: "boolean",
-              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");
+                this.isMutualTransferGoods = false;
         }
-      })
-      .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 = "";
+    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;
         }
-        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";
+    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 {
-              tempData[i]["Id"] = tempData[i].Prod.Id + "nothos";
+                console.log("r = " + JSON.stringify(r));
+                this.showMyToast('4/5鍒嗙被鏌ヨ澶辫触', r.msg, '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: 80,
-            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;
-        }
-      }
+        }).catch((error) => {
+            console.log("error" + JSON.stringify(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;
-      //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;
+    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));
+        });
     }
-    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);
+    invoiceChange(event) {
+        this.invoiceId = event.target.value;
+        console.log('this.invoiceId = ' + this.invoiceId);
     }
-  }
-  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("this.fileData = " + this.fileData);
+    showMyToast(title, message, variant) {
+        this.isShowSpinner = false;
         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();
+        this.isEditShowSpinner = false;
+        console.log('show custom message');
+        var iconName = '';
+        var content = '';
+        if (variant.toLowerCase() == 'success') {
+            iconName = 'utility:check';
         } else {
-          console.log("r.msg = " + r.msg);
-          this.showMyToast("閿欒", r.msg, "Error");
+            iconName = 'utility:error';
         }
-        this.isShippingSales = true;
-      })
-      .catch((error) => {
-        console.log("error = " + error.message);
-        this.showMyToast("澶辫触", "璺宠浆澶辫触", "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);
+    }
 
-  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(
-                  "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;
+    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;
                 }
-              }
             }
-          }
-          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 {
-          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 = " + 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;
+        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: 80,
+                        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');
             }
+        });
+    }
 
-            //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");
+    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 = "";
         }
-      })
-      .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.HospitalName = " + this.HospitalName);
+        console.log("this.OECId = " + this.OECId);
+        if (this.OECId != null && this.OECId != "") {
+            this.checkOutPattern();
+        }
     }
-    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"] = "";
+    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;
+        }
     }
-    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]({
+
+    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();
+            };
+            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("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('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;
+                            }
+                        }
+                    }
+                }
+                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 {
+                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 = ' + 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";
+        } 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: "/lexsaleanddelivery"
-            }
-          });
+                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 {
-          console.log("r.msg = " + r.msg);
-          this.showMyToast("閿�鍞け璐�", r.msg, "Error");
+            return false;
         }
-      })
-      .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"
+
+    //鍏抽棴闄勪欢寮圭獥
+    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]);
             }
-          });
-        } else {
-          console.log("r.msg = " + r.msg);
-          this.showMyToast("鍑鸿揣澶辫触", r.msg, "Error");
-        }
-      })
-      .catch((error) => {
-        console.log("error = " + JSON.stringify(error.message));
-        this.showMyToast("閿欒", "鍑鸿揣澶辫触", "Error");
-      });
-  }
+            : function (x) {
+                return x[field];
+            };
 
-  //鍙戠エ
-  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];
+        return function (a, b) {
+            a = key(a);
+            b = key(b);
+            return reverse * ((a > b) - (b > a));
         };
-
-    return function (a, b) {
-      a = key(a);
-      b = key(b);
-      return reverse * ((a > b) - (b > a));
-    };
-  }
-
-  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();
-  }
+    onHandleSort(event) {
 
-  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();
-  }
-
-  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();
-  }
-
-  editHandleLast() {
-    this.currentPageToken =
-      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-    this.searchEditProductJs();
-  }
-
-  editHandlePageschange(event) {
-    console.log(event.detail);
-    this.pageSize = event.detail;
-    this.currentPageToken = 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);
-
-          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"];
-
-            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;
+        //灏嗗凡缁忛�夊ソ浜嗙殑鏀惧埌鍓嶉潰锛屼笉杩涜鎺掑簭
+        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 {
-          console.log("r = " + JSON.stringify(r));
-          this.showMyToast("鎼滅储澶辫触", r.msg, "Error");
+            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;
         }
-      })
-      .catch((error) => {
-        this.showMyToast("閿欒", "鎼滅储澶辫触", "Error");
-      });
-  }
+    }
 
-  get previousButtonDisabled() {
-    return this.currentPageToken === 0;
-  }
+    handlePrevious() {
+        this.currentPageToken = Number(this.currentPageToken) - Number(this.pageSize);
+        this.searchProductJs();
+    }
 
-  get nextButtonDisabled() {
-    return this.nextPageToken === undefined;
-  }
+    handleNext() {
+        this.currentPageToken = Number(this.currentPageToken) + Number(this.pageSize);
+        this.searchProductJs();
+    }
+    handleFirst() {
+        this.currentPageToken = 0;
+        this.searchProductJs();
+    }
 
-  //鍒犻櫎闄勪欢
-  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");
-      });
-  }
-}
+    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();
+    }
+
+
+
+    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();
+    }
+
+    editHandleLast() {
+        this.currentPageToken = this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+        this.searchEditProductJs();
+    }
+
+    editHandlePageschange(event) {
+        console.log(event.detail);
+        this.pageSize = event.detail;
+        this.currentPageToken = 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);
+
+                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"];
+
+                    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 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
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
index 7986134..a73f3c5 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.html
@@ -1,292 +1,292 @@
 <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>
-  <div style="border: 1px solid #d4d4d4; border-radius: 5px">
-    <div
-      style="
-        border-top: 3px solid #51606e;
-        border-bottom: 1px solid #d4d4d4;
-        padding: 3px;
-      "
-    >
-      <!-- <p style="font-size: 18px;"><strong>搴撳瓨绠$悊</strong></p> -->
-      <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: 10px">
-      <div
-        style="
-          border: 1px solid #d4d4d4;
-          border-radius: 5px;
-          margin-bottom: 7px;
-        "
-      >
+    <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>
+    <div style="border: 1px solid #d4d4d4; border-radius: 5px">
         <div
-          style="
-            border-top: 3px solid #51606e;
-            border-bottom: 1px solid #d4d4d4;
-            padding: 10px;
-          "
+            style="
+                border-top: 3px solid #51606e;
+                border-bottom: 1px solid #d4d4d4;
+                padding: 3px;
+            "
         >
-          <!-- <lightning-button variant="brand" class = 'lexstyle' style="margin:12px;" label="搴撳瓨鐩樼偣" title="搴撳瓨鐩樼偣"
+            <!-- <p style="font-size: 18px;"><strong>搴撳瓨绠$悊</strong></p> -->
+            <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: 10px">
+            <div
+                style="
+                    border: 1px solid #d4d4d4;
+                    border-radius: 5px;
+                    margin-bottom: 7px;
+                "
+            >
+                <div
+                    style="
+                        border-top: 3px solid #51606e;
+                        border-bottom: 1px solid #d4d4d4;
+                        padding: 10px;
+                    "
+                >
+                    <!-- <lightning-button variant="brand" class = 'lexstyle' style="margin:12px;" label="搴撳瓨鐩樼偣" title="搴撳瓨鐩樼偣"
                         onclick={inventoryCount}></lightning-button>
                     <lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="杩囨湡搴撳瓨閿�瀛�" title="杩囨湡搴撳瓨閿�瀛�"
                         onclick={handleExpired}></lightning-button>
                     <lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="鎷嗙洅" title="鎷嗙洅" onclick={removeBox}></lightning-button>
                     <lightning-button variant="brand" class = 'lexstyle' style="margin: 12px;" label="鍙栨秷鎷嗙洅" title="鍙栨秷鎷嗙洅"
                         onclick={cancelremoveBox}></lightning-button> -->
-          <button
-            style="margin-left: 5px"
-            class="slds-button slds-button_neutral slds-button_stretch lexBorder"
-            label="搴撳瓨鐩樼偣"
-            onclick={inventoryCount}
-          >
-            搴撳瓨鐩樼偣
-          </button>
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
-            label="杩囨湡搴撳瓨閿�瀛�"
-            style="margin-left: 60px"
-            onclick={handleExpired}
-          >
-            杩囨湡搴撳瓨閿�瀛�
-          </button>
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
-            label="鎷嗙洅"
-            style="margin-left: 60px"
-            onclick={removeBox}
-          >
-            鎷嗙洅
-          </button>
-          <button
-            class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
-            label="鍙栨秷鎷嗙洅"
-            style="margin-left: 60px"
-            onclick={cancelremoveBox}
-          >
-            鍙栨秷鎷嗙洅
-          </button>
-        </div>
-      </div>
+                    <button
+                        style="margin-left: 5px"
+                        class="slds-button slds-button_neutral slds-button_stretch lexBorder"
+                        label="搴撳瓨鐩樼偣"
+                        onclick={inventoryCount}
+                    >
+                        搴撳瓨鐩樼偣
+                    </button>
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+                        label="杩囨湡搴撳瓨閿�瀛�"
+                        style="margin-left: 60px"
+                        onclick={handleExpired}
+                    >
+                        杩囨湡搴撳瓨閿�瀛�
+                    </button>
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+                        label="鎷嗙洅"
+                        style="margin-left: 60px"
+                        onclick={removeBox}
+                    >
+                        鎷嗙洅
+                    </button>
+                    <button
+                        class="slds-button slds-button_neutral slds-button_stretch lexButtoun"
+                        label="鍙栨秷鎷嗙洅"
+                        style="margin-left: 60px"
+                        onclick={cancelremoveBox}
+                    >
+                        鍙栨秷鎷嗙洅
+                    </button>
+                </div>
+            </div>
 
-      <div
-        style="
-          border: 1px solid #d4d4d4;
-          border-radius: 5px;
-          margin-bottom: 7px;
-          margin-top: 30px;
-        "
-      >
-        <div
-          style="
-            border-top: 3px solid #51606e;
-            border-bottom: 1px solid #d4d4d4;
-            padding: 3px;
-            height: 115px;
-          "
-        >
-          <table style="margin-top: 10px">
-            <colgroup>
-              <col width="160px" />
-              <col width="100px" />
-              <col width="10px" />
-              <col width="70px" />
-              <col width="100px" />
-              <col width="10px" />
-              <col width="70px" />
-              <col width="100px" />
-              <col width="10px" />
-              <col width="90px" />
-              <col width="100px" />
-              <col width="85px" />
-              <col width="100px" />
-              <col width="10px" />
-              <col width="70px" />
-              <col width="100px" />
-            </colgroup>
-            <tbody>
-              <tr>
-                <td style="width: 10px"></td>
-                <td style="width: 250px">
-                  <div
-                    style="width: 90px; margin-left: 12px"
-                    class="searchName"
-                  >
-                    娑堣�楀搧鍚嶇О
-                  </div>
-                </td>
-                <td style="width: 21%">
-                  <lightning-input
-                    class="searchName"
-                    type="text"
-                    name="Name"
-                    label="娑堣�楀搧鍚嶇О"
-                    value={Name}
-                    variant="label-hidden"
-                    onchange={dataChange}
-                    data-field="Name"
-                  ></lightning-input>
-                </td>
-                <td style="width: 150px">
-                  <div
-                    style="width: 90px; text-align: center"
-                    class="searchName"
-                  >
-                    绗�3鍒嗙被
-                  </div>
-                </td>
-                <td style="width: 21%">
-                  <lightning-combobox
-                    class="inputFont"
-                    style="margin-left: 5px"
-                    name="CategoryThree"
-                    label="绗�3鍒嗙被"
-                    value={value}
-                    placeholder="璇烽�夋嫨..."
-                    options={category3Options}
-                    variant="label-hidden"
-                    data-field="CategoryThree"
-                    onchange={dataChange}
-                  ></lightning-combobox>
-                </td>
-                <td style="width: 150px">
-                  <div
-                    style="width: 90px; text-align: center"
-                    class="searchName"
-                  >
-                    绗�4鍒嗙被
-                  </div>
-                </td>
-                <td style="width: 21%">
-                  <lightning-combobox
-                    class="inputFont"
-                    name="CategoryFour"
-                    label="绗�4鍒嗙被"
-                    value={value}
-                    placeholder="璇烽�夋嫨..."
-                    options={category4Options}
-                    variant="label-hidden"
-                    data-field="CategoryFour"
-                    onchange={dataChange}
-                  ></lightning-combobox>
-                </td>
-                <td style="width: 150px">
-                  <div
-                    style="width: 90px; text-align: center"
-                    class="searchName"
-                  >
-                    绗�5鍒嗙被
-                  </div>
-                </td>
-                <td style="width: 21%">
-                  <lightning-combobox
-                    class="inputFont"
-                    name="CategoryFive"
-                    label="绗�5鍒嗙被"
-                    value={value}
-                    placeholder="璇烽�夋嫨..."
-                    options={category5Options}
-                    variant="label-hidden"
-                    data-field="CategoryFive"
-                    onchange={dataChange}
-                  ></lightning-combobox>
-                </td>
-                <td style="width: 1%"></td>
-              </tr>
-            </tbody>
-          </table>
-          <br />
-          <div style="float: right; margin-right: 10px">
-            <button
-              class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
-              label="娑堣�楀搧鎼滅储"
-              onclick={searchOrderDetail}
+            <div
+                style="
+                    border: 1px solid #d4d4d4;
+                    border-radius: 5px;
+                    margin-bottom: 7px;
+                    margin-top: 30px;
+                "
             >
-              娑堣�楀搧鎼滅储
-            </button>
-            <button
-              style="margin-left: 10px"
-              class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
-              label="娓呯┖"
-              onclick={clearAll}
+                <div
+                    style="
+                        border-top: 3px solid #51606e;
+                        border-bottom: 1px solid #d4d4d4;
+                        padding: 3px;
+                        height: 115px;
+                    "
+                >
+                    <table style="margin-top: 10px">
+                        <colgroup>
+                            <col width="160px" />
+                            <col width="100px" />
+                            <col width="10px" />
+                            <col width="70px" />
+                            <col width="100px" />
+                            <col width="10px" />
+                            <col width="70px" />
+                            <col width="100px" />
+                            <col width="10px" />
+                            <col width="90px" />
+                            <col width="100px" />
+                            <col width="85px" />
+                            <col width="100px" />
+                            <col width="10px" />
+                            <col width="70px" />
+                            <col width="100px" />
+                        </colgroup>
+                        <tbody>
+                            <tr>
+                                <td style="width: 10px"></td>
+                                <td style="width: 250px">
+                                    <div
+                                        style="width: 90px; margin-left: 12px"
+                                        class="searchName"
+                                    >
+                                        娑堣�楀搧鍚嶇О
+                                    </div>
+                                </td>
+                                <td style="width: 21%">
+                                    <lightning-input
+                                        class="searchName"
+                                        type="text"
+                                        name="Name"
+                                        label="娑堣�楀搧鍚嶇О"
+                                        value={Name}
+                                        variant="label-hidden"
+                                        onchange={dataChange}
+                                        data-field="Name"
+                                    ></lightning-input>
+                                </td>
+                                <td style="width: 150px">
+                                    <div
+                                        style="width: 90px; text-align: center"
+                                        class="searchName"
+                                    >
+                                        绗�3鍒嗙被
+                                    </div>
+                                </td>
+                                <td style="width: 21%">
+                                    <lightning-combobox
+                                        class="inputFont"
+                                        style="margin-left: 5px"
+                                        name="CategoryThree"
+                                        label="绗�3鍒嗙被"
+                                        value={value}
+                                        placeholder="璇烽�夋嫨..."
+                                        options={category3Options}
+                                        variant="label-hidden"
+                                        data-field="CategoryThree"
+                                        onchange={dataChange}
+                                    ></lightning-combobox>
+                                </td>
+                                <td style="width: 150px">
+                                    <div
+                                        style="width: 90px; text-align: center"
+                                        class="searchName"
+                                    >
+                                        绗�4鍒嗙被
+                                    </div>
+                                </td>
+                                <td style="width: 21%">
+                                    <lightning-combobox
+                                        class="inputFont"
+                                        name="CategoryFour"
+                                        label="绗�4鍒嗙被"
+                                        value={value}
+                                        placeholder="璇烽�夋嫨..."
+                                        options={category4Options}
+                                        variant="label-hidden"
+                                        data-field="CategoryFour"
+                                        onchange={dataChange}
+                                    ></lightning-combobox>
+                                </td>
+                                <td style="width: 150px">
+                                    <div
+                                        style="width: 90px; text-align: center"
+                                        class="searchName"
+                                    >
+                                        绗�5鍒嗙被
+                                    </div>
+                                </td>
+                                <td style="width: 21%">
+                                    <lightning-combobox
+                                        class="inputFont"
+                                        name="CategoryFive"
+                                        label="绗�5鍒嗙被"
+                                        value={value}
+                                        placeholder="璇烽�夋嫨..."
+                                        options={category5Options}
+                                        variant="label-hidden"
+                                        data-field="CategoryFive"
+                                        onchange={dataChange}
+                                    ></lightning-combobox>
+                                </td>
+                                <td style="width: 1%"></td>
+                            </tr>
+                        </tbody>
+                    </table>
+                    <br />
+                    <div style="float: right; margin-right: 10px">
+                        <button
+                            class="slds-button slds-button_neutral slds-button_stretch lexsearchStyle"
+                            label="娑堣�楀搧鎼滅储"
+                            onclick={searchOrderDetail}
+                        >
+                            娑堣�楀搧鎼滅储
+                        </button>
+                        <button
+                            style="margin-left: 10px"
+                            class="slds-button slds-button_neutral slds-button_stretch lexclearStyle"
+                            label="娓呯┖"
+                            onclick={clearAll}
+                        >
+                            娓呯┖
+                        </button>
+                    </div>
+                </div>
+            </div>
+            <div
+                style="
+                    border: 1px solid #d4d4d4;
+                    border-radius: 5px;
+                    margin-bottom: 7px;
+                "
             >
-              娓呯┖
-            </button>
-          </div>
+                <div
+                    style="
+                        border-top: 3px solid #51606e;
+                        border-bottom: 1px solid #d4d4d4;
+                        padding: 3px;
+                    "
+                >
+                    <!-- <p style="font-size: 16px;"><strong>搴撳瓨璇︽儏</strong></p> -->
+                    <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: 10px">
+                    <template if:true={showTable}>
+                        <c-lex-custom-lightning-datatable
+                            key-field="id"
+                            data={data}
+                            columns={columns}
+                            default-sort-direction={defaultSortDirection}
+                            sorted-direction={sortDirection}
+                            sorted-by={sortedBy}
+                            onsort={onHandleSort}
+                            hide-checkbox-column={hidecheckboxcolumn}
+                            style="word-wrap:break-word; word-break:break-all;"
+                            class="wrapped-header-datatable"
+                        >
+                        </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>
+                </div>
+            </div>
         </div>
-      </div>
-      <div
-        style="
-          border: 1px solid #d4d4d4;
-          border-radius: 5px;
-          margin-bottom: 7px;
-        "
-      >
-        <div
-          style="
-            border-top: 3px solid #51606e;
-            border-bottom: 1px solid #d4d4d4;
-            padding: 3px;
-          "
-        >
-          <!-- <p style="font-size: 16px;"><strong>搴撳瓨璇︽儏</strong></p> -->
-          <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: 10px">
-          <template if:true={showTable}>
-            <c-lex-custom-lightning-datatable
-              key-field="id"
-              data={data}
-              columns={columns}
-              default-sort-direction={defaultSortDirection}
-              sorted-direction={sortDirection}
-              sorted-by={sortedBy}
-              onsort={onHandleSort}
-              hide-checkbox-column={hidecheckboxcolumn}
-              style="word-wrap: break-word; word-break: break-all"
-              class="wrapped-header-datatable"
-            >
-            </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>
-        </div>
-      </div>
     </div>
-  </div>
-</template>
+</template>
\ No newline at end of file
diff --git a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
index c425b29..6dafd81 100644
--- a/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
+++ b/force-app/main/default/lwc/lexinventoryViewLWC/lexinventoryViewLWC.js
@@ -1,682 +1,726 @@
-import { LightningElement, wire, api, track } from "lwc";
-import oninit from "@salesforce/apex/LexInventoryViewController.init";
-import { ShowToastEvent } from "lightning/platformShowToastEvent";
-import searchOrder from "@salesforce/apex/LexInventoryViewController.searchConsumableorderdetails";
-import categoryAllload from "@salesforce/apex/LexInventoryViewController.categoryAllload";
-import { NavigationMixin } from "lightning/navigation";
+import { LightningElement, wire, api, track } from 'lwc';
+import oninit from '@salesforce/apex/LexInventoryViewController.init';
+import { ShowToastEvent } from 'lightning/platformShowToastEvent';
+import searchOrder from '@salesforce/apex/LexInventoryViewController.searchConsumableorderdetails';
+import categoryAllload from '@salesforce/apex/LexInventoryViewController.categoryAllload';
+import { NavigationMixin } from 'lightning/navigation';
 
 //table css
-import { loadStyle } from "lightning/platformResourceLoader";
-import WrappedHeaderTable from "@salesforce/resourceUrl/lexdatatable";
+import { loadStyle } from 'lightning/platformResourceLoader';
+import WrappedHeaderTable from '@salesforce/resourceUrl/lexdatatable';
 
 export default class LexinventoryViewLWC extends NavigationMixin(
-  LightningElement
+    LightningElement
 ) {
-  //鍒嗛〉start
-  @track sortBy = "";
-  //@track sortDirection = "asc";
-  @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 sortDirection = "asc";
+    @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 data = [];
-  @track message = "";
-  @track Name;
-  @track CategoryThree;
+    @track data = [];
+    @track message = '';
+    @track Name;
+    @track CategoryThree;
 
-  @track category3Options = [];
-  @track CategoryFour;
-  @track category4Options = [];
-  @track CategoryFive;
-  @track category5Options = [];
-  @track orderDetZaikuList = [];
-  @track accountName;
-  @track agencyProType;
-  @track userWorkLocation;
-  @track value = "";
-  @track showTable = false;
-  @track hidecheckboxcolumn = true;
-  @track check = false;
-  @track productkucun;
-  //鍔犺浇
-  @track showSpinner = false;
-  @track showSpinners = false;
-  //鍖婚櫌鐗逛环
-  @track hasHos = false;
-  //琛ㄥご鏍峰紡
-  stylesLoaded = false;
+    @track category3Options = [];
+    @track CategoryFour;
+    @track category4Options = [];
+    @track CategoryFive;
+    @track category5Options = [];
+    @track orderDetZaikuList = [];
+    @track accountName;
+    @track agencyProType;
+    @track userWorkLocation;
+    @track value = '';
+    @track showTable = false;
+    @track hidecheckboxcolumn = true;
+    @track check = false;
+    @track productkucun;
+    //鍔犺浇
+    @track showSpinner = false;
+    @track showSpinners = false;
+    //鍖婚櫌鐗逛环
+    @track hasHos = false;
+    //琛ㄥご鏍峰紡
+    stylesLoaded = false;
 
-  @track columns = [
-    {
-      label: "娑堣�楀搧鍚嶇О",
-      fieldName: "Name__c",
-      type: "Name",
-      sortable: true,
-      hideDefaultActions: true,
-      // initialWidth: 200,
-      wrapText: true,
-      cellAttributes: { alignment: "left" }
-    },
-    {
-      label: "绗笁鍒嗙被",
-      fieldName: "Category3__c",
-      initialWidth: 102,
-      cellAttributes: { alignment: "left" },
-      hideDefaultActions: true,
-      sortable: true,
-      wrapText: true
-    },
-    {
-      label: "绗洓鍒嗙被",
-      fieldName: "Category4__c",
-      cellAttributes: { alignment: "left" },
-      initialWidth: 102,
-      hideDefaultActions: true,
-      wrapText: true,
-      sortable: true
-    },
-    {
-      label: "绗簲鍒嗙被",
-      fieldName: "Category5__c",
-      cellAttributes: { alignment: "left" },
-      initialWidth: 102,
-      hideDefaultActions: true,
-      wrapText: true,
-      sortable: true
-    },
+    @track columns = [
+        {
+            label: '娑堣�楀搧鍚嶇О',
+            fieldName: 'Name__c',
+            type: 'Name',
+            sortable: true,
+            hideDefaultActions: true,
+            // initialWidth: 200,
+            wrapText: true,
+            cellAttributes: { alignment: 'left' }
+        },
+        {
+            label: '绗笁鍒嗙被',
+            fieldName: 'Category3__c',
+            initialWidth: 102,
+            cellAttributes: { alignment: 'left' },
+            hideDefaultActions: true,
+            sortable: true,
+            wrapText: true
+        },
+        {
+            label: '绗洓鍒嗙被',
+            fieldName: 'Category4__c',
+            cellAttributes: { alignment: 'left' },
+            initialWidth: 102,
+            hideDefaultActions: true,
+            wrapText: true,
+            sortable: true
+        },
+        {
+            label: '绗簲鍒嗙被',
+            fieldName: 'Category5__c',
+            cellAttributes: { alignment: 'left' },
+            initialWidth: 102,
+            hideDefaultActions: true,
+            wrapText: true,
+            sortable: true
+        },
 
-    {
-      label: "瑙勬牸",
-      fieldName: "packing_list",
-      cellAttributes: { alignment: "right" },
-      initialWidth: 50,
-      wrapText: true,
-      hideDefaultActions: true
-    },
-    {
-      label: "鍗曚綅",
-      fieldName: "BoxPiece",
-      cellAttributes: { alignment: "left" },
-      initialWidth: 50,
-      wrapText: true,
-      hideDefaultActions: true
-    },
-    {
-      label: "娉ㄥ唽璇佺紪鐮佸彿",
-      fieldName: "approbation_No",
-      cellAttributes: { alignment: "left" },
-      wrapText: true,
-      initialWidth: 104,
-      hideDefaultActions: true
-    },
-    {
-      label: "娉ㄥ唽鏈夋晥鏈�",
-      fieldName: "expiration_Date",
-      cellAttributes: { alignment: "left" },
-      wrapText: true,
-      hideDefaultActions: true,
-      initialWidth: 95
-    },
-    {
-      label: "CFDA鐘舵��",
-      fieldName: "SFDA_Status__c",
-      cellAttributes: { alignment: "left" },
-      initialWidth: 84,
-      wrapText: true,
-      hideDefaultActions: true
-    },
-    {
-      label: "浣跨敤鏈熼檺",
-      fieldName: "guaranteeperiod",
-      cellAttributes: { alignment: "left" },
-      hideDefaultActions: true,
-      initialWidth: 95
-    },
-    {
-      label: "鏈夋晥鏈熷唴搴撳瓨",
-      type: "customInventoryColor",
-      fieldName: "limitCount",
-      sortable: true,
-      cellAttributes: { alignment: "right" },
-      typeAttributes: {
-        value: { fieldName: "limitCount" },
-        upperlimit: { fieldName: "upperlimit" },
-        lowerlimit: { fieldName: "lowerlimit" },
-        boxPrice: { fieldName: "BoxPiece" }
-      },
-      hideDefaultActions: true,
-      initialWidth: 110
-    },
+        {
+            label: '瑙勬牸',
+            fieldName: 'packing_list',
+            cellAttributes: { alignment: 'right' },
+            initialWidth: 50,
+            wrapText: true,
+            hideDefaultActions: true
+        },
+        {
+            label: '鍗曚綅',
+            fieldName: 'BoxPiece',
+            cellAttributes: { alignment: 'left' },
+            initialWidth: 50,
+            wrapText: true,
+            hideDefaultActions: true
+        },
+        {
+            label: '娉ㄥ唽璇佺紪鐮佸彿',
+            fieldName: 'approbation_No',
+            cellAttributes: { alignment: 'left' },
+            wrapText: true,
+            initialWidth: 104,
+            hideDefaultActions: true
+        },
+        {
+            label: '娉ㄥ唽鏈夋晥鏈�',
+            fieldName: 'expiration_Date',
+            cellAttributes: { alignment: 'left' },
+            wrapText: true,
+            hideDefaultActions: true,
+            initialWidth: 95
+        },
+        {
+            label: 'CFDA鐘舵��',
+            fieldName: 'SFDA_Status__c',
+            cellAttributes: { alignment: 'left' },
+            initialWidth: 84,
+            wrapText: true,
+            hideDefaultActions: true
+        },
+        {
+            label: '浣跨敤鏈熼檺',
+            fieldName: 'guaranteeperiod',
+            cellAttributes: { alignment: 'left' },
+            hideDefaultActions: true,
+            initialWidth: 95
+        },
+        {
+            label: '鏈夋晥鏈熷唴搴撳瓨',
+            type: 'customInventoryColor',
+            fieldName: 'limitCount',
+            sortable: true,
+            cellAttributes: { alignment: 'right' },
+            typeAttributes: {
+                value: { fieldName: 'limitCount' },
+                upperlimit: { fieldName: 'upperlimit' },
+                lowerlimit: { fieldName: 'lowerlimit' },
+                boxPrice: { fieldName: 'BoxPiece' }
+            },
+            hideDefaultActions: true,
+            initialWidth: 110
+        },
 
-    {
-      label: "杩囨湡搴撳瓨",
-      fieldName: "overlimitCount",
-      hideDefaultActions: true,
-      cellAttributes: { alignment: "right" },
-      initialWidth: 78
+        {
+            label: '杩囨湡搴撳瓨',
+            fieldName: 'overlimitCount',
+            hideDefaultActions: true,
+            cellAttributes: { alignment: 'right' },
+            initialWidth: 78
+        }
+    ];
+    defaultSortDirection = 'asc';
+    sortDirection = 'asc';
+    sortedBy;
+
+    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');
+                });
+        }
     }
-  ];
-  defaultSortDirection = "asc";
-  sortDirection = "asc";
-  sortedBy;
 
-  renderedCallback() {
-    if (!this.stylesLoaded) {
-      Promise.all([loadStyle(this, WrappedHeaderTable)])
-        .then(() => {
-          console.log("Custom styles loaded");
-          this.stylesLoaded = true;
+    connectedCallback() {
+        this.loader = true;
+        this.init();
+    }
+
+    init() {
+        this.showSpinner = true;
+        oninit({
+            pageSizeLWC: this.pageSize,
+            pageTokenLWC: this.currentPageToken,
+            sortFieldLWC: this.sortBy,
+            sortOrderLWC: this.sortDirection
         })
-        .catch((error) => {
-          console.error("Error loading custom styles");
+            .then((result) => {
+                result = JSON.parse(JSON.stringify(result));
+                console.log(
+                    'result.pageRecords = ' +
+                        JSON.stringify(result.entity.pageRecords)
+                );
+                console.log(
+                    'result.consumableorderdetailsRecords = ' +
+                        JSON.stringify(
+                            result.entity.consumableorderdetailsRecords
+                        )
+                );
+                console.log('result.status = ' + result.status);
+                console.log('result = ' + JSON.stringify(result));
+                console.log('result 1= ' + JSON.stringify(result.entity));
+                console.log(
+                    'result 2= ' + JSON.stringify(result.entity.pageRecords)
+                );
+                if (result.status == 'Success') {
+                    console.log(
+                        'result.entity.paginatedAccounts = ' +
+                            JSON.stringify(result.entity.paginatedAccounts)
+                    );
+                    this.nextPageToken =
+                        result.entity.paginatedAccounts.nextPageToken;
+                    this.totalRecords =
+                        result.entity.paginatedAccounts.totalRecords;
+                    this.recordStart =
+                        result.entity.paginatedAccounts.recordStart;
+                    this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+                    this.totalPages = Math.ceil(
+                        result.entity.paginatedAccounts.totalRecords /
+                            this.pageSize
+                    );
+                    console.log('this.totalPages = ' + this.totalPages);
+                    this.paginationVisibility =
+                        this.totalPages > 1 ? true : false;
+
+                    this.loader = false;
+                    this.data = result.entity.pageRecords;
+                    this.productkucun = result.entity.productkucun;
+
+                    for (var i in this.data) {
+                        this.data[i]['Name__c'] = this.data[i].Prod.Name__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]['SFDA_Status__c'] =
+                            this.data[i].Prod.SFDA_Status__c;
+                    }
+                    this.showTable = true;
+                    this.orderDetZaikuList = result.entity.orderDetZaikuList;
+                    this.accountName = result.entity.accountName;
+                    this.agencyProType = result.entity.agencyProType;
+                    this.userWorkLocation = result.entity.userWorkLocation;
+                    let option1ValueTemp = [];
+                    for (var key in result.entity.categoryOptionMap) {
+                        let object = {};
+                        object['label'] = result.entity.categoryOptionMap[key];
+                        object['value'] = key;
+                        option1ValueTemp.push(object);
+                    }
+                    this.category3Options = option1ValueTemp;
+                    console.log(
+                        ' this.optionscatone===>' +
+                            JSON.stringify(this.optionscatone)
+                    );
+                    let option2ValueTemp = [];
+                    for (var key in result.entity.category4OptionMap) {
+                        let object = {};
+                        object['label'] = result.entity.category4OptionMap[key];
+                        object['value'] = key;
+                        option2ValueTemp.push(object);
+                    }
+                    this.category4Options = option2ValueTemp;
+                    let option3ValueTemp = [];
+                    for (var key in result.entity.category5OptionMap) {
+                        let object = {};
+                        object['label'] = result.entity.category5OptionMap[key];
+                        object['value'] = key;
+                        option3ValueTemp.push(object);
+                    }
+                    this.category5Options = option3ValueTemp;
+                    this.hasHos = result.entity.hasHos;
+                    console.log('this.hasHos' + this.hasHos);
+                    //棰滆壊鏍囪
+
+                    //hasHos = true 鍖婚櫌鐗逛环
+                    if (this.hasHos) {
+                        let object1 = {
+                            label: '鍖婚櫌鐗逛环',
+                            fieldName: 'hospitalSpecialOffer__c',
+                            hideDefaultActions: true,
+                            type: 'boolean',
+                            cellAttributes: { alignment: 'left' },
+                            initialWidth: 80
+                        };
+                        this.columns.push(object1);
+                        console.log(' this.columns' + this.columns);
+                        for (var j in this.data) {
+                            this.data[j]['Name__c'] = this.data[j].Prod.Name__c;
+                            this.data[j]['Category3__c'] =
+                                this.data[j].Prod.Category3__c;
+                            this.data[j]['Category4__c'] =
+                                this.data[j].Prod.Category4__c;
+                            this.data[j]['Category5__c'] =
+                                this.data[j].Prod.Category5__c;
+                            this.data[j]['SFDA_Status__c'] =
+                                this.data[j].Prod.SFDA_Status__c;
+                            this.data[j]['hospitalSpecialOffer__c'] =
+                                this.data[j].hospitalSpecialOffer;
+                            console.log(
+                                'this.data[j].hospitalSpecialOffer__c' +
+                                    this.data[j].hospitalSpecialOffer
+                            );
+                        }
+                    }
+                    this.showSpinner = false;
+                } else {
+                    // this.showToast("Error",'Error', result.msg);
+                    this.showMyToast('鍒濆鍖栧け璐�', result.msg, 'error');
+                }
+            })
+            .catch((error) => {
+                this.loader = false;
+                this.showSpinner = false;
+                console.log('error = ' + JSON.stringify(error));
+            });
+    }
+
+    handleChange(event) {
+        let fieldName = event.target.getAttribute('data-field');
+        let value = event.detail.value;
+        console.log('======>fieldName' + fieldName);
+        console.log('======>value' + value);
+        switch (fieldName) {
+            case 'Name':
+                this.Name = value;
+                break;
+            case 'CategoryThree':
+                this.CategoryThree = value;
+                break;
+            case 'CategoryFour':
+                this.CategoryFour = value;
+                break;
+            case 'CategoryFive':
+                this.CategoryFive = value;
+                break;
+            default:
+                console.log('no data');
+        }
+    }
+    dataChange(event) {
+        let fieldName = event.target.getAttribute('data-field');
+        let value = event.detail.value;
+        console.log('fieldName = ' + fieldName + ' value = ' + value);
+        switch (fieldName) {
+            case 'Name':
+                this.Name = value;
+                break;
+            case 'CategoryThree':
+                this.CategoryThree = value;
+                //璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
+                this.showAllCate();
+                if (this.CategoryThree == '') {
+                    this.CategoryFour = '';
+                    this.CategoryFive = '';
+                }
+                break;
+            case 'CategoryFour':
+                this.CategoryFour = value;
+                //璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
+                this.showCate();
+                if (this.CategoryFour == '') {
+                    this.CategoryFive = '';
+                }
+                break;
+            case 'CategoryFive':
+                this.CategoryFive = value;
+                break;
+        }
+    }
+
+    showAllCate() {
+        categoryAllload({
+            category3LWC: this.CategoryThree,
+            agencyProTypeLWC: this.agencyProType
+        })
+            .then((result) => {
+                result = JSON.parse(JSON.stringify(result));
+                console.log('result = ' + JSON.stringify(result));
+                if (result.status == 'Success') {
+                    this.category4Options = [];
+                    this.category5Options = [];
+                    //绗�4鍒嗙被
+                    for (var key in result.entity.category4OptionMap) {
+                        let object = {};
+                        object['label'] = result.entity.category4OptionMap[key];
+                        object['value'] = key;
+                        this.category4Options.push(object);
+                    }
+                    console.log(
+                        'this.category4Options = ' +
+                            JSON.stringify(this.category4Options)
+                    );
+                    //绗�5鍒嗙被
+                    for (var key in result.entity.category5OptionMap) {
+                        let object = {};
+                        object['label'] = result.entity.category5OptionMap[key];
+                        object['value'] = key;
+                        this.category5Options.push(object);
+                    }
+                } else {
+                    console.log('result = ' + JSON.stringify(result));
+                    this.showMyToast(result.msg, '', 'error');
+                }
+            })
+            .catch((error) => {
+                console.log('error' + JSON.stringify(error));
+            });
+    }
+
+    searchOrderDetail() {
+        this.showTable = false;
+        this.showSpinner = true;
+        searchOrder({
+            category1: this.Name,
+            Category3: this.CategoryThree,
+            Category4: this.CategoryFour,
+            Category5: this.CategoryFive,
+            orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
+            accountName: this.accountName,
+            agencyProType: this.agencyProType,
+            userWorkLocation: this.userWorkLocation,
+            pageSizeLWC: this.pageSize,
+            pageTokenLWC: this.currentPageToken,
+            productkucunLWC: this.productkucun
+
+            // sortFieldLWC: this.sortBy,
+            // sortOrderLWC: this.sortDirection
+        })
+            .then((result) => {
+                result = JSON.parse(JSON.stringify(result));
+                if (result.status == 'Success') {
+                    this.nextPageToken =
+                        result.entity.paginatedAccounts.nextPageToken;
+                    this.totalRecords =
+                        result.entity.paginatedAccounts.totalRecords;
+                    this.recordStart =
+                        result.entity.paginatedAccounts.recordStart;
+                    this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+                    this.totalPages = Math.ceil(
+                        result.entity.paginatedAccounts.totalRecords /
+                            this.pageSize
+                    );
+                    console.log(
+                        'result.entity.paginatedAccounts = ' +
+                            JSON.stringify(result.entity.paginatedAccounts)
+                    );
+                    console.log('this.totalPages = ' + this.totalPages);
+                    this.paginationVisibility =
+                        this.totalPages > 1 ? true : false;
+                    console.log('this.sortDirection = ' + this.sortDirection);
+                    // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
+                    // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
+                    this.data = result.entity.pageRecords;
+                    console.log('鎼滅储Data==>' + JSON.stringify(this.data));
+                    for (var i in this.data) {
+                        this.data[i]['Name__c'] = this.data[i].Prod.Name__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]['SFDA_Status__c'] =
+                            this.data[i].Prod.SFDA_Status__c;
+                        this.data[i]['hospitalSpecialOffer__c'] =
+                            this.data[i].hospitalSpecialOffer;
+                        this.data[i]['guaranteeperiod'] =
+                            this.data[i].guaranteeperiod;
+                    }
+                    this.data = [...this.data];
+                    console.log('this.data = ' + JSON.stringify(this.data));
+                    this.showTable = true;
+                    this.showSpinner = false;
+                } else {
+                    this.nextPageToken = this.pageSize;
+                    this.totalRecords = 0;
+                    this.recordStart = 0;
+                    this.recordEnd = 0;
+                    this.totalPages = 0;
+
+                    // this.showToast("Error",'Error', result.msg);
+                    // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
+                    this.showSpinner = false;
+                }
+            })
+            .catch((error) => {
+                console.log('error = ' + JSON.stringify(error));
+                this.showSpinner = false;
+            });
+    }
+    inventoryCount() {
+        this[NavigationMixin.Navigate]({
+            type: 'standard__webPage',
+            attributes: {
+                url: '/lexinventory'
+            }
         });
     }
-  }
 
-  connectedCallback() {
-    this.loader = true;
-    this.init();
-  }
-
-  init() {
-    this.showSpinner = true;
-    oninit({
-      pageSizeLWC: this.pageSize,
-      pageTokenLWC: this.currentPageToken,
-      sortFieldLWC: this.sortBy,
-      sortOrderLWC: this.sortDirection
-    })
-      .then((result) => {
-        result = JSON.parse(JSON.stringify(result));
-        console.log(
-          "result.pageRecords = " + JSON.stringify(result.entity.pageRecords)
-        );
-        console.log(
-          "result.consumableorderdetailsRecords = " +
-            JSON.stringify(result.entity.consumableorderdetailsRecords)
-        );
-        console.log("result.status = " + result.status);
-        console.log("result = " + JSON.stringify(result));
-        console.log("result 1= " + JSON.stringify(result.entity));
-        console.log("result 2= " + JSON.stringify(result.entity.pageRecords));
-        if (result.status == "Success") {
-          console.log(
-            "result.entity.paginatedAccounts = " +
-              JSON.stringify(result.entity.paginatedAccounts)
-          );
-          this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
-          this.totalRecords = result.entity.paginatedAccounts.totalRecords;
-          this.recordStart = result.entity.paginatedAccounts.recordStart;
-          this.recordEnd = result.entity.paginatedAccounts.recordEnd;
-          this.totalPages = Math.ceil(
-            result.entity.paginatedAccounts.totalRecords / this.pageSize
-          );
-          console.log("this.totalPages = " + this.totalPages);
-          this.paginationVisibility = this.totalPages > 1 ? true : false;
-
-          this.loader = false;
-          this.data = result.entity.pageRecords;
-          this.productkucun = result.entity.productkucun;
-
-          for (var i in this.data) {
-            this.data[i]["Name__c"] = this.data[i].Prod.Name__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]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
-          }
-          this.showTable = true;
-          this.orderDetZaikuList = result.entity.orderDetZaikuList;
-          this.accountName = result.entity.accountName;
-          this.agencyProType = result.entity.agencyProType;
-          this.userWorkLocation = result.entity.userWorkLocation;
-          let option1ValueTemp = [];
-          for (var key in result.entity.categoryOptionMap) {
-            let object = {};
-            object["label"] = result.entity.categoryOptionMap[key];
-            object["value"] = key;
-            option1ValueTemp.push(object);
-          }
-          this.category3Options = option1ValueTemp;
-          console.log(
-            " this.optionscatone===>" + JSON.stringify(this.optionscatone)
-          );
-          let option2ValueTemp = [];
-          for (var key in result.entity.category4OptionMap) {
-            let object = {};
-            object["label"] = result.entity.category4OptionMap[key];
-            object["value"] = key;
-            option2ValueTemp.push(object);
-          }
-          this.category4Options = option2ValueTemp;
-          let option3ValueTemp = [];
-          for (var key in result.entity.category5OptionMap) {
-            let object = {};
-            object["label"] = result.entity.category5OptionMap[key];
-            object["value"] = key;
-            option3ValueTemp.push(object);
-          }
-          this.category5Options = option3ValueTemp;
-          this.hasHos = result.entity.hasHos;
-          console.log("this.hasHos" + this.hasHos);
-          //棰滆壊鏍囪
-
-          //hasHos = true 鍖婚櫌鐗逛环
-          if (this.hasHos) {
-            let object1 = {
-              label: "鍖婚櫌鐗逛环",
-              fieldName: "hospitalSpecialOffer__c",
-              hideDefaultActions: true,
-              type: "boolean",
-              cellAttributes: { alignment: "left" },
-              initialWidth: 80
-            };
-            this.columns.push(object1);
-            console.log(" this.columns" + this.columns);
-            for (var j in this.data) {
-              this.data[j]["Name__c"] = this.data[j].Prod.Name__c;
-              this.data[j]["Category3__c"] = this.data[j].Prod.Category3__c;
-              this.data[j]["Category4__c"] = this.data[j].Prod.Category4__c;
-              this.data[j]["Category5__c"] = this.data[j].Prod.Category5__c;
-              this.data[j]["SFDA_Status__c"] = this.data[j].Prod.SFDA_Status__c;
-              this.data[j]["hospitalSpecialOffer__c"] =
-                this.data[j].hospitalSpecialOffer;
-              console.log(
-                "this.data[j].hospitalSpecialOffer__c" +
-                  this.data[j].hospitalSpecialOffer
-              );
+    handleExpired() {
+        console.log('杩囨湡搴撳瓨鍛㈤攢瀛�');
+        this[NavigationMixin.Navigate]({
+            type: 'standard__webPage',
+            attributes: {
+                url: '/lexoverduestock'
             }
-          }
-          this.showSpinner = false;
-        } else {
-          // this.showToast("Error",'Error', result.msg);
-          this.showMyToast("鍒濆鍖栧け璐�", result.msg, "error");
-        }
-      })
-      .catch((error) => {
-        this.loader = false;
-        this.showSpinner = false;
-        console.log("error = " + JSON.stringify(error));
-      });
-  }
-
-  handleChange(event) {
-    let fieldName = event.target.getAttribute("data-field");
-    let value = event.detail.value;
-    console.log("======>fieldName" + fieldName);
-    console.log("======>value" + value);
-    switch (fieldName) {
-      case "Name":
-        this.Name = value;
-        break;
-      case "CategoryThree":
-        this.CategoryThree = value;
-        break;
-      case "CategoryFour":
-        this.CategoryFour = value;
-        break;
-      case "CategoryFive":
-        this.CategoryFive = value;
-        break;
-      default:
-        console.log("no data");
+        });
     }
-  }
-  dataChange(event) {
-    let fieldName = event.target.getAttribute("data-field");
-    let value = event.detail.value;
-    console.log("fieldName = " + fieldName + " value = " + value);
-    switch (fieldName) {
-      case "Name":
-        this.Name = value;
-        break;
-      case "CategoryThree":
-        this.CategoryThree = value;
-        //璋冪敤鍚庡彴鏄剧ず绗洓浜斿垎绫�
-        this.showAllCate();
-        if (this.CategoryThree == "") {
-          this.CategoryFour = "";
-          this.CategoryFive = "";
-        }
-        break;
-      case "CategoryFour":
-        this.CategoryFour = value;
-        //璋冪敤鍚庡彴鏄剧ず绗簲鍒嗙被
-        this.showCate();
-        if (this.CategoryFour == "") {
-          this.CategoryFive = "";
-        }
-        break;
-      case "CategoryFive":
-        this.CategoryFive = value;
-        break;
+    removeBox() {
+        this[NavigationMixin.Navigate]({
+            type: 'standard__webPage',
+            attributes: {
+                url: '/lexremovebox'
+            }
+        });
     }
-  }
+    cancelremoveBox() {
+        this[NavigationMixin.Navigate]({
+            type: 'standard__webPage',
+            attributes: {
+                url: '/lexcancelremovebox'
+            }
+        });
+    }
 
-  showAllCate() {
-    categoryAllload({
-      category3LWC: this.CategoryThree,
-      agencyProTypeLWC: this.agencyProType
-    })
-      .then((result) => {
-        result = JSON.parse(JSON.stringify(result));
-        console.log("result = " + JSON.stringify(result));
-        if (result.status == "Success") {
-          this.category4Options = [];
-          this.category5Options = [];
-          //绗�4鍒嗙被
-          for (var key in result.entity.category4OptionMap) {
-            let object = {};
-            object["label"] = result.entity.category4OptionMap[key];
-            object["value"] = key;
-            this.category4Options.push(object);
-          }
-          console.log(
-            "this.category4Options = " + JSON.stringify(this.category4Options)
-          );
-          //绗�5鍒嗙被
-          for (var key in result.entity.category5OptionMap) {
-            let object = {};
-            object["label"] = result.entity.category5OptionMap[key];
-            object["value"] = key;
-            this.category5Options.push(object);
-          }
-        } else {
-          console.log("result = " + JSON.stringify(result));
-          this.showMyToast(result.msg, "", "error");
-        }
-      })
-      .catch((error) => {
-        console.log("error" + JSON.stringify(error));
-      });
-  }
+    clearAll() {
+        this.showSpinner = true;
+        this.showTable = false;
+        this.Name = '';
+        this.CategoryThree = '';
+        this.CategoryFour = '';
+        this.CategoryFive = '';
+        this.template.querySelectorAll('lightning-combobox').forEach((each) => {
+            each.value = null;
+        });
+        console.log(' this.CategoryThree' + this.CategoryThree);
+        console.log('鏁版嵁鍒楄〃' + this.data);
+        searchOrder({
+            category1: this.Name,
+            Category3: this.CategoryThree,
+            Category4: this.CategoryFour,
+            Category5: this.CategoryFive,
+            orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
+            accountName: this.accountName,
+            agencyProType: this.agencyProType,
+            userWorkLocation: this.userWorkLocation,
+            pageSizeLWC: this.pageSize,
+            pageTokenLWC: this.currentPageToken,
+            productkucunLWC: this.productkucun
+        })
+            .then((result) => {
+                console.log('result鎼滅储 = ' + JSON.stringify(result));
+                result = JSON.parse(JSON.stringify(result));
+                if (result.status == 'Success') {
+                    this.nextPageToken =
+                        result.entity.paginatedAccounts.nextPageToken;
+                    this.totalRecords =
+                        result.entity.paginatedAccounts.totalRecords;
+                    this.recordStart =
+                        result.entity.paginatedAccounts.recordStart;
+                    this.recordEnd = result.entity.paginatedAccounts.recordEnd;
+                    this.totalPages = Math.ceil(
+                        result.entity.paginatedAccounts.totalRecords /
+                            this.pageSize
+                    );
+                    console.log('this.totalPages = ' + this.totalPages);
+                    this.paginationVisibility =
+                        this.totalPages > 1 ? true : false;
+                    console.log('this.sortDirection = ' + this.sortDirection);
+                    this.data = result.entity.pageRecords;
 
-  searchOrderDetail() {
-    this.showTable = false;
-    this.showSpinner = true;
-    searchOrder({
-      category1: this.Name,
-      Category3: this.CategoryThree,
-      Category4: this.CategoryFour,
-      Category5: this.CategoryFive,
-      orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
-      accountName: this.accountName,
-      agencyProType: this.agencyProType,
-      userWorkLocation: this.userWorkLocation,
-      pageSizeLWC: this.pageSize,
-      pageTokenLWC: this.currentPageToken,
-      productkucunLWC: this.productkucun
+                    for (var i in this.data) {
+                        this.data[i]['Name__c'] = this.data[i].Prod.Name__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]['SFDA_Status__c'] =
+                            this.data[i].Prod.SFDA_Status__c;
+                        this.data[i]['guaranteeperiod'] =
+                            this.data[i].guaranteeperiod;
+                    }
+                    this.showSpinner = false;
+                    this.showTable = true;
+                    // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
+                    // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
+                } else {
+                    // this.showToast("Error", 'Error',result.msg);
+                    // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
+                    this.showSpinner = false;
+                }
+            })
+            .catch((error) => {
+                console.log('error = ' + JSON.stringify(error));
+                this.showSpinner = false;
+            });
+    }
 
-      // sortFieldLWC: this.sortBy,
-      // sortOrderLWC: this.sortDirection
-    })
-      .then((result) => {
-        result = JSON.parse(JSON.stringify(result));
-        if (result.status == "Success") {
-          this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
-          this.totalRecords = result.entity.paginatedAccounts.totalRecords;
-          this.recordStart = result.entity.paginatedAccounts.recordStart;
-          this.recordEnd = result.entity.paginatedAccounts.recordEnd;
-          this.totalPages = Math.ceil(
-            result.entity.paginatedAccounts.totalRecords / this.pageSize
-          );
-          console.log(
-            "result.entity.paginatedAccounts = " +
-              JSON.stringify(result.entity.paginatedAccounts)
-          );
-          console.log("this.totalPages = " + this.totalPages);
-          this.paginationVisibility = this.totalPages > 1 ? true : false;
-          console.log("this.sortDirection = " + this.sortDirection);
-          // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
-          // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
-          this.data = result.entity.pageRecords;
-          console.log("鎼滅储Data==>" + JSON.stringify(this.data));
-          for (var i in this.data) {
-            this.data[i]["Name__c"] = this.data[i].Prod.Name__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]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
-            this.data[i]["hospitalSpecialOffer__c"] =
-              this.data[i].hospitalSpecialOffer;
-            this.data[i]["guaranteeperiod"] = this.data[i].guaranteeperiod;
-          }
-          this.data = [...this.data];
-          console.log("this.data = " + JSON.stringify(this.data));
-          this.showTable = true;
-          this.showSpinner = false;
-        } else {
-          this.nextPageToken = this.pageSize;
-          this.totalRecords = 0;
-          this.recordStart = 0;
-          this.recordEnd = 0;
-          this.totalPages = 0;
+    sortByMethod(field, reverse, primer) {
+        const key = primer
+            ? function (x) {
+                  return primer(x[field]);
+              }
+            : function (x) {
+                  return x[field];
+              };
 
-          // this.showToast("Error",'Error', result.msg);
-          // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
-          this.showSpinner = false;
-        }
-      })
-      .catch((error) => {
-        console.log("error = " + JSON.stringify(error));
-        this.showSpinner = false;
-      });
-  }
-  inventoryCount() {
-    this[NavigationMixin.Navigate]({
-      type: "standard__webPage",
-      attributes: {
-        url: "/lexinventory"
-      }
-    });
-  }
-
-  handleExpired() {
-    console.log("杩囨湡搴撳瓨鍛㈤攢瀛�");
-    this[NavigationMixin.Navigate]({
-      type: "standard__webPage",
-      attributes: {
-        url: "/lexoverduestock"
-      }
-    });
-  }
-  removeBox() {
-    this[NavigationMixin.Navigate]({
-      type: "standard__webPage",
-      attributes: {
-        url: "/lexremovebox"
-      }
-    });
-  }
-  cancelremoveBox() {
-    this[NavigationMixin.Navigate]({
-      type: "standard__webPage",
-      attributes: {
-        url: "/lexcancelremovebox"
-      }
-    });
-  }
-
-  clearAll() {
-    this.showSpinner = true;
-    this.showTable = false;
-    this.Name = "";
-    this.CategoryThree = "";
-    this.CategoryFour = "";
-    this.CategoryFive = "";
-    this.template.querySelectorAll("lightning-combobox").forEach((each) => {
-      each.value = null;
-    });
-    console.log(" this.CategoryThree" + this.CategoryThree);
-    console.log("鏁版嵁鍒楄〃" + this.data);
-    searchOrder({
-      category1: this.Name,
-      Category3: this.CategoryThree,
-      Category4: this.CategoryFour,
-      Category5: this.CategoryFive,
-      orderDetZaikuListLWC: JSON.stringify(this.orderDetZaikuList),
-      accountName: this.accountName,
-      agencyProType: this.agencyProType,
-      userWorkLocation: this.userWorkLocation,
-      pageSizeLWC: this.pageSize,
-      pageTokenLWC: this.currentPageToken,
-      productkucunLWC: this.productkucun
-    })
-      .then((result) => {
-        console.log("result鎼滅储 = " + JSON.stringify(result));
-        result = JSON.parse(JSON.stringify(result));
-        if (result.status == "Success") {
-          this.nextPageToken = result.entity.paginatedAccounts.nextPageToken;
-          this.totalRecords = result.entity.paginatedAccounts.totalRecords;
-          this.recordStart = result.entity.paginatedAccounts.recordStart;
-          this.recordEnd = result.entity.paginatedAccounts.recordEnd;
-          this.totalPages = Math.ceil(
-            result.entity.paginatedAccounts.totalRecords / this.pageSize
-          );
-          console.log("this.totalPages = " + this.totalPages);
-          this.paginationVisibility = this.totalPages > 1 ? true : false;
-          console.log("this.sortDirection = " + this.sortDirection);
-          this.data = result.entity.pageRecords;
-
-          for (var i in this.data) {
-            this.data[i]["Name__c"] = this.data[i].Prod.Name__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]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
-            this.data[i]["guaranteeperiod"] = this.data[i].guaranteeperiod;
-          }
-          this.showSpinner = false;
-          this.showTable = true;
-          // this.showMyToast('鎼滅储鎴愬姛',result.msg,'success');
-          // this.showToast("Success",'鎼滅储鎴愬姛', result.msg);
-        } else {
-          // this.showToast("Error", 'Error',result.msg);
-          // this.showMyToast('鎼滅储澶辫触',result.msg,'error');
-          this.showSpinner = false;
-        }
-      })
-      .catch((error) => {
-        console.log("error = " + JSON.stringify(error));
-        this.showSpinner = false;
-      });
-  }
-
-  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));
         };
-
-    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);
-    // if('limitCount' != this.sortBy)
-    // 	this.searchOrderDetail();
-    // else{
-    // 	const { fieldName: sortedBy, sortDirection } = event.detail;
-    // 	const cloneData = [...this.data];
-    // 	cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
-    // 	this.data = cloneData;
-    // 	this.sortDirection = sortDirection;
-    // 	this.sortedBy = sortedBy;
-    // }
-    const { fieldName: sortedBy, sortDirection } = event.detail;
-    const cloneData = [...this.data];
-    cloneData.sort(
-      this.sortByMethod(sortedBy, sortDirection === "asc" ? 1 : -1)
-    );
-    this.data = 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.searchOrderDetail();
-  }
-
-  handleNext() {
-    this.currentPageToken =
-      Number(this.currentPageToken) + Number(this.pageSize);
-    this.searchOrderDetail();
-  }
-  handleFirst() {
-    this.currentPageToken = 0;
-    this.searchOrderDetail();
-  }
-
-  handleLast() {
-    this.currentPageToken =
-      this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
-    this.searchOrderDetail();
-  }
-
-  handlePageschange(event) {
-    console.log(event.detail);
-    this.pageSize = event.detail;
-    this.currentPageToken = 0;
-    this.searchOrderDetail();
-  }
-  get previousButtonDisabled() {
-    return this.currentPageToken === 0;
-  }
-
-  get nextButtonDisabled() {
-    return this.nextPageToken === undefined;
-  }
-  showMyToast(title, message, variant) {
-    console.log("show custom message");
-    var iconName = "";
-    var content = "";
-    if (variant == "success") {
-      iconName = "utility:check";
-    } else {
-      iconName = "utility:error";
+    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);
+        // if('limitCount' != this.sortBy)
+        // 	this.searchOrderDetail();
+        // else{
+        // 	const { fieldName: sortedBy, sortDirection } = event.detail;
+        // 	const cloneData = [...this.data];
+        // 	cloneData.sort(this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1));
+        // 	this.data = cloneData;
+        // 	this.sortDirection = sortDirection;
+        // 	this.sortedBy = sortedBy;
+        // }
+        const { fieldName: sortedBy, sortDirection } = event.detail;
+        const cloneData = [...this.data];
+        cloneData.sort(
+            this.sortByMethod(sortedBy, sortDirection === 'asc' ? 1 : -1)
+        );
+        this.data = cloneData;
+        this.sortDirection = sortDirection;
+        this.sortedBy = sortedBy;
     }
-    if (message != "") {
-      content =
-        "<h2><strong>" + title + "<strong/></h2><h5>" + message + "</h5>";
-    } else {
-      content = "<h2><strong>" + title + "<strong/></h2>";
+    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;
+        }
     }
-    this.template
-      .querySelector("c-common-toast")
-      .showToast(variant, content, iconName, 10000);
-  }
-}
+
+    handlePrevious() {
+        this.currentPageToken =
+            Number(this.currentPageToken) - Number(this.pageSize);
+        this.searchOrderDetail();
+    }
+
+    handleNext() {
+        this.currentPageToken =
+            Number(this.currentPageToken) + Number(this.pageSize);
+        this.searchOrderDetail();
+    }
+    handleFirst() {
+        this.currentPageToken = 0;
+        this.searchOrderDetail();
+    }
+
+    handleLast() {
+        this.currentPageToken =
+            this.totalPages > 1 ? (this.totalPages - 1) * this.pageSize : 0;
+        this.searchOrderDetail();
+    }
+
+    handlePageschange(event) {
+        console.log(event.detail);
+        this.pageSize = event.detail;
+        this.currentPageToken = 0;
+        this.searchOrderDetail();
+    }
+    get previousButtonDisabled() {
+        return this.currentPageToken === 0;
+    }
+
+    get nextButtonDisabled() {
+        return this.nextPageToken === undefined;
+    }
+    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);
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.1