123
chenjingwu
2024-04-24 8a2c4b1d2e66ea83fcdf7ba519e09e587d84cafd
force-app/main/default/pages/AssetMaintain.page
@@ -1,8 +1,31 @@
<apex:page controller="AssetMaintainController" title="数据维护" showHeader="true" sidebar="false" id="allPage" action="{!init}" docType="html-5.0" lightningStylesheets="true">
<apex:page controller="AssetMaintainController" title="数据维护" showHeader="false" sidebar="false" id="allPage" action="{!init}" docType="html-5.0" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style>
         .datePicker {
            left: 805px !important;
            width: 350px !important;
        }
        .label{
            font-size: .75rem !important;
        }
        .labelCol{
            font-size: .75rem !important;
        }
        .dataCol{
            font-size: .75rem !important;
        }
        .textStyle{
            font-size: 15px;
        }
         /*20230815 ljh start*/
         table.mytable tr{
            height:45px;
        }
        /*20230815 ljh end*/
        .dateFormat  {
            display: none;
        }
@@ -15,6 +38,7 @@
        table {
            table-layout: fixed;
            border-collapse: collapse;
            line-height: 28px;
        }
        a {
            text-decoration: none;
@@ -28,7 +52,7 @@
        div#out_Div_R {
            position: relative;
            overflow: hidden;
            width: 1200px;
            width: 455px !important;
            margin-left: 686px;
        }
@@ -39,6 +63,7 @@
        }
        div#in_Div_R {
            position: relative;
            width: 470px !important;
            overflow: auto;
            height: 451px;
            margin-left: 686px;
@@ -46,7 +71,6 @@
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
            border-left: 1px solid rgb(229, 229, 229);
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
@@ -105,7 +129,7 @@
            padding-left: 10px;
        }
        .inputTextStyle input {
            width: 90%;
            width: 95%;
        }
        .inputTextStyle select {
            width: 95%;
@@ -121,6 +145,30 @@
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        td{
            min-height: 28px
        }
        .you-button {
            background-color: #d9d8d8 !important;
            box-shadow: 0px 7px 2px 0px #aeacac !important;
            transition: all .5s !important;
            }
            /* .you-button:hover {
                background-color: #fcdc5e !important;
            } */
        .you-button:active {
            transform: translate(0,4px) !important;
            text-shadow: -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0),
                    -2px 2px 2px rgb(209 132 0) !important;
            box-shadow: 0px 1px 0px 0px #aeacac !important;
        }
    </style>
    <script type="text/javascript">
