binxie
2023-06-19 41625c74ad92b72151f4d1009ea0c791635d9dac
test
4个文件已添加
12个文件已修改
9775 ■■■■■ 已修改文件
.sf/config.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp 2058 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js 681 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js 5968 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/WeeklyReport/WeeklyReport.css 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls 215 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/LightningUtil.cls 739 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/MetaDataUtility.cls 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
force-app/main/default/classes/WeeklyReportCmp.cls 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest/package.xml 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.sf/config.json
@@ -1,3 +1,3 @@
{
  "target-org": "OlympusStageEnv"
  "target-org": "OlympusDev"
}
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.cmp
@@ -1,1289 +1,807 @@
<aura:component
  controller="RetrospectiveWeeklyReportController"
  implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens"
  access="global"
>
  <ltng:require styles="{!$Resource.multilineToastCSS}" /> 
  <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
  <aura:handler
    event="c:strike_evt"
    action="{!c.createAopp}"
    name="strike_evt_addNewRecord"
  />
  <aura:attribute
    name="data"
    type="Agency_Report__c"
    default="{sobjectType:'Agency_Report__c'}"
  />
  <aura:attribute
    name="oppdata"
    type="Agency_Opportunity__c"
    default="{sobjectType:'Agency_Opportunity__c'}"
  />
  <aura:attribute
    name="acondata"
    type="Agency_Contact__c"
    default="{sobjectType:'Ag
    ency_Contact__c'}"
  />
  <aura:attribute name="successMessage" type="String" />
  <aura:attribute name="etEng" type="String" />
  <aura:attribute name="errorMessage" type="String" />
  <aura:attribute name="Close_Forecasted_Date__c_o" type="Date" />
  <aura:attribute name="Amount__c_o" type="String" />
  <aura:attribute name="OCMSale_Price__c_o" type="String" />
  <aura:attribute name="StageName__c_o" type="String" />
  <aura:attribute name="fieldsmap" type="Map" />
  <aura:attribute name="AgencyReportMap" type="Boolean" default="false" />
  <!-- 日报分类 -->
