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
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
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
<apex:page id="allPage" showHeader="false" sidebar="false" Controller="SetPersonalProductTargetController" action="{!init}">
<head>
<title>担当者重点产品目标设定</title>
<!-- 2018年7月25日 SWAG-B2Z344 by 张玉山
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
-->    
 
<apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
<apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
<style type="text/css">
.StandLeft{
 
}
.RollRow{
 
}
#sbArea{
    position:absolute;
    left:0px;
    top:0px;
    z-index:101;
}
 
#sbArea_contentsArea{
    position:absolute;
    z-index:103;
    overflow:auto;
}
 
#sbArea_contentsArea_msg{
    color:#FFFFFF;
    background-color:#070707;
    text-align:center;
    width:200px;
    padding:8px;
}
 
 
#sbArea_backArea{
    position:absolute;
    left:0px;
    top:0px;
    z-index:100;
    background-color:#000000;
}
</style>
<script type="text/javascript">
//  window.onload = function getInfo() 
// { 
          
// } 
// function Secin(){
         
// }     
function checkMoney(val, id) {
    // changeFlgセット
    j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).val(1);
    var ids = id.split(":");
    var isChangedid = ids[0] + ":" + ids[1] + ":" + ids[2] + ":" + ids[3] + ":" + ids[4] + ":isChanged";
    j$(escapeVfId(isChangedid)).val("1");
    j$(escapeVfId(id))[0].style.background="#FFFF33";
    if (val != null && val != "") {
        if (isNaN(parseFloat(val))) {
            alert("请输入数值");
            j$(escapeVfId(id)).val("");
            return;
        }
        val = localParseFloat(val);
        val = Math.round(val * 100) / 100;
        var targetCategory = j$('#targetCategory').value();
        if (targetCategory == '重点产品目标(金额)') {
            j$(escapeVfId(id)).val(toNumComma(val));
        } else {
            j$(escapeVfId(id)).val(number_format_common(val, 0, "", ","));
        } 
    }
    calc();
}
 
function calc() {
    var isorgtbl = j$('div[name=bodyTable]');
    var tbl = document.getElementById('bodyTable');
    var datarows = tbl.rows.length;
    // 如果MainTable没有分成4部分
    if (isorgtbl.length == 0) {
        //datarows -= 2;
    }
    var allSum = 0;
    // xiongyl
     var cols = new Array({!titleSize});
    for (var i =0;i<cols.length;i++){
        cols[i] =0;
        }
    var targetCategory = j$('#targetCategory').value();
    // 行
    for (var i = 0; i < datarows; i++) {
        var rowSum = 0;
        // 列
        for (var j = 0; j < cols.length; j++) {
            var amount = 0;
            var raw = j$(escapeVfId('allPage:allForm:dataBlock:dbRepeat:' + i + ':amountRepeat:' + j + ':inAmountValue')).value();
            raw = (raw + '').replace(/[^0-9+\-Ee.]/g, '');
            
            var amount = localParseFloat(raw);
            rowSum = rowSum + amount;
            cols[j] = cols[j] + amount;
            allSum = allSum + amount;
        }
        if (targetCategory == '重点产品目标(金额)') {
            j$(escapeVfId('allPage:allForm:dataBlock:dbRepeat:' + i + ':totalrow')).text(toNumComma(rowSum));
        } else {
            j$(escapeVfId('allPage:allForm:dataBlock:dbRepeat:' + i + ':totalrow')).text(number_format_common(rowSum, 0, "", ","));
        }
    }
    // 列
    for (var j = 0; j < cols.length; j++) {
        if (targetCategory == '重点产品目标(金额)') {
            j$(escapeVfId('totalcol' + j)).text(toNumComma(cols[j]));
        } else {
            j$(escapeVfId('totalcol' + j)).text(number_format_common(cols[j], 0, "", ","));
        }
    }
    // 総計
    if (targetCategory == '重点产品目标(金额)') {
        j$(escapeVfId('totalAll')).text(toNumComma(allSum));
    } else {
        j$(escapeVfId('totalAll')).text(number_format_common(allSum, 0, "", ","));
    }
}
 
function saveJs() {
    blockme_dark();
    if (window.confirm('确定要保存吗?')) {
        save();
    } else {
        unblockUI();
    }
}
    // 2018年7月6日 SWAG-AZHBH7  添加UpdateJs 调用Apex 中Update函数 by 张玉山
