buli
2023-04-26 d6a096fadfe9c8f261f56a827cfceed663c36b8b
backup0421
5个文件已修改
3375 ■■■■■ 已修改文件
.sf/config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/afterRenderHook/afterRenderHook.js-meta.xml 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html 1199 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js 2160 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest/packageForSign.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
.sf/config.json
@@ -1,3 +1,3 @@
{
  "target-org": "MEBGStage"
  "target-org": "LEXOlympusDev"
}
force-app/main/default/lwc/afterRenderHook/afterRenderHook.js-meta.xml
@@ -1,5 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>54.0</apiVersion>
    <isExposed>false</isExposed>
   <apiVersion>52.0</apiVersion>
   <isExposed>true</isExposed>
   <targets>
       <target>lightning__RecordAction</target>
   </targets>
    <targetConfigs>
   <targetConfig targets="lightning__RecordAction">
     <actionType>Action</actionType>
   </targetConfig>
 </targetConfigs>
</LightningComponentBundle>
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.html
@@ -2,96 +2,51 @@
<!-- sldsValidatorIgnore -->
<template>
    <template if:true={isShowSpinner}>
        <lightning-spinner
            alternative-text="Loading"
            size="large"
        ></lightning-spinner>
        <lightning-spinner alternative-text="Loading" size="large"></lightning-spinner>
    </template>
    <!-- 搜索客户名 -->
    <template if:true={isModalOpen}>
        <!-- Modal/Popup Box LWC starts here -->
        <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"
        >
        <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">
            <div class="slds-modal__container">
                <!-- Modal/Popup Box LWC header here -->
                <header class="slds-modal__header">
                    <button
                        class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
                        title="Close"
                        onclick={closeModal}
                    >
                        <lightning-icon
                            icon-name="utility:close"
                            alternative-text="close"
                            variant="inverse"
                            size="small"
                        ></lightning-icon>
                    <button class="slds-button slds-button_icon slds-modal__close slds-button_icon-inverse"
                        title="Close" onclick={closeModal}>
                        <lightning-icon icon-name="utility:close" alternative-text="close" variant="inverse"
                            size="small"></lightning-icon>
                        <span class="slds-assistive-text">Close</span>
                    </button>
                    <h2
                        id="modal-heading-01"
                        class="slds-text-heading_medium slds-hyphenate"
                    >
                    <h2 id="modal-heading-01" class="slds-text-heading_medium slds-hyphenate">
                        经销商医院检索
                    </h2>
                </header>
                <!-- Modal/Popup Box LWC body starts here -->
                <div
                    class="slds-modal__content slds-p-around_medium"
                    id="modal-content-id-1"
                >
                <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-1">
                    <lightning-layout>
                        <lightning-layout-item
                            flexibility="auto"
                            padding="around-small"
                        >
                            <lightning-input
                                type="text"
                                label="医院名称"
                                onchange={dataChange}
                                data-field="searchHospitalName"
                                value={searchHospitalName}
                                variant="label-inline"
                            ></lightning-input>
                        <lightning-layout-item flexibility="auto" padding="around-small">
                            <lightning-input type="text" label="医院名称" onchange={dataChange}
                                data-field="searchHospitalName" value={searchHospitalName}
                                variant="label-inline"></lightning-input>
                        </lightning-layout-item>
                        <lightning-layout-item
                            flexibility="auto"
                            padding="around-small"
                        >
                            <lightning-button
                                label="检索"
                                onclick={searchHospital}
                            ></lightning-button>
                        <lightning-layout-item flexibility="auto" padding="around-small">
                            <lightning-button label="检索" onclick={searchHospital}></lightning-button>
                        </lightning-layout-item>
                    </lightning-layout>
                    <div class="tableColumn">
                        <lightning-layout class="datatable">
                            <lightning-datatable
                                class="datatabel slds-border_top"
                                key-field="id"
                                data={hospitalList}
                                columns={hospitalColumns}
                                hide-checkbox-column="true"
                                onrowaction={searchHandleRowAction}
                            >
                            <lightning-datatable class="datatabel slds-border_top" key-field="id" data={hospitalList}
                                columns={hospitalColumns} hide-checkbox-column="true"
                                onrowaction={searchHandleRowAction}>
                            </lightning-datatable>
                        </lightning-layout>
                    </div>
                </div>
                <!-- Modal/Popup Box LWC footer starts here -->
                <footer class="slds-modal__footer">
                    <button
                        class="slds-button slds-button_neutral"
                        onclick={closeModal}
                        title="Cancel"
                    >
                    <button class="slds-button slds-button_neutral" onclick={closeModal} title="Cancel">
                        关闭
                    </button>
                </footer>
@@ -102,64 +57,27 @@
    <!-- 上传附件弹窗 -->
    <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"
        >
        <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>
                <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"
                <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>
                            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>
                    <h2 id="modal-heading-02" class="slds-text-heading_medium slds-hyphenate">上传附件</h2>
                </header>
                <div
                    class="slds-modal__content slds-p-around_medium"
                    id="modal-content-id-2"
                    style="border: 1px solid #f3f3f3"
                >
                <div class="slds-modal__content slds-p-around_medium" id="modal-content-id-2" style="border: 1px solid #F3F3F3;">
                    <div class="slds-m-top_medium slds-m-bottom_x-large">
                        <div class="slds-p-around_medium lgc-bg">
                            <lightning-input
                                type="file"
                                label="附件上传"
                                accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf"
                                onchange={attChange}
                            ></lightning-input>
                            <lightning-input type="file" label="附件上传" accept=".xlsx, .xls, .csv, .png, .doc, .docx, .pdf" onchange={attChange}></lightning-input>
                        </div>
                        <p>
                            已选择文件:{fileName}
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <p>已选择文件:{fileName} &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <template if:true={attDelBtn}>
                                <a onclick={removeAtt}>移除</a>
                            </template>
@@ -167,18 +85,8 @@
                    </div>
                </div>
                <footer class="slds-modal__footer">
                    <lightning-button
                        style="margin-left: 10px"
                        variant="neutral"
                        label="取消"
                        onclick={closePop}
                    ></lightning-button>
                    <lightning-button
                        style="margin-left: 10px"
                        variant="neutral"
                        label="上传"
                        onclick={handleSave}
                    ></lightning-button>
                    <lightning-button style="margin-left: 10px;" variant="neutral" label="取消" onclick={closePop}></lightning-button>
                    <lightning-button style="margin-left: 10px;" variant="neutral" label="上传" onclick={handleSave}></lightning-button>
                </footer>
            </div>
        </section>
@@ -213,11 +121,8 @@
                                <tr>
                                    <td>
                                        <template if:true={isSaveShow}>
                                            <lightning-button
                                                label="保存"
                                                onclick={saveConfirmJs}
                                                style="width: 150px"
                                            ></lightning-button>
                                            <lightning-button label="保存" onclick={saveConfirmJs}
                                                style="width: 150px"></lightning-button>
                                        </template>
                                    </td>
                                    <td colspan="4">
@@ -230,35 +135,25 @@
                                <tr>
                                    <td></td>
                                    <td>
                                        <template if:true={isEditShow}>
                                            <lightning-button
                                                label="编辑出库单"
                                                onclick={EditConsumable}
                                                style="width: 150px"
                                                disabled={isEditDisabled}
                                            ></lightning-button>
                                            <lightning-button label="编辑出库单" onclick={EditConsumable}
                                                style="width: 150px" disabled={isEditDisabled}></lightning-button>
                                        </template>
                                    </td>
                                    <td>
                                        <template if:true={isDeliveryShow}>
                                            <lightning-button
                                                label="出货/销售"
                                                onclick={GoodsDeliveryJs}
                                                style="width: 150px"
                                                disabled={isDeliveryDisabled}
                                            ></lightning-button>
                                            <lightning-button label="出货/销售" onclick={GoodsDeliveryJs}
                                                style="width: 150px;" disabled={isDeliveryDisabled}></lightning-button>
                                        </template>
                                    </td>
                                    <td>
                                        <template if:true={isOpenToInvoiceShow}>
                                            <lightning-button
                                                label="开票"
                                                onclick={openToInvoiceJs}
                                                style="width: 150px"
                                                disabled={isOpenToInvoiceDisabled}
                                            ></lightning-button>
                                            <lightning-button label="开票" onclick={openToInvoiceJs} style="width: 150px"
                                                disabled={isOpenToInvoiceDisabled}></lightning-button>
                                        </template>
                                    </td>
                                </tr>
@@ -266,34 +161,26 @@
                                    <td></td>
                                    <td>
                                        <template if:true={isPraseToPDFShow}>
                                            <lightning-button
                                                label="打印指示单"
                                                onclick={PraseToPDFJs}
                                                style="width: 150px"
                                                disabled={isPraseToPDFDisabled}
                                            ></lightning-button>
                                            <lightning-button label="打印指示单" onclick={PraseToPDFJs} style="width: 150px"
                                                disabled={isPraseToPDFDisabled}></lightning-button>
                                        </template>
                                    </td>
                                    <td>
                                        <template if:true={isOpenReportShow}>
                                            <lightning-button
                                                label="显示明细"
                                                onclick={openReportJs}
                                                style="width: 150px"
                                                disabled={isOpenReportDisabled}
                                            ></lightning-button>
                                            <lightning-button label="显示明细" onclick={openReportJs} style="width: 150px"
                                                disabled={isOpenReportDisabled}></lightning-button>
                                        </template>
                                    </td>
                                    <td>
                                        <template if:true={isDeleteShow}>
                                            <lightning-button
                                                label="删除"
                                                onclick={DeleteConsumable}
                                                style="width: 150px"
                                                disabled={isDeleteDisabled}
                                            ></lightning-button>
                                            <lightning-button label="删除" onclick={DeleteConsumable} style="width: 150px"
                                                disabled={isDeleteDisabled}></lightning-button>
                                        </template>
                                    </td>
                                    <td></td>
@@ -315,323 +202,182 @@
                            <div lwc:dom="manual" class="resultDiv"></div>
                            <div draggable="false">
                                <!-- SummonsStatus_c__c == '价格未定' -->
                                <template
                                    if:true={summonsStatusPriceNotDetermined}
                                >
                                    <lightning-record-edit-form
                                        object-api-name="Consumable_order__c"
                                        record-id={cocId}
                                        onload={handleLoad}
                                    >
                                <template if:true={summonsStatusPriceNotDetermined}>
                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
                                        onload={handleLoad}>
                                        <!-- 出库单号 出库单状态 -->
                                        <lightning-layout multiple-rows="true">
                                            <template if:true={isSummonsFlag}>
                                                <lightning-layout-item
                                                    size="1"
                                                ></lightning-layout-item>
                                                <lightning-layout-item size="1"></lightning-layout-item>
                                                <lightning-layout-item size="4">
                                                    <lightning-output-field
                                                        field-name="Name"
                                                        class="hehe-layoutItem"
                                                    ></lightning-output-field>
                                                    <lightning-output-field field-name="Name"
                                                        class="hehe-layoutItem"></lightning-output-field>
                                                </lightning-layout-item>
                                                <lightning-layout-item
                                                    size="1"
                                                ></lightning-layout-item>
                                                <lightning-layout-item size="1"></lightning-layout-item>
                                                <lightning-layout-item
                                                    class="hehe-layoutItem"
                                                    size="4"
                                                >
                                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                                    <lightning-output-field
                                                        field-name="SummonsStatus_c__c"
                                                    ></lightning-output-field>
                                                        field-name="SummonsStatus_c__c"></lightning-output-field>
                                                </lightning-layout-item>
                                            </template>
                                        </lightning-layout>
                                        <!-- 目的   开票状态 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field
                                                    field-name="SummonsForDirction__c"
                                                ></lightning-output-field>
                                                    field-name="SummonsForDirction__c"></lightning-output-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field
                                                    field-name="Billed_Status__c"
                                                ></lightning-output-field>
                                                    field-name="Billed_Status__c"></lightning-output-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                        <!-- 二级经销商 -->
                                        <template
                                            if:true={isSummonsForDirctionTwoShow}
                                        >
                                            <lightning-layout
                                                multiple-rows="true"
                                            >
                                                <lightning-layout-item
                                                    size="1"
                                                ></lightning-layout-item>
                                        <template if:true={isSummonsForDirctionTwoShow}>
                                            <lightning-layout multiple-rows="true">
                                                <lightning-layout-item size="1"></lightning-layout-item>
                                                <lightning-layout-item
                                                    class="hehe-layoutItem"
                                                    size="4"
                                                >
                                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                                    <lightning-output-field
                                                        field-name="Order_Dealer_Info__c"
                                                    ></lightning-output-field>
                                                        field-name="Order_Dealer_Info__c"></lightning-output-field>
                                                </lightning-layout-item>
                                            </lightning-layout>
                                        </template>
                                        <!-- 客户名 发票-->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-output-field
                                                    class="hideHelpText"
                                                    field-name="ShipmentAccount__c"
                                                ></lightning-output-field>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field class="hideHelpText"
                                                    field-name="ShipmentAccount__c"></lightning-output-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-input-field
                                                    data-field={ConInvoice_Code__c}
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-input-field data-field={ConInvoice_Code__c}
                                                    onchange={invoiceChange}
                                                    field-name="ConInvoice_Code__c"
                                                ></lightning-input-field>
                                                    field-name="ConInvoice_Code__c"></lightning-input-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                        <!-- 科室 出库金额 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field
                                                    field-name="Order_ForCustomerText__c"
                                                ></lightning-output-field>
                                                    field-name="Order_ForCustomerText__c"></lightning-output-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field
                                                    field-name="Shipment_total_amount__c"
                                                ></lightning-output-field>
                                                    field-name="Shipment_total_amount__c"></lightning-output-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                        <!-- 没有确定价格 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-output-field
                                                    field-name="NoConfirmedPrice__c"
                                                ></lightning-output-field>
                                                    field-name="NoConfirmedPrice__c"></lightning-output-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                    </lightning-record-edit-form>
                                </template>
                                <!-- SummonsStatus_c__c != '价格未定' -->
                                <template
                                    if:false={summonsStatusPriceNotDetermined}
                                >
                                    <lightning-record-edit-form
                                        object-api-name="Consumable_order__c"
                                        record-id={cocId}
                                        onsubmit={handleSubmit}
                                        onload={handleLoad}
                                    >
                                <template if:false={summonsStatusPriceNotDetermined}>
                                    <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
                                        onsubmit={handleSubmit} onload={handleLoad}>
                                        <!-- 出库单号 出库单状态 -->
                                        <lightning-layout multiple-rows="true">
                                            <template if:true={isSummonsFlag}>
                                                <lightning-layout-item
                                                    size="1"
                                                ></lightning-layout-item>
                                                <lightning-layout-item size="1"></lightning-layout-item>
                                                <lightning-layout-item
                                                    class="hehe-layoutItem"
                                                    size="4"
                                                >
                                                    <lightning-output-field
                                                        field-name="Name"
                                                    ></lightning-output-field>
                                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                                    <lightning-output-field field-name="Name"></lightning-output-field>
                                                </lightning-layout-item>
                                                <lightning-layout-item
                                                    size="1"
                                                ></lightning-layout-item>
                                                <lightning-layout-item size="1"></lightning-layout-item>
                                                <lightning-layout-item
                                                    class="hehe-layoutItem"
                                                    size="4"
                                                >
                                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                                    <lightning-output-field
                                                        field-name="SummonsStatus_c__c"
                                                    ></lightning-output-field>
                                                        field-name="SummonsStatus_c__c"></lightning-output-field>
                                                </lightning-layout-item>
                                            </template>
                                        </lightning-layout>
                                        <!-- 目的   二级经销商 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-input-field
                                                    data-field="summonsForDirction"
                                                    value={summonsForDirction}
                                                    field-name="SummonsForDirction__c"
                                                    required="true"
                                                    onchange={ChangeDirction}
                                                ></lightning-input-field>
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-input-field data-field="summonsForDirction"
                                                    value={summonsForDirction} field-name="SummonsForDirction__c"
                                                    required="true" onchange={ChangeDirction}></lightning-input-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-combobox
                                                    data-field="secondaryDistributor"
                                                    name="secondaryDistributor"
                                                    label="二级经销商"
                                                    value={secondaryDistributor}
                                                    placeholder="请选择..."
                                                    options={secondaryDistributorOptions}
                                                    variant="label-inline"
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-combobox data-field="secondaryDistributor"
                                                    name="secondaryDistributor" label="二级经销商"
                                                    value={secondaryDistributor} placeholder="请选择..."
                                                    options={secondaryDistributorOptions} variant="label-inline"
                                                    onchange={dataChange}
                                                    disabled={isDisabledSecondaryDistributor}
                                                ></lightning-combobox>
                                                    disabled={isDisabledSecondaryDistributor}></lightning-combobox>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                        <!-- 客户名   经销商录入 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <div
                                                    class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right"
                                                >
                                                    <lightning-icon
                                                        size="x-small"
                                                    class="slds-form-element__control slds-input-has-icon slds-input-has-icon_right">
                                                    <lightning-icon size="x-small"
                                                        class="iconMargin slds-icon slds-input__icon slds-input__icon_right slds-icon-text-default"
                                                        icon-name="utility:search"
                                                    ></lightning-icon>
                                                    <lightning-input
                                                        type="text"
                                                        name="HospitalName"
                                                        label="客户名"
                                                        value={HospitalName}
                                                        variant="label-inline"
                                                        onclick={searchHospitalNameModal}
                                                        data-field="HospitalName"
                                                        icon-name="utility:search"></lightning-icon>
                                                    <lightning-input type="text" name="HospitalName" label="客户名"
                                                        value={HospitalName} variant="label-inline"
                                                        onclick={searchHospitalNameModal} data-field="HospitalName"
                                                        disabled={isDisabledHospitalName}
                                                        onchange={clearAgencyI}
                                                    ></lightning-input>
                                                        onchange={clearAgencyI}></lightning-input>
                                                </div>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <template
                                                    if:true={isMutualTransferGoods}
                                                >
                                                    <c-lex-lookup
                                                        onsearch={handleSearch}
                                                        onselectionchange={handleSelectionChange}
                                                        label="经销商(录入)"
                                                        variant="label-inline"
                                                        placeholder="搜索经销商"
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <template if:true={isMutualTransferGoods}>
                                                    <c-lex-lookup onsearch={handleSearch}
                                                        onselectionchange={handleSelectionChange} label="经销商(录入)"
                                                        variant="label-inline" placeholder="搜索经销商"
                                                        onisdisabledfordealertext={isDisabledForDealerText}
                                                        onblur={vpClear2Delay}
                                                        disabled={isDisabledForDealerText}
                                                    >
                                                        onblur={vpClear2Delay} disabled={isDisabledForDealerText}>
                                                    </c-lex-lookup>
                                                </template>
                                                <template
                                                    if:false={isMutualTransferGoods}
                                                >
                                                    <lightning-input
                                                        type="text"
                                                        name="Order_ForDealerText__c"
                                                        label="经销商(录入)"
                                                        value={ForDealerText}
                                                        onchange={dataChange}
                                                <template if:false={isMutualTransferGoods}>
                                                    <lightning-input type="text" name="Order_ForDealerText__c"
                                                        label="经销商(录入)" value={ForDealerText} onchange={dataChange}
                                                        data-field="Order_ForDealerText__c"
                                                        disabled={isDisabledForDealerText}
                                                        variant="label-inline"
                                                    >
                                                        disabled={isDisabledForDealerText} variant="label-inline">
                                                    </lightning-input>
                                                </template>
                                            </lightning-layout-item>