<aura:component controller="RetrospectiveWeeklyReportController"
    implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction,forceCommunity:availableForAllPageTypes,lightning:availableForFlowScreens"
    access="global">
    <ltng:require styles="{!$Resource.multilineToastCSS}" /> 
    <aura:handler name="init" value="{!this}" action="{!c.doInit}" />
    <aura:handler event="c:strike_evt" action="{!c.createAopp}" name="strike_evt_addNewRecord" />
    <aura:attribute name="data" type="Agency_Report__c" default="{sobjectType:'Agency_Report__c'}" />
    <aura:attribute name="oppdata" type="Agency_Opportunity__c" default="{sobjectType:'Agency_Opportunity__c'}" />
    <aura:attribute name="acondata" type="Agency_Contact__c" default="{sobjectType:'Ag
    ency_Contact__c'}" />
    <aura:attribute name="successMessage" type="String" />
    <aura:attribute name="etEng" type="String" />
    <aura:attribute name="errorMessage" type="String" />
    <aura:attribute name="Close_Forecasted_Date__c_o" type="Date" />
    <aura:attribute name="Amount__c_o" type="String" />
    <aura:attribute name="OCMSale_Price__c_o" type="String" />
    <aura:attribute name="StageName__c_o" type="String" />
    <aura:attribute name="fieldsmap" type="Map" />
    <aura:attribute name="AgencyReportMap" type="Boolean" default="false" />
    <!-- 日报分类 -->
  <aura:attribute name="alldata" type="List" />
  <aura:attribute name="setdoctorlisthos" type="Boolean" default="false" />
  <aura:attribute name="allselectlist" type="Map" />
  <aura:attribute name="doclist" type="List" />
  <aura:attribute name="docmap" type="Map" />
  <aura:attribute name="login" type="Boolean" default="false" />
  <aura:attribute name="loadOpp" type="Boolean" default="false" />
  <aura:attribute name="reportPageData" type="Map" />
  <aura:attribute name="selectbody" type="String" />
  <aura:attribute name="report_date_list" type="Map" />
  <aura:attribute name="selected_date" type="String" />
  <aura:attribute name="selected_agency_person" type="String" />
  <aura:attribute name="agency_report_header" type="String" />
  <aura:attribute name="agency_report_header_id" type="String" />
  <aura:attribute name="result" type="String" default="" />
  <!-- //医院 点选需要    -->
  <aura:attribute name="hospital" type="string" default="" />
  <aura:attribute name="hospitalId" type="string" default="" />
  <aura:attribute name="hospitals" type="string" default="" />
  <aura:attribute name="hospitalLinkId" type="string" default="" />
  <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" />
  <aura:attribute name="hospitalList" type="Map" />
  <!-- 使用产品1(产品型号) -->
  <aura:attribute name="UseProduct1" type="string" default="" />
  <aura:attribute name="UseProduct1s" type="string" default="" />
  <aura:handler
    name="change"
    value="{!v.UseProduct1}"
    action="{!c.UseProduct1Change}"
  />
  <aura:attribute name="UseProduct1List" type="Map" />
  <aura:attribute name="UseProduct1Id" type="string" default="" />
  <!-- 使用产品2 -->
  <aura:attribute name="UseProduct2" type="string" default="" />
  <aura:attribute name="UseProduct2s" type="string" default="" />
  <aura:handler
    name="change"
    value="{!v.UseProduct2}"
    action="{!c.UseProduct2Change}"
  />
  <aura:attribute name="UseProduct2List" type="Map" />
  <aura:attribute name="UseProduct2Id" type="string" default="" />
  <!-- 使用产品3 -->
  <aura:attribute name="UseProduct3" type="string" default="" />
  <aura:attribute name="UseProduct3s" type="string" default="" />
  <aura:handler
    name="change"
    value="{!v.UseProduct3}"
    action="{!c.UseProduct3Change}"
  />
  <aura:attribute name="UseProduct3List" type="Map" />
  <aura:attribute name="UseProduct3Id" type="string" default="" />
  <!--SWAG-CF58C3 fy start -->
  <aura:attribute name="AWStoken" type="String" />
  <aura:attribute name="AWSsearch" type="String" />
  <aura:attribute name="AWSinsert" type="String" />
  <aura:attribute name="AWStransactionURL" type="String" />
  <aura:attribute name="AWSDoctor2Map" type="String" />
  <aura:attribute name="awsurl" type="Map" />
  <aura:attribute name="contactawsurl" type="Map" />
  <aura:attribute name="allselectlistAgencyPerson" type="Map" />
  <!--SWAG-CF58C3 fy end -->
    <aura:attribute name="alldata" type="List" />
    <aura:attribute name="setdoctorlisthos" type="Boolean" default="false" />
    <aura:attribute name="allselectlist" type="Map" />
    <aura:attribute name="doclist" type="List" />
    <aura:attribute name="docmap" type="Map" />
    <aura:attribute name="login" type="Boolean" default="false" />
    <aura:attribute name="loadOpp" type="Boolean" default="false" />
    <aura:attribute name="reportPageData" type="Map" />
    <aura:attribute name="selectbody" type="String" />
    <aura:attribute name="report_date_list" type="Map" />
    <aura:attribute name="selected_date" type="String" />
    <aura:attribute name="selected_agency_person" type="String" />
    <aura:attribute name="agency_report_header" type="String" />
    <aura:attribute name="agency_report_header_id" type="String" />
    <aura:attribute name="result" type="String" default="" />
    <!-- //医院 点选需要    -->
    <aura:attribute name="hospital" type="string" default="" />
    <aura:attribute name="hospitalId" type="string" default="" />
    <aura:attribute name="hospitals" type="string" default="" />
    <aura:attribute name="hospitalLinkId" type="string" default="" />
    <aura:handler name="change" value="{!v.hospital}" action="{!c.hosChange}" />
    <aura:attribute name="hospitalList" type="Map" />
    <!-- 使用产品1(产品型号) -->
    <aura:attribute name="UseProduct1" type="string" default="" />
    <aura:attribute name="UseProduct1s" type="string" default="" />
    <aura:handler name="change" value="{!v.UseProduct1}" action="{!c.UseProduct1Change}" />
    <aura:attribute name="UseProduct1List" type="Map" />
    <aura:attribute name="UseProduct1Id" type="string" default="" />
    <!-- 使用产品2 -->
    <aura:attribute name="UseProduct2" type="string" default="" />
    <aura:attribute name="UseProduct2s" type="string" default="" />
    <aura:handler name="change" value="{!v.UseProduct2}" action="{!c.UseProduct2Change}" />
    <aura:attribute name="UseProduct2List" type="Map" />
    <aura:attribute name="UseProduct2Id" type="string" default="" />
    <!-- 使用产品3 -->
    <aura:attribute name="UseProduct3" type="string" default="" />
    <aura:attribute name="UseProduct3s" type="string" default="" />
    <aura:handler name="change" value="{!v.UseProduct3}" action="{!c.UseProduct3Change}" />
    <aura:attribute name="UseProduct3List" type="Map" />
    <aura:attribute name="UseProduct3Id" type="string" default="" />
    <!--SWAG-CF58C3 fy start -->
    <aura:attribute name="AWStoken" type="String" />
    <aura:attribute name="AWSsearch" type="String" />
    <aura:attribute name="AWSinsert" type="String" />
    <aura:attribute name="AWStransactionURL" type="String" />
    <aura:attribute name="AWSDoctor2Map" type="String" />
    <aura:attribute name="awsurl" type="Map" />
    <aura:attribute name="contactawsurl" type="Map" />
    <aura:attribute name="allselectlistAgencyPerson" type="Map" />
    <!--SWAG-CF58C3 fy end -->
  <aura:attribute name="doctor_list" type="Map" />
  <!-- <aura:attribute name="doctor_title" type="String" /> -->
  <aura:attribute name="opportunity_list" type="Map" />
  <aura:attribute name="edit_copy_select_report_id" type="String" />
  <aura:attribute name="create_agency_report_id" type="String" />
  <aura:attribute name="reports" type="List" />
  <aura:attribute name="reports_now" type="List" />
  <aura:attribute name="reports_now_count" type="Integer" />
  <aura:attribute name="mode" type="String" />
  <aura:attribute name="select_report_data" type="Map" />
  <aura:attribute name="select_report_data_radio" type="Map" />
  <aura:attribute name="default_select_doctor_id" type="String" />
  <aura:attribute name="default_select_doctor_id2" type="String" />
  <aura:attribute name="default_select_opportunity_id" type="String" />
  <aura:attribute name="report_count" type="Integer" />
  <aura:attribute name="dialog_type" type="String" />
  <aura:attribute name="truthy" type="Boolean" default="false" />
  <aura:attribute name="list_message" type="String" default="搜索" />
  <aura:attribute name="confirm_status" type="Integer" default="0" />
  <aura:attribute name="modal_confirm_title" type="String" />
  <aura:attribute name="modal_confirm_text" type="String" />
  <!-- <aura:attribute name="new_falg" type="String" /> -->
  <!-- fy -->
  <aura:attribute name="UserProType" type="String" />
  <!-- 科室 -->
  <aura:attribute name="opportunity_cfilter" type="String" />
  <aura:attribute
    name="update_select_report_data_id"
    type="String"
    default=""
  />
  <!-- 批量添加日报 start-->
  <aura:attribute name="reports_date" type="List" />
  <aura:attribute
    name="TableContent"
    type="String"
    description=" Show the Result class"
  />
  <aura:attribute
    name="TableContent2"
    type="String"
    description=" Show the Result class"
  />
  <aura:attribute
    name="TargetFileName"
    type="String"
    description="Name of the file"
  />
  <aura:attribute name="tableheaders" type="Object[]" />
  <aura:attribute name="fileContentData" type="String" />
  <aura:attribute name="filename" type="String" />
  <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
  <aura:attribute name="showMain" type="Boolean" default="true" />
  <aura:attribute name="IsEventDefault" type="Boolean" default="true" />
  <!-- start DTT-zhj 增加错误信息table 2023-05-16-->
  <!-- Imports -->
  <!-- <aura:import library="lightningcomponentdemo:mockdataFaker" property="mockdataLibrary"/> -->
  <!-- attributes -->
  <aura:attribute name="errorData" type="Object" />
  <aura:attribute name="errorColumns" type="List" />
  <!-- show Error information -->
  <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
  <!-- end DTT-zhj 增加错误信息table 2023-05-16-->
  <aura:attribute name="PIConfig" type="Map" />
    <aura:attribute name="doctor_list" type="Map" />
    <!-- <aura:attribute name="doctor_title" type="String" /> -->
    <aura:attribute name="opportunity_list" type="Map" />
    <aura:attribute name="edit_copy_select_report_id" type="String" />
    <aura:attribute name="create_agency_report_id" type="String" />
    <aura:attribute name="reports" type="List" />
    <aura:attribute name="reports_now" type="List" />
    <aura:attribute name="reports_now_count" type="Integer" />
    <aura:attribute name="mode" type="String" />
    <aura:attribute name="select_report_data" type="Map" />
    <aura:attribute name="select_report_data_radio" type="Map" />
    <aura:attribute name="default_select_doctor_id" type="String" />
    <aura:attribute name="default_select_doctor_id2" type="String" />
    <aura:attribute name="default_select_opportunity_id" type="String" />
    <aura:attribute name="report_count" type="Integer" />
    <aura:attribute name="dialog_type" type="String" />
    <aura:attribute name="truthy" type="Boolean" default="false" />
    <aura:attribute name="list_message" type="String" default="搜索" />
    <aura:attribute name="confirm_status" type="Integer" default="0" />
    <aura:attribute name="modal_confirm_title" type="String" />
    <aura:attribute name="modal_confirm_text" type="String" />
    <!-- <aura:attribute name="new_falg" type="String" /> -->
    <!-- fy -->
    <aura:attribute name="UserProType" type="String" />
    <!-- 科室 -->
    <aura:attribute name="opportunity_cfilter" type="String" />
    <aura:attribute name="update_select_report_data_id" type="String" default="" />
    <!-- 批量添加日报 start-->
    <aura:attribute name="reports_date" type="List" />
    <aura:attribute name="TableContent" type="String" description=" Show the Result class" />
    <aura:attribute name="TableContent2" type="String" description=" Show the Result class" />
    <aura:attribute name="TargetFileName" type="String" description="Name of the file" />
    <aura:attribute name="tableheaders" type="Object[]" />
    <aura:attribute name="fileContentData" type="String" />
    <aura:attribute name="filename" type="String" />
    <aura:attribute name="NumOfRecords" type="Integer" default="1000" />
    <aura:attribute name="showMain" type="Boolean" default="true" />
    <aura:attribute name="IsEventDefault" type="Boolean" default="true" />
    <!-- start DTT-zhj 增加错误信息table 2023-05-16-->
    <aura:attribute name="errorData" type="Object" />
    <aura:attribute name="errorColumns" type="List" />
    <!-- show Error information -->
    <aura:attribute name="showErrorInfo" type="Boolean" default="false" />
    <!-- end DTT-zhj 增加错误信息table 2023-05-16-->
  <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
  <ltng:require scripts="{! $Resource.jquery183minjs }" />
    <aura:attribute name="PIConfig" type="Map" />
  <!-- 批量添加日报 end-->
  <!--ロード中...-->
  <aura:renderIf isTrue="{!v.login}">
    <div class="slds-spinner_container height100vh">
      <div
        class="slds-spinner--brand slds-spinner slds-spinner--medium"
        role="alert"
      >
        <span class="slds-assistive-text">Loading</span>
        <div class="slds-spinner__dot-a"></div>
        <div class="slds-spinner__dot-b"></div>
      </div>
    </div>
  </aura:renderIf>
  <div aura:id="report" id="report" class="contents_wrapper">
    <div class="slds-grid slds-wrap slds-grid--pull-padded">
      <div style="width: 200px"></div>
      <div
        class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
      >
        周
      </div>
      <div
        class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
      >
        <ui:inputSelect
          aura:id="select_date"
          class="slds-select"
          change="{!c.select_date_change}"
        />
      </div>
      <!-- 代理店担当者 -->
      <div
        class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
        style="display: none"
      >
        {!v.fieldsmap.Person_In_Charge2__c}
      </div>
      <div
        class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
        style="display: none"
      >
        <ui:inputSelect
          aura:id="select_agency_person"
          class="slds-select agency_person_select"
          change="{!c.select_agency_change}"
        />
      </div>
      <div style="width: 100px"></div>
      <div
        class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
        style="display: contents"
      >
        <ui:button aura:id="new_button" label="新建" press="{!c.new_report}" />
      </div>
      <div
        style="width: 350px"
        class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
      >
        <ui:button
          aura:id="copy_button"
          label="复制"
          press="{!c.copy_button}"
          disabled="true"
        />
        <ui:button
          aura:id="delete_button"
          label="删除"
          press="{!c.delete_button}"
          disabled="true"
        />
        <ui:button aura:id="import" label="导入" press="{!c.import}" />
        <ui:button
          aura:id="export"
          label="导出"
          press="{!c.export_condition}"
        />
        <ui:button
          aura:id="returnbutton"
          label="返回"
          press="{!c.return_main_page}"
        />
      </div>
    </div>
  </div>
  <div aura:id="report_list" class="report_list_area">
    <div
      class="slds-table--edit_container slds-is-relative"
      style="padding-left: 50px"
    >
      <table
        class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
        role="grid"
        style="width: 66.75rem"
      >
        <thead>
          <tr class="slds-line-height--reset">
            <th
              class="table_header slds-text-title--caps"
              style="width: 250px"
            ></th>
            <th class="table_header slds-text-title--caps">
              <span class="slds-truncate" title="Name"
                >{!v.fieldsmap.Person_In_Charge2__c}</span
              >
              <!-- {!v.fieldsmap.Person_In_Charge2__c}  担当-->
            </th>
            <th class="table_header slds-text-title--caps" style="width: 250px">
              <span class="slds-truncate" title="Name">医院</span>
            </th>
            <th class="table_header slds-text-title--caps">
              <span class="slds-truncate" title="Name"
                >{!v.fieldsmap.Department_Cateogy__c}</span
              >
              <!-- {!v.fieldsmap.Department_Cateogy__c}    科室-->
            </th>
            <th class="table_header slds-text-title--caps">
              <span class="slds-truncate" title="Name">拜访人</span>
              <!-- {!v.fieldsmap.doctor2__c}    拜访人 -->
            </th>
            <th class="table_header slds-text-title--caps">
              <span class="slds-truncate" title="Name"
                >{!v.fieldsmap.DealerPersonnel__c}</span
              >
              <!-- {!v.fieldsmap.visitor_title__c}   职位-->
            </th>
            <th class="table_header slds-text-title--caps">
              <span class="slds-truncate" title="Name"
                >{!v.fieldsmap.WorkMark__c}</span
              >
              <!-- {!v.fieldsmap.visitor_title__c}   职位-->
            </th>
          </tr>
        </thead>
        <tbody>
          <aura:iteration items="{!v.reports}" var="item" indexVar="index">
            <tr class="slds-hint-parent">
              <td role="gridcell" class="slds-cell-edit">
                <ui:inputRadio
                  class="report_radio"
                  name="report_radio"
                  label="{!item.Name}"
                  change="{!c.change_report_radio}"
                />
                <lightning:buttonIcon
                  class="edit_button"
                  iconName="utility:edit"
                  size="small"
                  alternativeText="edit"
                  value="{!index}"
                  onclick="{!c.edit_button}"
                />
              </td>
              <td role="gridcell" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  <span
                    class="slds-truncate"
                    title="{!item.Person_In_Charge2__r.Name}"
                    >{!item.Person_In_Charge2__r.Name}</span
                  >
                </span>
              </td>
              <th scope="row" tabindex="0" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  {!item.Agency_Hospital__r.Name}
                </span>
              </th>
              <td role="gridcell" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  <span
                    class="slds-truncate"
                    title="{!item.Department_Cateogy_text__c}"
                    >{!item.Department_Cateogy_text__c}</span
                  >
                </span>
              </td>
              <td role="gridcell" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  <span class="slds-truncate" title="{!item.doctor2__r.Name}">
                    <span class="encrypt">{!item.doctor2__r.Name}</span>
                    <span class="decrypt">{!item.doctor2__r.awsdata.name}</span>
                  </span>
                </span>
              </td>
              <td role="gridcell" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  <span
                    class="slds-truncate"
                    title="{!item.DealerPersonnel__r.Name}"
                    >{!item.DealerPersonnel__r.Name}</span
                  >
                </span>
              </td>
              <td role="gridcell" class="slds-cell-edit">
                <span class="slds-grid slds-grid--align-spread">
                  <span class="slds-truncate" title="{!item.WorkMark__c}">
                    <lightning:input
                      type="checkbox"
                      checked="{!item.WorkMark__c}"
                      disabled="true"
                    />
                  </span>
                </span>
              </td>
            </tr>
          </aura:iteration>
        </tbody>
      </table>
    </div>
    <aura:renderIf isTrue="{!v.report_count > 0}">
      <aura:set attribute="else">
        <div class="no_data_area">{!v.list_message}</div>
      </aura:set>
    <ltng:require scripts="{! $Resource.AWSService+'/AWSService.js' }" />
    <ltng:require scripts="{! $Resource.jquery183minjs }" />
    <!-- 批量添加日报 end-->
    <!--ロード中...-->
    <aura:renderIf isTrue="{!v.login}">
        <div class="slds-spinner_container height100vh">
            <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert">
                <span class="slds-assistive-text">Loading</span>
                <div class="slds-spinner__dot-a"></div>
                <div class="slds-spinner__dot-b"></div>
            </div>
        </div>
    </aura:renderIf>
  </div>
  <!-- 批量添加日报 start-->
  <div
    aura:id="modal_import"
    role="dialog"
    tabindex="-1"
    class="disp_none slds-modal slds-fade-in-open slds-modal--large"
    aria-labelledby="headerTarget"
  >
    <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
      <!-- <ui:inputText aura:id="articleURL" /> -->
      <div class="demo-only" style="height: 8rem">
        <div class="slds-notify_container slds-is-relative">
          <div
            class="slds-notify slds-notify_toast slds-theme_success"
            role="alert"
          >
            <div class="slds-m-left_xx-large">
              <div
                class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
              >
                <lightning:icon
                  alternativeText="Success"
                  iconName="utility:success"
                  size="small"
                  class="buttonColor slds-m-right_small"
                />
                <h2 class="slds-text-heading_small">{!v.successMessage}</h2>
              </div>
    <div aura:id="report" id="report">
        <div class="slds-grid slds-wrap slds-grid--pull-padded">
            <div style="width: 200px;"></div>
            <div
                class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12 fontSize">
                周
            </div>
          </div>
            <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12 fontSize">
                <ui:inputSelect aura:id="select_date" class="slds-select" change="{!c.select_date_change}" />
            </div>
            <!-- 代理店担当者 -->
            <div class="tr mt5 slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-12 slds-large-size--1-of-12"
                style="display: none;">
                {!v.fieldsmap.Person_In_Charge2__c}
            </div>
            <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--3-of-12 slds-large-size--3-of-12"
                style="display: none;">
                <ui:inputSelect aura:id="select_agency_person" class="slds-select agency_person_select"
                    change="{!c.select_agency_change}" />
            </div>
            <div style="width: 100px;">
            </div>
            <div class="tr slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
                style="display: contents;">
                <ui:button aura:id="new_button" label="新建" press="{!c.new_report}" class="buttonFontSize"/>
            </div>
            <div style="width: 450px;"
                class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--4-of-12 slds-large-size--4-of-12">
                <ui:button aura:id="copy_button" label="复制" press="{!c.copy_button}" disabled="true" class="buttonFontSize"/>
                <ui:button aura:id="delete_button" label="删除" press="{!c.delete_button}" disabled="true" class="buttonFontSize"/>
                <ui:button aura:id="import" label="导入" press="{!c.import}" class="buttonFontSize"/>
                <ui:button aura:id="export" label="导出" press="{!c.export_condition}" class="buttonFontSize"/>
                <!-- <ui:button aura:id="returnbutton" label="返回" press="{!c.return_main_page}" /> -->
            </div>
        </div>
      </div>
    </div>
    <div
      class="slds-modal slds-fade-in-open slds-hide"
      aura:id="errorDiv01"
      style="z-index: 10001"
    >
      <!-- <ui:inputText aura:id="articleURL" /> -->
      <div class="demo-only" style="height: 8rem">
        <div class="slds-notify_container slds-is-relative">
          <div
            class="slds-notify slds-notify_toast slds-theme_error"
            role="status"
          >
            <div class="slds-m-left_xx-large">
              <div
                class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
              >
                <lightning:icon
                  alternativeText="error"
                  iconName="utility:error"
                  size="small"
                  class="buttonColor slds-m-right_small"
                />
                <h2 class="slds-text-heading_small">{!v.errorMessage}</h2>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="slds-modal__container">
      <div class="slds-modal__header">
        <h4 id="headerTarget" class="slds-float--left"></h4>
        <h2 id="headerTarget" class="slds-text-heading--medium">
          日报批量导入
        </h2>
        <ui:button
          aura:id="close_button"
          label="关闭"
          class="close_button slds-button slds-button--neutral slds-order--1"
          press="{!c.close_import}"
        />
      </div>
      <div
        class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
      >
        <aura:if isTrue="{!v.showMain}">
          <div>
            <lightning:input
              type="file"
              class="file"
              uara:id="file"
              onchange="{!c.CreateRecord}"
            />
          </div>
          <aura:set attribute="else">
            <ui:outputRichText
              class="uiOutputRichText slds-m--around-large"
              value="{!v.TableContent}"
            />
            <div class="slds-p-around--large slds-align--absolute-center">
              <lightning:button
                label="保存"
                variant="brand"
                onclick="{!c.processFileContent}"
              />
              <lightning:button
                label="取消"
                variant="brand"
                onclick="{!c.cancel}"
              />
            </div>
            <aura:if isTrue="{!v.showErrorInfo}">
              <div class="slds-p-around--large slds-align--absolute-center">
                <lightning:button
                  label="导出错误信息"
                  variant="brand"
                  onclick="{!c.exportErrorInfo}"
                />
              </div>
              <div class="slds-p-around--large slds-align--absolute-center">
                <div style="height: 300px">
                  <lightning:datatable
                    keyField="id"
                    data="{! v.errorData }"
                    columns="{! v.errorColumns }"
                    hideCheckboxColumn="true"
                  />
                </div>
              </div>
            </aura:if>
          </aura:set>
        </aura:if>
      </div>
    </div>
  </div>
  <div
    aura:id="modal_importbg"
    class="disp_none slds-backdrop slds-backdrop--open"
  ></div>
  <!-- 批量添加日报 end-->
  <!-- 批量导出日报 start-->
  <div
    aura:id="modal_export"
    role="dialog"
    tabindex="-1"
    class="disp_none slds-modal slds-fade-in-open slds-modal--large"
  >
    <div class="slds-modal__container">
      <div class="slds-modal__header">
        <h4 id="headerTarget" class="slds-float--left"></h4>
        <h2 id="headerTarget" class="slds-text-heading--medium">
          日报批量导出
        </h2>
        <ui:button
          aura:id="close_button"
          label="关闭"
          class="close_button slds-button slds-button--neutral slds-order--1"
          press="{!c.close_export}"
        />
      </div>
      <div
        class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium"
      >
        <aura:if isTrue="{!v.showMain}">
          <div class="slds-grid slds-wrap slds-grid--pull-padded">
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
            ></div>
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
            >
              活动日开始日期
              <lightning:input
                type="Date"
                class="slds-input slds-input_bare"
                aura:id="input-report-date1"
              />
            </div>
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
            >
              活动日结束日期
              <lightning:input
                type="Date"
                class="slds-input slds-input_bare"
                aura:id="input-report-date2"
              />
            </div>
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4"
            ></div>
            <div class="slds-p-around--large slds-align--absolute-center">
              <lightning:button
                label="确认"
                variant="brand"
                onclick="{!c.select_repores_date}"
              />
              <lightning:button
                label="取消"
                variant="brand"
                onclick="{!c.close_export}"
              />
            </div>
          </div>
          <aura:set attribute="else">
            <ui:outputRichText
              class="uiOutputRichText slds-m--around-large"
              value="{!v.TableContent2}"
            />
            <div class="slds-p-around--large slds-align--absolute-center">
              <lightning:button
                label="确认"
                variant="brand"
                onclick="{!c.exportDate}"
              />
              <lightning:button
                label="取消"
                variant="brand"
                onclick="{!c.close_export}"
              />
            </div>
          </aura:set>
        </aura:if>
      </div>
    </div>
  </div>
  <div
    aura:id="modal_exportbg"
    class="disp_none slds-backdrop slds-backdrop--open"
  ></div>
  <!-- 批量导出日报 end-->
  <div
    aura:id="modal_window"
    role="dialog"
    tabindex="-1"
    class="disp_none slds-modal slds-fade-in-open slds-modal--large"
    aria-labelledby="headerTarget"
  >
    <div class="slds-modal__container">
      <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv">
        <!-- <ui:inputText aura:id="articleURL" /> -->
        <div class="demo-only" style="height: 8rem">
          <div class="slds-notify_container slds-is-relative">
            <div
              class="slds-notify slds-notify_toast slds-theme_success"
              role="alert"
            >
              <div class="slds-m-left_xx-large">
                <div
                  class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
                >
                  <lightning:icon
                    alternativeText="Success"
                    iconName="utility:success"
                    size="small"
                    class="buttonColor slds-m-right_small"
                  />
                  <h2 class="slds-text-heading_small">{!v.successMessage}</h2>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div
        class="slds-modal slds-fade-in-open slds-hide"
        aura:id="errorDiv"
        style="z-index: 10001"
      >
        <!-- <ui:inputText aura:id="articleURL" /> -->
        <div class="demo-only" style="height: 8rem">
          <div class="slds-notify_container slds-is-relative">
            <div
              class="slds-notify slds-notify_toast slds-theme_error"
              role="status"
            >
              <div class="slds-m-left_xx-large">
                <div
                  class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large"
                >
                  <lightning:icon
                    alternativeText="error"
                    iconName="utility:error"
                    size="small"
                    class="buttonColor slds-m-right_small"
                  />
                  <h2 class="slds-text-heading_small">{!v.errorMessage}</h2>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="slds-modal__header">
        <h2 id="headerTarget" class="slds-text-heading--medium">
          日报({!v.selected_date}&nbsp;{!v.selected_agency_person})
        </h2>
        <ui:button
          aura:id="close_button"
          label="关闭"
          class="close_button slds-button slds-button--neutral slds-order--1"
          press="{!c.toggle_report}"
        />
      </div>
      <div class="slds-modal__content slds-grow slds-p-around--medium">
        <div class="slds-box slds-theme--shade">
          <div class="slds-grid slds-wrap slds-grid--pull-padded">
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              活动日
              <lightning:input
                type="date"
                value="{!v.data.Report_Date__c}"
                aura:id="input-report-date"
                variant="label-hidden"
              />
            </div>
            <!-- 医院 -->
            <div
              aura:id="hospital_list"
              class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              data-select="single"
            >
              <!-- label="医院" -->
              医院
              <lightning:input
                aura:id="hospital_input_text"
                class="field"
                value="{!v.hospital}"
                updateOn="keyup"
                variant="label-hidden"
              />
              <div class="slds-lookup__menu" id="lookup-66">
                <ul class="slds-lookup__list" role="listbox">
                  <aura:iteration var="hospital" items="{!v.hospitalList}">
                    <li
                      role="presentation"
                      onclick="{!c.selectHos}"
                      data-accName="{!hospital.Hospital_Name_readonly__c}"
                      data-accId="{!hospital.Hospital__c}"
                    >
                      <span
                        class="slds-lookup__item-action slds-media"
                        id="lookup-option-498"
                        role="option"
                      >
                        <div class="slds-media__body">
                          <div class="slds-lookup__result-text">
                            {!hospital.Hospital_Name_readonly__c}
                          </div>
                        </div>
                      </span>
                    </li>
                  </aura:iteration>
                </ul>
              </div>
            </div>
            <!-- 科室分类 -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.Department_Cateogy__c}
              <!-- <ui:inputText aura:id="select_department" class="slds-select"
                                change="{!c.select_department}"/> -->
              <lightning:input
                type="text"
                onchange="{!c.select_department}"
                aura:id="select_department"
                variant="label-hidden"
              />
            </div>
            <!-- 经销商人员  change="{!c.select_DealerPersonnel}" -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              style="width: 145px"
            >
              {!v.fieldsmap.DealerPersonnel__c}
              <ui:inputSelect
                aura:id="select_DealerPersonnel"
                class="slds-select"
              />
            </div>
            <!-- 活动区分   -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.WorkRecord__c}
              <ui:inputSelect
                aura:id="select_purpose_type"
                class="slds-select"
                change="{!c.select_purpose_type}"
              />
            </div>
            <!-- 拜访人 {!v.fieldsmap.doctor2__c}-->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              style="width: 145px"
            >
              拜访人
              <ui:inputSelect
                aura:id="select_doctor"
                class="slds-select"
                change="{!c.doctor_change}"
              />
            </div>
            <!-- <p hidden="hidden"> -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12"
            >
              <br />
              <ui:button
                label="新建"
                class="slds-button"
                press="{!c.createCon}"
                disabled="true"
                aura:id="new_con"
              />
            </div>
            <!-- </p> -->
            <hr />
            <!-- 产品分类(第三分类) change="{!c.select_ProductClassification}" -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              产品分类(第三分类)
              <ui:inputSelect
                aura:id="select_ProductClassification"
                class="slds-select"
                change="{!c.selectProductClassification}"
              />
            </div>
            <!-- 使用产品1(产品型号)   UseProduct1__c  -->
            <div
              aura:id="UseProduct1_List"
              class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              data-select="single"
            >
              <!-- label="使用产品1(产品型号)" -->
              使用产品1(产品型号)
              <lightning:input
                aura:id="UseProduct1_TEXT"
                class="field"
                value="{!v.UseProduct1}"
                updateOn="keyup"
                variant="label-hidden"
              />
              <div class="slds-lookup__menu" id="lookup-11">
                <ul
                  class="slds-lookup__list"
                  role="listbox"
                  style="max-height: 230px"
                >
                  <aura:iteration
                    var="UseProduct1"
                    items="{!v.UseProduct1List}"
                  >
                    <li
                      role="presentation"
                      onclick="{!c.seletUseProduct1Change}"
                      data-accid="{!UseProduct1.Id}"
                      data-accName="{!UseProduct1.Asset_Model_No__c}"
                    >
                      <span
                        class="slds-lookup__item-action slds-media"
                        id="lookup-option-498"
                        role="option"
                      >
                        <div class="slds-media__body">
                          <div class="slds-lookup__result-text">
                            {!UseProduct1.Asset_Model_No__c}
                          </div>
                        </div>
                      </span>
                    </li>
                  </aura:iteration>
                </ul>
              </div>
            </div>
            <!-- 使用产品2   UseProduct2__c  -->
            <div
              aura:id="UseProduct2_List"
              class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              data-select="single"
            >
              <!-- label="使用产品2" -->
              使用产品2
              <lightning:input
                aura:id="UseProduct2_TEXT"
                class="field"
                value="{!v.UseProduct2}"
                updateOn="keyup"
                variant="label-hidden"
              />
              <div class="slds-lookup__menu" id="lookup-22">
                <ul
                  class="slds-lookup__list"
                  role="listbox"
                  style="max-height: 230px"
                >
                  <aura:iteration
                    var="UseProduct2"
                    items="{!v.UseProduct2List}"
                  >
                    <li
                      role="presentation"
                      onclick="{!c.seletUseProduct2Change}"
                      data-accid="{!UseProduct2.Id}"
                      data-accName="{!UseProduct2.Asset_Model_No__c}"
                    >
                      <span
                        class="slds-lookup__item-action slds-media"
                        id="lookup-option-498"
                        role="option"
                      >
                        <div class="slds-media__body">
                          <div class="slds-lookup__result-text">
                            {!UseProduct2.Asset_Model_No__c}
                          </div>
                        </div>
                      </span>
                    </li>
                  </aura:iteration>
                </ul>
              </div>
            </div>
            <!-- 使用产品3   UseProduct3__c  -->
            <div
              aura:id="UseProduct3_List"
              class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
              data-select="single"
            >
              <!-- label="使用产品3" -->
              使用产品3
              <lightning:input
                aura:id="UseProduct3_TEXT"
                class="field"
                value="{!v.UseProduct3}"
                updateOn="keyup"
                variant="label-hidden"
              />
              <div class="slds-lookup__menu" id="lookup-33">
                <ul
                  class="slds-lookup__list"
                  role="listbox"
                  style="max-height: 230px"
                >
                  <aura:iteration
                    var="UseProduct3"
                    items="{!v.UseProduct3List}"
                  >
                    <li
                      role="presentation"
                      onclick="{!c.seletUseProduct3Change}"
                      data-accid="{!UseProduct3.Id}"
                      data-accName="{!UseProduct3.Asset_Model_No__c}"
                    >
                      <span
                        class="slds-lookup__item-action slds-media"
                        id="lookup-option-498"
                        role="option"
                      >
                        <div class="slds-media__body">
                          <div class="slds-lookup__result-text">
                            {!UseProduct3.Asset_Model_No__c}
                          </div>
                        </div>
                      </span>
                    </li>
                  </aura:iteration>
                </ul>
              </div>
            </div>
            <!-- 效果/进度  EffectProgress__c-->
            <div
              aura:id="product_category_select1"
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.EffectProgress__c}
              <ui:inputSelect
                aura:id="select_EffectProgress"
                class="slds-select"
              />
            </div>
            <hr />
            <!-- 产品1同类耗材科室月使用量  ConsumptionOfConsumables__c-->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.ConsumptionOfConsumables__c}
              <!-- <ui:inputText aura:id="select_ConsumptionOfConsumables" class="slds-select"
                                change="{!c.select_ConsumptionOfConsumables}" /> -->
              <lightning:input
                type="text"
                onchange="{!c.select_ConsumptionOfConsumables}"
                aura:id="select_ConsumptionOfConsumables"
                variant="label-hidden"
              />
            </div>
            <!-- 术士分类   WarlockClassification__c   -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.WarlockClassification__c}
              <ui:inputSelect
                aura:id="select_OtherBrandConsumables"
                class="slds-select"
              />
            </div>
            <!-- 已采用其他品牌   ProductCcategory__c -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.ProductCcategory__c}
              <ui:inputSelect
                aura:id="select_ProductCcategory"
                class="slds-select"
                change="{!c.selectpurposetype}"
              />
            </div>
            <!-- 其他品牌产品类别  -->
            <div
              aura:id="result"
              class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.productCategories__c}
              <ui:inputSelect
                aura:id="select_productCategories"
                class="slds-select"
              />
            </div>
            <!-- 产品用量   warlocksNumber__c   -->
            <div
              class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
            >
              {!v.fieldsmap.warlocksNumber__c}
              <!-- <ui:inputText aura:id="select_warlocksNumber" class="slds-select"
                                change="{!c.select_warlocksNumber}" /> -->
              <lightning:input
                type="text"
                onchange="{!c.select_warlocksNumber}"
                aura:id="select_warlocksNumber"
                variant="label-hidden"
              />
            </div>
            <!-- 支援需求      WorkMark__c-->
            <div style="padding-left: 12px">
              {!v.fieldsmap.WorkMark__c}
              <lightning:input type="checkbox" aura:id="select_WorkMark" />
            </div>
            <div
              aura:id="input-opportunity-stage"
              class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
            >
              {!v.fieldsmap.StageName__c}
              <ui:inputSelect aura:id="select_stageName" class="slds-select" />
            </div>
            <div
              aura:id="input-opportunity-amount1"
              class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
            >
              {!v.fieldsmap.Amount__c}
              <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>  医院采购预算(不含税,元)-->
              <lightning:inputField value="{!v.oppdata.Amount__c}" class="" />
            </div>
            <div
              aura:id="input-opportunity-amount2"
              class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
            >
              {!v.fieldsmap.OCMSale_Price__c}
              <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>      订货金额(不含税,元)  -->
              <lightning:inputField
                value="{!v.oppdata.OCMSale_Price__c}"
                class=""
              />
            </div>
            <div
              aura:id="input-opportunity-date"
              class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12"
            >
              {!v.fieldsmap.Close_Forecasted_Date__c}
              <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>    预测与OCSM签约日 -->
              <lightning:inputField
                value="{!v.oppdata.Close_Forecasted_Date__c}"
                class=""
              />
            </div>
            <hr />
          </div>
        </div>
        <div class="save_button_area">
          <ui:button
            aura:id="save_button"
            label="保存并新建"
            class="save_button slds-button slds-button--brand slds-order--3"
            press="{!c.save_report}"
          />
        </div>
        <aura:renderIf isTrue="{!v.reports_now_count > 0}">
          <div class="mt40 slds-box slds-theme--shade">
            <div class="slds-table--edit_container slds-is-relative">
              <table
                class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
                role="grid"
              >
    <div aura:id="report_list" class="report_list_area">
        <div class="slds-table--edit_container slds-is-relative" style="padding-left: 50px;">
            <table class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
                role="grid" style="width:66.75rem;">
                <thead>
                  <tr class="slds-line-height--reset">
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name"></span>
                    </th>
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name">医院</span>
                    </th>
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name"
                        >{!v.fieldsmap.Department_Cateogy__c}</span
                      >
                    </th>
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name"
                        >{!v.fieldsmap.doctor2__c}</span
                      >
                      <!-- 客户人员 -->
                    </th>
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name"
                        >{!v.fieldsmap.visitor_title__c}</span
                      >
                    </th>
                    <th class="table_header slds-text-title--caps">
                      <span class="slds-truncate" title="Name"
                        >{!v.fieldsmap.WorkRecord__c}</span
                      >
                    </th>
                  </tr>
                    <tr class="slds-line-height--reset">
                        <th class="table_header slds-text-title--caps" style="width:250px">
                        </th>
                        <th class="table_header slds-text-title--caps fontSize">
                            <span class="slds-truncate" title="Name">{!v.fieldsmap.Person_In_Charge2__c}</span>
                            <!-- {!v.fieldsmap.Person_In_Charge2__c}  担当-->
                        </th>
                        <th class="table_header slds-text-title--caps fontSize" style="width:250px">
                            <span class="slds-truncate" title="Name">医院</span>
                        </th>
                        <th class="table_header slds-text-title--caps fontSize">
                            <span class="slds-truncate" title="Name">{!v.fieldsmap.Department_Cateogy__c}</span>
                            <!-- {!v.fieldsmap.Department_Cateogy__c}    科室-->
                        </th>
                        <th class="table_header slds-text-title--caps fontSize">
                            <span class="slds-truncate" title="Name">拜访人</span>
                            <!-- {!v.fieldsmap.doctor2__c}    拜访人 -->
                        </th>
                        <th class="table_header slds-text-title--caps fontSize">
                            <span class="slds-truncate" title="Name">{!v.fieldsmap.DealerPersonnel__c}</span>
                            <!-- {!v.fieldsmap.visitor_title__c}   职位-->
                        </th>
                        <th class="table_header slds-text-title--caps fontSize">
                            <span class="slds-truncate" title="Name">{!v.fieldsmap.WorkMark__c}</span>
                            <!-- {!v.fieldsmap.visitor_title__c}   职位-->
                        </th>
                    </tr>
                </thead>
                <tbody>
                  <aura:iteration
                    items="{!v.reports_now}"
                    var="item"
                    indexVar="index"
                  >
                    <tr aura:id="modal_data_list_tr" class="slds-hint-parent">
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.Department_Cateogy_text__c}"
                            >{!item.Name}</span
                          >
                        </span>
                      </td>
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.Agency_Hospital__r.Name}"
                            >{!item.Agency_Hospital__r.Name}</span
                          >
                        </span>
                      </td>
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.Department_Cateogy_text__c}"
                            >{!item.Department_Cateogy_text__c}</span
                          >
                        </span>
                      </td>
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.doctor2__r.Name}"
                            >{!item.doctor2__r.Name}</span
                          >
                        </span>
                      </td>
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.visitor_title__c}"
                            >{!item.visitor_title__c}</span
                          >
                        </span>
                      </td>
                      <td role="gridcell" class="slds-cell-edit">
                        <span class="slds-grid slds-grid--align-spread">
                          <span
                            class="slds-truncate"
                            title="{!item.WorkRecord__c}"
                            >{!item.WorkRecord__c}</span
                          >
                        </span>
                      </td>
                    </tr>
                  </aura:iteration>
                    <aura:iteration items="{!v.reports}" var="item" indexVar="index">
                        <tr class="slds-hint-parent">
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <ui:inputRadio class="report_radio" name="report_radio" label="{!item.Name}"
                                    change="{!c.change_report_radio}" />
                                <lightning:buttonIcon class="edit_button" iconName="utility:edit" size="small"
                                    alternativeText="edit" value="{!index}" onclick="{!c.edit_button}" />
                            </td>
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    <span class="slds-truncate"
                                        title="{!item.Person_In_Charge2__r.Name}">{!item.Person_In_Charge2__r.Name}</span>
                                </span>
                            </td>
                            <th scope="row" tabindex="0" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    {!item.Agency_Hospital__r.Name}
                                </span>
                            </th>
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    <span class="slds-truncate"
                                        title="{!item.Department_Cateogy_text__c}">{!item.Department_Cateogy_text__c}</span>
                                </span>
                            </td>
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    <span class="slds-truncate" title="{!item.doctor2__r.Name}">
                                        <span class="encrypt">{!item.doctor2__r.Name}</span>
                                        <span class="decrypt">{!item.doctor2__r.awsdata.name}</span>
                                    </span>
                                </span>
                            </td>
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    <span class="slds-truncate"
                                        title="{!item.DealerPersonnel__r.Name}">{!item.DealerPersonnel__r.Name}</span>
                                </span>
                            </td>
                            <td role="gridcell" class="slds-cell-edit fontSize">
                                <span class="slds-grid slds-grid--align-spread">
                                    <span class="slds-truncate" title="{!item.WorkMark__c}">
                                        <lightning:input type="checkbox" checked="{!item.WorkMark__c}"
                                            disabled="true" />
                                    </span>
                                </span>
                            </td>
                        </tr>
                    </aura:iteration>
                </tbody>
              </table>
            </div>
          </div>
            </table>
        </div>
        <aura:renderIf isTrue="{!v.report_count > 0}">
            <aura:set attribute="else">
                <div class="no_data_area">
                    {!v.list_message}
                </div>
            </aura:set>
        </aura:renderIf>
      </div>
    </div>
  </div>
    <!-- 批量添加日报 start-->
    <div aura:id="modal_import" role="dialog" tabindex="-1"
        class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget">
        <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv01">
            <!-- <ui:inputText aura:id="articleURL" /> -->
            <div class="demo-only" style="height: 8rem;">
                <div class="slds-notify_container slds-is-relative">
                    <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
                        <div class=" slds-m-left_xx-large">
                            <div
                                class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
                                <lightning:icon alternativeText="Success" iconName="utility:success" size="small"
                                    class="buttonColor slds-m-right_small" />
                                <h2 class="slds-text-heading_small ">{!v.successMessage}</h2>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv01" style="z-index: 10001">
            <!-- <ui:inputText aura:id="articleURL" /> -->
            <div class="demo-only" style="height: 8rem;">
                <div class="slds-notify_container slds-is-relative">
                    <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
                        <div class=" slds-m-left_xx-large">
                            <div
                                class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
                                <lightning:icon alternativeText="error" iconName="utility:error" size="small"
                                    class="buttonColor slds-m-right_small" />
                                <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="slds-modal__container ">
            <div class="slds-modal__header ">
                <h4 id="headerTarget" class="slds-float--left"></h4>
                <h2 id="headerTarget" class="slds-text-heading--medium">日报批量导入</h2>
                <ui:button aura:id="close_button" label="关闭"
                    class="close_button slds-button slds-button--neutral slds-order--1 buttonFontSize" press="{!c.close_import}" />
            </div>
            <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium fontSize">
                <aura:if isTrue="{!v.showMain}">
                    <div>
                        <lightning:input type="file" class="file" uara:id="file" onchange="{!c.CreateRecord}" />
                    </div>
                    <aura:set attribute="else">
                        <ui:outputRichText class="uiOutputRichText slds-m--around-large fontSize" value="{!v.TableContent}" />
                        <div class="slds-p-around--large slds-align--absolute-center">
                            <lightning:button label="保存" variant="brand" onclick="{!c.processFileContent}" class="buttonFontSize"/>
                            <lightning:button label="取消" variant="brand" onclick="{!c.cancel}" class="buttonFontSize"/>
                        </div>
                        <aura:if isTrue="{!v.showErrorInfo}">
                            <div class="slds-p-around--large slds-align--absolute-center">
                                <lightning:button label="导出错误信息" variant="brand" onclick="{!c.exportErrorInfo}" />
                            </div>
                            <div class="slds-p-around--large slds-align--absolute-center">
                                <div style="height: 300px;">
                                    <lightning:datatable keyField="id" data="{! v.errorData }"
                                        columns="{! v.errorColumns }" hideCheckboxColumn="true" />
                                </div>
                            </div>
                        </aura:if>
                    </aura:set>
  <div
    aura:id="modal_bg"
    class="disp_none slds-backdrop slds-backdrop--open"
  ></div>
  <div
    aura:id="modal_confirm"
    role="dialog"
    tabindex="-2"
    aria-labelledby="header43"
    class="disp_none slds-modal slds-fade-in-open"
  >
    <div class="slds-modal__container">
      <div class="slds-modal__header">
        <h2 id="header43" class="slds-text-heading--medium">
          {!v.modal_confirm_title}
        </h2>
      </div>
      <div class="slds-modal__content slds-p-around--medium">
        <p>{!v.modal_confirm_text}</p>
      </div>
      <div class="slds-modal__footer">
        <ui:button
          label="是"
          class="slds-button slds-button--brand"
          press="{!c.yes_button}"
        />
        <ui:button
          label="否"
          class="slds-button slds-button--neutral"
          press="{!c.no_button}"
        />
      </div>
                </aura:if>
            </div>
        </div>
    </div>
  </div>
  <div
    aura:id="modal_confirm_bg"
    class="disp_none slds-backdrop slds-backdrop--open"
  ></div>
    <div aura:id="modal_importbg" class="disp_none slds-backdrop slds-backdrop--open"></div>
    <!-- 批量添加日报 end-->
  <div
    aura:id="modal_newAC"
    role="dialog"
    tabindex="-3"
    aria-labelledby="headertest"
    class="disp_none slds-modal slds-fade-in-open"
  >
    <div class="slds-modal__container">
      <div class="slds-modal__header">
        <h2 id="headertest" class="slds-text-heading--medium">新建.拜访人</h2>
      </div>
      <div class="slds-modal__content slds-p-around--medium">
        <lightning:recordEditForm
          aura:id="recordEditForm"
          objectApiName="Agency_Contact__c"
          onsuccess="{!c.handleSuccess}"
          onload="{!c.showRequiredFields}"
          onsubmit="{!c.handleSubmit}"
        >
          <lightning:messages aura:id="OppMessage" />
          <!-- onload="{!c.showRequiredFields}" -->
          <aura:renderIf isTrue="{!v.truthy}">
            <lightning:inputField
              fieldName="Name"
              aura:id="newOpportunityField"
            />
            <lightning:inputField
              fieldName="Type__c"
              aura:id="newOpportunityField"
            />
            <lightning:inputField
              fieldName="Doctor_Division1__c"
              aura:id="newOpportunityField"
            />
          </aura:renderIf>
          <br />
          <br />
          <br />
          <br />
          <br />
          <div class="save_button_area">
            <lightning:button
              class="slds-m-top_small"
              type="button"
              label="取消"
              onclick="{!c.createCancel}"
            />
            <lightning:button
              class="slds-m-top_small"
              type="button"
              label="保存"
              onclick="{!c.handleSubmit}"
            />
          </div>
        </lightning:recordEditForm>
      </div>
    <!-- 批量导出日报 start-->
    <div aura:id="modal_export" role="dialog" tabindex="-1"
        class="disp_none slds-modal slds-fade-in-open slds-modal--large">
        <div class="slds-modal__container">
            <div class="slds-modal__header">
                <h4 id="headerTarget" class="slds-float--left"></h4>
                <h2 id="headerTarget" class="slds-text-heading--medium">日报批量导出</h2>
                <ui:button aura:id="close_button" label="关闭"
                    class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.close_export}" />
            </div>
            <div class="slds-modal__content slds-scrollable slds-grow slds-p-around--medium">
                <aura:if isTrue="{!v.showMain}">
                    <div class="slds-grid slds-wrap slds-grid--pull-padded">
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
                        </div>
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
                            活动日开始日期
                            <lightning:input type="Date" class="slds-input slds-input_bare "
                                aura:id="input-report-date1" />
                        </div>
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
                            活动日结束日期
                            <lightning:input type="Date" class="slds-input slds-input_bare "
                                aura:id="input-report-date2" />
                        </div>
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-4">
                        </div>
                        <div class="slds-p-around--large slds-align--absolute-center">
                            <lightning:button label="确认" variant="brand" onclick="{!c.select_repores_date}" />
                            <lightning:button label="取消" variant="brand" onclick="{!c.close_export}" />
                        </div>
                    </div>
                    <aura:set attribute="else">
                        <ui:outputRichText class="uiOutputRichText slds-m--around-large" value="{!v.TableContent2}" />
                        <div class="slds-p-around--large slds-align--absolute-center">
                            <lightning:button label="确认" variant="brand" onclick="{!c.exportDate}" />
                            <lightning:button label="取消" variant="brand" onclick="{!c.close_export}" />
                        </div>
                    </aura:set>
                </aura:if>
            </div>
        </div>
    </div>
  </div>
