高章伟
2022-03-18 4bfe21c4b5ddc089ae5a95f4b10f6cff148b690d
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<apex:page controller="NotReceivingNoteListFirstController" action="{!init}" showHeader="false" sidebar="false" id="allPage">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:stylesheet value="{!URLFOR($Resource.MainFixtureSelectCss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<apex:includeScript value="{!URLFOR($Resource.RelationListPagingCmpJS)}"/>
<apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
<script type="text/javascript">
var heightAjustment = 120;
var widthAjustment = 30;
function MysearchOppJs(){
    searchOpp();
}
</script>
<apex:form id="allForm">
        <apex:actionFunction name="searchOpp" action="{!searchOpp}" rerender="allForm,checEventFrame" oncomplete="unblockUI();">
        </apex:actionFunction>
        <apex:actionFunction name="checkEvent" action="{!checkEvent}" rerender="allForm,checEventFrame" oncomplete="window.scrollTo(0, 200);unblockUI();">
            <apex:param name="firstParam" assignTo="{!clickLineNo}" value="" />
        </apex:actionFunction>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock" tabStyle="Report">
                 <apex:pageBlockSection title="非集中备品收货清单一览" id="mainSection" columns="4"  >
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel value="备品存放地" />
                        <apex:inputText id="beiPinCunfangDi" value="{!beiPinCunfangDi}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="asset_loaner_category" value="备品类别" />
                        <apex:selectList value="{!asset_loaner_category}" size="1" id="asset_loaner_category" disabled="true">
                            <apex:selectOptions value="{!Asset_loaner_categoryOps}"/>
                        </apex:selectList>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="dateOfDelivery" value="发货日" />
                        <apex:outputPanel >
                            <div style="display:none;">
                                <apex:inputField value="{!rn.DateOfDelivery__c}" />
                            </div>
                            <apex:inputText id="dateOfDelivery" value="{!dateOfDelivery}" size="12" onfocus="DatePicker.pickDate(true, '{!$Component.dateOfDelivery}', false)" />
                        </apex:outputPanel>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="status" value="收货清单状态" />
                        <apex:selectList value="{!status}" size="1" id="status">
                            <apex:selectOptions value="{!RNStatusOpss}"/>
                         </apex:selectList>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="salesOrderNumber" value="合同编码" />
                        <apex:inputText id="salesOrderNumber" value="{!salesOrderNumber}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="orderCode" value="订单编码" />
                        <apex:inputText id="orderCode" value="{!orderCode}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="approvalNumber" value="采购申请裁决号" />
                        <apex:inputText id="approvalNumber" value="{!approvalNumber}"/>
                    </apex:pageBlockSectionItem>
                    <apex:pageBlockSectionItem >
                        <apex:outputLabel for="contactPerson" value="联系人" />
                        <apex:inputText id="contactPerson" value="{!contactPerson}"/>
                    </apex:pageBlockSectionItem>
                </apex:pageBlockSection>
                <apex:pageBlockButtons location="bottom">
                    <apex:commandButton style="" value="检索" onclick="MysearchOppJs(); return false;"/>
                    <apex:commandButton action="{!save}" value="数据确认" />
                </apex:pageBlockButtons>
                <!-- //数据展示 -->
                <div style="clear:both; width: 100%"></div>
            </apex:pageBlock>
            <apex:outputPanel id="message">
                <apex:pageMessages />
            </apex:outputPanel>
            <c:RelationListPagingCmp id="cmpid" pgController="{!this}" hasCheckbox="true" isRadio="false"/>
        </apex:outputPanel>
    </apex:form>
    <apex:outputPanel id="checEventFrame">
      <script type="text/javascript">
        j$("table#tableData").disabled = true;
        function windowResize() {
            var heightsp = 0;
            if( typeof bottomspace != 'undefined' ){
                heightsp = bottomspace;
            }
            blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:searchBlock')).height() - heightAjustment;
            blockHeight = blockHeight - heightsp;
            sbwidth = scrollbarWidth();
            blockAllWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width()-widthAjustment - sbwidth;
            j$('div#out_Div_L').css('width', blockAllWidth + 'px');
            j$('table#tableHeader_L').css('width', blockAllWidth + 'px');
            j$('table#tableData_L').css('width', blockAllWidth + 'px');
            blockWidth = j$(escapeVfId('allPage:allForm:searchBlock')).width() - j$('div#out_Div_L').width() - widthAjustment - sbwidth;
            
            //コンポネートなのでIDを変更
            j$(escapeVfId('allPage:allForm:dataBlock')).css('height', blockHeight + 78 + 'px');
            j$('div#in_Div').css('width', blockWidth + 'px');
            j$('div#out_Div').css('width', blockWidth + 'px');
            j$('div#in_Div').css('height', blockHeight + 'px');
            j$('div#in_Div_L').css('height', blockHeight + 'px');
            // Table tr の height をあわせる
            var tbl = document.getElementById('tableData_L');
            var tbl2 = document.getElementById('tableData');
            if (tbl != null && tbl2 != null) {
                for (var i = 0; i < tbl2.rows.length; i++) {
                    var ht1 = j$(tbl.rows[i]).height()+2;
                    var ht2 = j$(tbl2.rows[i]).height()+2;
                    if (ht2 < ht1) {
                        j$(tbl2.rows[i]).css('height', ht1 + 'px');
                        j$(tbl.rows[i]).css('height', ht1 + 'px');
                    } else {
                        j$(tbl.rows[i]).css('height', ht2 + 'px');
                        j$(tbl2.rows[i]).css('height', ht2 + 'px');
                    }
                }
                if (j$('table#tableData').height() > j$('div#in_Div').height()) {
                    j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
                } else {
                    j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
                    j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
                }
                if (j$('table#tableData').width() > j$('div#in_Div').width()) {
                    j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
                }
            }
        } 
      </script>
    </apex:outputPanel>
</apex:page>