@@ -639,60 +385,32 @@
                                        <!-- 科室   总金额 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-input-field
                                                    onchange={dataChange}
                                                    data-field="ForCustomerText"
                                                    value={ForCustomerText}
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-input-field onchange={dataChange}
                                                    data-field="ForCustomerText" value={ForCustomerText}
                                                    field-name="Order_ForCustomerText__c"
                                                    disabled={isDisabledForCustomerText}
                                                ></lightning-input-field>
                                                    disabled={isDisabledForCustomerText}></lightning-input-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-input
                                                    type="text"
                                                    name="sumPrice"
                                                    label="总金额"
                                                    value={sumPrice}
                                                    variant="label-inline"
                                                    onchange={dataChange}
                                                    data-field="sumPrice"
                                                    readonly
                                                ></lightning-input>
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-input type="text" name="sumPrice" label="总金额"
                                                    value={sumPrice} variant="label-inline" onchange={dataChange}
                                                    data-field="sumPrice" readonly></lightning-input>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                        <!-- 没有确定价格 -->
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item
                                                class="hehe-layoutItem"
                                                size="4"
                                            >
                                                <lightning-input-field
                                                    value={NoConfirmedPrice}
                                                    field-name="NoConfirmedPrice__c"
                                                    data-field="NoConfirmedPrice"
                                                    onchange={dataChange}
                                                ></lightning-input-field>
                                            <lightning-layout-item class="hehe-layoutItem" size="4">
                                                <lightning-input-field value={NoConfirmedPrice}
                                                    field-name="NoConfirmedPrice__c" data-field="NoConfirmedPrice"
                                                    onchange={dataChange}></lightning-input-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                    </lightning-record-edit-form>
@@ -713,146 +431,100 @@
                        <div style="padding: 10px">
                            <div lwc:dom="manual" class="resultDiv"></div>
                            <div draggable="false">
                                <lightning-record-edit-form
                                    object-api-name="Consumable_order__c"
                                    record-id={cocId}
                                    onload={handleLoad2}
                                >
                                <lightning-record-edit-form object-api-name="Consumable_order__c" record-id={cocId}
                                    onload={handleLoad2}>
                                    <!-- 出库单号 出库单状态 -->
                                    <lightning-layout multiple-rows="true">
                                        <template if:true={isSummonsFlag}>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item size="4">
                                                <lightning-output-field
                                                    field-name="Name"
                                                    class="hehe-layoutItem"
                                                ></lightning-output-field>
                                                <lightning-output-field field-name="Name"
                                                    class="hehe-layoutItem"></lightning-output-field>
                                            </lightning-layout-item>
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item size="4">
                                                <lightning-output-field
                                                    field-name="SummonsStatus_c__c"
                                                    class="hehe-layoutItem"
                                                ></lightning-output-field>
                                                <lightning-output-field field-name="SummonsStatus_c__c"
                                                    class="hehe-layoutItem"></lightning-output-field>
                                            </lightning-layout-item>
                                        </template>
                                    </lightning-layout>
                                    <!-- 目的   开票状态 -->
                                    <lightning-layout multiple-rows="true">
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                field-name="SummonsForDirction__c"
                                                class="hehe-layoutItem"
                                            ></lightning-output-field>
                                            <lightning-output-field field-name="SummonsForDirction__c"
                                                class="hehe-layoutItem"></lightning-output-field>
                                        </lightning-layout-item>
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                field-name="Billed_Status__c"
                                                class="hehe-layoutItem"
                                            ></lightning-output-field>
                                            <lightning-output-field field-name="Billed_Status__c"
                                                class="hehe-layoutItem"></lightning-output-field>
                                        </lightning-layout-item>
                                    </lightning-layout>
                                    <!-- 二级经销商 -->
                                    <template
                                        if:true={isSummonsForDirctionTwoShow}
                                    >
                                    <template if:true={isSummonsForDirctionTwoShow}>
                                        <lightning-layout multiple-rows="true">
                                            <lightning-layout-item
                                                size="1"
                                            ></lightning-layout-item>
                                            <lightning-layout-item size="1"></lightning-layout-item>
                                            <lightning-layout-item size="4">
                                                <lightning-output-field
                                                    field-name="Order_Dealer_Info__c"
                                                    class="hehe-layoutItem"
                                                ></lightning-output-field>
                                                <lightning-output-field field-name="Order_Dealer_Info__c"
                                                    class="hehe-layoutItem"></lightning-output-field>
                                            </lightning-layout-item>
                                        </lightning-layout>
                                    </template>
                                    <!-- 客户名 发票-->
                                    <lightning-layout multiple-rows="true">
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                class="hideHelpText"
                                                field-name="ShipmentAccount__c"
                                            ></lightning-output-field>
                                            <lightning-output-field class="hideHelpText"
                                                field-name="ShipmentAccount__c"></lightning-output-field>
                                        </lightning-layout-item>
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <template if:true={isConInvoiceShow}>
                                            <lightning-layout-item size="4">
                                                <lightning-input-field
                                                    data-field={ConInvoice_Code__c}
                                                    onchange={invoiceChange}
                                                    field-name="ConInvoice_Code__c"
                                                    class="hehe-layoutItem"
                                                ></lightning-input-field>
                                                <lightning-input-field data-field={ConInvoice_Code__c}
                                                    onchange={invoiceChange} field-name="ConInvoice_Code__c"
                                                    class="hehe-layoutItem"></lightning-input-field>
                                            </lightning-layout-item>
                                        </template>
                                    </lightning-layout>
                                    <!-- 科室 出库金额 -->
                                    <lightning-layout multiple-rows="true">
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                field-name="Order_ForCustomerText__c"
                                                class="hehe-layoutItem"
                                            ></lightning-output-field>
                                            <lightning-output-field field-name="Order_ForCustomerText__c"
                                                class="hehe-layoutItem"></lightning-output-field>
                                        </lightning-layout-item>
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                field-name="Shipment_total_amount__c"
                                                class="hehe-layoutItem"
                                            ></lightning-output-field>
                                            <lightning-output-field field-name="Shipment_total_amount__c"
                                                class="hehe-layoutItem"></lightning-output-field>
                                        </lightning-layout-item>
                                    </lightning-layout>
                                    <!-- 没有确定价格 -->
                                    <lightning-layout multiple-rows="true">
                                        <lightning-layout-item
                                            size="1"
                                        ></lightning-layout-item>
                                        <lightning-layout-item size="1"></lightning-layout-item>
                                        <lightning-layout-item size="4">
                                            <lightning-output-field
                                                field-name="NoConfirmedPrice__c"
                                                class="hehe-layoutItem"
                                            ></lightning-output-field>
                                            <lightning-output-field field-name="NoConfirmedPrice__c"
                                                class="hehe-layoutItem"></lightning-output-field>
                                        </lightning-layout-item>
                                    </lightning-layout>
                                </lightning-record-edit-form>
@@ -868,146 +540,61 @@
                            <div lwc:dom="manual" class="resultDiv"></div>
                            <div draggable="false">
                                <lightning-layout multiple-rows>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <div
                                                class="slds-form-element__label"
                                            >
                                                消耗品名称
                                            </div>
                                            <lightning-input
                                                type="text"
                                                name="consumableName"
                                                label="消耗品名称"
                                                value={consumableName}
                                                variant="label-hidden"
                                                onchange={dataChange}
                                                data-field="consumableName"
                                            ></lightning-input>
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <div class="slds-form-element__label">消耗品名称</div>
                                            <lightning-input type="text" name="consumableName" label="消耗品名称"
                                                value={consumableName} variant="label-hidden" onchange={dataChange}
                                                data-field="consumableName"></lightning-input>
                                        </div>
                                    </lightning-layout-item>
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <div class="slds-form-element__label" style="width:70px">第3分类</div>
                                            <lightning-combobox name="progress" label="第3分类" value={Category3}
                                                variant="label-hidden" options={category3Options} onchange={dataChange}
                                                data-field="Category3" style="min-width: 185px;"></lightning-combobox>
                                        </div>
                                    </lightning-layout-item>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <div
                                                class="slds-form-element__label"
                                                style="width: 70px"
                                            >
                                                第3分类
                                            </div>
                                            <lightning-combobox
                                                name="progress"
                                                label="第3分类"
                                                value={Category3}
                                                variant="label-hidden"
                                                options={category3Options}
                                                onchange={dataChange}
                                                data-field="Category3"
                                                style="min-width: 185px"
                                            ></lightning-combobox>
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <div class="slds-form-element__label" style="width:70px">第4分类</div>
                                            <lightning-combobox name="progress" label="第4分类" value={Category4}
                                                variant="label-hidden" options={category4Options} onchange={dataChange}
                                                data-field="Category4" style="min-width: 185px;"></lightning-combobox>
                                        </div>
                                    </lightning-layout-item>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <div
                                                class="slds-form-element__label"
                                                style="width: 70px"
                                            >
                                                第4分类
                                            </div>
                                            <lightning-combobox
                                                name="progress"
                                                label="第4分类"
                                                value={Category4}
                                                variant="label-hidden"
                                                options={category4Options}
                                                onchange={dataChange}
                                                data-field="Category4"
                                                style="min-width: 185px"
                                            ></lightning-combobox>
                                        </div>
                                    </lightning-layout-item>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <div
                                                class="slds-form-element__label"
                                                style="width: 70px"
                                            >
                                                第5分类
                                            </div>
                                            <lightning-combobox
                                                name="progress"
                                                label="第5分类"
                                                value={Category5}
                                                variant="label-hidden"
                                                onchange={dataChange}
                                                data-field="Category5"
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <div class="slds-form-element__label" style="width:70px">第5分类</div>
                                            <lightning-combobox name="progress" label="第5分类" value={Category5}
                                                variant="label-hidden" onchange={dataChange} data-field="Category5"
                                                options={category5Options}
                                                style="min-width: 185px"
                                            ></lightning-combobox>
                                                style="min-width: 185px;"></lightning-combobox>
                                        </div>
                                    </lightning-layout-item>
                                    <template if:true={hasHosPro}>
                                        <lightning-layout-item
                                            padding="around-small"
                                        >
                                            <div
                                                class="slds-grid slds-grid_vertical-align-center"
                                            >
                                                <div
                                                    class="slds-form-element__label"
                                                >
                                                    医院特价
                                                </div>
                                                <lightning-combobox
                                                    name="progress"
                                                    label="医院特价"
                                                    value={outOutPattern}
                                                    variant="label-hidden"
                                                    options={outOutPatternOptionList}
                                                    onchange={handleChange}
                                                ></lightning-combobox>
                                        <lightning-layout-item padding="around-small">
                                            <div class="slds-grid slds-grid_vertical-align-center">
                                                <div class="slds-form-element__label">医院特价</div>
                                                <lightning-combobox name="progress" label="医院特价" value={outOutPattern}
                                                    variant="label-hidden" options={outOutPatternOptionList}
                                                    onchange={handleChange}></lightning-combobox>
                                            </div>
                                        </lightning-layout-item>
                                    </template>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <lightning-button
                                                label="检索"
                                                onclick={searchProductJs}
                                            ></lightning-button>
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <lightning-button label="检索" onclick={searchProductJs}></lightning-button>
                                        </div>
                                    </lightning-layout-item>
                                    <lightning-layout-item
                                        padding="around-small"
                                    >
                                        <div
                                            class="slds-grid slds-grid_vertical-align-center"
                                        >
                                            <lightning-button
                                                label="清空"
                                                onclick={ClearJs}
                                            ></lightning-button>
                                    <lightning-layout-item padding="around-small">
                                        <div class="slds-grid slds-grid_vertical-align-center">
                                            <lightning-button label="清空" onclick={ClearJs}></lightning-button>
                                        </div>
                                    </lightning-layout-item>
                                </lightning-layout>
@@ -1026,41 +613,21 @@
                    <div style="padding: 10px">
                        <template if:true={EditAble}>
                            <template if:true={showTable}>
                                <c-lex-custom-lightning-datatable
                                    key-field="Id"
                                    data={data}
                                    columns={columns}
                                    onunitchange={handleUnitChange}
                                    onshipmentnumber={handleShipmentNumber}
                                    onshipmentunitprice={handleShipmentUnitPrice}
                                    onrowselection={getSelectedRows}
                                    selected-rows={selectedRows}
                                    style="
                                        word-wrap: break-word;
                                        word-break: break-all;
                                    "
                                >
                                <c-lex-custom-lightning-datatable key-field="Id" data={data} columns={columns}
                                    onunitchange={handleUnitChange} onshipmentnumber={handleShipmentNumber}
                                    onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
                                    selected-rows={selectedRows} style="word-wrap:break-word; word-break:break-all; ">
                                </c-lex-custom-lightning-datatable>
                            </template>
                        </template>
                        <template if:false={EditAble}>
                            <template if:true={showTable}>
                                <c-lex-custom-lightning-datatable
                                    hide-checkbox-column
                                    key-field="Id"
                                    data={data}
                                    columns={editColumns}
                                    onunitchange={handleUnitChange}
                                <c-lex-custom-lightning-datatable hide-checkbox-column key-field="Id" data={data}
                                    columns={editColumns} onunitchange={handleUnitChange}
                                    onshipmentnumber={handleShipmentNumber}
                                    onshipmentunitprice={handleShipmentUnitPrice}
                                    onrowselection={getSelectedRows}
                                    selected-rows={selectedRows}
                                    style="
                                        word-wrap: break-word;
                                        word-break: break-all;
                                    "
                                >
                                    onshipmentunitprice={handleShipmentUnitPrice} onrowselection={getSelectedRows}
                                    selected-rows={selectedRows} style="word-wrap:break-word; word-break:break-all; ">
                                </c-lex-custom-lightning-datatable>
                            </template>
                        </template>
@@ -1076,12 +643,8 @@
                            </p>
                        </div>
                        <div style="padding: 10px">
                            <lightning-datatable
                                key-field="id"
                                data={consumableorderdetails2Records}
                                columns={consumableorderdetails2RecordsColumns}
                                hide-checkbox-column
                            >
                            <lightning-datatable key-field="id" data={consumableorderdetails2Records}
                                columns={consumableorderdetails2RecordsColumns} hide-checkbox-column>
                            </lightning-datatable>
                        </div>
                    </div>
@@ -1099,10 +662,7 @@
                            <div lwc:dom="manual" class="resultDiv"></div>
                            <div draggable="false">
                                <lightning-card title="">
                                    <lightning-layout
                                        multiple-rows="true"
                                        style="margin-top: -20px"
                                    >
                                    <lightning-layout multiple-rows="true" style="margin-top: -20px">
                                        <!-- <lightning-layout-item size="12">
                                            <lightning-input label="" name="file uploader" onchange={handleFilesChange}
                                                type="file" accept={acceptedType}></lightning-input><br />
@@ -1116,27 +676,16 @@
                                        </lightning-layout-item> -->
                                        <lightning-layout-item size="5">
                                        </lightning-layout-item>
                                        <lightning-layout-item
                                            padding="around-small"
                                        >
                                            <lightning-button
                                                label="上传附件"
                                                onclick={uploadOrder}
                                            ></lightning-button>
                                        <lightning-layout-item padding="around-small">
                                            <lightning-button label='上传附件' onclick={uploadOrder}></lightning-button>
                                        </lightning-layout-item>
                                    </lightning-layout>
                                    <template if:true={showLoadingSpinner}>
                                        <lightning-spinner
                                            alternative-text="Uploading now"
                                        ></lightning-spinner>
                                        <lightning-spinner alternative-text="Uploading now"></lightning-spinner>
                                    </template>
                                    <footer style="margin-top: 20px">
                                        <lightning-datatable
                                            key-field="id"
                                            data={fileData}
                                            columns={fileColumns}
                                            hide-checkbox-column
                                        >
                                        <lightning-datatable key-field="id" data={fileData} columns={fileColumns}
                                            hide-checkbox-column>
                                        </lightning-datatable>
                                    </footer>
                                </lightning-card>