</aura:component>
    <div aura:id="modal_exportbg" class="disp_none slds-backdrop slds-backdrop--open"></div>
    <!-- 批量导出日报 end-->
    <div aura:id="modal_window" role="dialog" tabindex="-1"
        class="disp_none slds-modal slds-fade-in-open slds-modal--large" aria-labelledby="headerTarget">
        <div class="slds-modal__container">
            <div class="slds-modal slds-fade-in-open slds-hide" aura:id="successDiv">
                <!-- <ui:inputText aura:id="articleURL" /> -->
                <div class="demo-only" style="height: 8rem;">
                    <div class="slds-notify_container slds-is-relative">
                        <div class="slds-notify slds-notify_toast slds-theme_success" role="alert">
                            <div class=" slds-m-left_xx-large">
                                <div
                                    class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
                                    <lightning:icon alternativeText="Success" iconName="utility:success" size="small"
                                        class="buttonColor slds-m-right_small" />
                                    <h2 class="slds-text-heading_small ">{!v.successMessage}</h2>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slds-modal slds-fade-in-open slds-hide" aura:id="errorDiv" style="z-index: 10001">
                <!-- <ui:inputText aura:id="articleURL" /> -->
                <div class="demo-only" style="height: 8rem;">
                    <div class="slds-notify_container slds-is-relative">
                        <div class="slds-notify slds-notify_toast slds-theme_error" role="status">
                            <div class=" slds-m-left_xx-large">
                                <div
                                    class="slds-notify__content slds-m-left_small slds-align_absolute-center slds-m-left_xx-large">
                                    <lightning:icon alternativeText="error" iconName="utility:error" size="small"
                                        class="buttonColor slds-m-right_small" />
                                    <h2 class="slds-text-heading_small ">{!v.errorMessage}</h2>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="slds-modal__header">
                <h2 id="headerTarget" class="slds-text-heading--medium">
                    日报({!v.selected_date}&nbsp;{!v.selected_agency_person})</h2>
                <ui:button aura:id="close_button" label="关闭"
                    class="close_button slds-button slds-button--neutral slds-order--1" press="{!c.toggle_report}" />
            </div>
            <div class="slds-modal__content slds-grow slds-p-around--medium">
                <div class="slds-box slds-theme--shade">
                    <div class="slds-grid slds-wrap slds-grid--pull-padded">
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            活动日
                            <lightning:input type="date" value="{!v.data.Report_Date__c}" aura:id="input-report-date"
                                variant="label-hidden" />
                        </div>
                        <!-- 医院 -->
                        <div aura:id="hospital_list"
                            class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            data-select="single">
                            <!-- label="医院" -->
                            医院
                            <lightning:input aura:id="hospital_input_text" class="field" value="{!v.hospital}"
                                updateOn="keyup" variant="label-hidden" />
                            <div class="slds-lookup__menu" id="lookup-66">
                                <ul class="slds-lookup__list" role="listbox">
                                    <aura:iteration var="hospital" items="{!v.hospitalList}">
                                        <li role="presentation" onclick="{!c.selectHos}"
                                            data-accName="{!hospital.Hospital_Name_readonly__c}"
                                            data-accId="{!hospital.Hospital__c}">
                                            <span class="slds-lookup__item-action slds-media" id="lookup-option-498"
                                                role="option">
                                                <div class="slds-media__body">
                                                    <div class="slds-lookup__result-text">
                                                        {!hospital.Hospital_Name_readonly__c}</div>
                                                </div>
                                            </span>
                                        </li>
                                    </aura:iteration>
                                </ul>
                            </div>
                        </div>
                        <!-- 科室分类 -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.Department_Cateogy__c}
                            <!-- <ui:inputText aura:id="select_department" class="slds-select"
                                change="{!c.select_department}"/> -->
                            <lightning:input type="text" onchange="{!c.select_department}" aura:id="select_department"
                                variant="label-hidden" />
                        </div>
                        <!-- 经销商人员  change="{!c.select_DealerPersonnel}" -->
                        <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            style="width: 145px;">
                            {!v.fieldsmap.DealerPersonnel__c}
                            <ui:inputSelect aura:id="select_DealerPersonnel" class="slds-select" />
                        </div>
                        <!-- 活动区分   -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.WorkRecord__c}
                            <ui:inputSelect aura:id="select_purpose_type" class="slds-select"
                                change="{!c.select_purpose_type}" />
                        </div>
                        <!-- 拜访人 {!v.fieldsmap.doctor2__c}-->
                        <div class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            style="width: 145px;">
                            拜访人
                            <ui:inputSelect aura:id="select_doctor" class="slds-select" change="{!c.doctor_change}" />
                        </div>
                        <!-- <p hidden="hidden"> -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-12">
                            <br />
                            <ui:button label="新建" class="slds-button" press="{!c.createCon}" disabled="true"
                                aura:id="new_con" />
                        </div>
                        <!-- </p> -->
                        <hr />
                        <!-- 产品分类(第三分类) change="{!c.select_ProductClassification}" -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            产品分类(第三分类)
                            <ui:inputSelect aura:id="select_ProductClassification" class="slds-select"
                                change="{!c.selectProductClassification}" />
                        </div>
                        <!-- 使用产品1(产品型号)   UseProduct1__c  -->
                        <div aura:id="UseProduct1_List"
                            class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            data-select="single">
                            <!-- label="使用产品1(产品型号)" -->
                            使用产品1(产品型号)
                            <lightning:input aura:id="UseProduct1_TEXT" class="field" value="{!v.UseProduct1}"
                                updateOn="keyup" variant="label-hidden" />
                            <div class="slds-lookup__menu" id="lookup-11">
                                <ul class="slds-lookup__list" role="listbox" style="max-height:230px;">
                                    <aura:iteration var="UseProduct1" items="{!v.UseProduct1List}">
                                        <li role="presentation" onclick="{!c.seletUseProduct1Change}"
                                            data-accid="{!UseProduct1.Id}"
                                            data-accName="{!UseProduct1.Asset_Model_No__c}">
                                            <span class="slds-lookup__item-action slds-media" id="lookup-option-498"
                                                role="option">
                                                <div class="slds-media__body">
                                                    <div class="slds-lookup__result-text">
                                                        {!UseProduct1.Asset_Model_No__c}</div>
                                                </div>
                                            </span>
                                        </li>
                                    </aura:iteration>
                                </ul>
                            </div>
                        </div>
                        <!-- 使用产品2   UseProduct2__c  -->
                        <div aura:id="UseProduct2_List"
                            class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            data-select="single">
                            <!-- label="使用产品2" -->
                            使用产品2
                            <lightning:input aura:id="UseProduct2_TEXT" class="field" value="{!v.UseProduct2}"
                                updateOn="keyup" variant="label-hidden" />
                            <div class="slds-lookup__menu" id="lookup-22">
                                <ul class="slds-lookup__list" role="listbox" style="max-height:230px;">
                                    <aura:iteration var="UseProduct2" items="{!v.UseProduct2List}">
                                        <li role="presentation" onclick="{!c.seletUseProduct2Change}"
                                            data-accid="{!UseProduct2.Id}"
                                            data-accName="{!UseProduct2.Asset_Model_No__c}">
                                            <span class="slds-lookup__item-action slds-media" id="lookup-option-498"
                                                role="option">
                                                <div class="slds-media__body">
                                                    <div class="slds-lookup__result-text">
                                                        {!UseProduct2.Asset_Model_No__c}</div>
                                                </div>
                                            </span>
                                        </li>
                                    </aura:iteration>
                                </ul>
                            </div>
                        </div>
                        <!-- 使用产品3   UseProduct3__c  -->
                        <div aura:id="UseProduct3_List"
                            class="slds-form-element slds-lookup slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6"
                            data-select="single">
                            <!-- label="使用产品3" -->
                            使用产品3
                            <lightning:input aura:id="UseProduct3_TEXT" class="field" value="{!v.UseProduct3}"
                                updateOn="keyup" variant="label-hidden" />
                            <div class="slds-lookup__menu" id="lookup-33">
                                <ul class="slds-lookup__list" role="listbox" style="max-height:230px;">
                                    <aura:iteration var="UseProduct3" items="{!v.UseProduct3List}">
                                        <li role="presentation" onclick="{!c.seletUseProduct3Change}"
                                            data-accid="{!UseProduct3.Id}"
                                            data-accName="{!UseProduct3.Asset_Model_No__c}">
                                            <span class="slds-lookup__item-action slds-media" id="lookup-option-498"
                                                role="option">
                                                <div class="slds-media__body">
                                                    <div class="slds-lookup__result-text">
                                                        {!UseProduct3.Asset_Model_No__c}</div>
                                                </div>
                                            </span>
                                        </li>
                                    </aura:iteration>
                                </ul>
                            </div>
                        </div>
                        <!-- 效果/进度  EffectProgress__c-->
                        <div aura:id="product_category_select1"
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.EffectProgress__c}
                            <ui:inputSelect aura:id="select_EffectProgress" class="slds-select" />
                        </div>
                        <hr />
                        <!-- 产品1同类耗材科室月使用量  ConsumptionOfConsumables__c-->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.ConsumptionOfConsumables__c}
                            <!-- <ui:inputText aura:id="select_ConsumptionOfConsumables" class="slds-select"
                                change="{!c.select_ConsumptionOfConsumables}" /> -->
                            <lightning:input type="text" onchange="{!c.select_ConsumptionOfConsumables}"
                                aura:id="select_ConsumptionOfConsumables" variant="label-hidden" />
                        </div>
                        <!-- 术士分类   WarlockClassification__c   -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.WarlockClassification__c}
                            <ui:inputSelect aura:id="select_OtherBrandConsumables" class="slds-select" />
                        </div>
                        <!-- 已采用其他品牌   ProductCcategory__c -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.ProductCcategory__c}
                            <ui:inputSelect aura:id="select_ProductCcategory" class="slds-select"
                                change="{!c.selectpurposetype}" />
                        </div>
                        <!-- 其他品牌产品类别  -->
                        <div aura:id="result"
                            class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.productCategories__c}
                            <ui:inputSelect aura:id="select_productCategories" class="slds-select" />
                        </div>
                        <!-- 产品用量   warlocksNumber__c   -->
                        <div
                            class="slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--1-of-5 slds-large-size--1-of-6">
                            {!v.fieldsmap.warlocksNumber__c}
                            <!-- <ui:inputText aura:id="select_warlocksNumber" class="slds-select"
                                change="{!c.select_warlocksNumber}" /> -->
                            <lightning:input type="text" onchange="{!c.select_warlocksNumber}"
                                aura:id="select_warlocksNumber" variant="label-hidden" />
                        </div>
                        <!-- 支援需求      WorkMark__c-->
                        <div style="padding-left: 12px;">
                            {!v.fieldsmap.WorkMark__c}
                            <lightning:input type="checkbox" aura:id="select_WorkMark" />
                        </div>
                        <div aura:id="input-opportunity-stage"
                            class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
                            {!v.fieldsmap.StageName__c}
                            <ui:inputSelect aura:id="select_stageName" class="slds-select" />
                        </div>
                        <div aura:id="input-opportunity-amount1"
                            class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
                            {!v.fieldsmap.Amount__c}
                            <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>  医院采购预算(不含税,元)-->
                            <lightning:inputField value="{!v.oppdata.Amount__c}" class="" />
                        </div>
                        <div aura:id="input-opportunity-amount2"
                            class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
                            {!v.fieldsmap.OCMSale_Price__c}
                            <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>      订货金额(不含税,元)  -->
                            <lightning:inputField value="{!v.oppdata.OCMSale_Price__c}" class="" />
                        </div>
                        <div aura:id="input-opportunity-date"
                            class="disp_none slds-p-horizontal--small slds-size--1-of-1 slds-medium-size--2-of-12 slds-large-size--2-of-12">
                            {!v.fieldsmap.Close_Forecasted_Date__c}
                            <!-- <ui:inputSelect aura:id="select_opportunity" class="slds-select"/>    预测与OCSM签约日 -->
                            <lightning:inputField value="{!v.oppdata.Close_Forecasted_Date__c}" class="" />
                        </div>
                        <hr />
                    </div>
                </div>
                <div class="save_button_area">
                    <ui:button aura:id="save_button" label="保存并新建"
                        class="save_button slds-button slds-button--brand slds-order--3" press="{!c.save_report}" />
                </div>
                <aura:renderIf isTrue="{!v.reports_now_count > 0}">
                    <div class="mt40 slds-box slds-theme--shade">
                        <div class="slds-table--edit_container slds-is-relative">
                            <table
                                class="slds-table slds-table--edit slds-table--bordered slds-table--fixed-layout slds-no-cell-focus"
                                role="grid">
                                <thead>
                                    <tr class="slds-line-height--reset">
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate" title="Name"></span>
                                        </th>
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate" title="Name">医院</span>
                                        </th>
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate"
                                                title="Name">{!v.fieldsmap.Department_Cateogy__c}</span>
                                        </th>
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate" title="Name">{!v.fieldsmap.doctor2__c}</span>
                                            <!-- 客户人员 -->
                                        </th>
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate"
                                                title="Name">{!v.fieldsmap.visitor_title__c}</span>
                                        </th>
                                        <th class="table_header slds-text-title--caps">
                                            <span class="slds-truncate" title="Name">{!v.fieldsmap.WorkRecord__c}</span>
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <aura:iteration items="{!v.reports_now}" var="item" indexVar="index">
                                        <tr aura:id="modal_data_list_tr" class="slds-hint-parent">
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.Department_Cateogy_text__c}">{!item.Name}</span>
                                                </span>
                                            </td>
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.Agency_Hospital__r.Name}">{!item.Agency_Hospital__r.Name}</span>
                                                </span>
                                            </td>
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.Department_Cateogy_text__c}">{!item.Department_Cateogy_text__c}</span>
                                                </span>
                                            </td>
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.doctor2__r.Name}">{!item.doctor2__r.Name}</span>
                                                </span>
                                            </td>
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.visitor_title__c}">{!item.visitor_title__c}</span>
                                                </span>
                                            </td>
                                            <td role="gridcell" class="slds-cell-edit">
                                                <span class="slds-grid slds-grid--align-spread">
                                                    <span class="slds-truncate"
                                                        title="{!item.WorkRecord__c}">{!item.WorkRecord__c}</span>
                                                </span>
                                            </td>
                                        </tr>
                                    </aura:iteration>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </aura:renderIf>
            </div>
        </div>
    </div>
    <div aura:id="modal_bg" class="disp_none slds-backdrop slds-backdrop--open"></div>
    <div aura:id="modal_confirm" role="dialog" tabindex="-2" aria-labelledby="header43"
        class="disp_none slds-modal slds-fade-in-open">
        <div class="slds-modal__container">
            <div class="slds-modal__header">
                <h2 id="header43" class="slds-text-heading--medium">{!v.modal_confirm_title}</h2>
            </div>
            <div class="slds-modal__content slds-p-around--medium">
                <p>{!v.modal_confirm_text}</p>
            </div>
            <div class="slds-modal__footer">
                <ui:button label="是" class="slds-button slds-button--brand" press="{!c.yes_button}" />
                <ui:button label="否" class="slds-button slds-button--neutral" press="{!c.no_button}" />
            </div>
        </div>
    </div>
    <div aura:id="modal_confirm_bg" class="disp_none slds-backdrop slds-backdrop--open"></div>
    <div aura:id="modal_newAC" role="dialog" tabindex="-3" aria-labelledby="headertest"
        class="disp_none slds-modal slds-fade-in-open">
        <div class="slds-modal__container">
            <div class="slds-modal__header">
                <h2 id="headertest" class="slds-text-heading--medium">新建.拜访人</h2>
            </div>
            <div class="slds-modal__content slds-p-around--medium">
                <lightning:recordEditForm aura:id="recordEditForm" objectApiName="Agency_Contact__c"
                    onsuccess="{!c.handleSuccess}" onload="{!c.showRequiredFields}" onsubmit="{!c.handleSubmit}">
                    <lightning:messages aura:id="OppMessage" />
                    <!-- onload="{!c.showRequiredFields}" -->
                    <aura:renderIf isTrue="{!v.truthy}">
                        <lightning:inputField fieldName="Name" aura:id="newOpportunityField" />
                        <lightning:inputField fieldName="Type__c" aura:id="newOpportunityField" />
                        <lightning:inputField fieldName="Doctor_Division1__c" aura:id="newOpportunityField" />
                    </aura:renderIf>
                    <br />
                    <br />
                    <br />
                    <br />
                    <br />
                    <div class="save_button_area">
                        <lightning:button class="slds-m-top_small" type="button" label="取消"
                            onclick="{!c.createCancel}" />
                        <lightning:button class="slds-m-top_small" type="button" label="保存"
                            onclick="{!c.handleSubmit}" />
                    </div>
                </lightning:recordEditForm>
            </div>
        </div>
    </div>
