From f08088add834965ea9ee07dbd35804507e47f5e7 Mon Sep 17 00:00:00 2001
From: buli <137736985@qq.com>
Date: 星期五, 07 七月 2023 17:28:16 +0800
Subject: [PATCH] UATBackup

---
 force-app/main/default/lwc/lexConsumable/lexConsumable.html | 1329 ++++++++++++-----
 .sf/config.json                                             |    2 
 manifest/package.xml                                        |    2 
 force-app/main/default/lwc/lexConsumable/lexConsumable.js   | 3027 ++++++++++++++++++++++------------------
 4 files changed, 2,583 insertions(+), 1,777 deletions(-)

diff --git a/.sf/config.json b/.sf/config.json
index 5b4e627..e8a7811 100644
--- a/.sf/config.json
+++ b/.sf/config.json
@@ -1,3 +1,3 @@
 {
-  "target-org": "OlympusDev"
+  "target-org": "OlympusStageEnv"
 }
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.html b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
index 33ba4d1..60b46d7 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.html
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.html
@@ -1,100 +1,191 @@
 <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>
@@ -102,14 +193,16 @@
                                                     <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}>
@@ -119,63 +212,103 @@
                                             <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>
@@ -205,133 +338,309 @@
                                             <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>鍖婚櫌</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>
+                  <!-- <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>
-                    </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>
+                      </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 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>
+                      </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>
+          </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>
-        <!-- 闄勪欢 -->
-        <!-- <template if:false={editAble}>
+      </div>
+    </div>
+    <!-- 闄勪欢 -->
+    <!-- <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>
@@ -347,148 +656,332 @@
                 </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 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-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>
-                <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>
+              </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>
-                        <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 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>
-                    <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;"><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>
-                    <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>
+            <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>
\ No newline at end of file
+    <!-- 鎼滅储鍖婚櫌 -->
+    <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
+                      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>
+          <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">
+                    <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>
+          <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>
diff --git a/force-app/main/default/lwc/lexConsumable/lexConsumable.js b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
index 9733513..c3ea4d3 100644
--- a/force-app/main/default/lwc/lexConsumable/lexConsumable.js
+++ b/force-app/main/default/lwc/lexConsumable/lexConsumable.js
@@ -1,1390 +1,1703 @@
-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 { 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";
 
 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}