@@ -1158,152 +707,66 @@
                        <div lwc:dom="manual" class="resultDiv"></div>
                        <div draggable="false">
                            <lightning-layout multiple-rows="true">
                                <lightning-layout-item
                                    class="hehe-layoutItem"
                                    size="4"
                                >
                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                </lightning-layout-item>
                                <template if:true={isSales}>
                                    <lightning-layout-item
                                        class="hehe-layoutItem"
                                        size="4"
                                    >
                                        <lightning-button
                                            label="销售"
                                            onclick={SaveP}
                                            style="margin-top: -10px"
                                        ></lightning-button>
                                    <lightning-layout-item class="hehe-layoutItem" size="4">
                                        <lightning-button label="销售" onclick={SaveP}
                                            style="margin-top:-10px"></lightning-button>
                                    </lightning-layout-item>
                                </template>
                                <template if:false={isSales}>
                                    <lightning-layout-item
                                        class="hehe-layoutItem"
                                        size="4"
                                    >
                                        <lightning-button
                                            label="出货"
                                            onclick={SaveE}
                                        ></lightning-button>
                                    <lightning-layout-item class="hehe-layoutItem" size="4">
                                        <lightning-button label="出货" onclick={SaveE}></lightning-button>
                                    </lightning-layout-item>
                                </template>
                                <lightning-layout-item
                                    class="hehe-layoutItem"
                                    size="4"
                                >
                                <lightning-layout-item class="hehe-layoutItem" size="4">
                                </lightning-layout-item>
                            </lightning-layout>
                            <template if:true={isShowInformation}>
                                <div class="borderCss" style="margin-top: 5px">
                                <div class="borderCss" style="margin-top: 5px;">
                                    <div class="headerDorderCss">
                                        <p style="font-size: 16px">
                                            <strong>出库单信息</strong>
                                        </p>
                                    </div>
                                    <div style="padding: 10px">
                                        <div
                                            lwc:dom="manual"
                                            class="resultDiv"
                                        ></div>
                                        <div lwc:dom="manual" class="resultDiv"></div>
                                        <div draggable="false">
                                            <lightning-record-edit-form
                                                object-api-name="Consumable_order__c"
                                                record-id={cocId}
                                                onload={handleLoad2}
                                            >
                                                <lightning-layout
                                                    multiple-rows="true"
                                                >
                                                    <lightning-layout-item
                                                        size="3"
                                                        padding="around-small"
                                                    >
                                            <lightning-record-edit-form object-api-name="Consumable_order__c"
                                                record-id={cocId} onload={handleLoad2}>
                                                <lightning-layout multiple-rows="true">
                                                    <lightning-layout-item size="3" padding="around-small">
                                                        <!-- <lightning-output-field field-name="Name"></lightning-output-field> -->
                                                        <div
                                                            class="slds-grid slds-grid_vertical-align-center"
                                                        >
                                                            <div
                                                                class="slds-form-element__label"
                                                                style="
                                                                    padding: 0px;
                                                                "
                                                            >
                                                                出库单号:
                                                            </div>
                                                            <lightning-output-field
                                                                field-name="Name"
                                                                variant="label-hidden"
                                                            ></lightning-output-field>
                                                        <div class="slds-grid slds-grid_vertical-align-center">
                                                            <div class="slds-form-element__label" style="padding: 0px;">出库单号:</div>
                                                            <lightning-output-field field-name="Name" variant="label-hidden"></lightning-output-field>
                                                        </div>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item
                                                        size="4"
                                                        padding="around-small"
                                                    >
                                                    <lightning-layout-item size="4" padding="around-small">
                                                        <!-- <lightning-output-field
                                                            field-name="ShipmentAccount__c" class="hideHelpText"></lightning-output-field> -->
                                                        <div
                                                            class="slds-grid slds-grid_vertical-align-center"
                                                        >
                                                            <div
                                                                class="slds-form-element__label"
                                                                style="
                                                                    padding: 0px;
                                                                "
                                                            >
                                                                客户名:
                                                            <div class="slds-grid slds-grid_vertical-align-center">
                                                                <div class="slds-form-element__label" style="padding: 0px;">客户名:</div>
                                                                <lightning-output-field field-name="ShipmentAccount__c" variant="label-hidden"></lightning-output-field>
                                                            </div>
                                                            <lightning-output-field
                                                                field-name="ShipmentAccount__c"
                                                                variant="label-hidden"
                                                            ></lightning-output-field>
                                                        </div>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item
                                                        size="2"
                                                        padding="around-small"
                                                    >
                                                    <lightning-layout-item size="2" padding="around-small">
                                                        <!-- <lightning-output-field
                                                            field-name="Order_ForCustomerText__c"></lightning-output-field> -->
                                                        <div
                                                            class="slds-grid slds-grid_vertical-align-center"
                                                        >
                                                            <div
                                                                class="slds-form-element__label"
                                                                style="
                                                                    padding: 0px;
                                                                "
                                                            >
                                                                科室:
                                                            <div class="slds-grid slds-grid_vertical-align-center">
                                                                <div class="slds-form-element__label" style="padding: 0px;">科室:</div>
                                                                <lightning-output-field field-name="Order_ForCustomerText__c" variant="label-hidden"></lightning-output-field>
                                                            </div>
                                                            <lightning-output-field
                                                                field-name="Order_ForCustomerText__c"
                                                                variant="label-hidden"
                                                            ></lightning-output-field>
                                                        </div>
                                                    </lightning-layout-item>
                                                    <lightning-layout-item
                                                        size="2"
                                                        padding="around-small"
                                                    >
                                                    <lightning-layout-item size="2" padding="around-small">
                                                        <!-- <lightning-output-field
                                                            field-name="SummonsForDirction__c"></lightning-output-field> -->
                                                        <div
                                                            class="slds-grid slds-grid_vertical-align-center"
                                                        >
                                                            <div
                                                                class="slds-form-element__label"
                                                                style="
                                                                    padding: 0px;
                                                                "
                                                            >
                                                                目的:
                                                            <div class="slds-grid slds-grid_vertical-align-center">
                                                                <div class="slds-form-element__label" style="padding: 0px;">目的:</div>
                                                                <lightning-output-field field-name="SummonsForDirction__c" variant="label-hidden"></lightning-output-field>
                                                            </div>
                                                            <lightning-output-field
                                                                field-name="SummonsForDirction__c"
                                                                variant="label-hidden"
                                                            ></lightning-output-field>
                                                        </div>
                                                    </lightning-layout-item>
                                                </lightning-layout>
                                            </lightning-record-edit-form>
@@ -1319,63 +782,31 @@
                                            </p>
                                        </div>
                                        <div style="padding: 10px">
                                            <div
                                                lwc:dom="manual"
                                                class="resultDiv"
                                            ></div>
                                            <div lwc:dom="manual" class="resultDiv"></div>
                                            <div draggable="false">
                                                <lightning-record-edit-form
                                                    object-api-name="Consumable_order__c"
                                                    record-id={cocId}
                                                >
                                                    <lightning-layout
                                                        multiple-rows="true"
                                                    >
                                                        <lightning-layout-item
                                                            size="1"
                                                        ></lightning-layout-item>
                                                        <lightning-layout-item
                                                            padding="around-small"
                                                        >
                                                <lightning-record-edit-form object-api-name="Consumable_order__c"
                                                    record-id={cocId}>
                                                    <lightning-layout multiple-rows="true">
                                                        <lightning-layout-item size="1"></lightning-layout-item>
                                                        <lightning-layout-item padding="around-small">
                                                            <!-- <lightning-textarea name="Barcode" label="BarCode号"
                                                                onchange={dataChange} variant="label-inline"
                                                                data-field="Barcode"
                                                                value={Barcode}></lightning-textarea> -->
                                                            <div
                                                                class="slds-grid"
                                                            >
                                                                <div
                                                                    class="slds-form-element__label"
                                                                >
                                                                    BarCode号
                                                                </div>
                                                                <lightning-textarea
                                                                    name="Barcode"
                                                                    label="BarCode号"
                                                                    onchange={dataChange}
                                                                    variant="label-hidden"
                                                                    data-field="Barcode"
                                                                    value={Barcode}
                                                                    style="
                                                                        min-width: 400px;
                                                                    "
                                                                ></lightning-textarea>
                                                            <div class="slds-grid">
                                                                <div class="slds-form-element__label">BarCode号</div>
                                                                <lightning-textarea name="Barcode" label="BarCode号"
                                                                    onchange={dataChange} variant="label-hidden"
                                                                    data-field="Barcode" value={Barcode}
                                                                    style="min-width: 400px;"></lightning-textarea>
                                                            </div>
                                                        </lightning-layout-item>
                                                        <lightning-layout-item
                                                            padding="around-small"
                                                        >
                                                            <div
                                                                class="slds-grid slds-grid_vertical-align-center"
                                                            >
                                                                <div
                                                                    class="slds-form-element__label"
                                                                >
                                                                    <lightning-button
                                                                        label="确认"
                                                                        onclick={SalesearchProductJs}
                                                                    ></lightning-button>
                                                        <lightning-layout-item padding="around-small">
                                                            <div class="slds-grid slds-grid_vertical-align-center">
                                                                <div class="slds-form-element__label">
                                                                    <lightning-button label="确认"
                                                                        onclick={SalesearchProductJs}></lightning-button>
                                                                </div>
                                                            </div>
                                                        </lightning-layout-item>
@@ -1393,21 +824,11 @@
                                        </p>
                                    </div>
                                    <div style="padding: 10px">
                                        <div
                                            lwc:dom="manual"
                                            class="resultDiv"
                                        ></div>
                                        <div lwc:dom="manual" class="resultDiv"></div>
                                        <div draggable="false">
                                            <lightning-datatable
                                                key-field="id"
                                                data={salesData}
                                                columns={salesColumns}
                                            <lightning-datatable key-field="id" data={salesData} columns={salesColumns}
                                                hide-checkbox-column
                                                style="
                                                    word-wrap: break-word;
                                                    word-break: break-all;
                                                "
                                            >
                                                style="word-wrap:break-word; word-break:break-all; ">
                                            </lightning-datatable>
                                        </div>
                                    </div>
@@ -1420,58 +841,30 @@
                                        </p>
                                    </div>
                                    <div style="padding: 10px">
                                        <div
                                            lwc:dom="manual"
                                            class="resultDiv"
                                        ></div>
                                        <div lwc:dom="manual" class="resultDiv"></div>
                                        <div draggable="false">
                                            <lightning-datatable
                                                key-field="id"
                                                data={salesErrorData}
                                                columns={salesErrorColumns}
                                                hide-checkbox-column
                                                style="
                                                    word-wrap: break-word;
                                                    word-break: break-all;
                                                "
                                            >
                                            <lightning-datatable key-field="id" data={salesErrorData}
                                                columns={salesErrorColumns} hide-checkbox-column
                                                style="word-wrap:break-word; word-break:break-all; ">
                                            </lightning-datatable>
                                        </div>
                                    </div>
                                </div>
                                <lightning-layout multiple-rows="true">
                                    <lightning-layout-item
                                        class="hehe-layoutItem"
                                        size="4"
                                    >
                                    <lightning-layout-item class="hehe-layoutItem" size="4">
                                    </lightning-layout-item>
                                    <template if:true={isSales}>
                                        <lightning-layout-item
                                            class="hehe-layoutItem"
                                            size="4"
                                        >
                                            <lightning-button
                                                label="销售"
                                                onclick={SaveP}
                                            ></lightning-button>
                                        <lightning-layout-item class="hehe-layoutItem" size="4">
                                            <lightning-button label="销售" onclick={SaveP}></lightning-button>
                                        </lightning-layout-item>
                                    </template>
                                    <template if:false={isSales}>
                                        <lightning-layout-item
                                            class="hehe-layoutItem"
                                            size="4"
                                        >
                                            <lightning-button
                                                label="出货"
                                                onclick={SaveE}
                                            ></lightning-button>
                                        <lightning-layout-item class="hehe-layoutItem" size="4">
                                            <lightning-button label="出货" onclick={SaveE}></lightning-button>
                                        </lightning-layout-item>
                                    </template>
                                    <lightning-layout-item
                                        class="hehe-layoutItem"
                                        size="4"
                                    >
                                    <lightning-layout-item class="hehe-layoutItem" size="4">
                                    </lightning-layout-item>
                                </lightning-layout>
                            </template>
@@ -1481,4 +874,4 @@
            </template>
        </div>
    </div>
</template>
</template>
force-app/main/default/lwc/lexSummonsCreat/lexSummonsCreat.js
@@ -1,414 +1,414 @@
import { LightningElement, wire, api, track } from 'lwc';
import init from '@salesforce/apex/LexSummonsCreatController.init';
import { ShowToastEvent } from 'lightning/platformShowToastEvent';
import searchConsumableorderdetails from '@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails';
import PraseToPDF from '@salesforce/apex/LexSummonsCreatController.PraseToPDF';
import apexSearch from '@salesforce/apex/LexSummonsCreatController.search';
import saveFile from '@salesforce/apex/LexSummonsCreatController.saveFile';
import getFiles from '@salesforce/apex/LexSummonsCreatController.getFiles';
import GoodsDelivery from '@salesforce/apex/LexSummonsCreatController.GoodsDelivery';
import DelConsumable from '@salesforce/apex/LexSummonsCreatController.DelConsumable';
import categoryAllload from '@salesforce/apex/LexSummonsCreatController.categoryAllload';
import categoryload from '@salesforce/apex/LexSummonsCreatController.categoryload';
import GoodsDeliveryInit from '@salesforce/apex/LexSaleOrderController.GoodsDeliveryInit';
import SearchPro from '@salesforce/apex/LexSaleOrderController.SearchPro';
import ProdElivery from '@salesforce/apex/LexSaleOrderController.ProdElivery';
import ProSale from '@salesforce/apex/LexSaleOrderController.ProSale';
import save from '@salesforce/apex/LexSummonsCreatController.save';
import OPPORTUNITY_OBJECT from '@salesforce/schema/Consumable_Orderdetails__c';
import { getObjectInfo } from 'lightning/uiObjectInfoApi';
import hospitalInit from '@salesforce/apex/lexSearchAgencyHospitalController.init';
import serContact from '@salesforce/apex/lexSearchAgencyHospitalController.serContact';
import { NavigationMixin } from 'lightning/navigation';
import { LightningElement, wire, api, track } from "lwc";
import init from "@salesforce/apex/LexSummonsCreatController.init";
import { ShowToastEvent } from "lightning/platformShowToastEvent";
import searchConsumableorderdetails from "@salesforce/apex/LexSummonsCreatController.searchConsumableorderdetails";
import PraseToPDF from "@salesforce/apex/LexSummonsCreatController.PraseToPDF";
import apexSearch from "@salesforce/apex/LexSummonsCreatController.search";
import saveFile from "@salesforce/apex/LexSummonsCreatController.saveFile";
import getFiles from "@salesforce/apex/LexSummonsCreatController.getFiles";
import GoodsDelivery from "@salesforce/apex/LexSummonsCreatController.GoodsDelivery";
import DelConsumable from "@salesforce/apex/LexSummonsCreatController.DelConsumable";
import categoryAllload from "@salesforce/apex/LexSummonsCreatController.categoryAllload";
import categoryload from "@salesforce/apex/LexSummonsCreatController.categoryload";
import GoodsDeliveryInit from "@salesforce/apex/LexSaleOrderController.GoodsDeliveryInit";
import SearchPro from "@salesforce/apex/LexSaleOrderController.SearchPro";
import ProdElivery from "@salesforce/apex/LexSaleOrderController.ProdElivery";
import ProSale from "@salesforce/apex/LexSaleOrderController.ProSale";
import save from "@salesforce/apex/LexSummonsCreatController.save";
import OPPORTUNITY_OBJECT from "@salesforce/schema/Consumable_Orderdetails__c";
import { getObjectInfo } from "lightning/uiObjectInfoApi";
import hospitalInit from "@salesforce/apex/lexSearchAgencyHospitalController.init";
import serContact from "@salesforce/apex/lexSearchAgencyHospitalController.serContact";
import { NavigationMixin } from "lightning/navigation";
export default class LexSummonsCreat extends NavigationMixin(LightningElement) {
    @track isShowSpinner = true;
    @track showResults = true;
    @track results = [
        {
            Id: '1',
            Name: 'z'
            Id: "1",
            Name: "z",
        },
        {
            Id: '2',
            Name: 'h'
            Id: "2",
            Name: "h",
        },
        {
            Id: '3',
            Name: 'j'
        }
            Id: "3",
            Name: "j",
        },
    ];
    @track COLS = [
        {
            label: 'Account Name',
            type: 'customName',
            label: "Account Name",
            type: "customName",
            typeAttributes: {
                accountName: { fieldName: 'Name' }
            }
        }
                accountName: { fieldName: "Name" },
            },
        },
    ];
    @track columns = [
        {
            label: '消耗品名称',
            fieldName: 'Name__c',
            label: "消耗品名称",
            fieldName: "Name__c",
            //hideDefaultActions: true,
            wrapText: true
            wrapText: true,
            //initialWidth : 100,
        },
        {
            label: '规格',
            fieldName: 'packinglist',
            label: "规格",
            fieldName: "packinglist",
            //initialWidth : 50,
            wrapText: true,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: 'CFDA状态',
            fieldName: 'SFDA_Status__c',
            label: "CFDA状态",
            fieldName: "SFDA_Status__c",
            //initialWidth : 100,
            wrapText: true,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '注册证编码号',
            fieldName: 'approbation_No',
            label: "注册证编码号",
            fieldName: "approbation_No",
            //initialWidth : 150,
            wrapText: true,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '注册证效期',
            label: "注册证效期",
            //initialWidth : 100,
            wrapText: true,
            fieldName: 'expiration_Date',
            hideDefaultActions: true
            fieldName: "expiration_Date",
            hideDefaultActions: true,
        },
        {
            label: '第3分类',
            fieldName: 'Category3__c',
            label: "第3分类",
            fieldName: "Category3__c",
            //initialWidth : 100,
            wrapText: true,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '第4分类',
            fieldName: 'Category4__c',
            label: "第4分类",
            fieldName: "Category4__c",
            //initialWidth : 100,
            wrapText: true,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '第5分类',
            fieldName: 'Category5__c',
            label: "第5分类",
            fieldName: "Category5__c",
            //initialWidth : 100,
            wrapText: true,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '单位',
            type: 'customUnit',
            label: "单位",
            type: "customUnit",
            //initialWidth : 100,
            hideDefaultActions: true,
            typeAttributes: {
                unitValue: { fieldName: 'unitValue' },
                unitOptions: { fieldName: 'unitOptions' },
                recordId: { fieldName: 'recordId' }
            }
                unitValue: { fieldName: "unitValue" },
                unitOptions: { fieldName: "unitOptions" },
                recordId: { fieldName: "recordId" },
            },
        },
        {
            label: '出货数量',
            type: 'customShipment',
            label: "出货数量",
            type: "customShipment",
            //initialWidth : 150,
            hideDefaultActions: true,
            typeAttributes: {
                recordId: { fieldName: 'recordId' },
                shipmentNumber: { fieldName: 'shipmentNumber' }
            }
                recordId: { fieldName: "recordId" },
                shipmentNumber: { fieldName: "shipmentNumber" },
            },
        },
        {
            label: '出货单价(元)',
            type: 'customShipmentUnitPrice',
            label: "出货单价(元)",
            type: "customShipmentUnitPrice",
            //initialWidth : 150,
            hideDefaultActions: true,
            typeAttributes: {
                recordId: { fieldName: 'recordId' },
                shippingUnitPrice: { fieldName: 'shippingUnitPrice' }
            }
                recordId: { fieldName: "recordId" },
                shippingUnitPrice: { fieldName: "shippingUnitPrice" },
            },
        },
        {
            label: '出货金额(元)',
            type: 'customShipmentAmount',
            label: "出货金额(元)",
            type: "customShipmentAmount",
            //initialWidth : 120,
            hideDefaultActions: true,
            typeAttributes: {
                shipmentAmount: { fieldName: 'shipmentAmount' }
            }
                shipmentAmount: { fieldName: "shipmentAmount" },
            },
        },
        {
            label: '有效期内库存(盒)',
            fieldName: 'Boxnumber',
            label: "有效期内库存(盒)",
            fieldName: "Boxnumber",
            //initialWidth : 120,
            wrapText: true,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '有效期内库存(个)',
            fieldName: 'Piecenumber',
            label: "有效期内库存(个)",
            fieldName: "Piecenumber",
            //initialWidth : 120,
            wrapText: true,
            hideDefaultActions: true
        }
            hideDefaultActions: true,
        },
    ];
    @track editColumns = [
        {
            label: '消耗品名称',
            fieldName: 'Name__c',
            label: "消耗品名称",
            fieldName: "Name__c",
            hideDefaultActions: true,
            initialWidth: 250,
            wrapText: true
            wrapText: true,
        },
        {
            label: '规格',
            fieldName: 'packinglist',
            label: "规格",
            fieldName: "packinglist",
            initialWidth: 50,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: 'CFDA状态',
            fieldName: 'SFDA_Status__c',
            label: "CFDA状态",
            fieldName: "SFDA_Status__c",
            initialWidth: 100,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '注册证编码号',
            fieldName: 'approbation_No',
            label: "注册证编码号",
            fieldName: "approbation_No",
            initialWidth: 150,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '注册证效期',
            label: "注册证效期",
            initialWidth: 100,
            fieldName: 'expiration_Date',
            hideDefaultActions: true
            fieldName: "expiration_Date",
            hideDefaultActions: true,
        },
        {
            label: '第3分类',
            fieldName: 'Category3__c',
            label: "第3分类",
            fieldName: "Category3__c",
            initialWidth: 100,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '第4分类',
            fieldName: 'Category4__c',
            label: "第4分类",
            fieldName: "Category4__c",
            initialWidth: 100,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '第5分类',
            fieldName: 'Category5__c',
            label: "第5分类",
            fieldName: "Category5__c",
            initialWidth: 100,
            hideDefaultActions: true,
            sortable: true
            sortable: true,
        },
        {
            label: '单位',
            fieldName: 'Box_Piece__c',
            label: "单位",
            fieldName: "Box_Piece__c",
            initialWidth: 100,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '出货数量',
            fieldName: 'Shipment_Count__c',
            label: "出货数量",
            fieldName: "Shipment_Count__c",
            initialWidth: 150,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '出货单价(元)',
            fieldName: 'Shipment_amount__c',
            type: 'number',
            label: "出货单价(元)",
            fieldName: "Shipment_amount__c",
            type: "number",
            typeAttributes: {
                minimumFractionDigits: 2
                minimumFractionDigits: 2,
            },
            initialWidth: 150,
            hideDefaultActions: true
        }
            hideDefaultActions: true,
        },
    ];
    @track hospitalList = [];
    @track hospitalColumns = [
        {
            label: '医院名称',
            fieldName: 'Name',
            label: "医院名称",
            fieldName: "Name",
            initialWidth: 400,
            hideDefaultActions: true
            hideDefaultActions: true,
        },
        {
            label: '省份',
            fieldName: 'stateMasterName',
            hideDefaultActions: true
            label: "省份",
            fieldName: "stateMasterName",
            hideDefaultActions: true,
        },
        {
            label: '选择',
            fieldName: 'Id1',
            type: 'button',
            label: "选择",
            fieldName: "Id1",
            type: "button",
            hideDefaultActions: true,
            typeAttributes: {
                label: '选择',
                name: 'Id2',
                size: 1
            }
        }
                label: "选择",
                name: "Id2",
                size: 1,
            },
        },
    ];
    @track accountid = '';
    @track accountid = "";
    @track consumableproductdetailsRecords = [];
    @track SummonsStatus = '';
    @track ESetid = '';
    @track statusEdit = '';
    @track SummonsStatus = "";
    @track ESetid = "";
    @track statusEdit = "";
    @track cocLwc = {};
    @track selectedRows = [];
    @track ConsumableOut_report = '';
    @track ConsumableOut_report = "";
    @track isMutualTransferGoods = false;
    @track Barcode = '';
    @track Barcode = "";
    @track summonsForDirction = '';
    @track consumableorderdetails2RecordsColumns = [
        {
            label: '消耗品名称',
            fieldName: 'ProdName',
            hideDefaultActions: true
            label: "消耗品名称",
            fieldName: "ProdName",
            hideDefaultActions: true,
        },
        {
            label: '批次号',
            fieldName: 'orderdetails2SerialLotNo__c',
            hideDefaultActions: true
            label: "批次号",
            fieldName: "orderdetails2SerialLotNo__c",
            hideDefaultActions: true,
        },
        {
            label: '管理编码',
            fieldName: 'orderdetails2TracingCode__c',
            hideDefaultActions: true
            label: "管理编码",
            fieldName: "orderdetails2TracingCode__c",
            hideDefaultActions: true,
        },
        {
            label: '使用期限',
            fieldName: 'orderdetails2Sterilization_limit__c',
            hideDefaultActions: true
        }
            label: "使用期限",
            fieldName: "orderdetails2Sterilization_limit__c",
            hideDefaultActions: true,
        },
    ];
    @track consumableorderdetails2Records = [];
    //出货/销售
    @track salesColumns = [
        {
            label: '消耗品订单',
            fieldName: 'Consumable_order_minor__c',
            label: "消耗品订单",
            fieldName: "Consumable_order_minor__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '消耗品明细2名称',
            fieldName: 'orderdetails2NameUrl',
            type: 'url',
            label: "消耗品明细2名称",
            fieldName: "orderdetails2NameUrl",
            type: "url",
            typeAttributes: {
                label: { fieldName: 'orderdetails2Name' },
                target: '_blank'
                label: { fieldName: "orderdetails2Name" },
                target: "_blank",
            },
            hideDefaultActions: true,
            wrapText: true,
            initialWidth: 240
        },
        {
            label: '单位',
            fieldName: 'Box_Piece__c',
            label: "单位",
            fieldName: "Box_Piece__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '消耗品名称',
            fieldName: 'ProdName',
            label: "消耗品名称",
            fieldName: "ProdName",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '发货日期',
            fieldName: 'Deliver_date__c',
            label: "发货日期",
            fieldName: "Deliver_date__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: 'BarCode',
            fieldName: 'Bar_Code__c',
            label: "BarCode",
            fieldName: "Bar_Code__c",
            hideDefaultActions: true,
            wrapText: true,
            initialWidth: 500
        },
        {
            label: '使用期限',
            fieldName: 'Sterilization_limit__c',
            label: "使用期限",
            fieldName: "Sterilization_limit__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '出货数量',
            fieldName: 'outboundCount',
            label: "出货数量",
            fieldName: "outboundCount",
            hideDefaultActions: true,
            wrapText: true
        }
            wrapText: true,
        },
    ];
    @track salesData = [];
    @track salesErrorColumns = [
        {
            label: '消耗品订单',
            fieldName: 'Consumable_order_minor__c',
            label: "消耗品订单",
            fieldName: "Consumable_order_minor__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '消耗品明细2名称',
            fieldName: 'orderdetails2Name',
            label: "消耗品明细2名称",
            fieldName: "orderdetails2Name",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '消耗品名称',
            fieldName: 'ProdName',
            label: "消耗品名称",
            fieldName: "ProdName",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '单位',
            fieldName: 'Box_Piece__c',
            label: "单位",
            fieldName: "Box_Piece__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: 'BarCode',
            fieldName: 'Bar_Code__c',
            hideDefaultActions: true
            label: "BarCode",
            fieldName: "Bar_Code__c",
            hideDefaultActions: true,
        },
        {
            label: '使用期限',
            fieldName: 'Sterilization_limit__c',
            label: "使用期限",
            fieldName: "Sterilization_limit__c",
            hideDefaultActions: true,
            wrapText: true
            wrapText: true,
        },
        {
            label: '错误原因',
            fieldName: 'ErrorReason',
            label: "错误原因",
            fieldName: "ErrorReason",
            hideDefaultActions: true,
            wrapText: true
        }
            wrapText: true,
        },
    ];
    @track salesErrorData = [];
    @track salesAccountName = '';
    @track salesUserWorkLocation = '';
    @track salesAccountid = '';
    @track salesAccountName = "";
    @track salesUserWorkLocation = "";
    @track salesAccountid = "";
    @track salesOrderdetails = [];
    @track salesCoc = {};
    @track salesOrderpieceorboxMap;