</aura:component>
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReport.css
@@ -1,3 +1,4 @@
@import 'c/lexCssUtility';
.THIS .bcolor {
    color: #333;
}
@@ -138,4 +139,22 @@
.THIS tr:hover .encrypt{
    display: none;
}
.THIS tr:hover .encrypt{
    display: none;
}
.THIS .buttonFontSize{
    font-size: 18px;
    min-width: 80px;
    max-width: 110px;
}
.THIS .fontSize{
    font-size: 18px;
}
.THIS thead th{
    font-size: 18px;
}
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportController.js
@@ -1,389 +1,348 @@
({
  doInit: function (component, event, helper) {
    helper.doinit(component, event, helper);
    component.set("v.errorColumns", [
      {
        label: "错误行",
        fieldName: "errorRow",
        type: "text",
        hideDefaultActions: true,
        initialWidth: 100
      },
      {
        label: "错误信息",
        fieldName: "errorInfo",
        type: "text",
        hideDefaultActions: true
      }
    ]);
  },
    doInit: function (component, event, helper) {
        helper.doinit(component, event, helper);
    },
  createAopp: function (component, event, helper) {
    var addRecordEvent = $A.get("e.force:createRecord");
    addRecordEvent.setParams({
      entityApiName: "Agency_Opportunity__c",
      recordTypeId: "012100000006KW7"
    });
    addRecordEvent.fire();
  },
    createAopp: function (component, event, helper) {
        var addRecordEvent = $A.get('e.force:createRecord');
        addRecordEvent.setParams({
            entityApiName: 'Agency_Opportunity__c',
            recordTypeId: '012100000006KW7'
        });
        addRecordEvent.fire();
    },
  new_report: function (component, event, helper) {
    component.find("save_button").set("v.label", "保存并新建");
    helper.new_report(component, event, helper);
  },
    new_report: function (component, event, helper) {
        component.find('save_button').set('v.label', '保存并新建');
        helper.new_report(component, event, helper);
    },
  copy_button: function (component, event, helper) {
    component.find("save_button").set("v.label", "保存并新建");
    helper.copy_button(component, event, helper);
  },
  delete_button: function (component, event, helper) {
    helper.delete_button(component, event, helper);
  },
  change_report_radio: function (component, event, helper) {
    helper.change_report_radio(component, event, helper);
  },
    copy_button: function (component, event, helper) {
        component.find('save_button').set('v.label', '保存并新建');
        helper.copy_button(component, event, helper);
    },
    delete_button: function (component, event, helper) {
        helper.delete_button(component, event, helper);
    },
    change_report_radio: function (component, event, helper) {
        helper.change_report_radio(component, event, helper);
    },
  edit_button: function (component, event, helper) {
    component.find("save_button").set("v.label", "保存");
    helper.edit_button(component, event, helper);
  },
    edit_button: function (component, event, helper) {
        component.find('save_button').set('v.label', '保存');
        helper.edit_button(component, event, helper);
    },
  createCon: function (component, event, helper) {
    helper.createCon(component, event, helper);
  },
    createCon: function (component, event, helper) {
        helper.createCon(component, event, helper);
    },
  showRequiredFields: function (component, event, helper) {
    $A.util.removeClass(component.find("newOpportunityField"), "none");
    $A.util.removeClass(component.find("newOpportunityField"), "none");
  },
    showRequiredFields: function (component, event, helper) {
        $A.util.removeClass(component.find("newOpportunityField"), "none");
        $A.util.removeClass(component.find("newOpportunityField"), "none");
    },
  handleSuccess: function (component, event, helper) {
    helper.handleSuccess(component, event, helper);
  },
    handleSuccess: function (component, event, helper) {
        helper.handleSuccess(component, event, helper);
    },
  handleSubmit: function (component, event, helper) {
    event.preventDefault(); // stop form submission
    var showValidationError = false;
    var fields = component.find("newOpportunityField");
    var vaildationFailReason = "";
    let agencyReport = Object.create(null);
    fields.forEach(function (field) {
      if (
        field.get("v.fieldName") === "Type__c" &&
        $A.util.isEmpty(field.get("v.value"))
      ) {
        showValidationError = true;
        vaildationFailReason = "分类不能为空!";
      } else if (
        field.get("v.fieldName") === "Doctor_Division1__c" &&
        $A.util.isEmpty(field.get("v.value"))
      ) {
        showValidationError = true;
        if (vaildationFailReason != "") {
          vaildationFailReason += "医生区分(职务)不能为空!";
        } else {
          vaildationFailReason = "医生区分(职务)不能为空!";
        }
      }
      //SWAG-CF58C3 fy start
      if (field.get("v.fieldName") === "Name") {
        agencyReport["name"] = field.get("v.value");
      } else if (field.get("v.fieldName") === "Type__c") {
        agencyReport["type"] = field.get("v.value");
      } else if (field.get("v.fieldName") === "Doctor_Division1__c") {
        agencyReport["doctorDivision1"] = field.get("v.value");
      }
      //SWAG-CF58C3 fy end
    });
    if (!showValidationError) {
      //SWAG-CF58C3 fy start
      var agencyHospitalid = component.get("v.hospitalLinkId");
      //zhj MEBG新方案改造 2022-11-29 start
      debugger;
      let hospitalName = "";
      //调用后端searchAgencyDataId方法查询出医院下面所有客户人员dataid
      helper.CallBackAction(
        component,
        "searchAgencyDataId",
        {
          hospitalId: agencyHospitalid
        },
        function (data) {
          if (data.getState() == "SUCCESS") {
            var data = data.getReturnValue();
            if (data.IsSuccess == true) {
              let agencyContactIds = "";
              if (data.Message == "" && data.Data && data.Data.length > 0) {
                hospitalName = data.Data[0].Agency_Hospital__r.Name;
                for (var i = 0; i < data.Data.length; i++) {
                  if (data.Data[i].AWS_Data_Id__c)
                    agencyContactIds += "," + data.Data[i].AWS_Data_Id__c;
    handleSubmit: function (component, event, helper) {
        event.preventDefault(); // stop form submission
        var showValidationError = false;
        var fields = component.find("newOpportunityField");
        var vaildationFailReason = '';
        let agencyReport = Object.create(null);
        fields.forEach(function (field) {
            if (field.get("v.fieldName") === 'Type__c' && $A.util.isEmpty(field.get("v.value"))) {
                showValidationError = true;
                vaildationFailReason = "分类不能为空!";
            } else if (field.get("v.fieldName") === 'Doctor_Division1__c' && $A.util.isEmpty(field.get("v.value"))) {
                showValidationError = true;
                if (vaildationFailReason != '') {
                    vaildationFailReason += "医生区分(职务)不能为空!";
                } else {
                    vaildationFailReason = "医生区分(职务)不能为空!";
                }
                agencyContactIds = agencyContactIds.substring(1);
                agencyReport["agencyContactIds"] = agencyContactIds;
              } else {
                agencyReport["agencyContactIds"] = agencyContactIds;
              }
              var arr = new Array();
              arr.push(agencyReport);
              var requestData = JSON.stringify(arr);
              // helper.set_aws_url(component,data,agencyHospitalid);
              var token = component.get("v.AWStoken");
              var newUrl = component.get("v.AWSinsert") + "V2";
              component.set("v.login", true);
              helper.insert_agencycontact(
                component,
                token,
                newUrl,
                requestData,
                agencyHospitalid,
                helper,
                hospitalName
              );
            } else {
              helper.ShowToast({
                message: data.message,
                type: "error"
              });
            }
          } else {
            helper.ShowToast({
              message: "searchAgency失败",
              type: "error"
            });
          }
            //SWAG-CF58C3 fy start
            if (field.get("v.fieldName") === 'Name') {
                agencyReport['name'] = field.get("v.value");
            } else if (field.get("v.fieldName") === 'Type__c') {
                agencyReport['type'] = field.get("v.value");
            } else if (field.get("v.fieldName") === 'Doctor_Division1__c') {
                agencyReport['doctorDivision1'] = field.get("v.value");
            }
            //SWAG-CF58C3 fy end
        });
        if (!showValidationError) {
            //SWAG-CF58C3 fy start
            var agencyHospitalid = component.get('v.hospitalLinkId');
            //zhj MEBG新方案改造 2022-11-29 start
            debugger
            let hospitalName = '';
            //调用后端searchAgencyDataId方法查询出医院下面所有客户人员dataid
            helper.CallBackAction(component, 'searchAgencyDataId', {
                hospitalId: agencyHospitalid
            }, function (data) {
                if (data.getState() == "SUCCESS") {
                    var data = data.getReturnValue();
                    if (data.IsSuccess == true) {
                        let agencyContactIds = ''
                        if (data.Message == '' && data.Data && data.Data.length > 0) {
                            hospitalName = data.Data[0].Agency_Hospital__r.Name;
                            for (var i = 0; i < data.Data.length; i++) {
                                if (data.Data[i].AWS_Data_Id__c)
                                    agencyContactIds += ',' + data.Data[i].AWS_Data_Id__c;
                            }
                            agencyContactIds = agencyContactIds.substring(1);
                            agencyReport['agencyContactIds'] = agencyContactIds;
                        } else {
                            agencyReport['agencyContactIds'] = agencyContactIds;
                        }
                        var arr = new Array();
                        arr.push(agencyReport);
                        var requestData = JSON.stringify(arr);
                        // helper.set_aws_url(component,data,agencyHospitalid);
                        var token = component.get('v.AWStoken');
                        var newUrl = component.get('v.AWSinsert') + 'V2';
                        component.set('v.login', true);
                        helper.insert_agencycontact(component, token, newUrl, requestData, agencyHospitalid, helper, hospitalName);
                    } else {
                        helper.ShowToast({
                            "message": data.message,
                            "type": "error"
                        });
                    }
                } else {
                    helper.ShowToast({
                        "message": 'searchAgency失败',
                        "type": "error"
                    });
                }
            })
            //zhj MEBG新方案改造 2022-11-29 end
            // var arr = new Array();
            // arr.push(agencyReport);
            // var data = JSON.stringify(arr);
            // var token = component.get('v.AWStoken');
            // var newUrl = component.get('v.AWSinsert');
            // component.set('v.login',true);
            // helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
            //SWAG-CF58C3 fy end
            // helper.newlyBuild(component, event, helper);
        } else {
            component.find('OppMessage').setError(vaildationFailReason);
        }
      );
      //zhj MEBG新方案改造 2022-11-29 end
      // var arr = new Array();
      // arr.push(agencyReport);
      // var data = JSON.stringify(arr);
      // var token = component.get('v.AWStoken');
      // var newUrl = component.get('v.AWSinsert');
      // component.set('v.login',true);
      // helper.insert_agencycontact(component,token,newUrl,data,agencyHospitalid,helper);
      //SWAG-CF58C3 fy end
      // helper.newlyBuild(component, event, helper);
    } else {
      component.find("OppMessage").setError(vaildationFailReason);
    }
  },
    },
  createCancel: function (component, event, helper) {
    helper.createCancel(component, event, helper);
  },
    createCancel: function (component, event, helper) {
        helper.createCancel(component, event, helper);
    },
  yes_button: function (component, event, helper) {
    component.set("v.confirm_status", 1);
    helper.close_confirm(
      component,
      component.get("v.modal_confirm_title"),
      component.get("v.modal_confirm_text")
    );
  },
    yes_button: function (component, event, helper) {
        component.set('v.confirm_status', 1);
        helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text'));
    },
  no_button: function (component, event, helper) {
    component.set("v.confirm_status", 2);
    helper.close_confirm(
      component,
      component.get("v.modal_confirm_title"),
      component.get("v.modal_confirm_text")
    );
  },
    no_button: function (component, event, helper) {
        component.set('v.confirm_status', 2);
        helper.close_confirm(component, component.get('v.modal_confirm_title'), component.get('v.modal_confirm_text'));
    },
  toggle_report: function (component, event, helper) {
    helper.toggle_report(component, event, helper);
  },
    toggle_report: function (component, event, helper) {
        helper.toggle_report(component, event, helper);
    },
  save_report: function (component, event, helper) {
    helper.save_report(component, event, helper);
  },
    save_report: function (component, event, helper) {
        helper.save_report(component, event, helper);
    },
  select_date_change: function (component, event, helper) {
    helper.select_date_change(component, event, helper);
  },
    select_date_change: function (component, event, helper) {
        helper.select_date_change(component, event, helper);
    },
  select_agency_change: function (component, event, helper) {
    debugger;
    helper.select_agency_change(component, event, helper);
  },
    select_agency_change: function (component, event, helper) {
        debugger
        helper.select_agency_change(component, event, helper);
    },
  hosChange: function (component, event, helper) {
    var hospital_name = event.getParam("value");
    var hospital_nameld = component.get("v.UseProduct1s");
    if (hospital_name.match(/(\S+\s)+/)) {
      if (hospital_nameld != hospital_name) {
        helper.searchHos(component, event, helper);
      }
    } else {
      if (hospital_name == "") {
        helper.hideSearchs(component, event, helper);
      } else {
        helper.hideSearch(component, event, helper);
      }
    }
  },
  selectHos: function (component, event, helper) {
    helper.selectHos(component, event, helper);
    helper.setOpportunity_cfilter(component);
  },
  //使用产品1
  UseProduct1Change: function (component, event, helper) {
    var UseProduct1Name = event.getParam("value");
    var UseProduct1Nameold = component.get("v.UseProduct1s");
    debugger;
    if (UseProduct1Name.match(/(\S+\s)+/)) {
      if (UseProduct1Name != UseProduct1Nameold) {
        helper.searchUseProduct1(component, event, helper);
      }
    } else {
      if (UseProduct1Name == "") {
        helper.hideSearchUseProduct1s(component, event, helper);
      } else {
        helper.hideSearchUseProduct1(component, event, helper);
      }
    }
  },
  seletUseProduct1Change: function (component, event, helper) {
    helper.seletUseProduct1Change(component, event, helper);
  },
  //使用产品2
  UseProduct2Change: function (component, event, helper) {
    var UseProduct2Name = event.getParam("value");
    var UseProduct2Nameold = component.get("v.UseProduct2s");
    if (UseProduct2Name.match(/(\S+\s)+/)) {
      if (UseProduct2Name != UseProduct2Nameold) {
        helper.searchUseProduct2(component, event, helper);
      }
    } else {
      if (UseProduct2Name == "") {
        helper.hideSearchUseProduct2s(component, event, helper);
      } else {
        helper.hideSearchUseProduct2(component, event, helper);
      }
    }
  },
  seletUseProduct2Change: function (component, event, helper) {
    helper.seletUseProduct2Change(component, event, helper);
  },
  productcategoryChange2: function (component, event, helper) {
    helper.productcategoryChange2(component, event, helper);
  },
  //使用产品3
  UseProduct3Change: function (component, event, helper) {
    var UseProduct3Name = event.getParam("value");
    var UseProduct3Nameold = component.get("v.UseProduct3s");
    if (UseProduct3Name.match(/(\S+\s)+/)) {
      if (UseProduct3Name != UseProduct3Nameold) {
        helper.searchUseProduct3(component, event, helper);
      }
    } else {
      if (UseProduct3Name == "") {
        helper.hideSearchUseProduct3s(component, event, helper);
      } else {
        helper.hideSearchUseProduct3(component, event, helper);
      }
    }
  },
  seletUseProduct3Change: function (component, event, helper) {
    helper.seletUseProduct3Change(component, event, helper);
  },
    hosChange: function (component, event, helper) {
        var hospital_name = event.getParam("value");
        var hospital_nameld = component.get("v.UseProduct1s");
        if (hospital_name.match(/(\S+\s)+/)) {
            if (hospital_nameld != hospital_name) {
                helper.searchHos(component, event, helper);
            }
        } else {
            if (hospital_name == '') {
                helper.hideSearchs(component, event, helper);
            } else {
                helper.hideSearch(component, event, helper);
            }
        }
    },
    selectHos: function (component, event, helper) {
        helper.selectHos(component, event, helper);
        helper.setOpportunity_cfilter(component);
    },
    //使用产品1
    UseProduct1Change: function (component, event, helper) {
        var UseProduct1Name = event.getParam("value");
        var UseProduct1Nameold = component.get("v.UseProduct1s");
        debugger
        if (UseProduct1Name.match(/(\S+\s)+/)) {
            if (UseProduct1Name != UseProduct1Nameold) {
                helper.searchUseProduct1(component, event, helper);
            }
        } else {
            if (UseProduct1Name == '') {
                helper.hideSearchUseProduct1s(component, event, helper);
            } else {
                helper.hideSearchUseProduct1(component, event, helper);
            }
        }
    },
    seletUseProduct1Change: function (component, event, helper) {
        helper.seletUseProduct1Change(component, event, helper);
    },
    //使用产品2
    UseProduct2Change: function (component, event, helper) {
        var UseProduct2Name = event.getParam("value");
        var UseProduct2Nameold = component.get("v.UseProduct2s");
        if (UseProduct2Name.match(/(\S+\s)+/)) {
            if (UseProduct2Name != UseProduct2Nameold) {
                helper.searchUseProduct2(component, event, helper);
            }
        } else {
            if (UseProduct2Name == '') {
                helper.hideSearchUseProduct2s(component, event, helper);
            } else {
                helper.hideSearchUseProduct2(component, event, helper);
            }
        }
    },
    seletUseProduct2Change: function (component, event, helper) {
        helper.seletUseProduct2Change(component, event, helper);
    },
    productcategoryChange2: function (component, event, helper) {
        helper.productcategoryChange2(component, event, helper);
    },
    //使用产品3
    UseProduct3Change: function (component, event, helper) {
        var UseProduct3Name = event.getParam("value");
        var UseProduct3Nameold = component.get("v.UseProduct3s");
        if (UseProduct3Name.match(/(\S+\s)+/)) {
            if (UseProduct3Name != UseProduct3Nameold) {
                helper.searchUseProduct3(component, event, helper);
            }
        } else {
            if (UseProduct3Name == '') {
                helper.hideSearchUseProduct3s(component, event, helper);
            } else {
                helper.hideSearchUseProduct3(component, event, helper);
            }
        }
    },
    seletUseProduct3Change: function (component, event, helper) {
        helper.seletUseProduct3Change(component, event, helper);
    },
  select_department: function (component, event, helper) {
    helper.setOpportunity_cfilter(component);
  },
  doctor_change: function (component, event, helper) {
    helper.doctor_change(component, event, helper);
  },
  stageNameChange: function (component, event, helper) {
    helper.stageNameChange(component, event, helper);
  },
  onDragOver: function (component, event, helper) {
    event.preventDefault();
  },
  onDrop: function (component, event, helper) {
    event.stopPropagation();
    event.preventDefault();
    event.dataTransfer.dropEffect = "copy";
    var files = event.dataTransfer.files;
    helper.readFile(component, helper, files[0]);
  },
  CreateRecord: function (component, event, helper) {
    var files = event.getSource().get("v.files");
    helper.readFile(component, helper, files[0]);
  },
    select_department: function (component, event, helper) {
        helper.setOpportunity_cfilter(component);
    },
    doctor_change: function (component, event, helper) {
        helper.doctor_change(component, event, helper);
    },
    stageNameChange: function (component, event, helper) {
        helper.stageNameChange(component, event, helper);
    },
    onDragOver: function (component, event, helper) {
        event.preventDefault();
    },
  processFileContent: function (component, event, helper) {
    helper.saveRecords(component, event, helper);
    component.set("v.showErrorInfo", false);
  },
    onDrop: function (component, event, helper) {
        event.stopPropagation();
        event.preventDefault();
        event.dataTransfer.dropEffect = 'copy';
        var files = event.dataTransfer.files;
        helper.readFile(component, helper, files[0]);
    },
    CreateRecord: function (component, event, helper) {
        var files = event.getSource().get("v.files");
        helper.readFile(component, helper, files[0]);
        component.set("v.showErrorInfo",false);
    },
  cancel: function (component, event, helper) {
    component.set("v.showMain", true);
  },
    processFileContent: function (component, event, helper) {
        helper.saveRecords(component, event, helper);
        component.set("v.showErrorInfo", false);
    },
  import: function (component, event, helper) {
    helper.showImport(component);
  },
  exportDate: function (component, event, helper) {
    var stockData = component.get("v.reports_date");
    console.log("导出数据" + stockData);
    var csv = helper.convertArrayOfObjectsToCSV(component, stockData);
    if (csv == null) {
      return;
    }
    cancel: function (component, event, helper) {
        component.set("v.showMain", true);
    },
    var universalBOM = "\uFEFF";
    var hiddenElement = document.createElement("a");
    hiddenElement.href =
      "data:text/csv;charset=utf-8," + encodeURI(universalBOM + csv);
    hiddenElement.target = "_self"; //
    hiddenElement.download = "ExportData.csv"; // CSV file Name* you can change it.[only name not .csv]
    document.body.appendChild(hiddenElement); // Required for FireFox browser
    hiddenElement.click(); // using click() js function to download csv file
  },
  export_condition: function (component, event, helper) {
    helper.showExport(component);
  },
    import: function (component, event, helper) {
        helper.showImport(component);
    },
    exportDate: function (component, event, helper) {
        var stockData = component.get("v.reports_date");
        console.log('导出数据' + stockData);
        var csv = helper.convertArrayOfObjectsToCSV(component, stockData);
        if (csv == null) { return; }
  select_repores_date: function (component, event, helper) {
    helper.select_repores_date(component, event, helper);
  },
  export: function (component, event, helper) {
    console.log("进入export");
    var stockData = component.get("v.reports_date");
    console.log("查出的数据" + stockData);
  },
  close_import: function (component, event, helper) {
    component.set("v.showMain", true);
    helper.close_import(component);
  },
  close_export: function (component, event, helper) {
    component.set("v.showMain", true);
    helper.close_export(component);
  },
  select_ConsumptionOfConsumables: function (component, event, helper) {
    helper.select_ConsumptionOfConsumables(component, event, helper);
  },
  select_purpose_type: function (component, event, helper) {
    helper.selectPurposeType(component, event, helper);
  },
  select_warlocksNumber: function (component, event, helper) {
    helper.select_warlocksNumber(component, event, helper);
  },
  selectProductClassification: function (component, event, helper) {
    helper.selectProductClassification(component, event, helper);
  },
  selectpurposetype: function (component, event, helper) {
    helper.selectpurposetype(component, event, helper);
  },
  return_main_page: function (component, event, helper) {
    window.open("/customer/", "_self");
  },
  exportErrorInfo: function (component, event, helper) {
    helper.exportErrorInfoHelper(component);
  }
});
        var universalBOM = "\uFEFF";
        var hiddenElement = document.createElement('a');
        hiddenElement.href = 'data:text/csv;charset=utf-8,' + encodeURI(universalBOM + csv);
        hiddenElement.target = '_self'; //
        hiddenElement.download = 'ExportData.csv';  // CSV file Name* you can change it.[only name not .csv]
        document.body.appendChild(hiddenElement); // Required for FireFox browser
        hiddenElement.click(); // using click() js function to download csv file
    },
    export_condition: function (component, event, helper) {
        helper.showExport(component);
    },
    select_repores_date: function (component, event, helper) {
        helper.select_repores_date(component, event, helper);
    },
    export: function (component, event, helper) {
        console.log('进入export');
        var stockData = component.get("v.reports_date");
        console.log('查出的数据' + stockData);
    },
    close_import: function (component, event, helper) {
        component.set("v.showMain", true);
        helper.close_import(component);
    },
    close_export: function (component, event, helper) {
        component.set("v.showMain", true);
        helper.close_export(component);
    },
    select_ConsumptionOfConsumables: function (component, event, helper) {
        helper.select_ConsumptionOfConsumables(component, event, helper);
    },
    select_purpose_type: function (component, event, helper) {
        helper.selectPurposeType(component, event, helper);
    },
    select_warlocksNumber: function (component, event, helper) {
        helper.select_warlocksNumber(component, event, helper);
    },
    selectProductClassification: function (component, event, helper) {
        helper.selectProductClassification(component, event, helper);
    },
    selectpurposetype: function (component, event, helper) {
        helper.selectpurposetype(component, event, helper);
    },
    return_main_page: function (component, event, helper) {
        window.open('/customer/', '_self');
    },
    exportErrorInfo: function(component,event,helper){
        helper.exportErrorInfoHelper(component);
    },
})
force-app/main/default/aura/RetrospectiveWeeklyReport/RetrospectiveWeeklyReportHelper.js
Diff too large
force-app/main/default/aura/WeeklyReport/WeeklyReport.cmp
@@ -95,6 +95,7 @@
    
    <!--ロード中...-->
    <aura:renderIf isTrue="{!v.login}">
        <!-- add by Deloitte-Link 2023-6-19 -->
       <div class="weeklyReportSpinner">
          <div class="slds-spinner_container">
              <div class="slds-spinner--brand slds-spinner slds-spinner--medium" role="alert">
@@ -186,7 +187,7 @@
                                </span>
                            </td>
                            <th scope="row" tabindex="0" class="slds-cell-edit">
                                <span class="slds-grid slds-grid--align-spread" style="word-wrap:break-word;word-break:break-all; ">
                                <span class="slds-grid slds-grid--align-spread">
                                    {!item.Agency_Hospital__r.Name}
                                </span>
                            </th>
force-app/main/default/aura/WeeklyReport/WeeklyReport.css
@@ -140,6 +140,7 @@
    display: none;
}
/* add by Deloitte-Link 2023-6-19 start*/
.THIS .weeklyReportSpinner{
    top:100px;
}
@@ -147,4 +148,5 @@
.THIS .slds-spinner_container{
    position: absolute;
    top:100px;
}
}
/* add by Deloitte-Link 2023-6-19 end*/
force-app/main/default/aura/WeeklyReport/WeeklyReportHelper.js
@@ -437,8 +437,9 @@
                    if (select_product_category3 != null && select_product_category3 != '') {
                        component.find('select_Product3').set('v.value', select_product_category3);
                    }
                    console.log('reportDate = ' + reportDate);
                    if (reportDate != null) {
                        console.log('reportDate = ' + reportDate);
                        component.set('v.data.Report_Date__c', reportDate);
                    }
                    