-   ];
+  //椤甸潰鍩虹鏁版嵁
+  @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:150});
-      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:97});
-      cols.push({label:'娉ㄥ唽璇佺紪鐮佸彿',fieldName:'approbation_No',wrapText:true,hideDefaultActions: true,initialWidth:120});
-      cols.push({label:'娉ㄥ唽璇佹晥鏈�',fieldName:'expiration_Date',wrapText:true,hideDefaultActions: true,initialWidth:105});
-      cols.push({label:'绗�3鍒嗙被',fieldName:'prodCategory3',wrapText:true,hideDefaultActions: true,initialWidth:78,sortable: true});
-      cols.push({label:'绗�4鍒嗙被',fieldName:'prodCategory4',wrapText:true,hideDefaultActions: true,initialWidth:107,sortable: true});
-      cols.push({label:'绗�5鍒嗙被',fieldName:'prodCategory5',wrapText:true,hideDefaultActions: true,initialWidth:80,sortable: true});
-      if(this.cansee){
-         cols.push({label:'鏍囧噯鍗曚环',type:'number',typeAttributes:{minimumFractionDigits: 2},fieldName:'prodIntraTradeList',hideDefaultActions: true,initialWidth:80});
-      }
-      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:80});
-      }else{
-         cols.push({label:'閲囪喘鏁伴噺',fieldName:'consumableCount',hideDefaultActions: true,initialWidth:80,cellAttributes: { alignment: "right" }});
-      }
-      cols.push({label:'鍦ㄥ簱鏁颁笅闄�',fieldName:'lowerlimit',hideDefaultActions: true,initialWidth:100,cellAttributes: { alignment: "right" }});
-      cols.push({label:'鍦ㄥ簱鏁颁笂闄�',fieldName:'upperlimit',hideDefaultActions: true,initialWidth:100,cellAttributes: { alignment: "right" }});
-      // cols.push({label:'鏈夋晥鏈熷簱瀛�(鐩�)',fieldName:'allnumber',hideDefaultActions: true,initialWidth:105,sortable: true});
-      cols.push(
-         {label:'鏈夋晥鏈熷簱瀛�(鐩�)',
-         type: "customInventoryColor",
-         typeAttributes: {
-            value: { fieldName: "allnumber" },
-            upperlimit: { fieldName: "upperlimit" },
-            lowerlimit: { fieldName: "lowerlimit" },
-            boxPrice: '鐩�'
-         },
-         hideDefaultActions: true,initialWidth:126});
-      cols.push({label:'鏈夋晥鏈熷簱瀛�(涓�)',fieldName:'allnumber_piece',hideDefaultActions: true,initialWidth:126,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);
-            }
-         }
-         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('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);
-      }
-   }
-
-   renderedCallback(){ 
-      if (!this.stylesLoaded) {
-          Promise.all([loadStyle(this, WrappedHeaderTable)])
-              .then(() => {
-                  console.log("Custom styles loaded");
-                  this.stylesLoaded = true;
-              })
-              .catch((error) => {
-                  console.error("Error loading custom styles");
-              });
-      }
-   }
-   
-   //椤甸潰鍒濆鍖�
-   connectedCallback(){
-      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) + "...";
-                  }
-                  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');
-            }
-         })
-   }
-
-   //绗洓鍒嗙被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');
-               }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;
-      }else{
-         this.showEditBtn = false;
-         this.showOfferPriceInputBtn = false;
-      }
-      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
-         }
+  //娑堣�楀搧鏁版嵁col
+  get cols() {
+    var cols = [];
+    cols.push({
+      label: "娑堣�楀搧鍚嶇О",
+      fieldName: "prodName",
+      wrapText: true,
+      hideDefaultActions: true,
+      sortable: true,
+      initialWidth: 150
+    });
+    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: 97
+    });
+    cols.push({
+      label: "娉ㄥ唽璇佺紪鐮佸彿",
+      fieldName: "approbation_No",
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 120
+    });
+    cols.push({
+      label: "娉ㄥ唽璇佹晥鏈�",
+      fieldName: "expiration_Date",
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 105
+    });
+    cols.push({
+      label: "绗�3鍒嗙被",
+      fieldName: "prodCategory3",
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 78,
+      sortable: true
+    });
+    cols.push({
+      label: "绗�4鍒嗙被",
+      fieldName: "prodCategory4",
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 107,
+      sortable: true
+    });
+    cols.push({
+      label: "绗�5鍒嗙被",
+      fieldName: "prodCategory5",
+      wrapText: true,
+      hideDefaultActions: true,
+      initialWidth: 80,
+      sortable: true
+    });
+    if (this.cansee) {
+      cols.push({
+        label: "鏍囧噯鍗曚环",
+        type: "number",
+        typeAttributes: { minimumFractionDigits: 2 },
+        fieldName: "prodIntraTradeList",
+        hideDefaultActions: true,
+        initialWidth: 80
       });
-   }
+    }
+    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: 80
+      });
+    } else {
+      cols.push({
+        label: "閲囪喘鏁伴噺",
+        fieldName: "consumableCount",
+        hideDefaultActions: true,
+        initialWidth: 80,
+        cellAttributes: { alignment: "right" }
+      });
+    }
+    cols.push({
+      label: "鍦ㄥ簱鏁颁笅闄�",
+      fieldName: "lowerlimit",
+      hideDefaultActions: true,
+      initialWidth: 100,
+      cellAttributes: { alignment: "right" }
+    });
+    cols.push({
+      label: "鍦ㄥ簱鏁颁笂闄�",
+      fieldName: "upperlimit",
+      hideDefaultActions: true,
+      initialWidth: 100,
+      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: 146,
+      sortable: true
+    });
+    cols.push({
+      label: "鏈夋晥鏈熷簱瀛�(涓�)",
+      fieldName: "allnumber_piece",
+      hideDefaultActions: true,
+      initialWidth: 126,
+      cellAttributes: { alignment: "right" }
+    });
+    return cols;
+  }
 
-   //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
-   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');
-         })
-   }
+  //闄勪欢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
+    }
+  ];
 