@@ -441,55 +441,55 @@
    @track isDeleteDisabled = false;
    //出库单信息
    @track cocId = '';
    @track cocId = "";
    @track EditAble = false;
    @track summonsStatusPriceNotDetermined = false;
    @track isSummonsForDirctionTwoShow = false;
    @track isSummonsFlag = false;
    @track isConInvoiceShow = false;
    @track sumPrice = '';
    @track sumPrice = "";
    @track isSearchShow = false;
    @track Existarrive = false;
    @track Category3 = '';
    @track Category3 = "";
    @track category3Options = [];
    @track Category4 = '';
    @track Category4 = "";
    @track category4Options = [];
    @track Category5 = '';
    @track Category5 = "";
    @track category5Options = [];
    //发票id
    @track invoiceId = '';
    //二级经销商
    @track secondaryDistributor = '';
    @track secondaryDistributor = "";
    @track secondaryDistributorOptions = [];
    @track isDisabledSecondaryDistributor = false;
    //经销商录入
    @track ForDealerText = '';
    @track ForDealerText = "";
    @track isDisabledForDealerText = false;
    //客户名
    @track isModalOpen = false;
    @track HospitalName = '';
    @track searchHospitalName = '';
    @track OECId = '';
    @track HospitalName = "";
    @track searchHospitalName = "";
    @track OECId = "";
    @track isDisabledHospitalName = false;
    //科室
    @track ForCustomerText = '';
    @track ForCustomerText = "";
    @track isDisabledForCustomerText = false;
    //没有确定价格
    @track NoConfirmedPrice = false;
    //消耗品名称
    @track consumableName = '';
    @track consumableName = "";
    @track agencyProType = '';
    @track accountName = '';
    @track userWorkLocation = '';
    @track agencyProType = "";
    @track accountName = "";
    @track userWorkLocation = "";
    @track OutPattern__c = false;
    @track outOutPattern = '';
    @track outOutPattern = "";
    //出库单明细
    @track showTable = false;
@@ -497,31 +497,31 @@
    @track isSelectShow = false;
    @track hidecheckboxcolumn = false;
    @track is345Show = false;
    @track arriveorder = '';
    @track arriveorder = "";
    @track hasHosPro = false;
    @track InvoiceProNotLabel = '';
    @track RrturnProLabel = '';
    @track InvoicedLabel = '';
    @track InvoiceProNotLabel = "";
    @track RrturnProLabel = "";
    @track InvoicedLabel = "";
    @track outOutPatternOptionList = [];
    //文件上传
    @track showLoadingSpinner = false;
    @track UploadFile = 'Upload File';
    @track fileName = '';
    @track UploadFile = "Upload File";
    @track fileName = "";
    @track fileData = [];
    @track fileColumns = [
        {
            label: '标题',
            fieldName: 'url',
            type: 'url',
            typeAttributes: { label: { fieldName: 'Title' }, target: '_blank' },
            hideDefaultActions: true
            label: "标题",
            fieldName: "url",
            type: "url",
            typeAttributes: { label: { fieldName: "Title" }, target: "_blank" },
            hideDefaultActions: true,
        },
        {
            label: '创建人',
            fieldName: 'CreatedByName',
            hideDefaultActions: true
        }
            label: "创建人",
            fieldName: "CreatedByName",
            hideDefaultActions: true,
        },
    ];
    filesUploaded = [];
    fileContents;