@@ -395,35 +443,38 @@
            <!-- 取消是清空检索区 -->
            <apex:actionFunction name="clearAllSearchConditionWhenCancel" action="{!clearAllSearchConditionWhenCancel}"></apex:actionFunction>
            <!-- 左侧按钮区 -->
            <apex:outputPanel layout="block" style="width: 13%; float: left;" rendered="{!showTop}">
            <!-- chenjingwu 2023.8.2 start-->
            <!-- 左侧按钮区 -->
            <apex:outputPanel layout="block" style="width: 17%; float: left;" rendered="{!showTop}">
                <apex:pageBlock mode="maindetail">
                    <table style='height: 220px'>
                    <table style='height: 390px'>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看全部保有设备" rendered="{!!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle "><apex:commandButton styleClass="you-button"  value="查看全部保有设备" rendered="{!allBlueFlag}" onclick="checkAssetJs('all'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看有效库存" rendered="{!!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看有效库存" rendered="{!consumableBlueFlag}" onclick="checkAssetJs('consumable'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看借出分配数" rendered="{!!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看借出分配数" rendered="{!lendingBlueFlag}" onclick="checkAssetJs('lending'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看修理中保有设备" rendered="{!repairingBlueFlag}" onclick="checkAssetJs('repairing'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看待报废保有设备" rendered="{!scrappingBlueFlag}" onclick="checkAssetJs('scrapping'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已报废保有设备" rendered="{!scrappedBlueFlag}" onclick="checkAssetJs('scrapped'); return false;" /></td></tr>
                        <!-- OLY_OCM-818 -->
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已消耗的保有设备" rendered="{!consumedBlueFlag}" onclick="checkAssetJs('consumed'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看即将到期的保有设备" rendered="{!soonExpiredBlueFlag}" onclick="checkAssetJs('soonExpired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle blueStyle"><apex:commandButton value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                        <tr><td class="checkButtonStyle"><apex:commandButton styleClass="you-button"  value="查看已过期的保有设备" rendered="{!expiredBlueFlag}" onclick="checkAssetJs('expired'); return false;" /></td></tr>
                    </table>
                </apex:pageBlock>
            </apex:outputPanel>
            <!-- chenjingwu 2023.8.2 end-->
            <!-- 右侧检索区 -->
            <apex:outputPanel layout="block" style="width: 87%; float: right;" rendered="{!showTop}">
            <apex:outputPanel layout="block" style="width: 82%;margin: 0 auto;float: right;" rendered="{!showTop}">
                <apex:pageBlock mode="maindetail">
                    <table style='width: 95%; height: 220px'>
                    <table style='width: 100%; height: 390px' class="mytable">
                        <tr>
                            <td class="labelStyle">备品存放地</td>
                            <td class="inputTextStyle">
@@ -438,14 +489,14 @@
                            <td class="labelStyle">货架号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.wh_location}" id="shelfNumId" /></td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">备品状态</td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
                            <!-- 20230928 ljh 和机身号换位置 -->
                            <!-- <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                            </td>
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td> -->
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品管理编码</td>  <!-- シリアル番号 -->
                            <td class="inputTextStyle">
@@ -459,8 +510,12 @@
                                <apex:inputText value="{!searchB.internal_Asset_number}" id="fixedAssetNumId2" rendered="{!!internalAssetNumberEditableFlag}" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td>
                            <!-- <td class="labelStyle">机身号</td>
                            <td class="inputTextStyle"><apex:inputText value="{!searchB.serialNumber}" id="serialNoId" /></td> -->
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="inputTextStyle">
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">分公司号</td>
                            <td class="inputTextStyle">
@@ -469,7 +524,6 @@
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">主体/附属品</td>
                            <td class="inputTextStyle">
@@ -492,14 +546,7 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
                                    <apex:selectOptions value="{!manage_typeOpts}"/>
                                </apex:selectList>
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">所在地区(本部)</td>
                            <td class="inputTextStyle">
@@ -515,17 +562,14 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">消耗品有效期至</td>
                            <td class="labelStyle">备品状态</td>
                            <td class="inputTextStyle">
                                <apex:inputText id="consumable_Guaranteen_endStr" value="{!searchB.consumable_Guaranteen_endStr}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.consumable_Guaranteen_endStr}', false)" />
                                <apex:selectList value="{!searchB.fixture_Status}" id="assetStatusId" size="1">
                                    <apex:selectOptions value="{!assetStatusOptionList}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="searchButtonStyle" colspan="2">
                                <apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                            </td>
                        </tr>
                        <tr><td><br /><br /></td></tr>
                        <tr>
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
@@ -541,6 +585,18 @@
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="labelStyle">管理种类</td>
                            <td class="inputTextStyle">
                                <apex:selectList value="{!searchB.manage_type}" id="manage_type" size="1">
                                    <apex:selectOptions value="{!manage_typeOpts}"/>
                                </apex:selectList>
                            </td>
                            <td class="blankStyle"></td>
                            <td class="searchButtonStyle" colspan="2" style="text-align: right;">
                                <apex:commandButton style="width: 30%" value="检索" onclick="searchBtnJs(); return false;" rerender="allForm" />
                                <apex:commandButton style="width: 30%" value="取消" onclick="cancelBtnJs(); return false;" rerender="allForm" />
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
@@ -554,11 +610,12 @@
            <apex:inputHidden id="clearApplyFlagId" />
            <apex:outputPanel style="display:none">
                <apex:outputPanel id="popupBox" layout="block">
                    <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                    <input type="file" id="file_input" name="attFile" accept=".csv" style="padding-left: 8px;"/><br/><br/>
                    <apex:selectList size="1" id="csvMaintaintype">
                        <apex:selectOptions value="{!maintainTypeOptionList}"/>
                    </apex:selectList>
                    <center>
                        <input type="hidden" id="customHidden"/>
                        <apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                        <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                    </center>
@@ -569,47 +626,47 @@
                <apex:param name="csvMaintaintype" value="" />
            </apex:actionFunction>
            <apex:pageBlockSection columns="2">
                <apex:outputField value="{!amHeader.Name}"/>
                <apex:outputField value="{!amHeader.MaintainType__c}"/>
                <apex:outputField value="{!amHeader.Submit_Time__c}" rendered="{!amHeader.MaintainType__c=='实物报废'}"/>
                <apex:outputField value="{!amHeader.Date__c}" rendered="{!amHeader.MaintainType__c!='实物报废'}"/>
                <apex:outputField value="{!amHeader.Status__c}"/>
                <apex:outputField value="{!amHeader.Submit_Person__c}" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Name}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.MaintainType__c}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Submit_Time__c}" rendered="{!amHeader.MaintainType__c=='实物报废'}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Date__c}" rendered="{!amHeader.MaintainType__c!='实物报废'}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Status__c}"/>
                <apex:outputField styleClass="textStyle" value="{!amHeader.Submit_Person__c}" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }"/>
            </apex:pageBlockSection>
            <apex:pageBlockSection columns="1" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }">
                <apex:pageBlockSection columns="2" rendered="{! editmode}">
                    <apex:pageBlockSectionItem >
            <apex:pageBlockSection id="SalesSectionOut1" columns="1" rendered="{! amHeader.MaintainType__c=='实物报废'|| ISBLANK(amHeader.MaintainType__c) }">
                <apex:pageBlockSection id="SalesSectionIn1" columns="2" rendered="{! editmode}">
                    <apex:pageBlockSectionItem id="SalesSectionItem1">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User1__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_User1__c}"/>
                        <apex:inputField id="SalesName1" value="{!amHeader.CC_User1__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email1__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email1__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem2">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User2__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_User2__c}"/>
                        <apex:inputField id="SalesName2" value="{!amHeader.CC_User2__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email2__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email2__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem3">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User3__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_User3__c}"/>
                        <apex:inputField id="SalesName3" value="{!amHeader.CC_User3__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_Email3__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_Email3__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem4">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User4__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_User4__c}"/>
                        <apex:inputField id="SalesName4" value="{!amHeader.CC_User4__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem />
                    <apex:pageBlockSectionItem >
                    <apex:pageBlockSectionItem id="SalesSectionItem5">
                        <apex:outputLabel value="{!$ObjectType.AssetMaintainHeader__c.fields.CC_User5__c.Label}"/>
                        <apex:inputField value="{!amHeader.CC_User5__c}"/>
                        <apex:inputField id="SalesName5" value="{!amHeader.CC_User5__c}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem />
                </apex:pageBlockSection>
