<apex:page standardController="Inventory_Detail__c" extensions="InventoryReportDetailController" showHeader="true" sidebar="false" id="allPage" action="{!init}" lightningStylesheets="true">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/><!-- 20230619 ljh lightning --> 
    <style>
        table {
            /*width: 100%;
            margin: 10px;*/
            table-layout: fixed;
            border-collapse: collapse;
        }
        .labelStyle {
            padding: 5px;
            border: 1px solid black;
        }
        table tr td input{
            width: 140px;
        }
        body .bPageBlock .detailList .labelCol{
            width: 20%;
        }

        table.list .col_Asset__r_Id  {width:100px;}
        table.list .col_Salesdepartment__c  {width:100px;}
        table.list .col_Internal_asset_location__c  {width:100px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:100px;}
        table.list .col_Internal_Asset_number__c  {width:100px;}
        table.list .col_Fixture_Model_No__c  {width:120px;}
        table.list .col_SerialNumber__c  {width:100px;}
        table.list .col_WH_Location__c  {width:100px;}
        table.list .col_Inventory_Quantity_Jia__c  {width:100px;}
        table.list .col_Inventory_Weixiu_Count_Jia__c  {width:100px;}
        table.list .col_Inventory_Chujie_Count_Jia__c  {width:100px;}
        table.list .col_Inventory_Diaobo_Count_Jia__c {width:100px;}  
        table.list .col_Inventory_Daibaofei_Diushi_Count_Jia__c  {width:100px;}
        table.list .col_Inventory_Shipan_Count_Jia__c  {width:100px;}
        table.list .col_Inventory_Deviation_Jia__c  {width:100px;}
        table.list .col_Inventory_Profit_Quantity__c  {width:100px;}
        table.list .col_Inventory_Loss_Quantity__c  {width:80px;}
        table.list .col_Inventory_Remarks__c  {width:140px;}
        table.list .col_Remarks_Person__c  {width:80px;}
        table.list .col_InventoryPerson1__c  {width:100px;}
        table.list .col_InventoryPerson2__c  {width:100px;}
        table.list .col_InventoryPerson3__c  {width:100px;}
        table.list .col_Consumable_Guaranteen_end__c {width:80px;}
        table.list .col_Inventory_Zaiku_Count_Jia__c {width:120px;}
        table.list .col_Consumed_Count_Jia__c {width:100px;}

        table.list td input {min-width: 99%}
    </style>
    <apex:form id="allForm">
        <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm" oncomplete="unblockUI();" />
        <apex:actionFunction name="saveAndSearch" action="{!save}" rerender="allPanel" oncomplete="unblockUI();">
            <apex:param name="firstParam" assignTo="{!saveType}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                <apex:pageBlockSection title="备品盘点表明细画面">
                    <apex:outputField value="{!parentObj.Name}"/>
                    <apex:outputField value="{!parentObj.Internal_asset_location__c}"/>
                    <apex:outputField value="{!parentObj.Inventory_Start_Date__c}"/>
                    <apex:outputField value="{!parentObj.Inventory_Status__c}"/>
                    <apex:outputField value="{!parentObj.InventoryPIC__c}"/>
                </apex:pageBlockSection>
                <table>
                <tr>
                    <td width="4%" style="text-align: right; font-size: .75rem; color: rgb(68, 68, 68); padding-right:5px">关键字</td>
                    <td width="24%" style="text-align: right;" >
                        <apex:inputText value="{!keyword}" style="width: 120px;"/>
                        <apex:commandButton value="检索" onclick=" searchOppJs(); return false;" style="height: 32px;width: 60px; margin-right: 5px;"/>
                        <apex:commandButton action="{!save}" value="保存" onclick="blockme();" rerender="allForm" oncomplete="unblockUI();" style="height: 32px;width: 60px; margin-right: 5px;"/>
                    </td>
                    <td width="10%" style="text-align: right;">
                        <apex:outputLabel for="modelNo" value="{!$ObjectType.Inventory_Detail__c.fields.Fixture_Model_No__c.label}"/>
                    </td>
                    <td width="10%">
                      <apex:inputText id="modelNo" value="{!modelNo}" />
                    </td>
                    <td width="10%" style="text-align: right;">
                      <apex:outputLabel for="assetNumberKey" value="{!$ObjectType.Inventory_Detail__c.fields.Internal_Asset_number__c.label}" />
                    </td>
                    <td width="10%">
                      <apex:inputText id="assetNumberKey" value="{!assetNumberKey}"  />
                    </td>
                    <td width="10%" style="text-align: right;">
                      <apex:outputLabel for="serialNo" value="{!$ObjectType.Inventory_Detail__c.fields.SerialNumber__c.label}" />
                    </td>
                    <td width="10%">
                      <apex:inputText id="serialNo" value="{!serialNo}" />
                    </td>
                    <td width="10%" style="text-align: right;">
                      <apex:outputLabel for="whLocation" value="{!$ObjectType.Inventory_Detail__c.fields.WH_Location__c.label}" />
                    </td>
                    <td width="10%" style="text-align: right;">
                      <apex:inputText id="whLocation" value="{!whLocation}"  rendered="{!angecylookrole}" />
                      <apex:inputText disabled="true" rendered="{!!angecylookrole}" />
                    </td>
                </tr>
            </table>
            <table class="myTable" style="margin: 10px auto;">
                <tr>
                    <td style="width:11%; text-align: right;">
                        <apex:outputLabel for="bpPankuiYing" value="盘亏/盘盈"/>
                        <apex:selectList value="{!bpPankuiYing}" size="1" id="bpPankuiYingOps">
                            <apex:selectOptions value="{!bpPankuiYingOps}"/>
                        </apex:selectList>
                    </td>
                    <td style="width:8%;text-align: right;">
                        <apex:outputLabel for="bpBodyFushupin" value="主体/附属品" />
                    </td>
                    <td style="width:4%; text-align: right;">
                        <apex:selectList value="{!bpBodyFushupin}" size="1" id="bpBodyFushupinOps">
                            <apex:selectOptions value="{!bpBodyFushupinOps}"/>
                        </apex:selectList>
                    </td>
                    <!-- <td style="width:9%; text-align: right;"> -->
                    <td style="width:8%; text-align: right;">
                      <apex:outputLabel for="ifInternalAsset" value="是否固定资产" />
                    </td>
                    <td style="width:6%;">
                      <apex:selectList value="{!ifInternalAsset}" size="1" id="ifInternalAsset">
                        <apex:selectOptions value="{!ifInternalAssetOps}"/>
                      </apex:selectList>
                    </td>
                    <td style="width:12%; text-align: right;">
                        <apex:outputLabel for="bieChanPinFenLei" value="{!$ObjectType.Inventory_Detail__c.fields.Product_category__c.label}" />
                    </td>
                    <td style="width:6%;">
                        <apex:selectList value="{!bieChanPinFenLei}" size="1" id="bieChanPinFenLei">
                            <apex:selectOptions value="{!bieChanPinFenLeiOps}"/>
                        </apex:selectList>
                    </td>
                    <td style="width:6%; text-align: right;">
                        <apex:outputLabel for="bieBeiPinFenLei" value="{!$ObjectType.Inventory_Detail__c.fields.Equipment_Type__c.label}" />
                    </td>
                    <td style="width:6%;">
                        <apex:selectList value="{!bieBeiPinFenLei}" size="1" id="bieBeiPinFenLei">
                            <apex:selectOptions value="{!bieBeiPinFenLeiOps}"/>
                        </apex:selectList>
                    </td>
                    <td style="width:6%; text-align: right;">
                        <apex:outputLabel for="bieManageType" value="{!$ObjectType.Inventory_Detail__c.fields.Manage_type__c.label}" />
                    </td>
                    <td style="width:6%;">
                        <apex:selectList value="{!bieManageType}" size="1" id="bpAssetLocationOps">
                            <apex:selectOptions value="{!bieManageTypeOps}"/>
                        </apex:selectList>
                    </td>
                    <td style="width:6%; text-align: right; font-size: .75rem; color: rgb(68, 68, 68); padding-right:5px">盘点状态</td>
                    <td style="width:6%;text-align: right;">
                        <apex:selectList value="{!assetStatus}" id="assetStatusId" size="1">
                            <apex:selectOptions value="{!assetStatusOptionList}"/>
                        </apex:selectList>
                    </td>
                </tr>
            </table>
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            </apex:pageBlock>
            
        </apex:outputPanel>
        <apex:outputText style="margin: 10px;" value="{!invDetailResultRemark}" />
        <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="false" isRadio="false" noSort="false"/>
    </apex:form>
</apex:page>