@@ -447,7 +448,7 @@
            }
        } else {
            // CLOSE
            console.log('reportDate = ' + reportDate);
            var select_report_data = component.get('v.select_report_data');
            var Report_Date__c = component.get('v.data.Report_Date__c');
            var Agency_Hospital__c = component.get('v.hospitalLinkId');
@@ -963,6 +964,7 @@
        component.find('select_Product1').set('v.value','');
        component.find('select_Product2').set('v.value','');
        component.find('select_Product3').set('v.value','');
        console.log('reportDate = 空');
        component.set('v.data.Report_Date__c', '');
        component.set('v.oppdata.Close_Forecasted_Date__c', '');
        component.set('v.oppdata.Amount__c', '');
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls
New file
@@ -0,0 +1,215 @@
public without sharing class LexNewAndEditBasePIPLController {
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    // 字段信息
    public static Map<string, SObjectField> fieldMap = new Map<string, SObjectField>();
    public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType) {
        try {
            System.debug('rid = ' + rid);
            System.debug('recordTypeId = ' + recordTypeId);
            System.debug('sobjectType = ' + sobjectType);
            fieldMap = schemaMap.get(sobjectType).getDescribe().fields.getMap();
            ResponseBodyLWC res = new ResponseBodyLWC();
            Map<String, object> data = new Map<String, object>();
            res.entity = data;
            if (String.isBlank(recordTypeId)) {
                data.put('recordTypeId', LayoutDescriberHelper.getDefaultRecordType(sobjectType));
            }
            //编辑
            if(!String.isBlank(rid)){
                //获取对应对象的字段                List<Sobject> lso = Database.query('select id from RecordType where SobjectType = :sobjectType');
                String sql = 'select ';
                DescribeSObjectResult objectType = rid.getSobjectType().getDescribe();
                List<String> objectFields = new List<String>(objectType.fields.getMap().keySet());
                sql += String.join(objectFields, ',') +' from '+sobjectType+' where id =\''+rid+'\' limit 1';
                System.debug('sql = ' + sql);
                Sobject leadData = Database.query(sql);
                if(leadData == null){
                    return new ResponseBodyLWC('Error',500, 'id不存在', '');
                }
                if(objectFields.contains('recordtypeid')){
                    recordTypeId = (String)leadData.get('RecordTypeId');
                    System.debug('recordTypeId: ' + recordTypeId);
                }
                List<Metadata.LayoutSection> layout = MetaDataUtility.GetRecordTypePageLayout(recordTypeId, sobjectType);
                data.put('layout', Json.serialize(reviseMetaLayouts(layout)));
                data.put('recordTypeId', recordTypeId);
                System.debug('data.recordTypeId: ' + data.get('recordTypeId'));
                data.put('AWSDataId', (String)leadData.get('AWS_Data_Id__c'));
                //获取值
                System.debug('leadData = ' + JSON.serialize(leadData));
                data.put('data', leadData);
            }else {
                List<Metadata.LayoutSection> layout = MetaDataUtility.GetRecordTypePageLayout(recordTypeId, sobjectType);
                data.put('layout', Json.serialize(reviseMetaLayouts(layout)));
            }
            //获取PI字段
            PIHelper.PIIntegration piIntegration = PIHelper.getPIIntegrationInfo(sobjectType);
            Map<String, String> AWSToSobjectNonEncryptedMap = new Map<String, String>();
            List<String> AWSToSobjectNonEncryptedMapKeySet = new List<String>();
            for (PI_Field_Policy_Detail__c PIDetail : piIntegration.PIDetails) {
                AWSToSobjectNonEncryptedMap.put(PIDetail.AWS_Field_API__c, PIDetail.SF_Field_API_Name__c);
                AWSToSobjectNonEncryptedMapKeySet.add(PIDetail.AWS_Field_API__c);
            }
            data.put('AWSToSobjectNonEncryptedMap', AWSToSobjectNonEncryptedMap);
            data.put('AWSToSobjectNonEncryptedMapKeySet', AWSToSobjectNonEncryptedMapKeySet);
            data.put('staticResource', Json.serialize(PIHelper.getPIIntegrationInfo(sobjectType)));
            res.status = 'Success';
            res.code = 200;
            res.msg = '';
            return res;
        } catch (Exception e) {
            System.debug('error = ' + e.getMessage() + ' line = ' + e.getLineNumber());
            return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
        }
    }
    public static ResponseBodyLWC queryAccount(String accountTypes, String accountId) {
        ResponseBodyLWC res = new ResponseBodyLWC();
        Map<String, object> data = new Map<String, object>();
        res.entity = data;
        System.debug('accountType = ' + accountTypes);
        System.debug('accountId = ' + accountId);
        try {
            List<Object> types = (List<Object>) JSON.deserializeUntyped(accountTypes);
            System.debug('types=' + types);
            String soql = 'select Id,Name,';
            for (Object t : types) {
                soql += (String) t + ',';
            }
            soql = soql.substring(0, soql.length() - 1);
            soql += ' from Account where id=\'' + accountId + '\'';
            System.debug('soql=' + soql);
            Sobject account = new Account();
            if (!Test.isRunningTest()) {
                account = Database.query(soql);
            } else {
                account.put('Id', '000000000000000');
            }
            Map<String, Map<String, String>> m = new Map<String, Map<String, String>>();
            System.debug('account=' + account);
            for (Object ty : types) {
                String t = (String) ty;
                if (account.get(t) != null || Test.isRunningTest()) {
                    Sobject acc = new Account();
                    if (Test.isRunningTest()) {
                        acc.put('Id', '000000000000000');
                        acc.put('Name', 'Name');
                    } else {
                        acc = Database.query('select Id,Name from Account where id=\'' + account.get(t) + '\'');
                    }
                    Map<String, String> n = new Map<String, String>();
                    n.put('Id', (String) acc.get('Id'));
                    n.put('Name', (String) acc.get('Name'));
                    m.put(t, n);
                }
            }
            System.debug('m=' + m);
            data.put('m', m);
            data.put('account', account);
            res.status = 'Success';
            res.code = 200;
            res.msg = '';
            return res;
        } catch (Exception e) {
            return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
        }
    }
    public static ResponseBodyLWC searchContactInit(String accountId, String searchKeyWord) {
        ResponseBodyLWC res = new ResponseBodyLWC();
        Map<String, object> data = new Map<String, object>();
        res.entity = data;
        System.debug('accountId = ' + accountId);
        System.debug('searchKeyWord = ' + searchKeyWord);
        try {
            List<Contact> conList = new List<Contact>();
            List<Contact> noPIContactList = new List<Contact>();
            if (checkNullString(accountId) && checkNullString(searchKeyWord)) {
                conList = new List<Contact>();
            } else {
                if (checkNullString(accountId)) {
                    conList = new List<Contact>();
                } else {
                    //2022-5-12 yjk 将科室匹配改为医院匹配查询联系人 statt
                    Account act = [SELECT id, Hospital__c FROM Account WHERE id = :accountId];
                    conList = new List<Contact>(
                        [
                            SELECT Id, AWS_Data_Id__c, Account.Name
                            FROM Contact
                            WHERE Account.Hospital__c = :act.Hospital__c AND AWS_Data_Id__c != ''
                        ]
                    );
                    noPIContactList = AWSServiceTool.getNoPIContact(searchKeyWord, accountId);
                    //2022-5-12 yjk 将科室匹配改为医院匹配查询联系人 end
                }
            }
            Map<String, Contact> awsIdToContactMap = new Map<String, Contact>();
            List<String> conAWSIds = new List<String>();
            for (Contact con : conList) {
                conAWSIds.add(con.AWS_Data_Id__c);
                awsIdToContactMap.put(con.AWS_Data_Id__c, con);
            }
            data.put('awsIdToContactMap', awsIdToContactMap);
            data.put('conAWSIds', conAWSIds);
            data.put('noPIContactList', noPIContactList);
            data.put('contactStaticResource', JSON.serialize(PIHelper.getPIIntegrationInfo('Contact')));
            res.status = 'Success';
            res.code = 200;
            res.msg = '';
            return res;
        } catch (Exception e) {
            return new ResponseBodyLWC('Error', 500, e.getMessage() + ' ' + e.getLineNumber(), '');
        }
    }
    public static Boolean checkNullString(String inputString) {
        if (String.isEmpty(inputString) || String.isBlank(inputString)) {
            return true;
        }
        return false;
    }
    /**
     *@description 转换layout
     *@param    sections                        默认metalayout
     *@return    List<Metadata.LayoutSection>    标准metalayout
     */
    public static List<Metadata.LayoutSection> reviseMetaLayouts(List<Metadata.LayoutSection> sections) {
        List<Metadata.LayoutSection> result = new List<Metadata.LayoutSection>();
        if (sections == null) {
            return null;
        }
        for (Metadata.LayoutSection s : sections) {
            Metadata.LayoutSection section = new Metadata.LayoutSection();
            section.customLabel = s.customLabel;
            section.detailHeading = s.detailHeading;
            section.editHeading = s.editHeading;
            section.label = s.label;
            section.style = s.style;
            result.add(section);
            for (Metadata.LayoutColumn c : s.layoutColumns) {
                if (c.layoutItems == null) {
                    break;
                }
                Metadata.LayoutColumn col = new Metadata.LayoutColumn();
                col.reserved = col.reserved;
                section.layoutColumns.add(col);
                for (Metadata.layoutItem item : c.layoutItems) {
                    if (!fieldMap.containsKey(item.field) || !isUpdateable(fieldMap.get(item.field).getDescribe())) {
                        System.debug(item.field);
                        continue;
                    }
                    col.layoutItems.add(item);
                }
            }
        }
        return result;
    }
    private static Boolean isUpdateable(Schema.DescribeFieldResult dfr) {
        return (new List<String>{ 'Id', 'Name' }).contains(dfr.getName()) || dfr.isUpdateable();
    }
}
force-app/main/default/classes/LexNewAndEditBasePIPLController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls
New file
@@ -0,0 +1,59 @@
public with sharing class LexNewAndEditContactPIPLController {
    public static Map<String, Schema.SObjectType> schemaMap = Schema.getGlobalDescribe();
    // 字段信息
    public static Map<string, SObjectField> fieldMap = new Map<string, SObjectField>();
    @AuraEnabled
    public static ResponseBodyLWC initData(Id rid, String recordTypeId, String sobjectType, String accid) {
        ResponseBodyLWC res = new ResponseBodyLWC();
        Map<String, object> data = new Map<String, object>();
        res.entity = data;
        Boolean isDoctor = true;
        string s = null;
        //如果有记录类型,判断是不是医院类型
        if (String.isNotBlank(recordTypeId)) {
            System.debug('recordTypeId = ' + recordTypeId);
            s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(recordTypeId).getDeveloperName();
            //说明无需加密
            if (s == 'Agency' || s == 'Internal_staff') {
                isDoctor = false;
                data.put('isDoctor', isDoctor);
                return new ResponseBodyLWC('Success', 200, '', data);
            }
        }
        //说明无需加密
        if (String.isNotBlank(accid)) {
            List<Account> accs = [SELECT RecordType.DeveloperName FROM account WHERE id = :accid];
            if (accs.size() > 0) {
                s = accs[0].RecordType.DeveloperName;
                if (s == 'Office' || s == 'AgencyContact' || s == 'Agency') {
                    isDoctor = false;
                    data.put('isDoctor', isDoctor);
                    return new ResponseBodyLWC('Success', 200, '', data);
                }
            }
        }
        //说明无需加密
        if (String.isNotBlank(rid)) {
            List<Contact> contact = [select Id,RecordTypeId from Contact where Id=:rid];
            if(String.isNotBlank(contact[0].RecordTypeId)){
                s = Schema.SObjectType.Contact.getRecordTypeInfosById().get(contact[0].RecordTypeId).getDeveloperName();
                if (s == 'Agency' || s == 'Internal_staff') {
                    isDoctor = false;
                    data.put('isDoctor', isDoctor);
                    return new ResponseBodyLWC('Success', 200, '', data);
                }
            }
        }
        ResponseBodyLWC rbl = LexNewAndEditBasePIPLController.initData(rid, recordTypeId, sobjectType);
        if(rbl.status == 'Success'){
            data = (Map<String,Object>)rbl.entity;
            data.put('isDoctor', isDoctor);
            rbl.entity = data;
        }
        return rbl;
    }
}
force-app/main/default/classes/LexNewAndEditContactPIPLController.cls-meta.xml
New file
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
    <apiVersion>57.0</apiVersion>
    <status>Active</status>