function UpdateJs() {
    blockme_dark();
    if (window.confirm('确定要反应到目标吗?')) {
        Update();
    } else {
        unblockUI();
    }
}
    
 
function nextJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('要保存已做的修改吗?\n点击 [确定] 保存并去下年度\n点击 [取消] 只去下年度,不保存')) {
            next(true);
        } else {
            next(false);
        }
    } else {
        next(false);
    }
}
 
function prevJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('要保存已做的修改吗?\n点击 [确定] 保存并去上年度\n点击 [取消] 只去上年度,不保存')) {
            prev(true);
        } else {
            prev(false);
        }
    } else {
        prev(false);
    }
}
 
function checkOwner(val, id, rownum) {
    // changeFlgセット
    j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).val(1);
    var ids = id.split(":");
    var isChangedid = ids[0] + ":" + ids[1] + ":" + ids[2] + ":" + ids[3] + ":" + ids[4] + ":isChanged";
    j$(escapeVfId(isChangedid)).val("1");
    j$(escapeVfId(id))[0].style.background="#FFFF33";
}
 
function searchByDptJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('目标金额有变化,要保存已做的修改吗?\n点击 [确定] 保存并继续\n点击 [取消] 不保存')) {
            searchByDpt(true);
        } else {
            searchByDpt(false);
        }
    } else {
        searchByDpt(false);
    }
}
 
function searchByProvinceJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('目标金额有变化,要保存已做的修改吗?\n点击 [确定] 保存并继续\n点击 [取消] 不保存')) {
            searchByProvince(true);
        } else {
            searchByProvince(false);
        }
    } else {
        searchByProvince(false);
    }
}
 
function searchByFilterJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('目标金额有变化,要保存已做的修改吗?\n点击 [确定] 保存并继续\n点击 [取消] 不保存')) {
            searchByFilter(true);
        } else {
            searchByFilter(false);
        }
    } else {
        searchByFilter(false);
    }
}
 