@@ -536,16 +536,16 @@
            this.InvoiceProNotLabel = data.fields.InvoiceProNot_count__c.label;
            this.RrturnProLabel = data.fields.RrturnPro_count__c.label;
            this.InvoicedLabel = data.fields.Invoiced_Procount__c.label;
            console.log('this.InvoiceProNotLabel = ' + this.InvoiceProNotLabel);
            console.log('this.RrturnProLabel = ' + this.RrturnProLabel);
            console.log('this.InvoicedLabel = ' + this.InvoicedLabel);
            console.log("this.InvoiceProNotLabel = " + this.InvoiceProNotLabel);
            console.log("this.RrturnProLabel = " + this.RrturnProLabel);
            console.log("this.InvoicedLabel = " + this.InvoicedLabel);
        }
    }
    //获取链接参数
    getQueryString(name) {
        console.log('getQueryString name ' + name);
        let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
        console.log("getQueryString name " + name);
        let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        let r = window.location.search.substr(1).match(reg);
        if (r != null) {
            return decodeURIComponent(r[2]);
@@ -553,491 +553,414 @@
        return null;
    }
    connectedCallback() {
        console.log('connectedCallback LexSummonsCreat');
        this.ESetid = this.getQueryString('ESetid');
        this.ESetid = this.ESetid == null ? '' : this.ESetid;
        console.log("connectedCallback LexSummonsCreat");
        this.ESetid = this.getQueryString("ESetid");
        this.ESetid = this.ESetid == null ? "" : this.ESetid;
        //statusEdit
        this.statusEdit = this.getQueryString('KeyWords');
        this.statusEdit = this.statusEdit == null ? '' : this.statusEdit;
        console.log('this.ESetid = ' + this.ESetid);
        console.log('this.statusEdit = ' + this.statusEdit);
        if (this.ESetid == '') {
        this.statusEdit = this.getQueryString("KeyWords");
        this.statusEdit = this.statusEdit == null ? "" : this.statusEdit;
        console.log("this.ESetid = " + this.ESetid);
        console.log("this.statusEdit = " + this.statusEdit);
        if (this.ESetid == "") {
            this.isShowInformation = false;
        }
        console.log('init LexSummonsCreat');
        console.log("init LexSummonsCreat");
        init({
            ESetidJs: this.ESetid,
            statusEdit: this.statusEdit
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log("r = " + JSON.stringify(r));
                if (r.status == 'Success') {
                    this.OECId =
                        r.entity.HospitalInfo == null
                            ? ''
                            : r.entity.HospitalInfo;
                    console.log('this.OECId = ' + this.OECId);
                    this.ConsumableOut_report = r.entity.ConsumableOut_report;
                    console.log(
                        'this.ConsumableOut_report = ' +
                            this.ConsumableOut_report
                    );
                    this.accountid = r.entity.accountid;
                    this.consumableproductdetailsRecords =
                        r.entity.consumableproductdetailsRecords;
                    this.accountName = r.entity.accountName;
                    this.agencyProType = r.entity.agencyProType;
                    this.accountName = r.entity.accountName;
                    this.userWorkLocation = r.entity.userWorkLocation;
                    this.EditAble = r.entity.EditAble;
                    this.consumableorderdetails2Records =
                        r.entity.consumableorderdetails2Records;
                    for (var i in this.consumableorderdetails2Records) {
                        this.consumableorderdetails2Records[i]['ProdName'] =
                            this.consumableorderdetails2Records[i].Prod.Name;
                        this.consumableorderdetails2Records[i][
                            'orderdetails2SerialLotNo__c'
                        ] =
                            this.consumableorderdetails2Records[
                                i
                            ].orderdetails2.SerialLotNo__c;
                        this.consumableorderdetails2Records[i][
                            'orderdetails2TracingCode__c'
                        ] =
                            this.consumableorderdetails2Records[
                                i
                            ].orderdetails2.TracingCode__c;
                        this.consumableorderdetails2Records[i][
                            'orderdetails2Sterilization_limit__c'
                        ] =
                            this.consumableorderdetails2Records[
                                i
                            ].orderdetails2.Sterilization_limit__c;
                    }
                    this.isShowOutboundProductDetails =
                        r.entity.consumableorderdetails2Count > 0
                            ? true
                            : false;
                    console.log('this.agencyProType = ' + this.agencyProType);
                    console.log('this.EditAble = ' + this.EditAble);
                    //查询附件
                    if (!this.EditAble) this.getFiles();
                    //第3分类
                    for (var key in r.entity.categoryOptionMap) {
                        let object = {};
                        object['label'] = r.entity.categoryOptionMap[key];
                        object['value'] = key;
                        this.category3Options.push(object);
                    }
                    console.log(
                        'this.category3Options = ' +
                            JSON.stringify(this.category3Options)
                    );
                    //第4分类
                    for (var key in r.entity.category4OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category4OptionMap[key];
                        object['value'] = key;
                        this.category4Options.push(object);
                    }
                    console.log(
                        'this.category4Options = ' + this.category4Options
                    );
                    //第5分类
                    for (var key in r.entity.category5OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category5OptionMap[key];
                        object['value'] = key;
                        this.category5Options.push(object);
                    }
                    console.log(
                        'this.category5Options = ' + this.category5Options
                    );
            if (r.status == "Success") {
                    this.data = r.entity.pageRecords;
                    console.log(
                        'this.data start = ' + JSON.stringify(this.data)
                    );
                    for (var i in this.data) {
                        let unitOptions = [];
                        for (var key in this.data[i].boxorpieceMap) {
                            let unitOption = {};
                            unitOption['label'] =
                                this.data[i].boxorpieceMap[key];
                            unitOption['value'] = key;
                            unitOptions.push(unitOption);
                        }
                        this.data[i]['unitOptions'] = unitOptions;
                        this.data[i]['unitValue'] =
                            this.data[i]['unitValue'] == null
                                ? unitOptions[0].value
                                : this.data[i]['unitValue'];
                        if (this.EditAble) {
                            this.data[i].orderdetails1['Box_Piece__c'] =
                                this.data[i].orderdetails1['Box_Piece__c'] ==
                                null
                                    ? unitOptions[0].value
                                    : this.data[i].orderdetails1[
                                          'Box_Piece__c'
                                      ];
                            this.data[i].orderdetails1['Shipment_Count__c'] =
                                this.data[i].orderdetails1[
                                    'Shipment_Count__c'
                                ] == null
                                    ? 0
                                    : this.data[i].orderdetails1[
                                          'Shipment_Count__c'
                                      ];
                            this.data[i].orderdetails1['Delivery_List_RMB__c'] =
                                this.data[i].orderdetails1[
                                    'Delivery_List_RMB__c'
                                ] == null
                                    ? 0.0
                                    : this.data[i].orderdetails1[
                                          'Delivery_List_RMB__c'
                                      ];
                        } else {
                            this.data[i]['InvoiceProNot_count__c'] =
                                this.data[
                                    i
                                ].orderdetails1.InvoiceProNot_count__c;
                            this.data[i]['RrturnPro_count__c'] =
                                this.data[i].orderdetails1.RrturnPro_count__c;
                            this.data[i]['Invoiced_Procount__c'] =
                                this.data[i].orderdetails1.Invoiced_Procount__c;
                        }
                        // this.data[i]["shipmentNumber"] = 0;
                        // this.data[i]["shippingUnitPrice"] = 0.0;
                        //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
                        //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
                        this.data[i]['shipmentNumber'] =
                            this.data[i].orderdetails1['Shipment_Count__c'];
                        this.data[i]['shippingUnitPrice'] =
                            this.data[i].orderdetails1['Delivery_List_RMB__c'];
                        this.data[i]['recordId'] = this.data[i].Prod.Id;
                        this.data[i]['Id'] = this.data[i].Prod.Id;
                        this.data[i]['Name__c'] = this.data[i].Prod.Name__c;
                        this.data[i]['SFDA_Status__c'] =
                            this.data[i].Prod.SFDA_Status__c;
                        this.data[i]['Category3__c'] =
                            this.data[i].Prod.Category3__c;
                        this.data[i]['Category4__c'] =
                            this.data[i].Prod.Category4__c;
                        this.data[i]['Category5__c'] =
                            this.data[i].Prod.Category5__c;
                        this.data[i]['Box_Piece__c'] =
                            this.data[i].orderdetails1.Box_Piece__c;
                        this.data[i]['shipmentAmount'] =
                            this.data[i].orderdetails1.Shipment_amount__c;
                        this.data[i]['Shipment_amount__c'] =
                            this.data[i].orderdetails1.Shipment_amount__c;
                        this.data[i]['Shipment_Count__c'] =
                            this.data[i].orderdetails1.Shipment_Count__c;
                        if (this.data[i]['check']) {
                            this.selectedRows.push(this.data[i].Id);
                        }
                    }
                    console.log('this.data = ' + JSON.stringify(this.data));
                    //show
                    if (
                        r.entity.EditDelCommitBtnDisabled ||
                        r.entity.EditAble
                    ) {
                        this.isSaveShow = true;
                    } else {
                        this.isEditShow = true;
                        this.isDeliveryShow = true;
                        this.isOpenToInvoiceShow = true;
                        this.isPraseToPDFShow = true;
                        this.isOpenReportShow = true;
                        this.isDeleteShow = true;
                    }
                    this.Existarrive = r.entity.Existarrive;
                    console.log('this.EditAble = ' + this.EditAble);
                    this.hasHosPro = r.entity.hasHosPro;
                    //disable
                    if (Object.values(r.entity.coc).length > 0) {
                        this.cocLwc = r.entity.coc;
                        console.log(
                            'this.cocLwc = ' + JSON.stringify(this.cocLwc)
                        );
                        var coc = r.entity.coc;
                        this.cocId = coc.Id;
                        console.log('cocId = ' + this.cocId);
                        coc.SummonsStatus = coc.SummonsStatus_c__c;
                        if (coc.SummonsStatus_c__c == '已完成') {
                            this.isEditDisabled = true;
                        }
                        if (
                            coc.SummonsStatus_c__c == '批准' ||
                            coc.SummonsStatus_c__c == '已销售待上传纳品书' ||
                            coc.SummonsStatus_c__c == '出库单已打印' ||
                            coc.SummonsStatus_c__c == '已完成'
                        ) {
                            this.isDeliveryDisabled = true;
                        }
                        if (
                            ((coc.Billed_Status__c != '全部开票' &&
                                coc.SummonsStatus_c__c == '已完成') ||
                                coc.Onchange_order__c == true) &&
                            coc.SummonsForDirction__c != '互相调货'
                        ) {
                            this.isOpenToInvoiceDisabled = false;
                        }
                        if (
                            coc.SummonsStatus_c__c == '已销售待上传纳品书' ||
                            coc.SummonsStatus_c__c == '批准' ||
                            coc.SummonsStatus_c__c == '出库单已打印' ||
                            coc.SummonsStatus_c__c == '草案中'
                        ) {
                            this.isPraseToPDFDisabled = false;
                        }
                        if (
                            coc.Billed_Status__c != '还没开票' ||
                            coc.SummonsStatus_c__c == '已完成'
                        ) {
                            this.isOpenReportDisabled = false;
                        }
                        if (
                            coc.SummonsStatus_c__c == '已销售待上传纳品书' ||
                            coc.SummonsStatus_c__c == '价格未定' ||
                            coc.SummonsStatus_c__c == '批准' ||
                            coc.SummonsStatus_c__c == '出库单已打印' ||
                            coc.SummonsStatus_c__c == '已完成'
                        ) {
                            this.isDeleteDisabled = true;
                        }
                        this.isConInvoiceShow =
                            coc.SummonsStatus_c__c == '已完成' &&
                            coc.SummonsForDirction__c != '互相调货'
                                ? true
                                : false;
                        this.summonsStatusPriceNotDetermined =
                            coc.SummonsStatus_c__c == '价格未定' ? true : false;
                        this.isSummonsForDirctionTwoShow =
                            coc.SummonsForDirction__c == '销售给二级经销商'
                                ? true
                                : false;
                    }
                    this.isSearchShow =
                        !this.Existarrive &&
                        r.entity.coc.SummonsStatus_c__c != '价格未定' &&
                        r.entity.EditAble
                            ? true
                            : false;
                    this.hidecheckboxcolumn = !this.isSearchShow;
                    this.arriveorder = r.entity.arriveorder;
                    this.is345Show =
                        this.arriveorder == '' &&
                        this.Existarrive == false &&
                        this.EditAble
                            ? true
                            : false;
                    //如果不显示345分类,columns里面删除3,4,5分类
                    if (!this.is345Show) {
                        for (var i = 0; i < this.columns.length; i++) {
                            if (this.columns[i].label == '第3分类') {
                                this.columns.splice(i, 1);
                            }
                        }
                        for (var i = 0; i < this.columns.length; i++) {
                            if (this.columns[i].label == '第4分类') {
                                this.columns.splice(i, 1);
                            }
                        }
                        for (var i = 0; i < this.columns.length; i++) {
                            if (this.columns[i].label == '第5分类') {
                                this.columns.splice(i, 1);
                            }
                        }
                        for (var i = 0; i < this.editColumns.length; i++) {
                            if (this.editColumns[i].label == '第3分类') {
                                this.editColumns.splice(i, 1);
                            }
                        }
                        for (var i = 0; i < this.editColumns.length; i++) {
                            if (this.editColumns[i].label == '第4分类') {
                                this.editColumns.splice(i, 1);
                            }
                        }
                        for (var i = 0; i < this.editColumns.length; i++) {
                            if (this.editColumns[i].label == '第5分类') {
                                this.editColumns.splice(i, 1);
                            }
                        }
                    }
                    //如果EditAble==false,删除 出货金额(元) 有效期内库存(盒) 有效期内库存(个) 3列 展示 还没发票数量 返品数量 已发票数量
                    //type : "number",
                    // typeAttributes:{
                    //     minimumFractionDigits:2,
                    // },
                    if (!this.EditAble) {
                        let object1 = {
                            label: this.InvoiceProNotLabel,
                            fieldName: 'InvoiceProNot_count__c',
                            type: 'number',
                            typeAttributes: {
                                minimumFractionDigits: 2
                            },
                            hideDefaultActions: true
                        };
                        let object2 = {
                            label: this.RrturnProLabel,
                            fieldName: 'RrturnPro_count__c',
                            hideDefaultActions: true
                        };
                        let object3 = {
                            label: this.InvoicedLabel,
                            fieldName: 'Invoiced_Procount__c',
                            type: 'number',
                            typeAttributes: {
                                minimumFractionDigits: 2
                            },
                            hideDefaultActions: true
                        };
                        this.editColumns.push(object1);
                        this.editColumns.push(object2);
                        this.editColumns.push(object3);
                    } else {
                        this.ForCustomerText =
                            this.cocLwc.Order_ForCustomerText__c;
                        console.log(
                            'EditAble = true this.ForCustomerText = ' +
                                this.ForCustomerText
                        );
                        this.summonsForDirction =
                            this.cocLwc.SummonsForDirction__c;
                        console.log(
                            'EditAble = true this.summonsForDirction = ' +
                                this.summonsForDirction
                        );
                        let value = this.summonsForDirction;
                        switch (value) {
                            case '直接销售给医院':
                                this.isDisabledHospitalName = false;
                                this.isDisabledForCustomerText = false;
                                this.secondaryDistributor = '';
                                this.ForDealerText = '';
                                this.isDisabledForDealerText = true;
                                this.isDisabledSecondaryDistributor = true;
                                break;
                            case '医院试用':
                                this.isDisabledHospitalName = false;
                                this.isDisabledForCustomerText = false;
                                this.isDisabledForDealerText = false;
                                this.isDisabledSecondaryDistributor = false;
                                break;
                            case '销售给二级经销商':
                                this.isDisabledHospitalName = false;
                                this.isDisabledForCustomerText = false;
                                this.isDisabledForDealerText = false;
                                this.isDisabledSecondaryDistributor = false;
                                break;
                            case '互相调货':
                                this.isDisabledHospitalName = true;
                                this.HospitalName = '';
                                this.OECId = '';
                                this.isDisabledForCustomerText = true;
                                this.ForCustomerText = '';
                                this.isDisabledForDealerText = false;
                                this.isDisabledSecondaryDistributor = false;
                                this.isMutualTransferGoods = true;
                                break;
                            default:
                                this.isDisabledHospitalName = false;
                                this.isDisabledForCustomerText = false;
                                this.isDisabledForDealerText = false;
                                this.isDisabledSecondaryDistributor = false;
                        }
                    }
                    //如果hasHosPro = true 医院特价
                    if (this.hasHosPro) {
                        let object1 = {
                            label: '医院特价',
                            fieldName: 'InvoiceProNot_count__c',
                            hideDefaultActions: true
                        };
                        this.columns.push(object1);
                        this.editColumns.push(object1);
                    }
                    //出库单信息
                    this.isSummonsFlag =
                        r.entity.SummonsFlag == 'visible' ? true : false;
                    console.log(
                        'r.entity.provinceOptsMap = ' + r.entity.provinceOptsMap
                    );
                    for (var key in r.entity.provinceOptsMap) {
                        let object = {};
                        object['label'] = r.entity.provinceOptsMap[key];
                        object['value'] = key;
                        this.secondaryDistributorOptions.push(object);
                    }
                    for (var key in r.entity.outOutPatternOptionMap) {
                        let object = {};
                        object['label'] = r.entity.outOutPatternOptionMap[key];
                        object['value'] = key;
                        this.outOutPatternOptionList.push(object);
                    }
                    console.log(
                        'this.secondaryDistributorOptions = ' +
                            JSON.stringify(this.secondaryDistributorOptions)
                    );
                    this.HospitalName = r.entity.HospitalName;
                    this.sumPrice = r.entity.sumPrice + '元';
                    this.isShowSpinner = false;
                    this.showTable = true;
                    console.log('ESetid = ' + this.ESetid);
                } else {
                    console.log('r = ' + JSON.stringify(r));
                    this.showToast('Error', r.msg);
                this.OECId = r.entity.HospitalInfo == null ? '' : r.entity.HospitalInfo;
                console.log("this.OECId = " + this.OECId);
                this.ConsumableOut_report = r.entity.ConsumableOut_report;
                console.log("this.ConsumableOut_report = " + this.ConsumableOut_report);
                this.accountid = r.entity.accountid;
                this.consumableproductdetailsRecords =
                    r.entity.consumableproductdetailsRecords;
                this.accountName = r.entity.accountName;
                this.agencyProType = r.entity.agencyProType;
                this.accountName = r.entity.accountName;
                this.userWorkLocation = r.entity.userWorkLocation;
                this.EditAble = r.entity.EditAble;
                this.consumableorderdetails2Records =
                    r.entity.consumableorderdetails2Records;
                for (var i in this.consumableorderdetails2Records) {
                    this.consumableorderdetails2Records[i]["ProdName"] =
                        this.consumableorderdetails2Records[i].Prod.Name;
                    this.consumableorderdetails2Records[i][
                        "orderdetails2SerialLotNo__c"
                    ] =
                        this.consumableorderdetails2Records[i].orderdetails2.SerialLotNo__c;
                    this.consumableorderdetails2Records[i][
                        "orderdetails2TracingCode__c"
                    ] =
                        this.consumableorderdetails2Records[i].orderdetails2.TracingCode__c;
                    this.consumableorderdetails2Records[i][
                        "orderdetails2Sterilization_limit__c"
                    ] =
                        this.consumableorderdetails2Records[
                            i
                        ].orderdetails2.Sterilization_limit__c;
                }
            })
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error));
            });
                this.isShowOutboundProductDetails =
                    r.entity.consumableorderdetails2Count > 0 ? true : false;
                console.log("this.agencyProType = " + this.agencyProType);
                console.log("this.EditAble = " + this.EditAble);
                //查询附件
                if (!this.EditAble) this.getFiles();
                //第3分类
                for (var key in r.entity.categoryOptionMap) {
                    let object = {};
                    object["label"] = r.entity.categoryOptionMap[key];
                    object["value"] = key;
                    this.category3Options.push(object);
                }
                console.log("this.category3Options = " + JSON.stringify(this.category3Options));
                //第4分类
                for (var key in r.entity.category4OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category4OptionMap[key];
                    object["value"] = key;
                    this.category4Options.push(object);
                }
                console.log("this.category4Options = " + this.category4Options);
                //第5分类
                for (var key in r.entity.category5OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category5OptionMap[key];
                    object["value"] = key;
                    this.category5Options.push(object);
                }
                console.log("this.category5Options = " + this.category5Options);
                this.data = r.entity.pageRecords;
                console.log("this.data start = " + JSON.stringify(this.data));
                for (var i in this.data) {
                    let unitOptions = [];
                    for (var key in this.data[i].boxorpieceMap) {
                        let unitOption = {};
                        unitOption["label"] = this.data[i].boxorpieceMap[key];
                        unitOption["value"] = key;
                        unitOptions.push(unitOption);
                    }
                    this.data[i]["unitOptions"] = unitOptions;
                    this.data[i]["unitValue"] = this.data[i]["unitValue"] == null ? unitOptions[0].value : this.data[i]["unitValue"];
                    if (this.EditAble) {
                        this.data[i].orderdetails1["Box_Piece__c"] = this.data[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : this.data[i].orderdetails1["Box_Piece__c"];
                        this.data[i].orderdetails1["Shipment_Count__c"] = this.data[i].orderdetails1["Shipment_Count__c"] == null ? 0 : this.data[i].orderdetails1["Shipment_Count__c"];
                        this.data[i].orderdetails1["Delivery_List_RMB__c"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : this.data[i].orderdetails1["Delivery_List_RMB__c"];
                    } else {
                        this.data[i]["InvoiceProNot_count__c"] =
                            this.data[i].orderdetails1.InvoiceProNot_count__c;
                        this.data[i]["RrturnPro_count__c"] =
                            this.data[i].orderdetails1.RrturnPro_count__c;
                        this.data[i]["Invoiced_Procount__c"] =
                            this.data[i].orderdetails1.Invoiced_Procount__c;
                    }
                    // this.data[i]["shipmentNumber"] = 0;
                    // this.data[i]["shippingUnitPrice"] = 0.0;
                    //this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"] == 0 ? '' : this.data[i].orderdetails1["Shipment_Count__c"];
                    //this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"] == 0 ? '' : this.data[i].orderdetails1["Delivery_List_RMB__c"];
                    this.data[i]["shipmentNumber"] = this.data[i].orderdetails1["Shipment_Count__c"];
                    this.data[i]["shippingUnitPrice"] = this.data[i].orderdetails1["Delivery_List_RMB__c"];
                    this.data[i]["recordId"] = this.data[i].Prod.Id;
                    this.data[i]["Id"] = this.data[i].Prod.Id;
                    this.data[i]["Name__c"] = this.data[i].Prod.Name__c;
                    this.data[i]["SFDA_Status__c"] = this.data[i].Prod.SFDA_Status__c;
                    this.data[i]["Category3__c"] = this.data[i].Prod.Category3__c;
                    this.data[i]["Category4__c"] = this.data[i].Prod.Category4__c;
                    this.data[i]["Category5__c"] = this.data[i].Prod.Category5__c;
                    this.data[i]["Box_Piece__c"] = this.data[i].orderdetails1.Box_Piece__c;
                    this.data[i]["shipmentAmount"] = this.data[i].orderdetails1.Shipment_amount__c;
                    this.data[i]["Shipment_amount__c"] = this.data[i].orderdetails1.Shipment_amount__c;
                    this.data[i]["Shipment_Count__c"] = this.data[i].orderdetails1.Shipment_Count__c;
                    if (this.data[i]['check']) {
                        this.selectedRows.push(this.data[i].Id);
                    }
                }
                console.log("this.data = " + JSON.stringify(this.data));
                //show
                if (r.entity.EditDelCommitBtnDisabled || r.entity.EditAble) {
                    this.isSaveShow = true;
                } else {
                    this.isEditShow = true;
                    this.isDeliveryShow = true;
                    this.isOpenToInvoiceShow = true;
                    this.isPraseToPDFShow = true;
                    this.isOpenReportShow = true;
                    this.isDeleteShow = true;
                }
                this.Existarrive = r.entity.Existarrive;
                console.log("this.EditAble = " + this.EditAble);
                this.hasHosPro = r.entity.hasHosPro;
                //disable
                if (Object.values(r.entity.coc).length > 0) {
                    this.cocLwc = r.entity.coc;
                    console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
                    var coc = r.entity.coc;
                    this.cocId = coc.Id;
                    console.log('cocId = ' + this.cocId);
                    coc.SummonsStatus = coc.SummonsStatus_c__c;
                    if (coc.SummonsStatus_c__c == "已完成") {
                        this.isEditDisabled = true;
                    }
                    if (
                        coc.SummonsStatus_c__c == "批准" ||
                        coc.SummonsStatus_c__c == "已销售待上传纳品书" ||
                        coc.SummonsStatus_c__c == "出库单已打印" ||
                        coc.SummonsStatus_c__c == "已完成"
                    ) {
                        this.isDeliveryDisabled = true;
                    }
                    if (
                        ((coc.Billed_Status__c != "全部开票" &&
                            coc.SummonsStatus_c__c == "已完成") ||
                            coc.Onchange_order__c == true) &&
                        coc.SummonsForDirction__c != "互相调货"
                    ) {
                        this.isOpenToInvoiceDisabled = false;
                    }
                    if (
                        coc.SummonsStatus_c__c == "已销售待上传纳品书" ||
                        coc.SummonsStatus_c__c == "批准" ||
                        coc.SummonsStatus_c__c == "出库单已打印" ||
                        coc.SummonsStatus_c__c == "草案中"
                    ) {
                        this.isPraseToPDFDisabled = false;
                    }
                    if (
                        coc.Billed_Status__c != "还没开票" ||
                        coc.SummonsStatus_c__c == "已完成"
                    ) {
                        this.isOpenReportDisabled = false;
                    }
                    if (
                        coc.SummonsStatus_c__c == "已销售待上传纳品书" ||
                        coc.SummonsStatus_c__c == "价格未定" ||
                        coc.SummonsStatus_c__c == "批准" ||
                        coc.SummonsStatus_c__c == "出库单已打印" ||
                        coc.SummonsStatus_c__c == "已完成"
                    ) {
                        this.isDeleteDisabled = true;
                    }
                    this.isConInvoiceShow =
                        coc.SummonsStatus_c__c == "已完成" &&
                            coc.SummonsForDirction__c != "互相调货"
                            ? true
                            : false;
                    this.summonsStatusPriceNotDetermined =
                        coc.SummonsStatus_c__c == "价格未定" ? true : false;
                    this.isSummonsForDirctionTwoShow =
                        coc.SummonsForDirction__c == "销售给二级经销商" ? true : false;
                }
                this.isSearchShow =
                    !this.Existarrive &&
                        r.entity.coc.SummonsStatus_c__c != "价格未定" &&
                        r.entity.EditAble
                        ? true
                        : false;
                this.hidecheckboxcolumn = !this.isSearchShow;
                this.arriveorder = r.entity.arriveorder;
                this.is345Show =
                    this.arriveorder == "" && this.Existarrive == false && this.EditAble
                        ? true
                        : false;
                //如果不显示345分类,columns里面删除3,4,5分类
                if (!this.is345Show) {
                    for (var i = 0; i < this.columns.length; i++) {
                        if (this.columns[i].label == "第3分类") {
                            this.columns.splice(i, 1);
                        }
                    }
                    for (var i = 0; i < this.columns.length; i++) {
                        if (this.columns[i].label == "第4分类") {
                            this.columns.splice(i, 1);
                        }
                    }
                    for (var i = 0; i < this.columns.length; i++) {
                        if (this.columns[i].label == "第5分类") {
                            this.columns.splice(i, 1);
                        }
                    }
                    for (var i = 0; i < this.editColumns.length; i++) {
                        if (this.editColumns[i].label == "第3分类") {
                            this.editColumns.splice(i, 1);
                        }
                    }
                    for (var i = 0; i < this.editColumns.length; i++) {
                        if (this.editColumns[i].label == "第4分类") {
                            this.editColumns.splice(i, 1);
                        }
                    }
                    for (var i = 0; i < this.editColumns.length; i++) {
                        if (this.editColumns[i].label == "第5分类") {
                            this.editColumns.splice(i, 1);
                        }
                    }
                }
                //如果EditAble==false,删除 出货金额(元) 有效期内库存(盒) 有效期内库存(个) 3列 展示 还没发票数量 返品数量 已发票数量
                //type : "number",
                // typeAttributes:{
                //     minimumFractionDigits:2,
                // },
                if (!this.EditAble) {
                    let object1 = {
                        label: this.InvoiceProNotLabel,
                        fieldName: "InvoiceProNot_count__c",
                        type: "number",
                        typeAttributes: {
                            minimumFractionDigits: 2,
                        },
                        hideDefaultActions: true,
                    };
                    let object2 = {
                        label: this.RrturnProLabel,
                        fieldName: "RrturnPro_count__c",
                        hideDefaultActions: true,
                    };
                    let object3 = {
                        label: this.InvoicedLabel,
                        fieldName: "Invoiced_Procount__c",
                        type: "number",
                        typeAttributes: {
                            minimumFractionDigits: 2,
                        },
                        hideDefaultActions: true,
                    };
                    this.editColumns.push(object1);
                    this.editColumns.push(object2);
                    this.editColumns.push(object3);
                } else {
                    this.ForCustomerText = this.cocLwc.Order_ForCustomerText__c;
                    console.log('EditAble = true this.ForCustomerText = ' + this.ForCustomerText);
                    this.summonsForDirction = this.cocLwc.SummonsForDirction__c;
                    console.log('EditAble = true this.summonsForDirction = ' + this.summonsForDirction);
                    let value = this.summonsForDirction;
                    switch (value) {
                        case "直接销售给医院":
                            this.isDisabledHospitalName = false;
                            this.isDisabledForCustomerText = false;
                            this.secondaryDistributor = "";
                            this.ForDealerText = "";
                            this.isDisabledForDealerText = true;
                            this.isDisabledSecondaryDistributor = true;
                            break;
                        case "医院试用":
                            this.isDisabledHospitalName = false;
                            this.isDisabledForCustomerText = false;
                            this.isDisabledForDealerText = false;
                            this.isDisabledSecondaryDistributor = false;
                            break;
                        case "销售给二级经销商":
                            this.isDisabledHospitalName = false;
                            this.isDisabledForCustomerText = false;
                            this.isDisabledForDealerText = false;
                            this.isDisabledSecondaryDistributor = false;
                            break;
                        case "互相调货":
                            this.isDisabledHospitalName = true;
                            this.HospitalName = "";
                            this.OECId = "";
                            this.isDisabledForCustomerText = true;
                            this.ForCustomerText = "";
                            this.isDisabledForDealerText = false;
                            this.isDisabledSecondaryDistributor = false;
                            this.isMutualTransferGoods = true;
                            break;
                        default:
                            this.isDisabledHospitalName = false;
                            this.isDisabledForCustomerText = false;
                            this.isDisabledForDealerText = false;
                            this.isDisabledSecondaryDistributor = false;
                    }
                }
                //如果hasHosPro = true 医院特价
                if (this.hasHosPro) {
                    let object1 = {
                        label: "医院特价",
                        fieldName: "InvoiceProNot_count__c",
                        hideDefaultActions: true,
                    };
                    this.columns.push(object1);
                    this.editColumns.push(object1);
                }
                //出库单信息
                this.isSummonsFlag = r.entity.SummonsFlag == "visible" ? true : false;
                console.log("r.entity.provinceOptsMap = " + r.entity.provinceOptsMap);
                for (var key in r.entity.provinceOptsMap) {
                    let object = {};
                    object["label"] = r.entity.provinceOptsMap[key];
                    object["value"] = key;
                    this.secondaryDistributorOptions.push(object);
                }
                for (var key in r.entity.outOutPatternOptionMap) {
                    let object = {};
                    object["label"] = r.entity.outOutPatternOptionMap[key];
                    object["value"] = key;
                    this.outOutPatternOptionList.push(object);
                }
                console.log(
                    "this.secondaryDistributorOptions = " +
                    JSON.stringify(this.secondaryDistributorOptions)
                );
                this.HospitalName = r.entity.HospitalName;
                this.sumPrice = r.entity.sumPrice.toFixed(2) + "元";
                this.isShowSpinner = false;
                this.showTable = true;
                console.log("ESetid = " + this.ESetid);
            } else {
                console.log("r = " + JSON.stringify(r));
                this.showToast("Error", r.msg);
            }
        }).catch((error) => {
            console.log("error = " + JSON.stringify(error));
        });
    }
    ChangeDirction(event) {
        let value = event.target.value;
        this.summonsForDirction = value;
        this.cocLwc['SummonsForDirction__c'] = value;
        console.log('选择了 = ' + value);
        this.cocLwc["SummonsForDirction__c"] = value;
        console.log("选择了 = " + value);
        switch (value) {
            case '直接销售给医院':
            case "直接销售给医院":
                this.isDisabledHospitalName = false;
                this.isDisabledForCustomerText = false;
                this.secondaryDistributor = '';
                this.ForDealerText = '';
                this.secondaryDistributor = "";
                this.ForDealerText = "";
                this.isDisabledForDealerText = true;
                this.isDisabledSecondaryDistributor = true;
                this.isMutualTransferGoods = false;
                break;
            case '医院试用':
            case "医院试用":
                this.isDisabledHospitalName = false;
                this.isDisabledForCustomerText = false;
                this.isDisabledForDealerText = false;
                this.isDisabledSecondaryDistributor = false;
                break;
            case '销售给二级经销商':
            case "销售给二级经销商":
                this.isDisabledHospitalName = false;
                this.isDisabledForCustomerText = false;
                this.isDisabledForDealerText = false;
                this.isDisabledSecondaryDistributor = false;
                break;
            case '互相调货':
            case "互相调货":
                this.isDisabledHospitalName = true;
                this.HospitalName = '';
                this.OECId = '';
                this.HospitalName = "";
                this.OECId = "";
                this.isDisabledForCustomerText = true;
                this.ForCustomerText = '';
                this.ForCustomerText = "";
                this.isDisabledForDealerText = false;
                this.isDisabledSecondaryDistributor = false;
                this.isMutualTransferGoods = true;
@@ -1051,39 +974,39 @@
    }
    dataChange(event) {
        let fieldName = event.target.getAttribute('data-field');
        let fieldName = event.target.getAttribute("data-field");
        let value = event.detail.value;
        console.log('fieldName = ' + fieldName + ' value = ' + value);
        console.log("fieldName = " + fieldName + " value = " + value);
        switch (fieldName) {
            case 'summonsForDirction':
            case "summonsForDirction":
                this.summonsForDirction = value;
                break;
            case 'secondaryDistributor':
            case "secondaryDistributor":
                this.secondaryDistributor = value;
                break;
            case 'HospitalName':
            case "HospitalName":
                this.HospitalName = value;
                break;
            case 'ForDealerText':
            case "ForDealerText":
                this.ForDealerText = value;
                this.cocLwc['Order_ForDealerText__c'] = value;
                this.cocLwc["Order_ForDealerText__c"] = value;
                break;
            case 'ForCustomerText':
                this.cocLwc['Order_ForCustomerText__c'] = value;
            case "ForCustomerText":
                this.cocLwc["Order_ForCustomerText__c"] = value;
                this.ForCustomerText = value;
                break;
            case 'sumPrice':
                this.sumPrice = value;
            case "sumPrice":
                this.sumPrice = value.toFixed(2);
                break;
            case 'NoConfirmedPrice':
            case "NoConfirmedPrice":
                this.NoConfirmedPrice = !this.NoConfirmedPrice;
                this.cocLwc['NoConfirmedPrice__c'] = this.NoConfirmedPrice;
                console.log('this.NoConfirmedPrice = ' + this.NoConfirmedPrice);
                this.cocLwc["NoConfirmedPrice__c"] = this.NoConfirmedPrice;
                console.log("this.NoConfirmedPrice = " + this.NoConfirmedPrice);
                break;
            case 'consumableName':
            case "consumableName":
                this.consumableName = value;
                break;
            case 'Category3':
            case "Category3":
                this.Category3 = value;
                //调用后台显示第四五分类
                this.showAllCate();
@@ -1092,7 +1015,7 @@
                    this.Category5 = '';
                }
                break;
            case 'Category4':
            case "Category4":
                this.Category4 = value;
                //调用后台显示第五分类
                this.showCate();
@@ -1100,93 +1023,85 @@
                    this.Category5 = '';
                }
                break;
            case 'Category5':
            case "Category5":
                this.Category5 = value;
                break;
            case 'searchHospitalName':
            case "searchHospitalName":
                this.searchHospitalName = value;
                break;
            case 'Barcode':
            case "Barcode":
                this.Barcode = value;
                break;
        }
    }
    showAllCate() {
        console.log('showAllCate');
        console.log('showAllCate')
        categoryAllload({
            category3Lwc: this.Category3
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    this.category4Options = [];
                    this.category5Options = [];
                    //第4分类
                    for (var key in r.entity.category4OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category4OptionMap[key];
                        object['value'] = key;
                        this.category4Options.push(object);
                    }
                    console.log(
                        'this.category4Options = ' + this.category4Options
                    );
                    //第5分类
                    for (var key in r.entity.category5OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category5OptionMap[key];
                        object['value'] = key;
                        this.category5Options.push(object);
                    }
                } else {
                    console.log('r = ' + JSON.stringify(r));
                    this.showToast('Error', r.msg);
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log("r = " + JSON.stringify(r));
            if (r.status == "Success") {
                this.category4Options = [];
                this.category5Options = [];
                //第4分类
                for (var key in r.entity.category4OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category4OptionMap[key];
                    object["value"] = key;
                    this.category4Options.push(object);
                }
            })
            .catch((error) => {
                console.log('error' + JSON.stringify(error));
            });
                console.log("this.category4Options = " + this.category4Options);
                //第5分类
                for (var key in r.entity.category5OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category5OptionMap[key];
                    object["value"] = key;
                    this.category5Options.push(object);
                }
            } else {
                console.log("r = " + JSON.stringify(r));
                this.showToast("Error", r.msg);
            }
        }).catch((error) => {
            console.log("error" + JSON.stringify(error));
        });
    }
    showCate() {
        console.log('showAllCate');
        console.log('showAllCate')
        categoryload({
            category3Lwc: this.Category3,
            category4Lwc: this.Category4
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    this.category4Options = [];
                    this.category5Options = [];
                    //第4分类
                    for (var key in r.entity.category4OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category4OptionMap[key];
                        object['value'] = key;
                        this.category4Options.push(object);
                    }
                    console.log(
                        'this.category4Options = ' + this.category4Options
                    );
                    //第5分类
                    for (var key in r.entity.category5OptionMap) {
                        let object = {};
                        object['label'] = r.entity.category5OptionMap[key];
                        object['value'] = key;
                        this.category5Options.push(object);
                    }
                } else {
                    console.log('r = ' + JSON.stringify(r));
                    this.showToast('Error', r.msg);
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log("r = " + JSON.stringify(r));
            if (r.status == "Success") {
                this.category4Options = [];
                this.category5Options = [];
                //第4分类
                for (var key in r.entity.category4OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category4OptionMap[key];
                    object["value"] = key;
                    this.category4Options.push(object);
                }
            })
            .catch((error) => {
                console.log('error' + JSON.stringify(error));
            });
                console.log("this.category4Options = " + this.category4Options);
                //第5分类
                for (var key in r.entity.category5OptionMap) {
                    let object = {};
                    object["label"] = r.entity.category5OptionMap[key];
                    object["value"] = key;
                    this.category5Options.push(object);
                }
            } else {
                console.log("r = " + JSON.stringify(r));
                this.showToast("Error", r.msg);
            }
        }).catch((error) => {
            console.log("error" + JSON.stringify(error));
        });
    }
    invoiceChange(event) {
@@ -1200,7 +1115,7 @@
        const event = new ShowToastEvent({
            title: type,
            variant: type,
            message: msg
            message: msg,
        });
        this.dispatchEvent(event);
    }