-   //妫�绱㈠尰闄�
-   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');
+  //鍙栧緱鎵�鏈夎鍕鹃�夌殑浜у搧id
+  getAllChecked() {
+    this.selectRows = [];
+    for (var i in this.currentRecord) {
+      if (this.currentRecord[i].check) {
+        this.selectRows.push(this.currentRecord[i].recordId);
       }
-   }
+    }
+  }
 
-   //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
-   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;
-               }
+  //鍕鹃�夋搷浣�
+  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(
+      "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);
+    }
+  }
+
+  renderedCallback() {
+    if (!this.stylesLoaded) {
+      Promise.all([loadStyle(this, WrappedHeaderTable)])
+        .then(() => {
+          console.log("Custom styles loaded");
+          this.stylesLoaded = true;
+        })
+        .catch((error) => {
+          console.error("Error loading custom styles");
+        });
+    }
+  }
+
+  //椤甸潰鍒濆鍖�
+  connectedCallback() {
+    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) + "...";
             }
-         }else{
-            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)) {
+            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=>{
-         console.log("Error:"+error);
-         this.showMyToast('鍒濆鍖栨绱㈠悎鍚岄〉闈㈠け璐�',error,'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");
+      }
+    });
+  }
+
+  //绗洓鍒嗙被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");
+        } 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);
+      });
+  }
 
-   //妫�绱㈠悎鍚�
-   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;
-               }
+  //娓呴櫎鎼滅储鏍�
+  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
             }
-         }else{
-            console.log("Error:"+result.errorMsg);
-            this.showMyToast('鎼滅储澶辫触',result.errorMsg,'error');
-         }
+          };
+          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);
-         this.showMyToast('鎼滅储澶辫触',error,'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;
+    } else {
+      this.showEditBtn = false;
+      this.showOfferPriceInputBtn = false;
+    }
+    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");
+      });
+  }
 
-   searchNameConChange(event){
-      this.searchNameCon = event.detail.value;
-   }
+  //鍒犻櫎闄勪欢
+  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");
+      });
+  }
 
-   //鍏抽棴寮圭獥
-   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');
+  //棰勮闄勪欢
+  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
       }
-   }
+    });
+  }
 
-   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;
+  //鎵撳紑鎼滅储寮圭獥锛屽苟鍒濆鍖栧脊绐�
+  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{
-            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]);
-               }
+          }
+        } 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;
             }
-         }
-         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 = [];
+          }
+        } 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]);
+        }
       }
-   }
-
-   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;
+      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");
+    }
+  }
 
-   get totalRecords(){
-      return this.consumableorderdetailsRecordsview.length;
-   }
+  //鎵撳紑鍚堝悓妫�绱㈠脊绐楀苟鍒濆鍖�
+  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");
+      });
+  }
 
-   //绗竴椤�
-   goFirstPage(){
-      this.currentPage = 1;
-      this.showCurrentReocrd();
-   }
+  //妫�绱㈠悎鍚�
+  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");
+      });
+  }
 
-   //鏈�鍚庝竴椤�
-   goLastPage(){
-      this.currentPage = this.totalPage;
-      this.showCurrentReocrd();
-   }
+  searchNameConChange(event) {
+    this.searchNameCon = event.detail.value;
+  }
 
-   //涓婁竴椤�
-   prePageClick(){
-      this.currentPage = this.currentPage - 1;
-      this.showCurrentReocrd();
-   }
+  //鍏抽棴寮圭獥
+  closeContractPop() {
+    this.showConPop = false;
+    this.chooseContract = "";
+    this.chooseContractId = "";
+  }
 
-   //涓嬩竴椤�
-   nextPageClick(){
-      this.currentPage = this.currentPage + 1;
-      this.showCurrentReocrd();
-   }
+  //閫夋嫨鍚堝悓
+  // 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;
+  // }
 
-   //page size change
-   pageSizeChange(event){
-      console.log('pagesize:'+event.detail);
-      this.pageSize = event.detail;
-      this.currentPage = 1;
+  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 = [];
-      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
+  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;
+  }
+}
diff --git a/manifest/package.xml b/manifest/package.xml
index de18a57..052747c 100644
--- a/manifest/package.xml
+++ b/manifest/package.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
 <Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
-        <members>LexConsumable</members>
+        <members>lexConsumable</members>
         <name>LightningComponentBundle</name>
     </types>
     <types>

--
Gitblit v1.9.1