@@ -650,13 +707,173 @@
                    <apex:pageBlockSectionItem />
                </apex:pageBlockSection>
            </apex:pageBlockSection>
            <script>
                let SelectFieldParamList=[
                   {
                       //原apex:inputField的id值,需要在页面上获取
                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem1:SalesName1',
                       //查找字段所在对象
                       ObjectType : 'AssetMaintainHeader__c',
                       //查找字段的api名称
                       QueryFieldApiName : 'CC_User1__c',
                       //查找字段的查找对象
                       SelectObj : 'User',
                       //搜索时使用的字段
                       SelectFld : 'Name',
                   },
                   {
                       //原apex:inputField的id值,需要在页面上获取
                       inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem2:SalesName2',
                       //查找字段所在对象
                       ObjectType : 'AssetMaintainHeader__c',
                       //查找字段的api名称
                       QueryFieldApiName : 'CC_User2__c',
                       //查找字段的查找对象
                       SelectObj : 'User',
                       //搜索时使用的字段
                       SelectFld : 'Name',
                   }, {
                   //原apex:inputField的id值,需要在页面上获取
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem3:SalesName3',
                   //查找字段所在对象
                   ObjectType : 'AssetMaintainHeader__c',
                   //查找字段的api名称
                   QueryFieldApiName : 'CC_User3__c',
                   //查找字段的查找对象
                   SelectObj : 'User',
                   //搜索时使用的字段
                   SelectFld : 'Name',
                   }, {
                   //原apex:inputField的id值,需要在页面上获取
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem4:SalesName4',
                   //查找字段所在对象
                   ObjectType : 'AssetMaintainHeader__c',
                   //查找字段的api名称
                   QueryFieldApiName : 'CC_User4__c',
                   //查找字段的查找对象
                   SelectObj : 'User',
                   //搜索时使用的字段
                   SelectFld : 'Name',
                   }, {
                   //原apex:inputField的id值,需要在页面上获取
                   inputFieldId : 'allPage:allForm:pageBlockButton1:SalesSectionOut1:SalesSectionIn1:SalesSectionItem5:SalesName5',
                   //查找字段所在对象
                   ObjectType : 'AssetMaintainHeader__c',
                   //查找字段的api名称
                   QueryFieldApiName : 'CC_User5__c',
                   //查找字段的查找对象
                   SelectObj : 'User',
                   //搜索时使用的字段
                   SelectFld : 'Name',
                   },
                   ]
                   //初始化
                   resetOpenPage(SelectFieldParamList);
                   function unblockUI(){
                       j$("#sbArea").fadeOut(500, function(){
                           j$("#sbArea").remove();
                       });
                       resetOpenPage(SelectFieldParamList);
                   }
                   function refreshinput1(){
                    // 复杂组件 start
                    var baseURL = '';
                            var ObjectType = 'AssetMaintainDetail__c';
                            var QueryFieldApiName = 'OneToOne_Main__c';
                            var ObjectType = 'AssetMaintainDetail__c';
                            var inputFieldId = '';
                            var inputFieldId_lktp = '';
                            var SelectObj = 'Asset';
                            var SelectFld = 'Name';
                            console.log('xxx');
                            console.log('123');
                            var cnt = j$(escapeVfId('count_hidden')).val();
                            console.log('count_hidden=' + j$(escapeVfId('count_hidden').length));
                            console.log('count=' + cnt);
                            for (var i = 0; i < cnt; i++) {
                                inputFieldId = 'allPage:allForm:dataBlock:dataline_R1:'+ i +':OneToOne';
                                inputFieldId_lktp = 'allPage:allForm:dataBlock:dataline_R1:'+ i +':OneToOne_lktp';
                                baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
                                var obj = document.getElementById('allPage:allForm:dataBlock:dataline_R1:' + i + ':OneToOne_lkwgt');
                                if (obj != null) {
                                    obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
                                }
                            }
                        // 复杂组件 end
                    }
                    refreshinput1();
               </script>
            <table border="0">
                <tr>
                    <td style="width: 2%"></td>
                    <td class="setButtonStyle"><apex:commandButton value="EXCEL导入" onclick="openPopupCSV(); return false;" oncomplete="refresh" disabled="{!!importCSVButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton action="{!saveApply}" value="保存申请" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!saveButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton value="提交申请" onclick="submitApplyJS();return false;" disabled="{!!submitButtonActive}" /></td>
                    <!-- <td style="width: 2%"></td> -->
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="EXCEL导入" onclick="openPopupCSV(); return false;" oncomplete="refresh" disabled="{!!importCSVButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" action="{!saveApply}" value="保存申请" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!saveButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="提交申请" onclick="submitApplyJS();return false;" disabled="{!!submitButtonActive}" /></td>
                    <apex:actionFunction name="submitApply" action="{!submitApply}" rerender="allForm" onComplete="unblockUI();" />
                    <script>
                        function submitApplyJS(){
@@ -666,7 +883,7 @@
                            }
                        }
                    </script>
                    <td class="setButtonStyle"><apex:commandButton value="删除" onclick="deleteApplyJS();return false;" disabled="{!!deleteButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" value="删除" onclick="deleteApplyJS();return false;" disabled="{!!deleteButtonActive}" /></td>
                    <apex:actionFunction name="deleteApply" action="{!deleteApply}" rerender="allForm" onComplete="unblockUI();" />
                    <script>
                        function deleteApplyJS() {
@@ -676,14 +893,14 @@
                            }
                        }
                    </script>
                    <td class="setButtonStyle"><apex:commandButton action="{!abandon}" value="废弃" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!abandonButtonActive}" /></td>
                    <td class="setButtonStyle"><apex:commandButton style="width: 90%" action="{!abandon}" value="废弃" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()" disabled="{!!abandonButtonActive}" /></td>
                    <td>
                        <apex:selectList size="1" id="reportMaintaintype">
                            <apex:selectOptions value="{!maintainTypeOptionList}"/>
                        </apex:selectList>
                    </td>
                    <td>
                        <apex:commandButton onclick="openReport();return false;" value="查看报表" />
                        <apex:commandButton style="width: 90px" onclick="openReport();return false;" value="查看报表" />
                    </td>
                    <script type="text/javascript">
                        var popupBox;