@@ -1209,28 +1124,26 @@
        this.isShowSpinner = true;
        //this.showTable = false;
        //查询有哪些选择了的然后check
        const selectedRows = this.template
            .querySelector('c-lex-custom-lightning-datatable')
            .getSelectedRows();
        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
        console.log('selectedRows = ' + selectedRows);
        for (var i in this.data) {
            this.data[i]['check'] = false;
            this.data[i]["check"] = false;
        }
        for (var i in this.data) {
            for (var j in selectedRows) {
                if (this.data[i].Id == selectedRows[j].Id) {
                    this.data[i]['check'] = true;
                    this.data[i]["check"] = true;
                }
            }
        }
        let cloneData = this.data;
        for (var i in cloneData) {
            cloneData[i]['Name'] = cloneData[i].Name__c;
            cloneData[i]['Category3'] = cloneData[i].Category3__c;
            cloneData[i]['Category4'] = cloneData[i].Category4__c;
            cloneData[i]['Category5'] = cloneData[i].Category5__c;
            cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
            cloneData[i]["Name"] = cloneData[i].Name__c;
            cloneData[i]["Category3"] = cloneData[i].Category3__c;
            cloneData[i]["Category4"] = cloneData[i].Category4__c;
            cloneData[i]["Category5"] = cloneData[i].Category5__c;
            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
            delete cloneData[i].Name__c;
            delete cloneData[i].Category3__c;
            delete cloneData[i].Category4__c;
@@ -1238,7 +1151,7 @@
            delete cloneData[i].Box_Piece__c;
        }
        console.log('cloneData = ' + JSON.stringify(cloneData));
        console.log("cloneData = " + JSON.stringify(cloneData));
        searchConsumableorderdetails({
            agencyProTypeLwc: this.agencyProType,
            accountNameLwc: this.accountName,
@@ -1250,13 +1163,12 @@
            category5: this.Category5,
            editAbleLwc: this.EditAble,
            pageRecordsLwcLwc: cloneData,
            consumableproductdetailsRecordsLwc:
                this.consumableproductdetailsRecords,
            arriveorderLwc: this.arriveorder
            consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
            arriveorderLwc: this.arriveorder,
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log('r = ' + JSON.stringify(r));
            if (r.status == 'Success') {
            console.log("r = " + JSON.stringify(r));
            if (r.status == "Success") {
                let tempData = [];
                //this.data = r.entity.pageRecords;
                tempData = r.entity.pageRecords;
@@ -1264,67 +1176,50 @@
                    let unitOptions = [];
                    for (var key in tempData[i].boxorpieceMap) {
                        let unitOption = {};
                        unitOption['label'] = tempData[i].boxorpieceMap[key];
                        unitOption['value'] = key;
                        unitOption["label"] = tempData[i].boxorpieceMap[key];
                        unitOption["value"] = key;
                        unitOptions.push(unitOption);
                    }
                    tempData[i]['unitOptions'] = unitOptions;
                    tempData[i]['unitValue'] =
                        tempData[i]['unitValue'] == null
                            ? unitOptions[0].value
                            : tempData[i]['unitValue'];
                    tempData[i]["unitOptions"] = unitOptions;
                    tempData[i]["unitValue"] = tempData[i]["unitValue"] == null ? unitOptions[0].value : tempData[i]["unitValue"];
                    if (this.EditAble) {
                        tempData[i].orderdetails1['Box_Piece__c'] =
                            tempData[i].orderdetails1['Box_Piece__c'] == null
                                ? unitOptions[0].value
                                : tempData[i].orderdetails1['Box_Piece__c'];
                        tempData[i].orderdetails1['Shipment_Count__c'] =
                            tempData[i].orderdetails1['Shipment_Count__c'] ==
                            null
                                ? 0
                                : tempData[i].orderdetails1[
                                      'Shipment_Count__c'
                                  ];
                        tempData[i].orderdetails1['Delivery_List_RMB__c'] =
                            tempData[i].orderdetails1['Delivery_List_RMB__c'] ==
                            null
                                ? 0.0
                                : tempData[i].orderdetails1[
                                      'Delivery_List_RMB__c'
                                  ];
                        tempData[i].orderdetails1["Box_Piece__c"] = tempData[i].orderdetails1["Box_Piece__c"] == null ? unitOptions[0].value : tempData[i].orderdetails1["Box_Piece__c"];
                        tempData[i].orderdetails1["Shipment_Count__c"] = tempData[i].orderdetails1["Shipment_Count__c"] == null ? 0 : tempData[i].orderdetails1["Shipment_Count__c"];
                        tempData[i].orderdetails1["Delivery_List_RMB__c"] = tempData[i].orderdetails1["Delivery_List_RMB__c"] == null ? 0.0 : tempData[i].orderdetails1["Delivery_List_RMB__c"];
                    } else {
                        tempData[i]['InvoiceProNot_count__c'] =
                        tempData[i]["InvoiceProNot_count__c"] =
                            tempData[i].orderdetails1.InvoiceProNot_count__c;
                        tempData[i]['RrturnPro_count__c'] =
                        tempData[i]["RrturnPro_count__c"] =
                            tempData[i].orderdetails1.RrturnPro_count__c;
                        tempData[i]['Invoiced_Procount__c'] =
                        tempData[i]["Invoiced_Procount__c"] =
                            tempData[i].orderdetails1.Invoiced_Procount__c;
                    }
                    tempData[i]['shipmentNumber'] =
                        tempData[i].orderdetails1['Shipment_Count__c'];
                    tempData[i]['shippingUnitPrice'] =
                        tempData[i].orderdetails1['Delivery_List_RMB__c'];
                    tempData[i]["shipmentNumber"] = tempData[i].orderdetails1["Shipment_Count__c"];
                    tempData[i]["shippingUnitPrice"] = tempData[i].orderdetails1["Delivery_List_RMB__c"];
                    tempData[i]['recordId'] = tempData[i].Prod.Id;
                    tempData[i]['Id'] = tempData[i].Prod.Id;
                    tempData[i]['Name__c'] = tempData[i].Prod.Name__c;
                    tempData[i]['SFDA_Status__c'] =
                        tempData[i].Prod.SFDA_Status__c;
                    tempData[i]['Category3__c'] = tempData[i].Prod.Category3__c;
                    tempData[i]['Category4__c'] = tempData[i].Prod.Category4__c;
                    tempData[i]['Category5__c'] = tempData[i].Prod.Category5__c;
                    tempData[i]['Box_Piece__c'] =
                        tempData[i].orderdetails1.Box_Piece__c;
                    tempData[i]['shipmentAmount'] =
                        tempData[i].orderdetails1.Shipment_amount__c;
                    tempData[i]['Shipment_amount__c'] =
                        tempData[i].orderdetails1.Shipment_amount__c;
                    tempData[i]['Shipment_Count__c'] =
                        tempData[i].orderdetails1.Shipment_Count__c;
                    tempData[i]["recordId"] = tempData[i].Prod.Id;
                    tempData[i]["Id"] = tempData[i].Prod.Id;
                    tempData[i]["Name__c"] = tempData[i].Prod.Name__c;
                    tempData[i]["SFDA_Status__c"] = tempData[i].Prod.SFDA_Status__c;
                    tempData[i]["Category3__c"] = tempData[i].Prod.Category3__c;
                    tempData[i]["Category4__c"] = tempData[i].Prod.Category4__c;
                    tempData[i]["Category5__c"] = tempData[i].Prod.Category5__c;
                    tempData[i]["Box_Piece__c"] = tempData[i].orderdetails1.Box_Piece__c;
                    tempData[i]["shipmentAmount"] = tempData[i].orderdetails1.Shipment_amount__c;
                    tempData[i]["Shipment_amount__c"] = tempData[i].orderdetails1.Shipment_amount__c;
                    tempData[i]["Shipment_Count__c"] = tempData[i].orderdetails1.Shipment_Count__c;
                    if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
                        tempData[i]["shipmentAmount"] = this.amend(
                            tempData[i]["shipmentNumber"],
                            tempData[i]["shippingUnitPrice"],
                            "*"
                        );
                    if (tempData[i]['check']) {
                        this.selectedRows.push(tempData[i].Id);
                    }
                }
                // for (var i in tempData) {
                //     let unitOptions = [];
@@ -1349,87 +1244,80 @@
                //     console.log(
                //         "shippingUnitPrice = " + tempData[i]["shippingUnitPrice"]
                //     );
                //     if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
                //         tempData[i]["shipmentAmount"] = this.amend(
                //             tempData[i]["shipmentNumber"],
                //             tempData[i]["shippingUnitPrice"],
                //             "*"
                //         );
                // if (tempData[i]["shippingUnitPrice"] && tempData[i]["shipmentNumber"])
                //     tempData[i]["shipmentAmount"] = this.amend(
                //         tempData[i]["shipmentNumber"],
                //         tempData[i]["shippingUnitPrice"],
                //         "*"
                //     );
                // }
                this.data = tempData;
                console.log('this.data = ' + JSON.stringify(this.data));
                console.log("this.data = " + JSON.stringify(this.data));
                //this.showTable = true;
                this.isShowSpinner = false;
            } else {
                console.log('r = ' + JSON.stringify(r));
                this.showToast('Error', r.msg);
                console.log("r = " + JSON.stringify(r));
                this.showToast("Error", r.msg);
            }
        });
    }
    searchHospitalNameModal() {
        console.log('searchHospitalNameModal');
        console.log("searchHospitalNameModal");
        hospitalInit({
            ctype: this.agencyProType
            ctype: this.agencyProType,
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            if (r.status == 'Success') {
            if (r.status == "Success") {
                this.hospitalList = r.entity.at;
                for (var i in this.hospitalList) {
                    this.hospitalList[i]['stateMasterName'] =
                    this.hospitalList[i]["stateMasterName"] =
                        this.hospitalList[i].State_Master__r.Name;
                }
                console.log(
                    'hospitalInit r = ' + JSON.stringify(this.hospitalList)
                );
                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
                this.isModalOpen = true;
            }
        });
    }
    searchHospital() {
        console.log('this.searchHospitalName = ' + this.searchHospitalName);
        console.log("this.searchHospitalName = " + this.searchHospitalName);
        serContact({
            searchName: this.searchHospitalName,
            ctype: this.agencyProType
            ctype: this.agencyProType,
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            if (r.status == 'Success') {
            if (r.status == "Success") {
                this.hospitalList = r.entity.at;
                for (var i in this.hospitalList) {
                    this.hospitalList[i]['stateMasterName'] =
                    this.hospitalList[i]["stateMasterName"] =
                        this.hospitalList[i].State_Master__r.Name;
                }
                console.log(
                    'hospitalInit r = ' + JSON.stringify(this.hospitalList)
                );
                console.log("hospitalInit r = " + JSON.stringify(this.hospitalList));
            }
        });
    }
    searchHandleRowAction(event) {
        console.log('searchHandleRowAction');
        console.log("searchHandleRowAction");
        let row = event.detail.row;
        this.OECId = row.Id;
        this.HospitalName = row.Name;
        console.log(
            'this.OECId = ' +
                this.OECId +
                ' this.HospitalName = ' +
                this.HospitalName
            "this.OECId = " + this.OECId + " this.HospitalName = " + this.HospitalName
        );
        this.isModalOpen = false;
        console.log('this.isModalOpen = ' + this.isModalOpen);
        console.log("this.isModalOpen = " + this.isModalOpen);
    }
    clearAgencyI(event) {
        this.HospitalName = event.target.value;
        if (this.HospitalName == '' || this.HospitalName == null) {
            this.OECId = '';
        if (this.HospitalName == "" || this.HospitalName == null) {
            this.OECId = "";
        }
        console.log('this.HospitalName = ' + this.HospitalName);
        console.log('this.OECId = ' + this.OECId);
        if (this.OECId != null && this.OECId != '') {
        console.log("this.HospitalName = " + this.HospitalName);
        console.log("this.OECId = " + this.OECId);
        if (this.OECId != null && this.OECId != "") {
            this.checkOutPattern();
        }
    }
@@ -1446,9 +1334,9 @@
            }
        }
        if (ishos > 0) {
            this.cocLwc['OutPattern__c'] = true;
            this.cocLwc["OutPattern__c"] = true;
        } else {
            this.cocLwc['OutPattern__c'] = false;
            this.cocLwc["OutPattern__c"] = false;
        }
    }
@@ -1457,31 +1345,28 @@
    }
    handleUnitChange(event) {
        console.log('handleUnitChange');
        console.log("handleUnitChange");
        const unitDetail = event.detail;
        console.log('unitDetail = ' + JSON.stringify(unitDetail));
        console.log("unitDetail = " + JSON.stringify(unitDetail));
        for (var i in this.data) {
            if (this.data[i].recordId == unitDetail.data.recordId) {
                this.data[i].unitValue = unitDetail.data.unitValue;
                this.data[i].orderdetails1['Box_Piece__c'] =
                    unitDetail.data.unitValue;
                this.data[i].orderdetails1["Box_Piece__c"] = unitDetail.data.unitValue;
            }
        }
        console.log('this.data = ' + JSON.stringify(this.data));
        console.log("this.data = " + JSON.stringify(this.data));
    }
    handleShipmentNumber(event) {
        console.log('handleShipmentNumber');
        console.log("handleShipmentNumber");
        const numberDetail = event.detail;
        console.log('numberDetail = ' + JSON.stringify(numberDetail));
        console.log("numberDetail = " + JSON.stringify(numberDetail));
        let index = 0;
        for (var i in this.data) {
            if (this.data[i].recordId == numberDetail.data.recordId) {
                index = i;
                this.data[i].shipmentNumber = Number(
                    numberDetail.data.shipmentnumber
                );
                this.data[i].orderdetails1['Shipment_Count__c'] = Number(
                this.data[i].shipmentNumber = Number(numberDetail.data.shipmentnumber);
                this.data[i].orderdetails1["Shipment_Count__c"] = Number(
                    numberDetail.data.shipmentnumber
                );
            }
@@ -1494,7 +1379,7 @@
    }
    handleShipmentUnitPrice(event) {
        console.log('handleShipmentUnitPrice');
        console.log("handleShipmentUnitPrice");
        const priceDetail = event.detail;
        let index = 0;
        for (var i in this.data) {
@@ -1503,7 +1388,7 @@
                this.data[i].shippingUnitPrice = Number(
                    priceDetail.data.shipmentunitprice
                );
                this.data[i].orderdetails1['Delivery_List_RMB__c'] = Number(
                this.data[i].orderdetails1["Delivery_List_RMB__c"] = Number(
                    priceDetail.data.shipmentunitprice
                );
            }
@@ -1516,18 +1401,17 @@
    }
    ComputePrice(index, number, price) {
        console.log('index = ' + index);
        console.log('number = ' + number);
        console.log('price = ' + price);
        let shipmentAmount = this.amend(number, price, '*');
        console.log('shipmentAmount = ' + shipmentAmount);
        console.log("index = " + index);
        console.log("number = " + number);
        console.log("price = " + price);
        let shipmentAmount = this.amend(number, price, "*");
        console.log("shipmentAmount = " + shipmentAmount);
        let sumPrice = 0.0;
        this.data[index].shipmentAmount = shipmentAmount;
        for (var i in this.data) {
            if (this.data[i].shipmentAmount)
                sumPrice += this.data[i].shipmentAmount;
            if (this.data[i].shipmentAmount) sumPrice += this.data[i].shipmentAmount;
        }
        this.sumPrice = sumPrice + '元';
        this.sumPrice = sumPrice.toFixed(2) + "元";
        //存下选择行,不会被清空
        if (this.selectedRows.indexOf(this.data[index].Id) == -1)
            this.selectedRows.push(this.data[index].Id);
@@ -1538,9 +1422,9 @@
        //     }
        // }
        this.data = [...this.data];
        this.selectedRows = [...this.selectedRows];
        console.log('this.selectedRows = ' + JSON.stringify(this.selectedRows));
        console.log('this.data = ' + JSON.stringify(this.data));
        this.selectedRows = [...this.selectedRows]
        console.log("this.selectedRows = " + JSON.stringify(this.selectedRows));
        console.log("this.data = " + JSON.stringify(this.data));
    }
    //num1 num2传入两个值  symbol +-*/符号
@@ -1552,12 +1436,12 @@
            str2Length;
        //解决整数没有小数点方法
        try {
            str1Length = str1.split('.')[1].length;
            str1Length = str1.split(".")[1].length;
        } catch (error) {
            str1Length = 0;
        }
        try {
            str2Length = str2.split('.')[1].length;
            str2Length = str2.split(".")[1].length;
        } catch (error) {
            str2Length = 0;
        }
@@ -1565,16 +1449,16 @@
        //
        console.log(step);
        switch (symbol) {
            case '+':
            case "+":
                result = (num1 * step + num2 * step) / step;
                break;
            case '-':
            case "-":
                result = (num1 * step - num2 * step) / step;
                break;
            case '*':
            case "*":
                result = (num1 * step * (num2 * step)) / step / step;
                break;
            case '/':
            case "/":
                result = (num1 * step) / (num2 * step);
                break;
            default:
@@ -1584,6 +1468,11 @@
    }
    getSelectedRows(event) {
        let selectedRowsEvent = event.detail.selectedRows;
        this.selectedRows = [];
        for (var i in selectedRowsEvent) {
            this.selectedRows.push(selectedRowsEvent[i].Id)
        }
        // const selectedRows = event.detail.selectedRows;
        // console.log("this.selectedRows = " + this.selectedRows);
        // for (var i in this.data) {
@@ -1599,8 +1488,8 @@
    }
    saveConfirmJs() {
        let msg = '出库价格仅可操作一次变更,保存后将无法修改。\n\n请确认!';
        if (this.SummonsStatus == '价格未定') {
        let msg = "出库价格仅可操作一次变更,保存后将无法修改。\n\n请确认!";
        if (this.SummonsStatus == "价格未定") {
            if (confirm(msg) == true) {
                this.saveConfirm();
            }
@@ -1613,44 +1502,42 @@
        this.isShowSpinner = true;
        //查询有哪些选择了的然后check
        const selectedRows = this.template
            .querySelector('c-lex-custom-lightning-datatable')
            .getSelectedRows();
        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
        console.log('selectedRows = ' + selectedRows);
        for (var i in this.data) {
            this.data[i]['check'] = false;
            this.data[i]["check"] = false;
        }
        for (var i in this.data) {
            for (var j in selectedRows) {
                if (this.data[i].Id == selectedRows[j].Id) {
                    this.data[i]['check'] = true;
                    this.data[i]["check"] = true;
                }
            }
        }
        let cloneData = this.data;
        for (var i in cloneData) {
            cloneData[i]['Name'] = cloneData[i].Name__c;
            cloneData[i]['Category3'] = cloneData[i].Category3__c;
            cloneData[i]['Category4'] = cloneData[i].Category4__c;
            cloneData[i]['Category5'] = cloneData[i].Category5__c;
            cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
            cloneData[i]["Name"] = cloneData[i].Name__c;
            cloneData[i]["Category3"] = cloneData[i].Category3__c;
            cloneData[i]["Category4"] = cloneData[i].Category4__c;
            cloneData[i]["Category5"] = cloneData[i].Category5__c;
            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
            delete cloneData[i].Name__c;
            delete cloneData[i].Category3__c;
            delete cloneData[i].Category4__c;
            delete cloneData[i].Category5__c;
            delete cloneData[i].Box_Piece__c;
        }
        console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
        console.log('this.OECId = ' + this.OECId);
        console.log('this.HospitalName = ' + this.HospitalName);
        console.log('this.secondaryDistributor = ' + this.secondaryDistributor);
        console.log('this.pageRecordsLwc = ' + JSON.stringify(cloneData));
        console.log('this.accountid = ' + this.accountid);
        console.log('this.ESetid = ' + this.ESetid);
        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
        console.log("this.OECId = " + this.OECId);
        console.log("this.HospitalName = " + this.HospitalName);
        console.log("this.secondaryDistributor = " + this.secondaryDistributor);
        console.log("this.pageRecordsLwc = " + JSON.stringify(cloneData));
        console.log("this.accountid = " + this.accountid);
        console.log("this.ESetid = " + this.ESetid);
        console.log(
            'this.consumableproductdetailsRecords = ' +
                JSON.stringify(this.consumableproductdetailsRecords)
            "this.consumableproductdetailsRecords = " +
            JSON.stringify(this.consumableproductdetailsRecords)
        );
        save({
            cocLwc: this.cocLwc,
@@ -1660,81 +1547,79 @@
            pageRecordsLwc: cloneData,
            accountidLwc: this.accountid,
            ESetIdLwc: this.ESetid,
            consumableproductdetailsRecordsLwc:
                this.consumableproductdetailsRecords,
            consumableproductdetailsRecordsLwc: this.consumableproductdetailsRecords,
            agencyProTypeLwc: this.agencyProType,
            userWorkLocationLwc: this.userWorkLocation
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                debugger;
                if (r.status == 'Success') {
                    let url = '/lexsummonscreat?ESetid=' + r.entity.ESetId;
                    this[NavigationMixin.Navigate]({
                        type: 'standard__webPage',
                        attributes: {
                            url: url
                        }
                    });
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error));
            });
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log("r = " + JSON.stringify(r));
            debugger
            if (r.status == "Success") {
                let url = "/lexsummonscreat?ESetid=" + r.entity.ESetId;
                this[NavigationMixin.Navigate]({
                    type: "standard__webPage",
                    attributes: {
                        url: url,
                    },
                });
            } else {
                console.log("r.msg = " + r.msg);
                this.showToast("Error", r.msg);
            }
        }).catch((error) => {
            console.log("error = " + JSON.stringify(error));
        });
    }
    //打印指示单
    PraseToPDFJs() {
        console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
        console.log('this.ESetId = ' + this.ESetid);
        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
        console.log("this.ESetId = " + this.ESetid);
        PraseToPDF({
            cocLwc: this.cocLwc,
            ESetId: this.ESetid
            ESetId: this.ESetid,
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log('r = ' + JSON.stringify(r));
            if (r.status == 'Success') {
                window.open('/customer/summonsPDF?ESetid=' + r.entity.ESetId);
            console.log("r = " + JSON.stringify(r));
            if (r.status == "Success") {
                window.open("/customer/summonsPDF?ESetid=" + r.entity.ESetId);
            } else {
                console.log('r.msg = ' + r.msg);
                this.showToast('Error', r.msg);
                console.log("r.msg = " + r.msg);
                this.showToast("Error", r.msg);
            }
        });
    }
    //显示明细
    openReportJs() {
        console.log('openReportJs');
        console.log("openReportJs");
        var reportId = this.ESetid;
        reportId = reportId.substring(0, 15);
        let url = '/report/00O100000058VzB?fv1=' + reportId;
        console.log('url = ' + url);
        let reportFilters = '[{"operator":"equals","value":"' + reportId + '","column":"FK_CUSTENT_ID"}]';
        let url = "/report/00O0l000000zZtpEAE?reportFilters=" + encodeURIComponent(reportFilters);
        console.log("url = " + url);
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            type: "standard__webPage",
            attributes: {
                url: url
            }
                url: url,
            },
        });
    }
    vpClear2Delay(event) {
        console.log('vpClear2Delay');
        if (this.summonsForDirction != '互相调货') {
            this.cocLwc['Order_ForDealerText__c'] = event.target.value;
            console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
        console.log("vpClear2Delay");
        if (this.summonsForDirction != "互相调货") {
            this.cocLwc["Order_ForDealerText__c"] = event.target.value;
            console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
        } else {
            //console.log('Order_ForDealerTextID__c = ' + this.cocLwc['Order_ForDealerTextID__c'])
            this.cocLwc['Order_ForDealerText__c'] =
                this.cocLwc['Order_ForDealerTextID__c'] == '' ||
                this.cocLwc['Order_ForDealerTextID__c'] == null ||
                this.cocLwc['Order_ForDealerTextID__c'] == undefined
                    ? ''
                    : this.cocLwc['Order_ForDealerText__c'];
            console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
            this.cocLwc["Order_ForDealerText__c"] =
                this.cocLwc["Order_ForDealerTextID__c"] == "" ||
                    this.cocLwc["Order_ForDealerTextID__c"] == null ||
                    this.cocLwc["Order_ForDealerTextID__c"] == undefined
                    ? ""
                    : this.cocLwc["Order_ForDealerText__c"];
            console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
            // console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
            // this.ForDealerText = this.cocLwc['Order_ForDealerText__c'];
            // event.target.value = this.cocLwc['Order_ForDealerText__c'];
@@ -1743,28 +1628,28 @@
    }
    handleSearch(event) {
        const lookupElement = event.target;
        console.log('event.detail = ' + JSON.stringify(event.detail));
        console.log("event.detail = " + JSON.stringify(event.detail));
        apexSearch({
            searchTerm: event.detail.searchTerm
            searchTerm: event.detail.searchTerm,
        })
            .then((results) => {
                lookupElement.setSearchResults(results);
            })
            .catch((error) => {
                console.log('error' + JSON.stringify(error));
                console.log("error" + JSON.stringify(error));
            });
    }
    handleSelectionChange(event) {
        const selection = event.target.getSelection();
        console.log('selection = ' + JSON.stringify(selection));
        this.cocLwc['Order_ForDealerTextID__c'] = selection[0].id;
        this.cocLwc['Order_ForDealerText__c'] = selection[0].title;
        console.log('this.cocLwc = ' + JSON.stringify(this.cocLwc));
        console.log("selection = " + JSON.stringify(selection));
        this.cocLwc["Order_ForDealerTextID__c"] = selection[0].id;
        this.cocLwc["Order_ForDealerText__c"] = selection[0].title;
        console.log("this.cocLwc = " + JSON.stringify(this.cocLwc));
    }
    handleFilesChange(event) {
        console.log('handleFilesChange');
        console.log("handleFilesChange");
        if (event.target.files.length > 0) {
            this.filesUploaded = event.target.files;
            this.fileName = event.target.files[0].name;
@@ -1772,11 +1657,11 @@
    }
    handleSave() {
        console.log('saveFile');
        console.log("saveFile");
        if (this.filesUploaded.length > 0) {
            this.file = this.filesUploaded[0];
            if (this.file.size > this.MAX_FILE_SIZE) {
                this.showToast('Error', '文件过大');
                this.showToast("Error", "文件过大");
                return;
            }
            this.showPopSpinner = true;
@@ -1784,62 +1669,60 @@
            this.fileReader.onloadend = () => {
                this.fileContents = this.fileReader.result;
                let base64 = 'base64,';
                this.content =
                    this.fileContents.indexOf(base64) + base64.length;
                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 = '选择一个文件上传';
            this.fileName = "选择一个文件上传";
        }
    }
    saveToFile() {
        console.log('saveToFile');
        console.log('base64Data = ' + encodeURIComponent(this.fileContents));
        console.log("saveToFile");
        console.log("base64Data = " + encodeURIComponent(this.fileContents));
        saveFile({
            recordId: this.ESetid,
            fileName: this.fileName,
            base64Data: encodeURIComponent(this.fileContents)
            base64Data: encodeURIComponent(this.fileContents),
        })
            .then((r) => {
                this.showPopSpinner = false;
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                console.log("r = " + JSON.stringify(r));
                this.closePop();
                this.showToast('Success', '上传成功');
                this.showToast("Success", "上传成功");
                this.getFiles();
            })
            .catch((error) => {
                this.showPopSpinner = false;
                console.log('error = ' + error.message);
                this.showToast('Error', '上传失败');
                console.log("error = " + error.message);
                this.showToast("Error", "上传失败");
            });
    }
    getFiles() {
        console.log('getFiles');
        console.log("getFiles");
        this.showLoadingSpinner = true;
        getFiles({
            recordId: this.ESetid
            recordId: this.ESetid,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                console.log("r = " + JSON.stringify(r));
                this.fileData = r.entity.cvList;
                for (var i in this.fileData) {
                    this.fileData[i]['CreatedByName'] =
                        this.fileData[i].CreatedBy.Name;
                    this.fileData[i]['url'] = '/' + this.fileData[i].Id;
                    this.fileData[i]["CreatedByName"] = this.fileData[i].CreatedBy.Name;
                    this.fileData[i]["url"] = "/" + this.fileData[i].Id;
                }
                console.log('this.fileData = ' + this.fileData);
                console.log("this.fileData = " + this.fileData);
                this.showLoadingSpinner = false;
            })
            .catch((error) => {
                console.log('error = ' + error.message);
                this.showToast('Error', '获取附件失败');
                console.log("error = " + error.message);
                this.showToast("Error", "获取附件失败");
            });
    }
@@ -1847,100 +1730,93 @@
        this.isShowSpinner = true;
        //查询有哪些选择了的然后check
        const selectedRows = this.template
            .querySelector('c-lex-custom-lightning-datatable')
            .getSelectedRows();
        const selectedRows = this.template.querySelector('c-lex-custom-lightning-datatable').getSelectedRows();
        console.log('selectedRows = ' + selectedRows);
        for (var i in this.data) {
            this.data[i]['check'] = false;
            this.data[i]["check"] = false;
        }
        for (var i in this.data) {
            for (var j in selectedRows) {
                if (this.data[i].Id == selectedRows[j].Id) {
                    this.data[i]['check'] = true;
                    this.data[i]["check"] = true;
                }
            }
        }
        let cloneData = this.data;
        for (var i in cloneData) {
            cloneData[i]['Name'] = cloneData[i].Name__c;
            cloneData[i]['Category3'] = cloneData[i].Category3__c;
            cloneData[i]['Category4'] = cloneData[i].Category4__c;
            cloneData[i]['Category5'] = cloneData[i].Category5__c;
            cloneData[i]['BoxPiece'] = cloneData[i].Box_Piece__c;
            cloneData[i]["Name"] = cloneData[i].Name__c;
            cloneData[i]["Category3"] = cloneData[i].Category3__c;
            cloneData[i]["Category4"] = cloneData[i].Category4__c;
            cloneData[i]["Category5"] = cloneData[i].Category5__c;
            cloneData[i]["BoxPiece"] = cloneData[i].Box_Piece__c;
            delete cloneData[i].Name__c;
            delete cloneData[i].Category3__c;
            delete cloneData[i].Category4__c;
            delete cloneData[i].Category5__c;
            delete cloneData[i].Box_Piece__c;
        }
        console.log('cloneData = ' + JSON.stringify(cloneData));
        console.log("cloneData = " + JSON.stringify(cloneData));
        GoodsDelivery({
            cocLwc: this.cocLwc,
            ESetId: this.ESetid,
            pageRecordsLwcLwc: cloneData
            pageRecordsLwcLwc: cloneData,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                console.log("r = " + JSON.stringify(r));
                if (r.status == "Success") {
                    console.log(
                        'Summons_Order_type__c = ' +
                            this.cocLwc['Summons_Order_type__c']
                        "Summons_Order_type__c = " + this.cocLwc["Summons_Order_type__c"]
                    );
                    this.isSales =
                        this.cocLwc['Summons_Order_type__c'] == '销售'
                            ? true
                            : false;
                        this.cocLwc["Summons_Order_type__c"] == "销售" ? true : false;
                    this.GoodsDeliveryInit();
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                    console.log("r.msg = " + r.msg);
                    this.showToast("Error", r.msg);
                }
                this.isShippingSales = true;
            })
            .catch((error) => {
                console.log('error = ' + error.message);
                this.showToast('Error', '跳转失败');
                console.log("error = " + error.message);
                this.showToast("Error", "跳转失败");
            });
    }
    GoodsDeliveryInit() {
        console.log('GoodsDeliveryInit');
        console.log("GoodsDeliveryInit");
        GoodsDeliveryInit({
            ESetId: this.ESetid
            ESetId: this.ESetid,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                console.log("r = " + JSON.stringify(r));
                if (r.status == "Success") {
                    this.salesCoc = r.entity.coc;
                    this.salesAccountName = r.entity.accountName;
                    this.salesUserWorkLocation = r.entity.userWorkLocation;
                    this.salesAccountid = r.entity.accountid;
                    this.salesOrderdetails = r.entity.orderdetails;
                    this.salesData = r.entity.consumableorderdetailsRecords;
                    this.salesErrorData =
                        r.entity.consumableorderdetailsRecordserror;
                    this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
                    this.salesOrderpieceorboxMap = r.entity.orderpieceorboxMap;
                    this.salesOrderpriceMap = r.entity.orderpriceMap;
                    this.salesOrderagencypriceMap =
                        r.entity.orderagencypriceMap;
                    this.salesOrderagencypriceMap = r.entity.orderagencypriceMap;
                    this.isShowSpinner = false;
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                    console.log("r.msg = " + r.msg);
                    this.showToast("Error", r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + error.message);
                this.showToast('Error', '初始化失败');
                console.log("error = " + error.message);
                this.showToast("Error", "初始化失败");
            });
    }
    SalesearchProductJs() {
        console.log('this.Barcode = ' + this.Barcode);
        console.log("this.Barcode = " + this.Barcode);
        this.isShowSpinner = true;
        SearchPro({
            cocLwc: this.salesCoc,
@@ -1949,65 +1825,55 @@
            userWorkLocation: this.salesUserWorkLocation,
            accountid: this.salesAccountid,
            orderdetails: this.salesOrderdetails,
            orderpieceorboxMap: this.salesOrderpieceorboxMap
            orderpieceorboxMap: this.salesOrderpieceorboxMap,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    console.log('SearchPro success');
                    this.salesErrorData =
                        r.entity.consumableorderdetailsRecordserror;
                console.log("r = " + JSON.stringify(r));
                if (r.status == "Success") {
                    console.log("SearchPro success");
                    this.salesErrorData = r.entity.consumableorderdetailsRecordserror;
                    this.salesData = r.entity.consumableorderdetailsRecords;
                    for (var i in this.salesErrorData) {
                        this.salesErrorData[i]['Consumable_order_minor__c'] =
                            this.salesErrorData[
                                i
                            ].orderdetails2.Consumable_order_minor__c;
                        this.salesErrorData[i]['orderdetails2Name'] =
                        this.salesErrorData[i]["Consumable_order_minor__c"] =
                            this.salesErrorData[i].orderdetails2.Consumable_order_minor__c;
                        this.salesErrorData[i]["orderdetails2Name"] =
                            this.salesErrorData[i].orderdetails2.Name;
                        this.salesErrorData[i]['ProdName'] =
                        this.salesErrorData[i]["ProdName"] =
                            this.salesErrorData[i].Prod.Name;
                        this.salesErrorData[i]['Box_Piece__c'] =
                        this.salesErrorData[i]["Box_Piece__c"] =
                            this.salesErrorData[i].orderdetails2.Box_Piece__c;
                        this.salesErrorData[i]['Bar_Code__c'] =
                        this.salesErrorData[i]["Bar_Code__c"] =
                            this.salesErrorData[i].orderdetails2.Bar_Code__c;
                        this.salesErrorData[i]['Sterilization_limit__c'] =
                            this.salesErrorData[
                                i
                            ].orderdetails2.Sterilization_limit__c;
                        this.salesErrorData[i]["Sterilization_limit__c"] =
                            this.salesErrorData[i].orderdetails2.Sterilization_limit__c;
                    }
                    for (var i in this.salesData) {
                        this.salesData[i]['Consumable_order_minor__c'] =
                            this.salesData[
                                i
                            ].orderdetails2.Consumable_order_minor__c;
                        this.salesData[i]['orderdetails2Name'] =
                        this.salesData[i]["Consumable_order_minor__c"] =
                            this.salesData[i].orderdetails2.Consumable_order_minor__c;
                        this.salesData[i]["orderdetails2Name"] =
                            this.salesData[i].orderdetails2.Name;
                        this.salesData[i]['orderdetails2NameUrl'] =
                            '/' + this.salesData[i].orderdetails2.Id;
                        this.salesData[i]['Box_Piece__c'] =
                        this.salesData[i]["orderdetails2NameUrl"] =
                            "/" + this.salesData[i].orderdetails2.Id;
                        this.salesData[i]["Box_Piece__c"] =
                            this.salesData[i].orderdetails2.Box_Piece__c;
                        this.salesData[i]['ProdName'] =
                            this.salesData[i].Prod.Name;
                        this.salesData[i]['Deliver_date__c'] =
                        this.salesData[i]["ProdName"] = this.salesData[i].Prod.Name;
                        this.salesData[i]["Deliver_date__c"] =
                            this.salesData[i].orderdetails2.Deliver_date__c;
                        this.salesData[i]['Bar_Code__c'] =
                        this.salesData[i]["Bar_Code__c"] =
                            this.salesData[i].orderdetails2.Bar_Code__c;
                        this.salesData[i]['Sterilization_limit__c'] =
                            this.salesData[
                                i
                            ].orderdetails2.Sterilization_limit__c;
                        this.salesData[i]["Sterilization_limit__c"] =
                            this.salesData[i].orderdetails2.Sterilization_limit__c;
                    }
                    this.isShowSpinner = false;
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                    console.log("r.msg = " + r.msg);
                    this.showToast("Error", r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error.message));
                this.showToast('Error', '初始化失败');
                console.log("error = " + JSON.stringify(error.message));
                this.showToast("Error", "初始化失败");
            });
    }
@@ -2022,7 +1888,7 @@
            delete cloneSalesData[i].Deliver_date__c;
            delete cloneSalesData[i].Bar_Code__c;
            delete cloneSalesData[i].Sterilization_limit__c;
            cloneSalesData[i]['ErrorReason'] = '';
            cloneSalesData[i]["ErrorReason"] = "";
        }
        this.isShowSpinner = true;
        ProSale({
@@ -2034,28 +1900,28 @@
            consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
            orderdetails: this.salesOrderdetails,
            orderpriceMap: this.salesOrderpriceMap,
            orderagencypriceMap: this.salesOrderagencypriceMap
            orderagencypriceMap: this.salesOrderagencypriceMap,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    console.log('ProdElivery success');
                console.log("r = " + JSON.stringify(r));
                if (r.status == "Success") {
                    console.log("ProdElivery success");
                    this.isShowSpinner = false;
                    this[NavigationMixin.Navigate]({
                        type: 'standard__webPage',
                        type: "standard__webPage",
                        attributes: {
                            url: '/lexsaleanddelivery'
                        }
                            url: "/lexsaleanddelivery",
                        },
                    });
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                    console.log("r.msg = " + r.msg);
                    this.showToast("Error", r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error.message));
                this.showToast('Error', 'ProSale2失败');
                console.log("error = " + JSON.stringify(error.message));
                this.showToast("Error", "ProSale2失败");
            });
    }
@@ -2070,7 +1936,7 @@
            delete cloneSalesData[i].Deliver_date__c;
            delete cloneSalesData[i].Bar_Code__c;
            delete cloneSalesData[i].Sterilization_limit__c;
            cloneSalesData[i]['ErrorReason'] = '';
            cloneSalesData[i]["ErrorReason"] = "";
        }
        this.isShowSpinner = true;
        ProdElivery({
@@ -2082,28 +1948,28 @@
            consumableorderdetailsRecordsLwc: JSON.stringify(cloneSalesData),
            orderdetails: this.salesOrderdetails,
            orderpriceMap: this.salesOrderpriceMap,
            orderagencypriceMap: this.salesOrderagencypriceMap
            orderagencypriceMap: this.salesOrderagencypriceMap,
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    console.log('ProdElivery success');
                console.log("r = " + JSON.stringify(r));
                if (r.status == "Success") {
                    console.log("ProdElivery success");
                    this.isShowSpinner = false;
                    this[NavigationMixin.Navigate]({
                        type: 'standard__webPage',
                        type: "standard__webPage",
                        attributes: {
                            url: '/lexsaleanddelivery'
                        }
                            url: "/lexsaleanddelivery",
                        },
                    });
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                    console.log("r.msg = " + r.msg);
                    this.showToast("Error", r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + JSON.stringify(error.message));
                this.showToast('Error', '初始化失败');
                console.log("error = " + JSON.stringify(error.message));
                this.showToast("Error", "初始化失败");
            });
    }
