1
chenjingwu
2024-05-24 bdb1a98b64a2cf59bcfd575c579aa0742e0de954
force-app/main/default/pages/InventoryResultRecord.page
@@ -1,4 +1,4 @@
<apex:page controller="InventoryResultRecordController" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab">
<apex:page controller="InventoryResultRecordController" showHeader="false" sidebar="false" id="allPage" action="{!init}" tabStyle="CheckAllOlympusAsset__tab" lightningStylesheets="true" applyHtmlTag="false">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
@@ -7,7 +7,157 @@
<apex:includeScript value="{!URLFOR($Resource.jquery_confirm, 'jquery-confirm.min.js')}"/>
<apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
<apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
<apex:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <style>
        .dateFormat  {
            display: none;
        }
        .requiredBlock  {
            display: none;
        }
        .message {
            margin: 0px;
            /*width: 1125px;*/
        }
        table {
            table-layout: fixed;
            border-collapse: collapse;
        }
        a {
            text-decoration: none;
        }
        /*TODO width margin-left 这里调节宽度*/
        div#out_Div_L {
            position: relative;
            overflow: hidden;
            width: 1300px;
        }
        div#out_Div_R {
            position: relative;
            overflow: hidden;
            width: 1200px;
            margin-left: 686px;
        }
        div#in_Div_L {
            position: relative;
            width: 745px;
            height: 451px;
        }
        div#in_Div_R {
            position: relative;
            overflow: auto;
            height: 451px;
            margin-left: 686px;
            margin-top: -451px;
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
        }
        /* 默认 */
        table.list td {width:100px;}
        table.list td select {width:95%;}
        table.list td input {width:95%;}
        table.list td textarea {
            height:50px;
            width:90%;
        }
        table.list .col_Internal_asset_location__c {width:130px;}
        table.list .col_Salesdepartment__c {width:110px;}
        table.list .col_SalesProvince__c {width:70px;}
        table.list .col_Asset_loaner_category__c {width:80px;}
        table.list .col_Fixture_Model_No_F__c {width:80px;}
        table.list .col_CompanyOfEquipment__c {width:60px;}
        table.list .col_Asset_name__c {width:60px;}
        table.list .col_Internal_Asset_number__c {width:80px;}
        table.list .col_Internal_Asset_number_key__c {width:80px;}
        table.list .col_SerialNumber {width:60px;}  /*机身编号*/
        table.list .col_Product_Serial_No__c {width:60px;}  /*产品 + 机体编码*/
        table.list .col_Product_category__c {width:60px;}
        table.list .col_Equipment_Type__c {width:120px;}
        table.list .col_Consumable_Guaranteen_end__c {width:70px;}
        table.list .col_Manage_type__c {width:80px;}  /*管理种类*/
        table.list .col_Loaner_accsessary__c {width:50px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:50px;}
        table.list .col_AssetManageConfirm__c {width:50px;}
        table.list .col_Fixture_QRCode__c {width:50px;}
        table.list .col_WH_location__c {width:30px;}
        table.list .col_Quantity {width:30px;}
        table.list .col_You_Xiao_Ku_Cun__c {width:30px;}
        table.list .col_Ji_Zhong_Guan_Li_Ku_Cun__c {width:30px;}
        table.list .col_Out_of_wh__c {width:30px;}
        table.list .col_Rental_Count__c {width:30px;}
        table.list .col_Frozen_Quantity__c {width:30px;}
        table.list .col_Abandoned_RealThing__c {width:30px;}
        table.list .col_Abandoned_Inventory__c {width:40px;}
        table.list .col_Repairing_Count__c {width:30px;}
        table.list .col_Fixture_Status__c {width:30px;}
        table.list .col_Main_OneToOne__c {width:40px;}
        .navigationBarBlock {
            width: 100%;
        }
        .apexp .bPageBlock.apexDefaultPageBlock .pbBody {
            margin: 0px;
        }
        .checkButtonStyle input {
            width: 100%;
            text-align: left;
        }
        .searchButtonStyle {
            width: 50%;
        }
        .searchButtonStyle input {
            width: 80%;
            background: #9BC2E6;
        }
        .setButtonStyle {
            width: 8%;
        }
        .setButtonStyle input {
            width: 100%;
            background: #9BC2E6;
        }
        .startInventoryButtonStyle {
            width: 12%;
        }
        .labelSettingStyle {
            width: 8%;
            text-align: right;
        }
        .labelStyle {
            width: 8%;
            text-align: left;
        }
        .blankStyle {
            width: 1%;
        }
        .inputTextStyle {
            width: 9%;
        }
        .inputTextStyle input {
            width: 96%;
        }
        .inputTextStyle select {
            width: 95%;
        }
        .redStyle {
            background-color: #F00;
        }
        .greyStyle {
            background-color: #AAA;
        }
        .blueStyle input {
            background: #9BC2E6;
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        .overlay {
            position: absolute;
            top: 0;
@@ -91,7 +241,7 @@
        }
        .startInventoryButtonStyle {
            margin-left: 15%;
            width: 12%;
            width: 11%;
        }
        .labelStyle {
            width: 9%;
@@ -103,7 +253,7 @@
            width: 9%;
        }
        .inputTextStyle input {
            width: 90%;
            width: 96%;
        }
        .inputTextStyle select {
            width: 95%;
@@ -201,6 +351,15 @@
            text-decoration: none;
            cursor: pointer;
        }
        #pageBlockButton1 {
            margin: 0pxt;
        }
        div#in_Div_L td.dataCellBorder1 {
            border-width: 1px;
        }
        div#in_Div_R td.dataCellBorder1 {
            border-width: 1px;
        }
    </style>
    <script type="text/javascript">
        sforce.connection.sessionId = "{!$Api.Session_ID}";
