涂煌豪
2022-03-24 7a6bde159e19c304b3a512ed21171b7ce09055d9
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
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
<!-- <apex:page controller="FixtureRemindForAgencyRequestController" action="{!init}" id="allPage">  注释by rentx 20210902 -->
<apex:page controller="FixtureRemindForAgencyRequestController" action="{!init}" id="allPage" rendered="{!canshowData}" title="现地首页">
<apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
 <script>
    function changeShowStyleFn() {
        changeShowStyle();
    }
</script>
    <style type="text/css">
        th{
            text-align: center;
        }
        td.number{
            text-align: center;
            width: 50px;
        }
        td.firstCol{
            text-align: left;
            width: 120px;
        }
        .tb2 {
            background: #ffffff;
            /*left: 0px;
            height: 100%;
            float: left;
            position: sticky;*/
            position: fixed;
            z-index: 1000;
            width: 100px;
        }
        .tab-css tr {
            position: relative;
        }
        .td-empty {
            width: 100px;
            /*height: 20px;
            padding: 0!important;*/
            border-color: #ffffff;
            border-width: 0 1px 1px 1px;
            display: inline-block;
        }
    </style>
 
    <script>
        function setFocusOnLoad() {}
        function bodyOnLoad(){setFocusOnLoad();}
    </script>
 
    <apex:form id="allForm">
 
        <apex:actionFunction name="changeShowStyle" action="{!changeShowStyle}" />
 
 
        <table style="margin-bottom: 20px;">
            <tr>
                <td>日期</td>
                <td>
                    <apex:actionRegion >
                        <apex:inputField id="chosenDate" value="{!snap.Date__c}">
                            <apex:actionSupport event="onchange" action="{!refreshTable}" onsubmit="blockme();" reRender="allForm" oncomplete="unblockUI();" />
                        </apex:inputField>
                    </apex:actionRegion>
                </td>
                <td style="padding-left: 30px;">时间</td>
                <td>
                    <apex:actionRegion >
                        <apex:inputField value="{!snap.Time__c}" >
                            <apex:actionSupport event="onchange" action="{!refreshTable}" onsubmit="blockme();" reRender="allForm"  oncomplete="unblockUI();"/>
                        </apex:inputField>
                    </apex:actionRegion>
                    <dfn>选择【无】时显示当前时间的数量</dfn>
                </td>
 
                <td style="padding-left: 30px;">显示方式:</td>
                <td>
                    <apex:selectList value="{!showStyle}" style="width:100px" size="1" onchange="changeShowStyleFn();" >
                        <apex:selectOptions value="{!showStyles}"/>
                    </apex:selectList>
                </td>
            </tr>
            
        </table>
        <br/>
 
        <apex:pageMessages />
        <apex:outputText id="tables" rendered="{!hasAuthority}">
            
            <apex:outputText rendered="{! !isBenBu}">
                <div style="overflow-x: auto; overflow-y: auto; width:100%; border:1px; border-left-color: black; border-right-color: black">
                    <table border="1" cellspacing="0" style="text-align: center;width: auto;" class="tab-css" >
                        <tr>
                            <!--border-color: #2c2c2c #2c2c2c white #2c2c2c;-->
                            <th  id="bpbsc" rowspan="2" class="tb2" style="height:50px;line-height:50px; text-align:center;">备品(办事处)</th>
                            <!-- <th id="bpbsc" class="tb2">备品(办事处)</th> -->
                            <th class="td-empty">&nbsp;&nbsp;</th>
                            <apex:outputText rendered="{!canshowdongbei}">
                                <th colspan="5">东北</th> 
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuabei}">
                                <th colspan="7">华北</th> 
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowxibei}">
                                <th colspan="8">西北</th> 
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowxinan}">
                                <th colspan="5">西南</th> 
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuanan}">
                                <th colspan="6">华南</th> 
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuadong}">
                                <th colspan="7">华东</th>
                            </apex:outputText>
                        </tr>
                        <tr>
                            <!-- 大连 沈阳 长春 哈尔滨 合计 北京 石家庄 天津 呼和浩特 济南 青岛 合计 陕西 山西 河南 青海 宁夏 新疆 甘肃 合计 成都 重庆 贵阳 昆明 合计 武汉 长沙 南宁 广州 深圳 合计 上海 南京 杭州 南昌 合肥 福州 合计 -->
                            <!-- <th style="border-color: white #2c2c2c #2c2c2c #2c2c2c" class="tb2" >(办事处)</th> -->
                            <th class="td-empty">&nbsp;&nbsp;</th>
                            <apex:outputText rendered="{!canshowdongbei}">
                                <!-- 大连 -->
                                <!-- 东北 -->
                                <th> {!BSC_ADDR_LIST[0]} </th> 
                                <th> {!BSC_ADDR_LIST[1]} </th>
                                <th> {!BSC_ADDR_LIST[2]} </th>
                                <th> {!BSC_ADDR_LIST[3]} </th>
                                <th> {!BSC_ADDR_LIST[4]} </th>
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuabei}">
                                <!-- 华北 -->
                                <th> {!BSC_ADDR_LIST[5]} </th>
                                <th> {!BSC_ADDR_LIST[6]} </th>
                                <th> {!BSC_ADDR_LIST[7]} </th>
                                <th> {!BSC_ADDR_LIST[8]} </th>
                                <th> {!BSC_ADDR_LIST[9]} </th>
                                <th> {!BSC_ADDR_LIST[10]}</th>
                                <th> {!BSC_ADDR_LIST[11]}</th>
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowxibei}">
                                <!-- 西北 -->
                                <th> {!BSC_ADDR_LIST[12]} </th>
                                <th> {!BSC_ADDR_LIST[13]} </th>
                                <th> {!BSC_ADDR_LIST[14]} </th>
                                <th> {!BSC_ADDR_LIST[15]} </th>
                                <th> {!BSC_ADDR_LIST[16]} </th>
                                <th> {!BSC_ADDR_LIST[17]} </th>
                                <th> {!BSC_ADDR_LIST[18]} </th>
                                <th> {!BSC_ADDR_LIST[19]} </th>
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowxinan}">
                                <!-- 西南 -->
                                <th> {!BSC_ADDR_LIST[20]} </th>
                                <th> {!BSC_ADDR_LIST[21]} </th>
                                <th> {!BSC_ADDR_LIST[22]} </th>
                                <th> {!BSC_ADDR_LIST[23]} </th>
                                <th> {!BSC_ADDR_LIST[24]} </th>
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuanan}">
                                <!-- 华南 -->
                                <th> {!BSC_ADDR_LIST[25]} </th>
                                <th> {!BSC_ADDR_LIST[26]} </th>
                                <th> {!BSC_ADDR_LIST[27]} </th>
                                <th> {!BSC_ADDR_LIST[28]} </th>
                                <th> {!BSC_ADDR_LIST[29]} </th>
                                <th> {!BSC_ADDR_LIST[30]} </th>
                            </apex:outputText>
                            <apex:outputText rendered="{!canshowhuadong}">
                                <!-- 华东 -->
                                <th> {!BSC_ADDR_LIST[31]} </th>
                                <th> {!BSC_ADDR_LIST[32]} </th>
                                <th> {!BSC_ADDR_LIST[33]} </th>
                                <th> {!BSC_ADDR_LIST[34]} </th>
                                <th> {!BSC_ADDR_LIST[35]} </th>
                                <th> {!BSC_ADDR_LIST[36]} </th>
                                <th> {!BSC_ADDR_LIST[37]} </th>
                            </apex:outputText>
                        </tr>
 
                        <apex:repeat value="{!BSC_STATUS_LIST}" var="show_status">
                            <tr>
                                <td class="tb2">{!IF(show_status== '待欠品确认件数','待欠品确认配套数
                                (不同办事处)',show_status)}</td>
                                <td class="td-empty">&nbsp;&nbsp;</td>
                                <apex:outputText rendered="{!canshowdongbei}">
                                    <td class="number" >{!dlmap[show_status]}</td>
                                    <td class="number" >{!symap[show_status]}</td>
                                    <td class="number" >{!ccmap[show_status]}</td>
                                    <td class="number" >{!hrbmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" > 
                                        {! dlmap[show_status] + symap[show_status] + ccmap[show_status] + hrbmap[show_status]}
                                    </td>
                                </apex:outputText>
                                
                                <apex:outputText rendered="{!canshowhuabei}">
                                    <td class="number" >{!bjmap[show_status]}</td>
                                    <td class="number" >{!sjzmap[show_status]}</td>
                                    <td class="number" >{!tjmap[show_status]}</td>
                                    <td class="number" >{!hhhtmap[show_status]}</td>
                                    <td class="number" >{!jnmap[show_status]}</td>
                                    <td class="number" >{!qdmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" >
                                        {! bjmap[show_status]+sjzmap[show_status] + tjmap[show_status] + hhhtmap[show_status] + jnmap[show_status] + qdmap[show_status]}
                                    </td>
                                </apex:outputText>
 
                                <apex:outputText rendered="{!canshowxibei}">
                                    <td class="number" >{!sxmap[show_status]}</td>
                                    <td class="number" >{!shxmap[show_status]}</td>
                                    <td class="number" >{!hnmap[show_status]}</td>
                                    <td class="number" >{!qhmap[show_status]}</td>
                                    <td class="number" >{!mapnx[show_status]}</td>
                                    <td class="number" >{!xjmap[show_status]}</td>
                                    <td class="number" >{!gsmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" >
                                        {! sxmap[show_status] + shxmap[show_status] + hnmap[show_status] + qhmap[show_status] + mapnx[show_status] + xjmap[show_status] + gsmap[show_status]}
                                    </td>
                                </apex:outputText>
                            
                                <apex:outputText rendered="{!canshowxinan}">
                                    <td class="number" >{!cdmap[show_status]}</td>
                                    <td class="number" >{!cqmap[show_status]}</td>
                                    <td class="number" >{!gymap[show_status]}</td>
                                    <td class="number" >{!kmmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" >
                                        {! cdmap[show_status] + cqmap[show_status] + gymap[show_status] + kmmap[show_status]}
                                    </td>
                                </apex:outputText>
 
                                <apex:outputText rendered="{!canshowhuanan}">
                                    <td class="number" >{!whmap[show_status]}</td>
                                    <td class="number" >{!csmap[show_status]}</td>
                                    <td class="number" >{!nnmap[show_status]}</td>
                                    <td class="number" >{!mapgz[show_status]}</td>
                                    <td class="number" >{!szmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" >
                                        {! whmap[show_status] + csmap[show_status] + nnmap[show_status] + mapgz[show_status]+szmap[show_status]}
                                    </td>
                                </apex:outputText>
 
                                <apex:outputText rendered="{!canshowhuadong}">
                                    <td class="number" >{!shmap[show_status]}</td>
                                    <td class="number" >{!njmap[show_status]}</td>
                                    <td class="number" >{!hzmap[show_status]}</td>
                                    <td class="number" >{!ncmap[show_status]}</td>
                                    <td class="number" >{!hfmap[show_status]}</td>
                                    <td class="number" >{!fzmap[show_status]}</td>
                                    <td class="number" style="background-color: #bdd7ee;" >
                                        {! shmap[show_status] + njmap[show_status] + hzmap[show_status] + ncmap[show_status]+ hfmap[show_status] + fzmap[show_status]}
                                        
                                    </td>
                                </apex:outputText>
 
                            </tr>
                        </apex:repeat>
                    </table>
                </div>
            </apex:outputText>
 
            <apex:outputText rendered="{!isbenbu}">
                <table border="1" cellspacing="0" style="float:left;margin-right:80px;text-align: right;width: auto;">
                    <tr>
                        <th >备品(办事处)</th>
                        <apex:outputText rendered="{!canshowdongbei}"> 
                            <th >东北</th> 
                        </apex:outputText>
                        <apex:outputText rendered="{!canshowhuabei}">
                            <th >华北</th> 
                        </apex:outputText>
                        <apex:outputText rendered="{!canshowxibei}">
                            <th >西北</th> 
                        </apex:outputText>
                        <apex:outputText rendered="{!canshowxinan}">
                            <th >西南</th> 
                        </apex:outputText>
                        <apex:outputText rendered="{!canshowhuanan}">
                            <th >华南</th> 
                        </apex:outputText>
                        <apex:outputText rendered="{!canshowhuadong}">
                            <th >华东</th>
                        </apex:outputText>
                    </tr>
                    <apex:repeat value="{!BSC_STATUS_LIST}" var="show_status">
                        <tr>
                            <td class="firstCol">{!IF(show_status== '待欠品确认件数','待欠品确认配套数
                            (不同办事处)',show_status)}</td>
                            <apex:outputText rendered="{!canshowdongbei}">
                                <td class="number" style="background-color: #bdd7ee;" > 
                                    {! dlmap[show_status] + symap[show_status] + ccmap[show_status] + hrbmap[show_status]}
                                </td>
                            </apex:outputText>
                            
                            <apex:outputText rendered="{!canshowhuabei}">
                                <td class="number" style="background-color: #bdd7ee;" >
                                    {! bjmap[show_status]+sjzmap[show_status] + tjmap[show_status] + hhhtmap[show_status] + jnmap[show_status] + qdmap[show_status]}
                                </td>
                            </apex:outputText>
 
                            <apex:outputText rendered="{!canshowxibei}">
                                <td class="number" style="background-color: #bdd7ee;" >
                                    {! sxmap[show_status] + shxmap[show_status] + hnmap[show_status] + qhmap[show_status] + mapnx[show_status] + xjmap[show_status] + gsmap[show_status]}
                                </td>
                            </apex:outputText>
                        
                            <apex:outputText rendered="{!canshowxinan}">
                                <td class="number" style="background-color: #bdd7ee;" >
                                    {! cdmap[show_status] + cqmap[show_status] + gymap[show_status] + kmmap[show_status]}
                                </td>
                            </apex:outputText>
 
                            <apex:outputText rendered="{!canshowhuanan}">
                                <td class="number" style="background-color: #bdd7ee;" >
                                    {! whmap[show_status] + csmap[show_status] + nnmap[show_status] + mapgz[show_status] + szmap[show_status]}
                                    <!-- 20220110 ljh add mapgz -->
                                </td>
                            </apex:outputText>
 
                            <apex:outputText rendered="{!canshowhuadong}">
                                <td class="number" style="background-color: #bdd7ee;" >
                                    {! shmap[show_status] + njmap[show_status] + hzmap[show_status] + ncmap[show_status]+ hfmap[show_status] + fzmap[show_status]}
                                    
                                </td>
                            </apex:outputText>
 
                        </tr>
                    </apex:repeat>
                </table>
            </apex:outputText>
        </apex:outputText>
    </apex:form>
</apex:page>