@@ -740,31 +957,38 @@
                            else{
                                reportId = "{!notScrappedReportId}";
                            }
                            var url = `/${reportId}?pv0=${maintainType}`;
                            var url = `/lightning/r/Report/${reportId}/view?fv0=${maintainType}`;
                            window.open(url);
                        }
                    </script>
                </tr>
                <tr><td>&nbsp;</td></tr>
                <tr>
                    <td class="labelSettingStyle">维护类型</td>
                    <td class="inputTextStyle">
                        <apex:selectList id="maintainTypeId" size="1">
                    <td>
                    <font>维护类型</font>&nbsp;
                    <apex:selectList id="maintainTypeId" size="1" style="width: 100px;">
                            <apex:selectOptions value="{!maintainTypeOptionList}"/>
                        </apex:selectList>
                        </apex:selectList>
                    </td>
                    <!-- <td class="inputTextStyle">
                    </td> -->
                    <td class="labelSettingStyle">维护数量</td>
                    <td class="inputTextStyle">
                        <apex:inputText id="maintainCountId"/>
                        <apex:inputText id="maintainCountId" style="width: 90%"/>
                    </td>
                    <td class="labelSettingStyle">废弃数量</td>
                    <td class="inputTextStyle">
                        <apex:inputText id="abandonCountId"/>
                        <apex:inputText id="abandonCountId" style="width: 90%"/>
                    </td>
                    <td class="setButtonStyle"><apex:commandButton action="{!changeEditable}" value="编辑" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" disabled="{!!editButtonActive}" /></td>
                    <td class="setButtonStyle">
                        <apex:commandButton value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!!editmode}"  />
                        <apex:commandButton style="width: 70%" action="{!changeEditable}" value="编辑" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();resetOpenPage(SelectFieldParamList);" disabled="{!!editButtonActive}" />
                    </td>
                    <td class="setButtonStyle">
                        <apex:commandButton style="width: 58%" value="适用" reRender="allForm" onclick="applyJs(); return false;" disabled="{!!editmode}"  />
                        <script type="text/javascript">
                            // 适用按钮
                            function applyJs() {
@@ -829,50 +1053,55 @@
                        </script>
                    </td>
                </tr>
                <tr><td>&nbsp;</td></tr>
            </table>
            <table>
                <tr>
                    <td>
                    <td style="width: 49%;">
                        <font>数据字段</font>&nbsp;
                        <apex:selectList value="{!fieldName}" size="1" style="width:110px"><apex:selectOptions value="{!fieldNameOpts}"/></apex:selectList> 
                        <apex:selectList value="{!fieldName}" size="1" style="width:100px"><apex:selectOptions value="{!fieldNameOpts}"/></apex:selectList> 
                        &nbsp;<apex:selectList value="{!operator}" size="1"><apex:selectOptions value="{!operatorOpts}"/></apex:selectList> 
                        &nbsp;<apex:inputText value="{!fieldvalue}" style="width:80px"/>
                        <apex:commandButton value="筛选" action="{!filter}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()"/>
                        <apex:commandButton style="width: 18%;" value="筛选" action="{!filter}" onclick="blockme();" rerender="allForm" oncomplete="unblockUI()"/>
                    </td>
                    <td>显示数据数量</td>
                    <td style="width: 8%;">显示数据数量</td>
                    <td class="inputTextStyle">
                        <apex:actionFunction name="firstPg" action="{!firstPage}" rerender="allForm" onComplete="unblockUI();" />
                        <apex:selectList value="{!selRecordOption}" size="1" onchange="blockme();firstPg(); return false;">
                            <apex:selectOptions value="{!limitOpts}"/>
                        </apex:selectList>
                    </td>
                    <td align="right">共{!allAssetDataListSize}条数据</td>
                    <td align="right" style="width: 8%;">共{!allAssetDataListSize}条数据</td>
                    <td width="20px"></td>
                    <td align="right"> 已选中<label id="checkedNumId">{!checkedSize}</label>条数据</td>
                    <td align="right" style="width: 10%;"> 已选中<label id="checkedNumId">{!checkedSize}</label>条数据</td>
                    <td width="20px"></td>
                    <td align="right"> 未选中<label id="uncheckedNumId">{!allAssetDataListSize - checkedSize}</label>条数据</td>
                    <td width="20px"></td>
                    <td align="right">第 {!currPage} 页</td>
                    <td width="20px"></td>
                    <td align="right">共 {!totalPage} 页</td>
                    <td width="20px"></td>
                    <td align="right" width="45px">
                    <td style="width: 13%;"> 未选中<label id="uncheckedNumId">{!allAssetDataListSize - checkedSize}</label>条数据</td>
                </tr>
            </table>
            <table style="width: 97%">
                <tr>
                    <td></td>
                    <td style="width: 40%" align="right">第 {!currPage} 页 &nbsp;&nbsp;共 {!totalPage} 页</td>
                    <td align="left"></td>
                    <td width="120px"></td>
                    <td style="width: 8%">
                        <apex:commandLink action="{!firstPage}" value="首页" id="firstPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="首页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="4%">
                        <apex:commandLink action="{!previousPage}" value="上一页" id="previous" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(currPage==1,'display: none;','')}color: blue;"/>
                        <apex:outputText value="上一页" style="{!IF(currPage!=1,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="45px">
                        <apex:commandLink action="{!nextPage}" value="下一页" id="next" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage ||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="下一页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
                    <td width="45px"></td>
                    <td align="right" width="45px">
                    <td width="50px"></td>
                    <td width="45px">
                        <apex:commandLink action="{!endPage}" value="尾页" id="endPg" onclick="blockme();" oncomplete="unblockUI();" reRender="allForm" style="{!IF(totalPage==currPage||totalPage == 0,'display: none;','')}color: blue;"/>
                        <apex:outputText value="尾页" style="{!IF(totalPage!=currPage && totalPage != 0,'display: none;','')}color: gray;"></apex:outputText>
                    </td>