@@ -226,10 +385,11 @@
                j$('.inventoryResultsTable').hide();
            } else {
                if (hasChange == false) {
                    j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                    /*j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                    j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide();
                    j$('.inventoryResultsTable').show();
                    j$('#descdiv').show();
                    j$('#descdiv').show();*/
                    doInit();
                } else {
                    j$.confirm({
                        title: '确认',
@@ -238,10 +398,11 @@
                        useBootstrap: false,
                        buttons: {
                            OK: function () {
                                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                                /*j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).removeClass('overlay');
                                j$(escapeVfId('allPage:allForm:recordBlock:overlay_div')).hide();
                                j$('.inventoryResultsTable').show();
                                j$('#descdiv').show();
                                j$('#descdiv').show();*/
                                doInit();
                            },
                            cancel: {
                                text: '取消', // With spaces and symbols
@@ -340,6 +501,7 @@
          </div>
        </div>
        <apex:actionFunction name="doInit" action="{!init}" rerender="recordBlock" onComplete="unblockUI()" />
        <apex:actionFunction name="startInventory" action="{!startInventory}" rerender="allForm" onComplete="unblockUI()" />
        <!-- update by rentx 20210827 start 耗材盘点方案 -->
        <!-- <apex:actionFunction name="searchBtnFunc" action="{!searchBtn}" rerender="allForm" onComplete="unblockUI();changeFullScreen(true);" /> -->
@@ -396,7 +558,7 @@
                        <tr>
                            <td></td>
                            <td colspan="10">
                                <input class="startInventoryButtonStyle blueStyle" style="margin-left: 0" type="button" value="开始盘点" onclick="startjs(this);return false;" />
                                <input class="startInventoryButtonStyle blueStyle" style="margin-left: 2px" type="button" value="开始盘点" onclick="startjs(this);return false;" />
                            </td>
                        </tr>
                        <!-- <tr>
@@ -472,6 +634,7 @@
                                </div> -->
                            </td>
                        </tr>
                        <tr><td style="height: 23px;"></td></tr>
                        <tr>
                            <td class="labelStyle">盘亏/盘盈</td>
                            <td class="inputTextStyle">
@@ -491,8 +654,13 @@
                            <td class="blankStyle">
                            </td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle"></td>
                            <td class="blankStyle">
                            <!-- 20230912 ljh start -->
                            <!-- <td class="searchButtonStyle"> -->
                            <td  width="11%">
                            <!-- 20230912 ljh end -->
                                <div style="display: table-cell; width: 143px">
                                    <apex:commandButton action="{!showResult}" value="显示盘点结果" reRender="allForm" onclick="blockme()" oncomplete="unblockUI()" rendered="{!canDoFlg}"/>
                                </div>
                            </td>
                            <td class="searchButtonStyle" colspan="2">
                                <div style="display: table-cell; width: 80px">
@@ -500,6 +668,7 @@
                                </div>
                            </td>
                        </tr>
                        <tr><td height="23px"></td></tr>
                        <tr style="{!IF(bieCunFangDi=='上海 备品中心' || hasConsumAsset,'','display: none;')}">
                            <td class="labelStyle">备品类别</td>
                            <td class="inputTextStyle">
@@ -761,25 +930,25 @@
                        <apex:param value="{!consumInventoryHeader.Inventory_Start_Date__c}"></apex:param>&nbsp;
                    </apex:outputtext>
                </div>
                <apex:outputPanel id="message2" layout="block" style="width: 530px">
                <apex:outputPanel id="message2" layout="block" style="width: 100%">
                    <apex:pageMessages />
                </apex:outputPanel>
                <div class="searchButtonStyle1" id="scanAction_div">
                    <!-- 耗材追溯方案 检索耗材时 修改"扫描"为"pad扫描" -->
                    <div style="display: table-cell; width: 100px">
                    <div style="display: table-cell; width: 18%;">
                        <apex:commandButton value="iPad扫描" rendered="{!assetCategory == '耗材'  && bieCunFangDi == '上海 备品中心'}" onclick="qrsacn();return false"/>
                        <apex:commandButton value="扫描" rendered="{!!(assetCategory == '耗材' && bieCunFangDi == '上海 备品中心') }" onclick="qrsacn();return false"/>
                    </div>
                    <div style="display: table-cell; width: 80px"><apex:commandButton value="保存" onclick="savejs();return false"/></div>
                    <div style="display: table-cell; width: 80px"><apex:commandButton value="返回" onclick="changeFullScreen(false); return false"/></div>
                    <div style="display: table-cell; width: 13%;"><apex:commandButton value="保存" onclick="savejs();return false"/></div>
                    <div style="display: table-cell; width: 13%;"><apex:commandButton value="返回" onclick="changeFullScreen(false); return false"/></div>
                    <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 start -->
                    <apex:outputText rendered="{!assetCategory == '耗材' && bieCunFangDi = '上海 备品中心'}">
                        <div style="display: table-cell; width: 80px">
                        <div style="display: table-cell; width: 19%;">
                            <apex:commandButton onclick="document.getElementById('maqCode').focus();return false" value="码枪扫描" />
                        </div>
                        <div style="display: table-cell; width: 500px" >
                            <input value="" autofocus="autofocus" id="maqCode" width="100%" style="background-color: #ffffff" onkeypress="return onKeyPress(event)" />
                            <input value="" autofocus="autofocus" id="maqCode" width="100%" style="background-color: #ffffff;height: 32px;" onkeypress="return onKeyPress(event)" />
                        </div>
                       <!--  <div style="display: table-cell;" >
                            <div style="float: left;display: table-cell;" class="btn" >码枪扫描 </div>
@@ -790,17 +959,23 @@
                    <!-- 耗材追溯方案 添加 "码枪扫描"输入框 add by rentx 20210911 end -->
                </div>
                <table border="1px" style="width: 510px;" >
                <table border="1px" style="width: 95%;" >
                    <tr>
                        <td class="labelStyle" style="width: 130px;">型号</td>
                        <td class="labelStyle" style="width: 60px;">机身号</td>
                         <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle" style="width: 60px;">货架号</td></apex:outputText>
                        <td class="labelStyle" style="width: 90px;">所在地区(本部)</td>
                        <td class="labelStyle" style="width: 60px;">货区</td>
                        <td class="labelStyle" style="width: 60px;">在库数量</td>
                        <td class="labelStyle" style="width: 60px;">盘点结果</td>
                        <td class="labelStyle" style="width: 40px;">盘盈</td>
                        <td class="labelStyle" style="width: 40px;">盘亏</td>
                        <td class="labelStyle">型号</td>
                        <td class="labelStyle">机身号</td>
                         <apex:outputText rendered="{!angecylookrole}"> <!-- 1650--><td class="labelStyle">货架号</td></apex:outputText>
                        <td class="labelStyle">所在地区(本部)</td>
                        <td class="labelStyle">货区</td>
                        <td class="labelStyle">在库数量</td>
                        <td class="labelStyle">盘点结果</td>
                        <td class="labelStyle">盘盈</td>
                        <td class="labelStyle">盘亏</td>
         <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start -->
                        <apex:outputText rendered="{!assetCategory!='备品'}"><td class="labelStyle" style="width: 60px;">有效期至</td></apex:outputText>
                        <apex:outputText rendered="{!assetCategory!='备品'}"><td class="labelStyle" style="width: 50px;">效期</td></apex:outputText>
                        <td class="labelStyle" style="width: 50px;">外观</td>
                        <td class="labelStyle" style="width: 50px;">包装</td>
                        <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End -->
                    </tr>
                    <apex:repeat value="{!inventoryDetailList}" var="ivDetail" id="inventroyRow">
                        <tr class="{!IF(assetCategory!='耗材','displayRow','hiddenRow')}">
@@ -813,7 +988,7 @@
                            <td class="labelStyle">
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}"
                                            html-disabled="true" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px"/>
                                            html-disabled="true" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%"/>
                                    <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理'}">
                                        <br/>
                                        <button onclick="lostGeTi(this);return false;">手动</button>
@@ -821,11 +996,15 @@
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-accsessary="{!ivDetail.OneToOne_Accsessary__c}" html-data-main="{!ivDetail.OneToOne_Body__c}" html-data-mid="{!ivDetail.Main_Asset__c}"
                                            html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px" />
                                            html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%" />
                                </apex:outputPanel>
                            </td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td>
                            <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start -->
                            <td class="labelStyle"><apex:inputField value="{!ivDetail.Appearance_Check_Result__c}" style="width: 50px" /></td>
                            <td class="labelStyle"><apex:inputField value="{!ivDetail.Package_Check_Result__c}" style="width: 50px" /></td>
                            <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End -->
                        </tr>
                    </apex:repeat>
                    <apex:repeat value="{!consumInventoryDetailList}" var="ivDetail" id="consumInventroyRow">
@@ -840,7 +1019,7 @@
                            <td class="labelStyle">
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '个体管理' && ivDetail.Asset_Status__c != '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()" html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}"
                                            html-disabled="true" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px"/>
                                            html-disabled="true" html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%"/>
                                            <!-- add by rentx 20210823 start 耗材盘点时记录code -->
                                        <apex:inputHidden value="{!ivDetail.HCCodes__c}" />
                                            <!-- add by rentx 20210823 start 耗材盘点时记录code -->
@@ -851,7 +1030,7 @@
                                </apex:outputPanel>
                                <apex:outputPanel layout="none" rendered="{!ivDetail.Asset__r.Manage_type__c == '数量管理' || ivDetail.Asset_Status__c == '冻结'}">
                                    <apex:inputField onchange="hasChangeFunc()"  html-data-accsessary="false" html-data-barcode="{!ivDetail.Barcode__c}" html-data-ProductSerialNo="{!ivDetail.Asset__r.Product_Serial_No__c}" html-data-salesdepartment="{!ivDetail.Salesdepartment__c}"
                                            html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 40px" />
                                            html-data-qrcode="{!ivDetail.Fixture_QRCode__c}" html-data-aid="{!ivDetail.Asset__c}" html-data-frozen="{!ivDetail.Asset_Status__c == '冻结'}" html-data-bpguige="{!ivDetail.Asset__r.Product2.Packing_list_Fixture_F__c}" value="{!ivDetail.Inventory_Count__c}" style="width: 80%" />
                                            <!-- add by rentx 20210819 start -->
                                            <apex:inputHidden value="{!ivDetail.HCCodes__c}" />
                                            <!-- add by rentx 20210819 start -->
@@ -860,6 +1039,16 @@
                            </td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Inventory_Count__c - ivDetail.Amount__c > 0}">{!ivDetail.Inventory_Count__c - ivDetail.Amount__c}</apex:outputPanel></td>
                            <td class="labelStyle"><apex:outputPanel rendered="{!ivDetail.Inventory_Count__c != null && ivDetail.Amount__c - ivDetail.Inventory_Count__c > 0}">{!ivDetail.Amount__c - ivDetail.Inventory_Count__c}</apex:outputPanel></td>
                            <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc Start -->
                            <td class="labelStyle">
                                <apex:outputtext value="{0, date, yyyyMMdd}">
                                    <apex:param value="{!ivDetail.Consumable_Guaranteen_end__c}" />
                                </apex:outputtext>
                            </td>
                            <td class="labelStyle"><apex:inputField value="{!ivDetail.Expiration_Check_Result__c}" style="width: 50px" /></td>
                            <td class="labelStyle"><apex:inputField value="{!ivDetail.Appearance_Check_Result__c}" style="width: 50px" /></td>
                            <td class="labelStyle"><apex:inputField value="{!ivDetail.Package_Check_Result__c}" style="width: 50px" /></td>
                            <!-- 【FY24大及巨大课题】北京新法规项目对应 DB202307428742 20230801 by lc End -->
                        </tr>
                    </apex:repeat>
                </table>