</ApexClass>
force-app/main/default/classes/LightningUtil.cls
@@ -212,7 +212,7 @@
                            Product_Category__c, Product_Category__r.Name, Result__c, visitor_title__c, Opportunity__c, Opportunity__r.Name,EffectProgress__c,SupportNeeds__c,
                            UseProduct1__c,UseProduct2__c,UseProduct3__c,UseProduct1__r.Name,UseProduct2__r.Name,UseProduct3__r.Name  
                            From Agency_Report__c
                            where Person_In_Charge2__c in :conMList and Report_Date__c >= :date1 and Report_Date__c <= :date2 and WeeklyReportClassification__c = ''];
                            where Person_In_Charge2__c in :conMList and Report_Date__c >= :date1 and Report_Date__c <= :date2 and WeeklyReportClassification__c = '' ];
        return reportlist;
    }
    //追溯系统
@@ -287,742 +287,7 @@
    public static Integer ControllerUtil() {
        Integer i = 0;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        i++;
        return i;
    }
    
force-app/main/default/classes/MetaDataUtility.cls
@@ -26,7 +26,7 @@
    }
    
    /*[{
            "attributes": {
            "attributes": {
                "type": "Layout",
                "url": "/services/data/v53.0/tooling/sobjects/Layout/00h10000009iAb5AAE"
            },
force-app/main/default/classes/WeeklyReportCmp.cls
@@ -253,6 +253,7 @@
        Agency_Report_Header__c agency_report_header = makeReportHeader(name, s_date, s_agency, head_key);
        agency_report_header = LightningUtil.upsertAgencyReportHeader(agency_report_header);
        system.debug('report Id:'+);
        return agency_report_header.Id;
    }
    public static Agency_Report_Header__c makeReportHeader(String name, String s_date, String s_agency, String head_key){
manifest/package.xml
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
     <types>
        <members>LexContactPIPLAura</members>
        <name>AuraDefinitionBundle</name>
    </types>
    <types>
        <members>lexNewAndEditContactPIPL</members>
        <name>LightningComponentBundle</name>
        <members>LexNewAndEditBasePIPLController</members>
        <name>ApexClass</name>
    </types>    
    <version>52.0</version>
</Package>