DESKTOP-0K9VGFE\hp
2022-03-11 6d766b0c8e9b31e7e03ffd344a94c2851aa9beb9
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
<apex:page controller="NotReceivingNoteWaitingReceiptController" showHeader="false" action="{!init}" id="allPage">
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:stylesheet value="{!URLFOR($Resource.ReceivingNotePageCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.ReceivingNotePageJS)}"/>
    <apex:includeScript value="{!URLFOR($Resource.CommonUtilJs)}"/>
    <apex:form >
        <!-- 此处隐式生成二维码图片,防止PDF页上的二维码崩坏 -->
        <!-- <apex:includeScript value="{!URLFOR($Resource.qrcode)}"/> -->
        <apex:includeScript value="/soap/ajax/40.0/connection.js"/>
        <apex:includeScript value="/soap/ajax/40.0/apex.js"/>
        <div id="qrcode" hidden="true"></div>
        <script type="text/javascript">
        </script>
    </apex:form>
 
    <apex:form id="allForm">
        <style>
            table.headTable td   {
                /*min-width:150px;*/
            }
            .left20 {
                margin-left: 20px;
            }
 
            body .pbBody table.list tr.headerRow td.colViewing {
              background-image:url('{!URLFOR($Resource.IconResizeMinus_5)}') ;
              background-repeat:no-repeat;
            }
            body .pbBody table.list tr.headerRow td.colUnHideIcon {
              background-image:url('{!URLFOR($Resource.IconResizePlus_5)}');
              background-repeat:no-repeat;
            }
            td.deleted {
                background-color: #ccc;
            }
            td.newed {
                color: #f00 !important;
            }
        </style>
        <script type="text/javascript">
            var heightAjustment = 120;
            var widthAjustment = 30;
            j$(document).ready(function(){
            //       blockme();
            //       init();
              // windowResize();
            });
            function runSFDCAddRemote(MetadataConnectionWarning) {
                if (MetadataConnectionWarning) SFDCAddRemote('{!$Api.Session_ID}');
            }
            function sortTableJs(key) {
              // blockme();
              sortTablefunc(key);
            }
 
            j$(function() {
                var tableWidth = 0;
                j$('body .pbBody table#tableHeader tr.headerRow td').each(function() {
                    var colClass = getColClassName(this);
                    if (colClass != 'col_Scroll') {
                        var headerCol = j$('body .pbBody table.list tr.headerRow td.' + colClass);
                        tableWidth += headerCol.width();
                    }
                });
                j$('table#tableData').css('width', (tableWidth + 2) + 'px');
                j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
 
                // list の headerRow の tdに toggleWidth() を追加
                bindTdToggleWidth();
            });
            windowResize();
 
 
            function closeCurrentPage() {
                const ua = window.navigator.userAgent;
                if (ua.indexOf('MSIE') > 0) {
                    if (ua.indexOf('MSIE 6.0') > 0) {
                        window.opener = null;
                        window.close();
                    } else {
                        window.open('', '_top');
                        window.top.close();
                    }
                } else {
                    window.opener = null;
                    window.open('', '_self', '');
                    window.close();
                }
            }
            function checkMessage() {
                if (j$(escapeVfId('allPage:allForm:done_flg')).val() == 'true') {
                    alert("保存成功");
                }
            }
        </script>
        <apex:pageMessages />
        <apex:inputHidden value="{!done_flg}" id="done_flg"/>
        <apex:outputPanel id="pageallPanel">
            <apex:pageBlock id="searchBlock">
                    <table class="headTable" style="width:100%">
                        <tr>
                            <td>
                                <span style="font-weight:bold;">
                                备品存放地&nbsp;
                                </span>
                                {!pageB.rn.Internal_asset_location__c}
                            </td>
                            <td>
                                <span style="font-weight:bold;">
                                合同编码&nbsp;
                                </span>
                                {!pageB.rn.Sales_order_number__c}
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                订单编码&nbsp;
                               </span>
                               {!pageB.rn.OrderCode__c}
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                采购申请决裁号&nbsp;
                               </span>
                               {!pageB.rn.ApprovalNumber__c}
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                发货日&nbsp;
                                </span>
                                <apex:outputText value="{0, date, yyyy'-'MM'-'dd}">
                                    <apex:param value="{!pageB.rn.DateOfDelivery__c}" />
                                </apex:outputText>
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                收货申请单NO&nbsp;
                               </span>
                               {!pageB.rn.ReceivingNoteNo_New__c}
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                收货清单状态&nbsp;
                               </span>
                               {!pageB.rn.RN_Status__c}
                            </td>
                        </tr>
                    </table>
                    <table class="searchTable" style="width:100%">
                        <tr>
                            <td>
                                <span>
                                    收货状态:
                                    <apex:selectList value="{!pageB.status}" size="1">
                                        <apex:selectOptions value="{!StatusOps}"/>
                                    </apex:selectList>
                                </span>
                                <span class="left20">
                                    备品配套明细型号:
                                    <apex:inputText value="{!pageB.fixture_Model_No}"/>
                                </span>
                                <span class="left20">
                                    <apex:selectList value="{!showCount}" size="1" style="width:60px">
                                        <apex:selectOptions value="{!ShowCountOps}"/>
                                    </apex:selectList>
                                </span>
                                <span style="margin-left: 50px;">
                                    <apex:commandButton value="检索" action="{!search}" onclick="blockme();" reRender="allForm"  oncomplete="unblockUI();"/>
                                </span>
                            </td>
                            <td>
                                <span style="margin-left: 50px;float: right;">
                                    <apex:commandButton style="" value="数据确认" action="{!defineSaveRecord}" onclick="blockme();" reRender="allForm"  oncomplete="unblockUI();checkMessage();"/>
                                    <apex:commandButton style="" value="保存" action="{!saveRecord}" onclick="blockme();" reRender="allForm"  oncomplete="unblockUI();checkMessage();"/>
                                    <apex:commandButton value="返回" onclick="closeCurrentPage();"/>
                                </span>
                            </td>
                        </tr>
                    </table>
                    <div style="background-color: black; height: 1px; width: 100%;"/>
                </apex:pageBlock>
                <apex:pageBlock id="dataBlock">
 
                <apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
                <div>
                    <apex:commandButton reRender="allForm" onclick="blockme();" disabled="{!canBefore = false}" action="{!beforePage}" value="back" oncomplete="unblockUI();"/>
                    {!nowPage}/{!maxPage}
                    <apex:commandButton reRender="allForm" onclick="blockme();" disabled="{!canNext = false}" action="{!nextPage}" value="next" oncomplete="unblockUI();"/>
                </div>
            <div id="out_Div_L" style="width: 100%;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader_L">
                    <tr class="headerRow" height="30px">
                        <td class="col_chk" align="center">
                            <input type='checkbox' onClick='checkAll()' id="checker" />
                        </td>
                        <apex:repeat value="{!inputFieldList}" var="info">
                            <td class="col_{!info.value}">
                               {!info.label}
                            </td>
                        </apex:repeat>
                    </tr>
                </table>
            </div>
            <div style="clear:both;"/>
            <div id="in_Div_L" style="width: 100%;overflow: auto;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData_L">
                    <apex:variable value="{!0}" var="Cnt" />
                        <apex:repeat id="dataline_L" value="{!pageB.showBList}" var="var">
                            <tr class="dataRow" id="tableData_L_{!Cnt}">
                                <td class="dataCellBorder1 col_Chk {!IF(var.rnd['Change_Point__c']=='删除','deleted',IF(var.rnd['Change_Point__c']!=NULL,'newed',''))}" align="center">
                                    <apex:inputCheckbox rendered="{!var.rnd['Change_Point__c']!='删除' && var.canChange}" styleClass="rowchkcls" value="{!var.checked}" id="rowCheck"/>
                                </td>
                                <apex:repeat value="{!inputFieldList}" var="info">
                                    <td class="dataCellBorder1 col_{!info.value} {!IF(var.rnd['Change_Point__c']=='删除','deleted',IF(var.rnd['Change_Point__c']!=NULL,'newed',''))}" align="center" style="{!IF(info.value == 'ReceivingNoteDetailNo__c' && var.haveAsset, 'background-color: #6eb9ef;', '')}">
                                        <apex:outputPanel rendered="{!IF(info.value = 'SerialNumber__c',TRUE,FALSE)}">
                                            <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')"  ignoreEditPermissionForRendering="true"/>
                                        </apex:outputPanel>
 
                                        <apex:outputPanel rendered="{!IF(info.value = 'SerialNumber__c',FALSE,TRUE)}">
                                            <apex:outputField value="{!var.rnd[info.value]}"/>
                                        </apex:outputPanel>
                                    </td>
                                </apex:repeat>
                            </tr>
                        <apex:variable value="{!Cnt+1}" var="Cnt" />
                    </apex:repeat>
                </table>
            </div>
            </apex:pageBlock>
        </apex:outputPanel>
    </apex:form>
</apex:page>