@@ -890,7 +1119,7 @@
                <table class="list" border="1" style="border-collapse: collapse; table-layout: fixed; border-bottom-width: 0px; border-spacing: 0px; height: 30px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <!-- 全选 -->
                        <td style="width:20px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
                        <td style="width:23px"><input type='checkbox' onclick='selectAllJs()' id='checker' onchange='checkboxOnclick(); return false;'/></td>
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!amdLeftLabelList}" var="t">
                            <td class="col_{!columnAmdLeftCssList[cnt]}" style="word-wrap:break-word">
@@ -902,7 +1131,7 @@
                </table>
            </div>
            <div id="out_Div_R">
                <table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:700px; height: 30px;">
                <table class="list" border="1" style="border-collapse: collapse; table-layout:fixed; border-bottom-width: 0px; border-spacing:0; width:455px; height: 30px;">
                    <tr class="headerRow" style="background-color: #DCDCDC; text-align: left; vertical-align: top;">
                        <apex:variable value="{!0}" var="cnt" />
                        <apex:repeat value="{!amdRightLabelList}" var="t">
@@ -921,7 +1150,7 @@
                    <apex:repeat id="dataline_L1" value="{!allAssetInfoShowList}" var="eachAssetData">
                        <tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                            <!-- 全选 -->
                            <td class="dataCellBorder1" style="width:20px" align="center">
                            <td class="dataCellBorder1" style="width:23px" align="center">
                                <apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.amd['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
                                <apex:inputHidden id="canChange" />
                            </td>
@@ -946,11 +1175,10 @@
                        </tr>
                        <apex:variable value="{!Cnt_L+1}" var="Cnt_L" />
                    </apex:repeat>
                    <apex:repeat id="dataline_L2" value="{!assetFromSearchList}" var="eachAssetData">
                        <tr class="dataRow" id="tableData_L_{!Cnt_L}" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}">
                            <!-- 全选 -->
                            <td class="dataCellBorder1" style="width:20px" align="center">
                            <td class="dataCellBorder1" style="width:23px" align="center">
                                <apex:inputCheckbox id="rowCheck" value="{!eachAssetData.isCheck}" disabled="{!IF((internalAssetLocationLogin != 'All' && eachAssetData.amd['Internal_asset_location__c'] != internalAssetLocationLogin), true, false)}" onchange="checkboxOnclick(); return false;" />
                                <apex:inputHidden id="canChange" />
                            </td>