function searchByImpKeyJs() {
    blockme_dark();
    if (j$(escapeVfId('allPage:allForm:dataBlock:changeFlg')).value() == 1) {
        if (window.confirm('目标金额有变化,要保存已做的修改吗?\n点击 [确定] 保存并继续\n点击 [取消] 不保存')) {
            searchByImpKey(true);
        } else {
            searchByImpKey(false);
        }
    } else {
        searchByImpKey(false);
    }
}
//CHAN-BDQBLX  20210129 ljh start 
function exportJs() {
    if (j$(escapeVfId('Page:allForm:editBlock:changeFlg')).value() == 1) {
        if (window.confirm('重点产品的目标数量有变化,请先点击保存按钮,在进行导出操作')) {
            return;
        } 
    } 
    exportcsv();
}
//CHAN-BDQBLX  20210129 ljh end 
/*****************************/
var heightAjustment = 160;
var widthAjustment = 15;
function windowResize() {
    blockHeight = j$(window).innerHeight() - j$(escapeVfId('allPage:allForm:headBlock')).height() - j$('div#MessageBlock').height() - heightAjustment;
    sbwidth = scrollbarWidth();
    blockWidth =  j$(escapeVfId('allPage:allForm:headBlock')).width() - j$('div#in_Div_L').width() - widthAjustment - sbwidth*2;
    allblockWidth = j$(escapeVfId('allPage:allForm:headBlock')).width() - widthAjustment - sbwidth;
    allblockHeight = blockHeight + j$('div#out_Div').height();
    j$(escapeVfId('allPage:allForm:dataBlock')).css('height', blockHeight + 98 + 'px');
    j$('div#in_Div').css('width', blockWidth + 'px');
    j$('div#out_Div').css('width', blockWidth + 'px');
    j$('div#all').css('width', allblockWidth + 'px');
    j$('div#in_Div').css('height', blockHeight + 'px');
    j$('div#in_Div_L').css('height', blockHeight + 'px');
    j$('div#all').css('height', allblockHeight + 'px');
 
    // Table tr の height をあわせる
    var tbl = document.getElementById('leftTable');
    var tbl2 = document.getElementById('bodyTable');
    var tbl3 = document.getElementById('crossTable');
    var tbl4 = document.getElementById('topTable');
    for (var i = 0; i < tbl4.rows.length; i++) {
     var ht3 = j$(tbl3.rows[i]).height();
     var ht4= j$(tbl4.rows[i]).height();
     if (ht4 < ht3) {
            j$(tbl4.rows[i]).css('height', ht3 + 'px');
        } else {
            j$(tbl3.rows[i]).css('height', ht4 + 'px');
        }
 }
    for (var i = 0; i < tbl2.rows.length; i++) {
        var ht1 = j$(tbl.rows[i]).height();
        var ht2 = j$(tbl2.rows[i]).height();
       
        if (ht2 < ht1) {
            j$(tbl2.rows[i]).css('height', ht1 + 'px');
        } else {
            j$(tbl.rows[i]).css('height', ht2 + 'px');
        }
        
    }
 
    if (j$('table#bodyTable').height() > j$('div#in_Div').height()) {
        j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
        j$('div#all').css('width', (allblockWidth + sbwidth) + 'px');
    } else {
       j$('div#out_Div').css('width', (blockWidth + sbwidth) + 'px');
       j$('div#in_Div').css('width', (blockWidth + sbwidth) + 'px');
       j$('div#all').css('width', (allblockWidth + sbwidth) + 'px');
    }
    if (j$('table#bodyTable').width() > j$('div#in_Div').width()) {
        j$('div#in_Div').css('height', (blockHeight + sbwidth) +'px');
        j$('div#all').css('height', (allblockHeight + sbwidth) +'px');
    }
}
window.onresize = windowResize;
//CHAN-BDQBLX  20210129 ljh start 
var popupBox;
popupBox = new SimpleDialog("CSVImportDialogId", false);  // 不可拖动
popupBox.createDialog();
function openPopupCSV() {
    popupBox.setTitle("导入CSV文件");
    popupBox.importContentNode(document.getElementById("{!$Component.allForm.popupBox}"));
    popupBox.show(document.getElementById("{!$Component.allForm.popupBox}"));
function remoteLocationPost() {
    blockme();
    var fbody = document.getElementById("file_input").files[0];
    if (typeof fbody === "undefined") {
        alert("请选择CSV文件");
        return;
    }
    else {
        var reader = new FileReader();
        reader.readAsText(fbody,"gb2312");//在前台改乱码问题
        reader.onload = function(val) {
 
            // if(this.result.split("\n").length - 1 > {!detailCountLimit}){
            //     alert("文件不可超过" + {!detailCountLimit} + "行");
            //     return;
            // }
            passToController(this.result);
            popupBox.hide();
        } 
    }
}
//CHAN-BDQBLX  20210129 ljh end 
</script>
<style>
div#out_Div {
  position:relative;
  overflow: hidden;
  width: 820px;
}
div#out_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
  width: 500px;
}
div#in_Div {
  position:relative;
  overflow: auto;
  width: 837px;
  height: 314px;
}
div#in_Div_L {
  position:relative;
  overflow: hidden;
  float:left;
  width: 500px;
  height: 297px;
}
div#all {
  overflow: hidden;
  width: 1270px;
}
</style>
</head>
 
<apex:form id="allForm">
    <div id="MessageBlock">
    <apex:outputPanel id="MessageP">
        <apex:pagemessages />
    </apex:outputPanel>
    </div>
    <apex:actionFunction name="save" action="{!saveBtn}" rerender="MessageP,dataBlock" oncomplete="unblockUI();Secin();" />
    <!-- 2018年7月6日 SWAG-AZHBH7  添加Update action function by 张玉山 -->
    <apex:actionFunction name="Update" action="{!UpdateBtn}" rerender="MessageP,dataBlock" oncomplete="unblockUI();Secin();" />
 
    <apex:actionFunction name="next" action="{!next}" rerender="allForm" oncomplete="unblockUI();Secin();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="prev" action="{!previous}" rerender="allForm" oncomplete="unblockUI();Secin();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="searchByDpt" action="{!searchByDpt}" rerender="allForm" oncomplete="unblockUI();Secin();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="searchByProvince" action="{!searchByProvince}" rerender="allForm" oncomplete="unblockUI();Secin();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
    <apex:actionFunction name="searchByFilter" action="{!searchByFilter}" rerender="allForm" oncomplete="unblockUI();Secin();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
    <!--CHAN-BDQBLX  20210129 ljh start -->
    <apex:outputPanel style="display:none">
            <apex:outputPanel id="popupBox" layout="block">
                <input type="file" id="file_input" name="attFile" accept=".csv" /><br/>
                <center>
                    <apex:commandButton value="确认" onclick="remoteLocationPost(); return false;" style="width: 20%; margin: 20px 10px 0px 10px" />
                    <apex:commandButton value="取消" onclick="popupBox.hide();" style="width: 20%; margin: 20px 10px 0px 10px" />
                </center>
            </apex:outputPanel>
    </apex:outputPanel>
    <!--CHAN-BDQBLX  20210129 ljh end -->
  <!--  <apex:actionFunction name="searchByImpKey" action="{!searchByImpKey}" rerender="Form" oncomplete="unblockUI();">
        <apex:param name="saveFlg" assignTo="{!saveFlg}" value="" />
    </apex:actionFunction>
