liuyn
2024-03-11 a87f1c3df03078814ee97ad0c8ac200a232419e9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<apex:page lightningStylesheets="true" title="盘点相关">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <style>
        .right-pane {
            flex: 2;
            padding: 20px;
        }
        .highlight {
        background-color: yellow;
        /* 添加任何其他突出显示样式 */
    }
   
 
    .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>
<apex:form >
    <apex:actionFunction action="{!loadPage}" name="cancel" rerender="allForm" oncomplete="unblockUI();"/>
    <div class="vf-container">
        <div style="width:9%;float:left;">
            <div>
                <apex:commandButton styleClass="my-button you-button" style="width: 99%" value="盘点" onclick="loadPage('/apex/InventoryResultRecord'); return false"/>
            </div>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="备品盘点报告" onclick="loadPage('/apex/InventoryReport'); return false"/>
            </div>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="耗材盘点报告" onclick="loadPage('/apex/InventoryReport?isConsum=true'); return false"/> 
            </div>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="盘点表头" onclick="window.open('/lightning/o/Inventory_Header__c/list?filterName=Recent'); return false"/> 
            </div>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="温湿度盘点" onclick="loadPage('/apex/InventoryTemperatureHumidity'); return false"/> 
            </div>
            <div style="margin-top:10px;">
                <apex:commandButton styleClass="my-button" style="width: 99%" value="温湿度盘点表头" onclick="window.open('/lightning/o/Temperature_And_Humidity_Check__c/list?filterName=Recent'); return false"/> 
            </div>
            
        </div>
        <!-- <div style="width:90%;float:right;margin-left:5px;" id="vf-content"> -->
            <!-- VF 页面内容将在此处显示 -->
        <!-- </div> -->
        <iframe src="/apex/InventoryResultRecord" id="iframepage" width="90%" style="margin-left:3px;" scrolling="auto" onload="changeFrameHeight()" frameborder="0"></iframe>
    </div>
</apex:form>
    
 
    <script>
        function changeFrameHeight(){
            var ifm= document.getElementById("iframepage");
            ifm.height=document.documentElement.clientHeight-30;
        }
        window.onresize=function(){
            changeFrameHeight();
        }
        function loadPage(pageUrl) {
            var buttons = document.getElementsByClassName("my-button");
            console.log(buttons);
            for (let i = 0; i < buttons.length; i++) {
                // buttons[i].style.backgroundColor = "white";
                buttons[i].classList.remove('you-button');
            }
            var clickedButton = event.target || event.srcElement; // 获取被点击的按钮
            // clickedButton.style.backgroundColor = "silver"; // 添加突出显示的背景颜色
            clickedButton.classList.add('you-button');
            // 添加其他突出显示样式
            document.getElementById("iframepage").src = pageUrl;   
        }
    </script>
</apex:page>