@@ -973,7 +1201,7 @@
                                <apex:outputField value="{!eachAssetData.amd.SerialNumber__c}" />
                            </td>
                        </tr>
                        <apex:variable value="{!Cnt_L+1}" var="Cnt_L" />
                        <apex:variable id="Cnt_L" value="{!Cnt_L+1}" var="Cnt_L" />
                    </apex:repeat>
                </table>
            </div>
@@ -1070,7 +1298,7 @@
                                <apex:outputField value="{!eachAssetData.amd.Is_OneToOne_Accessory__c}"/>
                            </td>
                            <td class="col_OneToOne_Main__c dataCellBorder1 OneToOne_Main__c" style="word-wrap:break-word">
                                <apex:inputField value="{!eachAssetData.amd.OneToOne_Main__c}"
                                <apex:inputField id="OneToOne" value="{!eachAssetData.amd.OneToOne_Main__c}"
                                                onchange="j$(escapeVfId('allPage:allForm:dataBlock:dataline_L1:' + '{!Cnt_R}' + ':rowCheck')).prop('checked', true); setChangeFlg(); blockAbandon('{!Cnt_R}');"
                                                rendered="{!editmode && eachAssetData.editable && eachAssetData.amd.Is_OneToOne_Accessory__c  && eachAssetData.amd.Manage_type__c == '数量管理'}"
                                />