-->
    <font style="font-size:15px;font-weight:700;display:{!IF(target_category == '重点产品目标(金额)','','none')}">录入重点产品的目标&nbsp;(注:请输入含税金额)</font>
    <font style="font-size:15px;font-weight:700;display:{!IF(target_category == '重点产品目标(金额)','none','')}">录入重点产品的目标&nbsp;(注:数量,请输入整数)</font>
    <!--CHAN-BDQBLX  20210129 ljh start  -->
    <apex:actionFunction name="exportcsv" action="{!exportBycsv}"/>
    <apex:actionFunction name="passToController" action="{!importCSVFile}" rerender="allForm, MessageP" oncomplete="unblockUI();">
         <apex:param name="csvData" value="" />
    </apex:actionFunction>
    <!--CHAN-BDQBLX  20210129 ljh end -->
    <apex:pageBlock id="headBlock" tabStyle="Report">
        <table id="ButtonTable" border="0" >
            <tr>
                <td>
                    本部&nbsp;<apex:selectList value="{!salesDpt}" size="1" style="width:120px;" disabled="{!!(loginUser.ProfileId == $Label.ProfileId_SystemAdmin || loginUser.ProfileId == $Label.ProfileId_103)}" onchange="searchByDptJs();return false;"><apex:selectOptions value="{!salesDptOpts}"/></apex:selectList>&nbsp;&nbsp;&nbsp;
                    省&nbsp;<apex:inputField id="province" value="{!loginUser.Province__c}" style="width:90px;" onchange="searchByProvinceJs();return false;"></apex:inputField>&nbsp;&nbsp;&nbsp;
                <script type="text/javascript">
                    var isadmin = {!(loginUser.ProfileId == $Label.ProfileId_SystemAdmin || loginUser.ProfileId == $Label.ProfileId_103)};
                    if (!isadmin) {
                        j$(escapeVfId('allPage:allForm:headBlock:province')).attr("disabled",true);
                    }
                </script>
                    职种&nbsp;<apex:selectList id="jobCategory" value="{!loginUser.Job_Category__c}" size="1" style="width:80px;" onchange="searchByFilterJs();return false;">
                        <apex:selectOptions value="{!userJobCategorys}"/>
                    </apex:selectList>&nbsp;&nbsp;&nbsp;
                    {!$ObjectType.User.fields.Consumable_sales__c.Label}&nbsp;<apex:inputField value="{!loginUser.Consumable_sales__c}" style="width:80px;" onchange="searchByFilterJs();return false;"></apex:inputField>&nbsp;&nbsp;&nbsp;
                    产品担当&nbsp;
                    <apex:selectList value="{!productUser}" size="1" style="width:100px;" onchange="searchByFilterJs();return false;">
                        <apex:selectOptions value="{!productUserOptions}"/>
                    </apex:selectList>&nbsp;&nbsp;&nbsp;
                    <!-- xiongyl重点产品&nbsp;
                    <apex:selectList value="{!opp.Important_Key_product_category__c}" id="impKey" size="1" style="width:280px;" onchange="searchByImpKeyJs();return false;">
                        <apex:selectOptions value="{!impProductOptions}"/>
                    </apex:selectList>&nbsp;&nbsp;&nbsp;!-->
                    <apex:inputCheckBox id="checkAll" value="{!checkAll}" onchange="searchByFilterJs(); false;"/><apex:outputLabel value="经理以下" for="checkAll"/>&nbsp;&nbsp;&nbsp;
                    <input type="hidden" id="targetCategory" value="{!target_category}"/>
                    <input type="hidden" id="titileSize" value="{titileSize}"/>
                </td>
                <td align="right" width="10%">
                    <apex:commandButton value="反应到目标" rerender="dummy" onclick="UpdateJs();return false;" rendered="{!Not(isPast)}"/>
                </td>
                <!--CHAN-BDQBLX  20210129 ljh start -->
                <td>
                    <apex:commandbutton onclick="exportJs();return false;" id="export" value="导出数据模板"></apex:commandbutton>
                </td>
                <td>
                    <apex:commandButton onclick="openPopupCSV(); return false;" value="导入" rerender="Form"/>
                </td>
                <!--CHAN-BDQBLX  20210129 ljh end -->
            </tr>
        </table>
        <table id="ButtonTable" border="0" width="100%">
            <tr>
                <td width="10%"></td>
                <td align="center" width="20%">
                    <apex:commandButton value="保存" rerender="dummy" onclick="saveJs();return false;" rendered="{!Not(isPast)}"/>
                </td>
                <!-- 2018年7月6日 添加更中间表数据至业务机会按键 by 张玉山  -->      
 
                <td width="10%" align="right"><apex:commandButton action="{!backBtn}" value="返回" rerender="dummy"/></td>
            </tr>
            <tr>
                <td width="15%" align="left" ><apex:commandLink value="上年度" style="color:blue;" rendered="{!previousRendered}" onclick="prevJs();return false;"/></td>
                <td align="center"><apex:outputText id="Year" value="{!currentPeriod}" style="color:blue;"/></td>
                <td width="15%" align="right"><apex:commandLink value="下年度" style="color:blue;" rendered="{!nextRendered}" onclick="nextJs();return false;"/></td>
            </tr>
        </table>
    </apex:pageBlock>
    
    <apex:pageBlock id="dataBlock" tabStyle="Report">
        <!-- バック側にパラメータを増やしたくないため、1になれないパラメータを入れます -->
        <!-- ここの値は1かどうかの判断のみで使います -->
        <apex:inputHidden id="changeFlg" value="{!saveFlg}"/>
        <div id="Div_all">
        <div id="out_Div_L">
              <table class="list" style="border-bottom-width: 0px;table-layout:fixed;" border="0"  cellspacing="0" cellpadding="0" id="crossTable">
                <thead>
                    <tr class="headerRow" id="Head_L">
                    <th width="55px" class="headerRow  booleanColumn">本部</th>
                    <th width="55px" class="headerRow  booleanColumn">省</th>
                    <th width="95px" class="headerRow  booleanColumn">角色</th>
                    <th width="55px" class="headerRow  booleanColumn">担当</th>
                    <th width="50px" class="headerRow  booleanColumn">职位</th>
                    <!-- <th width="55px" class="headerRow  booleanColumn">负责<br/>科室分类</th> -->
                    <!-- wangweipeng  20210623   start -->
                    <th width="70px" class="headerRow  booleanColumn">负责<br/>产品(主)</th>
                    <th width="70px" class="headerRow  booleanColumn">负责<br/>产品(兼)</th>
                    <!-- wangweipeng  20210623   end -->
                    
                </tr>
                </thead>
                <tbody>
                <apex:variable value="{!1}" var="cnt" />
                <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" bgcolor="#AAAACC" id="dataRow_HL">
                    <td class="dataCell"></td>
                    <td class="dataCell"></td>
                    <td class="dataCell"></td>
                    <td class="dataCell"></td>
                    <!-- <td class="dataCell"></td> -->
                    <!-- wangweipeng  20210623   start -->
                    <td class="dataCell"></td>
                    <td class="dataCell"></td>
                    <!-- wangweipeng  20210623   end -->
                    <td class="dataCell" style="text-align:center;">合计</td>
                </tr>
                </tbody>
                </table>
        </div>
          <div id="out_Div">
         <table  class="list" style="border-collapse: collapse;border-bottom-width: 0px;table-layout:fixed;" border="0"  cellspacing="0" cellpadding="0" id="topTable">
              <thead>
                <tr class="headerRow" id="header_R">
                    <apex:repeat value="{!opportunity_category}" var="oc" id="opportunityCategoryRepeat_R_2">
                        <th width="79px" style="white-space: normal;" class="headerRow  booleanColumn">
                            <apex:outputText id="categoryValue_R" value="{!oc}"></apex:outputText>
                            
                        </th>
                    </apex:repeat>
                    <th width="70px" class="headerRow  booleanColumn" style="background-color:#AAAACC;">合计</th>
                </tr>
            </thead>
            <tbody>
            <apex:variable value="{!1}" var="cnt" />
                <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" bgcolor="#AAAACC" id="dataRow_HR">
                     <apex:variable value="{!0}" var="cntTotal" />  
                     <apex:repeat value="{!opportunity_category}" var="oc" id="titleRepeat">
                         <td class="dataCell" style="text-align:right; width:79px" id="totalcol{!cntTotal}"></td>
                          <apex:variable value="{!cntTotal + 1}" var="cntTotal" /> 
                     </apex:repeat>
                     <td class="dataCell" style="text-align:right;" id="totalAll"></td>
                     </tr>
            </tbody>
            </table>
        </div>
        <div id="in_Div_L" >
            <table class="list" style="border-bottom-width: 0px;table-layout:fixed;" border="0"  cellspacing="0" cellpadding="0" id="leftTable">
                    <apex:variable value="{!1}" var="cnt" />
                    <apex:repeat value="{!dataBeans}" var="dbs" id="dbRepeat_L">
                    <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" id="dataRow_L">
                        <td class="dataCell" width="55px">{!dbs.user.Salesdepartment__c}</td>
                        <td class="dataCell" width="55px">{!dbs.user.Province__c}</td>
                        <td class="dataCell" width="100px">{!dbs.user.UserRole.Name}</td>
                        <td class="dataCell" width="65x">{!dbs.user.Alias}</td>
                        <td class="dataCell" width="50px">{!dbs.user.Post__c}</td>
                        <!-- <td class="dataCell" style="word-wrap:break-word;max-width:55px;">{!SUBSTITUTE(dbs.user.Product_specialist_incharge_dept__c, ",", "; ")}</td> -->
                        <!-- wangweipeng  20210623   start -->
                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Product_specialist_incharge_product__c, ";", "; ")}</td>
                        <td class="dataCell" style="word-wrap:break-word;max-width:70px;">{!SUBSTITUTE(dbs.user.Responsible_for_Products_Concurrently__c, ";", "; ")}</td>
                        <!-- wangweipeng  20210623   end -->
                 </tr>
                </apex:repeat>
            </table>
        </div>
      
        <div id="in_Div">
        <table  class="list" style="border-collapse: collapse;border-bottom-width: 0px;table-layout:fixed;" border="0"  cellspacing="0" cellpadding="0" id="bodyTable">
            
            <tbody>
                 </tbody>
                <apex:variable value="{!1}" var="cnt" />
                <apex:repeat value="{!dataBeans}" var="dbs" id="dbRepeat">
                    <tr class="dataRow {!IF(MOD(cnt, 2)==0, 'odd', 'even')} {!IF(cnt==1, 'first', '')}" id="dataRow_R">
                       
                        <!--<td class="dataCell" style="word-wrap:break-word;max-width:70px;"></td>-->
                        <apex:variable value="{!1}" var="cnt2" />
                        <apex:repeat value="{!dbs.oppInput}" var="oppInput" id="amountRepeat">
                            <td class="dataCell" style="text-align:right;width:80px;">
                                <apex:inputField id="inAmountValue" value="{!oppInput.Num_Of_OPD__c}" 
                                                 style="width:70px; text-align:right;" onchange="checkMoney(this.value, this.id);"/>
                                <script type="text/javascript">
                                    var ispast = {!isPast};
                                    if (ispast) {
                                        j$(escapeVfId('allPage:allForm:dataBlock:dbRepeat:' + {!cnt-1} + ':amountRepeat:' + {!cnt2-1} + ':inAmountValue')).attr("disabled",true);
                                    }
                                </script>
                            </td>
                            <apex:variable value="{!cnt2 + 1}" var="cnt2" />
                        </apex:repeat>
                        <td class="dataCell" style="text-align:right; background-color:#AAAACC; width: 71px" >
                            <apex:outputText id="totalrow" style="width:75px;" value="{0,number,#,##0.00}">
                                <apex:param value="" />
                            </apex:outputText>
                            <apex:inputHidden id="isChanged" value="{!dbs.isChanged}"/>
                        </td>
                    </tr>
                    <apex:variable value="{!cnt + 1}" var="cnt" />
                </apex:repeat>
            </table>
        </div>
        </div>
<script type="text/javascript">
calc();
j$('div#in_Div').scroll(function() {
    j$('div#out_Div').scrollLeft(j$(this).scrollLeft());
    j$('div#in_Div_L').scrollTop(j$(this).scrollTop());
});
j$('div#out_Div').scroll(function() {
    j$('div#in_Div').scrollLeft(j$(this).scrollLeft());
});
j$('div#in_Div_L').scroll(function() {
    j$('div#in_Div').scrollTop(j$(this).scrollTop());
});
windowResize();
</script>
    </apex:pageBlock>
</apex:form>
</apex:page>