@@ -2112,23 +1978,15 @@
        let url = '';
        console.log('this.invoiceId = ' + this.invoiceId);
        if (this.invoiceId.length > 0 && this.invoiceId != '000000000000000') {
            url =
                '/lexconinvoiceview?deliveryId=' +
                this.ESetid +
                '&invoiceId=' +
                this.invoiceId +
                '&KeyWords=Redirect';
            url = "/lexconinvoiceview?deliveryId=" + this.ESetid + "&invoiceId=" + this.invoiceId + "&KeyWords=Redirect";
        } else {
            url =
                '/lexconinvoiceview?deliveryId=' +
                this.ESetid +
                '&KeyWords=Redirect';
            url = "/lexconinvoiceview?deliveryId=" + this.ESetid + "&KeyWords=Redirect";
        }
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            type: "standard__webPage",
            attributes: {
                url: url
            }
                url: url,
            },
        });
    }
@@ -2136,32 +1994,30 @@
    DeleteConsumable() {
        this.isShowSpinner = true;
        DelConsumable({
            ESetId: this.ESetid
        })
            .then((r) => {
                r = JSON.parse(JSON.stringify(r));
                console.log('r = ' + JSON.stringify(r));
                if (r.status == 'Success') {
                    let url = '/lexsaleanddelivery';
                    this[NavigationMixin.Navigate]({
                        type: 'standard__webPage',
                        attributes: {
                            url: url
                        }
                    });
                } else {
                    console.log('r.msg = ' + r.msg);
                    this.showToast('Error', r.msg);
                }
            })
            .catch((error) => {
                console.log('error = ' + error.message);
                this.showToast('Error', '跳转失败');
            });
            ESetId: this.ESetid,
        }).then((r) => {
            r = JSON.parse(JSON.stringify(r));
            console.log("r = " + JSON.stringify(r));
            if (r.status == "Success") {
                let url = "/lexsaleanddelivery";
                this[NavigationMixin.Navigate]({
                    type: "standard__webPage",
                    attributes: {
                        url: url,
                    },
                });
            } else {
                console.log("r.msg = " + r.msg);
                this.showToast("Error", r.msg);
            }
        }).catch((error) => {
            console.log("error = " + error.message);
            this.showToast("Error", "跳转失败");
        });
    }
    handleLoad() {
        console.log('handleLoad');
        console.log('handleLoad')
        try {
            const style = document.createElement('style');
            style.innerText = '.slds-button__icon {display: none;}';
@@ -2172,15 +2028,14 @@
    }
    handleLoad2() {
        console.log('handleLoad2');
        console.log('handleLoad2')
        try {
            const style = document.createElement('style');
            style.innerText = '.slds-button__icon {display: none;}';
            this.template.querySelector('.hideHelpText').appendChild(style);
            const style2 = document.createElement('style');
            style2.innerText =
                '.hehe-layoutItem  .slds-form-element__label {padding : 0px}';
            style2.innerText = '.hehe-layoutItem  .slds-form-element__label {padding : 0px}';
            this.template.querySelector('.hideHelpText').appendChild(style2);
        } catch (error) {
            console.log(error);
@@ -2188,13 +2043,12 @@
    }
    //编辑出库单
    EditConsumable() {
        let url =
            '/lexsummonscreat?ESetid=' + this.ESetid + '&KeyWords=Redirect';
        let url = "/lexsummonscreat?ESetid=" + this.ESetid + "&KeyWords=Redirect";
        this[NavigationMixin.Navigate]({
            type: 'standard__webPage',
            type: "standard__webPage",
            attributes: {
                url: url
            }
                url: url,
            },
        });
    }
@@ -2214,11 +2068,7 @@
    //是否显示附件移除
    get attDelBtn() {
        if (
            this.fileName != '' &&
            this.fileName != null &&
            this.fileName != '请选择一个文件上传'
        ) {
        if (this.fileName != '' && this.fileName != null && this.fileName != '请选择一个文件上传') {
            return true;
        } else {
            return false;
@@ -2245,4 +2095,4 @@
        this.Category5 = '';
        this.searchProductJs();
    }
}
}
manifest/packageForSign.xml
@@ -12,4 +12,4 @@
        <name>ApexClass</name>
    </types>
    <version>52.0</version>
</Package>
</Package>