@@ -1088,8 +1316,36 @@
                                />
                            </td>
                        </tr>
                        <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
                        <apex:variable id="Cnt_R" value="{!Cnt_R+1}" var="Cnt_R" />
                    </apex:repeat>
                    <script>
                    function refreshinput1(){
                    // 复杂组件 start
                    var baseURL = '';
                            var ObjectType = 'AssetMaintainDetail__c';
                            var QueryFieldApiName = 'OneToOne_Main__c';
                            var ObjectType = 'AssetMaintainDetail__c';
                            var inputFieldId = '';
                            var inputFieldId_lktp = '';
                            var SelectObj = 'Asset';
                            var SelectFld = 'Name';
                            console.log('xxx');
                            console.log('123');
                            var cnt = j$(escapeVfId('Cnt_L')).val();
                            console.log('count=' + cnt);
                            for (var i = 0; i < cnt; i++) {
                                inputFieldId = 'allPage:allForm:dataBlock:dataline_R1:'+ i +':OneToOne';
                                inputFieldId_lktp = 'allPage:allForm:dataBlock:dataline_R1:'+ i +':OneToOne_lktp';
                                baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
                                var obj = document.getElementById('allPage:allForm:dataBlock:dataline_R1:' + i + ':OneToOne_lkwgt');
                                if (obj != null) {
                                    obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
                                }
                            }
                        // 复杂组件 end
                    }
                    refreshinput1();
                    </script>
                    <apex:variable value="{!Cnt_R}" var="Cnt_R_Start" />
                    <apex:repeat id="dataline_R2" value="{!assetFromSearchList}" var="eachAssetData">
                        <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" >
@@ -1178,7 +1434,7 @@
                j$('select[id$=mlktp]').each(function() {
                    this.style.display="none";
                })
            </script>
        </apex:pageBlock>
    </apex:form>