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
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
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
<apex:page controller="ReceivingNoteWaitingReceiptController" showHeader="false" action="{!init}" id="allPage" lightningStylesheets="true">
    <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:stylesheet value="{!URLFOR($Resource.StyleUtilCss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.SelectFieldJs)}"/> 
    <style type="text/css">
        table.list .col_ReceivingNoteDetailNo__c {width:100px;}
        table.list .col_OT_CODE__c {width:100px;}
        table.list .col_Fixture_Model_No_F__c {width:100px;}
        table.list .col_Fixture_Model_Name_F__c {width:100px;}
        table.list .col_Fixture_Arrival_Process__c {width:100px;}
        table.list .col_Fixture_Arrival_Product__c {width:200px;}
        table.list .col_Internal_Asset_number_key__c {width:100px;}
        table.list .col_SerialNumber_Origin__c {width:100px;}
        table.list .col_SerialNumber__c {width:100px;}
        table.list .col_PeriodOfUse_Old_F__c {width:100px;}
        table.list .col_PeriodOfUse_Final__c {width:100px;}
        table.list .col_Packing_list_Fixture_F__c {width:100px;}
        table.list .col_RND_Status__c {width:100px;}
        table.list .col_Asset_loaner_category_F__c {width:100px;}
        table.list .col_EquipmentSet_Managment_Code__c {width:100px;}
        table.list .col_Salesdepartment__c {width:100px;}
        table.list .col_SalesProvince__c {width:100px;}
        table.list .col_Product_category__c {width:100px;}
        table.list .col_Equipment_Type__c {width:100px;}
        table.list .col_Manage_type__c {width:100px;}
        table.list .col_unknow_serial_NO_product__c {width:100px;}
        table.list .col_Loaner_accsessary__c {width:100px;}
        table.list .col_Change_Point__c {width:100px;}
        /* table.list .noClick .col_DataConfirmation__c {width:100px;} */
    </style>
    <apex:form >
        <!-- 此处隐式生成二维码图片,防止PDF页上的二维码崩坏 -->
        <apex:includeScript value="{!URLFOR($Resource.qrcode)}"/>
        <apex:includeScript value="{!URLFOR($Resource.connection20)}"/>
        <apex:includeScript value="{!URLFOR($Resource.apex20)}"/>
        <div id="qrcode" hidden="true"></div>
        <script type="text/javascript">
            function createAttachment() {
                var div = document.getElementById("qrcode");
                var img = div.getElementsByTagName("img");
                var src = img[0].src;
                src = src.substring(22, src.length);
 
                sforce.connection.sessionId = '{!GETSESSIONID()}';
                 // 20210312 you WLIG-BV8CHF start
               // var record = sforce.connection.query("select id from Attachment where ParentId = \'{!pageB.rn.Id}\' and name = \'QRCode-{!pageB.rn.ReceivingNoteNo_New__c}\'");
               // //20231027 ymh添加注释  lighting修改附件上传 start
               var record = sforce.connection.query("select Id,ContentDocumentId from ContentDocumentLink where LinkedEntityId = \'{!pageB.rn.Id}\'");
                if(record.size > 0){
                    var records = record.getArray("records");
                    var idList = records.map(obj => "'" + obj.ContentDocumentId + "'").join(",");
                    record = sforce.connection.query("select Id from ContentDocument where Id in (" + idList + ") and Title =  \'QRCode-{!pageB.rn.ReceivingNoteNo_New__c}\'");
                }   
                // 20210312 you WLIG-BV8CHF end
                // 不存在qr文件时,新生成一个,并连到清单上
                if (record.size == 0) {
                    var version = new sforce.SObject("ContentVersion");
                    version.VersionData = src;
                    version.Title = "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}";
                    version.ContentLocation = 's';
                    version.PathOnClient= "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}.jpg";
                    var versionResult = sforce.connection.create([version]);
                    record = sforce.connection.query("SELECT ContentDocumentId FROM ContentVersion WHERE Id =\'" + versionResult[0].id + "\'");
                    var records = record.getArray("records");
                    var link = new sforce.SObject("ContentDocumentLink");
                    link.ContentDocumentId = records[0].ContentDocumentId;
                    link.LinkedEntityId = "{!pageB.rn.Id}";
                    link.ShareType = 'I';
                    link.Visibility = 'AllUsers';
                    var result = sforce.connection.create([link]);
 
 
                    // var atta = new sforce.SObject("Attachment");
                    // // 20210312 you WLIG-BV8CHF start
                    // atta.Name = "QRCode-{!pageB.rn.ReceivingNoteNo_New__c}";
                    // // 20210312 you WLIG-BV8CHF end
                    // atta.ParentId = "{!pageB.rn.Id}";
                    // atta.Body = src;
                    // var result = sforce.connection.create([atta]);
                    var es = new sforce.SObject("ReceivingNote__c");
                    es.Id = "{!pageB.rn.Id}";
                    es.QRId__c = versionResult[0].id;
                    result = sforce.connection.update([es]);
                // 存在qr时,绑到清单上
                } else {
                    var records = record.getArray("records");
                    var version = new sforce.SObject("ContentVersion");
                    version = sforce.connection.query("select Id,ContentDocumentId from ContentVersion where ContentDocumentId = \'" + records[0].id + "\'");
                    version = version.getArray("records"); 
                    
                    var es = new sforce.SObject("ReceivingNote__c");
                    es.Id = "{!pageB.rn.Id}";
                    es.QRId__c = versionResult[0].id;
                    result = sforce.connection.update([es]);
                    
                    
                    // var records = record.getArray("records");
                    // var es = new sforce.SObject("ReceivingNote__c");
                    // es.Id = "{!pageB.rn.Id}";
                    // es.QRId__c = records[0].Id;
                    // result = sforce.connection.update([es]);
                }
// //20231027 ymh添加注释  lighting修改附件上传 end
            }
            var qrcode = new QRCode(document.getElementById("qrcode"), {
                // 20210312 you WLIG-BV8CHF start
                text: "{!pageB.rn.ReceivingNoteNo_New__c}",
                 // 20210312 you WLIG-BV8CHF end
                width: 128,
                height: 128,
                colorDark : "#000000",
                colorLight : "#ffffff",
                correctLevel : QRCode.CorrectLevel.H
            });
            // qrcode生成後、Attachmentを作成
            setTimeout("createAttachment()", 1000);
        </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();
            }
        });
        //20210803 ljh WLIG-C5J9ZP start
        // console.log( windzhow.screen.width+'x'+window.screen.height);
        // j$('table#tableData').css('width', (tableWidth + 2) + 'px');
        // j$('table#tableHeader').css('width', (tableWidth + 2) + 'px');
        j$('table#tableData').css('width', (2188 + 2) + 'px');
        j$('table#tableHeader').css('width', (2188 + 2) + 'px');
        //20210803 ljh WLIG-C5J9ZP end
 
        // list の headerRow の tdに toggleWidth() を追加
        bindTdToggleWidth();
    });
    // var elements = document.getElementsByTagName("select");
    // for (i = 0; i < elements.length; i++) {
    //     var id = elements[i].id;
    //     if (id.length > 5 && id.substring(id.length - 5, id.length) == 'mlktp') {
    //         elements[i].style.display = "none";
    //     }
    // }
    // var tbl_l = document.getElementById("tableData_L");
    // var input_l = tbl_l.getElementsByTagName("input");
    // for (i = 0; i < input_l.length; i++) {
    //     var id = input_l[i].id + '_lkid';
    //     if (document.getElementById(id) != null) {
    //         input_l[i].style.width = "75%";
    //     }
    // }
    // var tbl = document.getElementById("tableData");
    // var input = tbl.getElementsByTagName("input");
    // for (i = 0; i < input.length; i++) {
    //     var id = input[i].id + '_lkid';
    //     if (document.getElementById(id) != null) {
    //         input[i].style.width = "75%";
    //     }
    // }
    //aをクリックする際に、tdイベントを実装しない
    // j$("a[name='out_Div_a']").bind("click",function(event){
    //     event.stopPropagation();
    // });
    windowResize();
 
    function setEmailBody() {
        var body = prompt('请输入型号提醒邮件内容');
        if (body != null) {
            if (confirm('输入的邮件内容为[' + body + ']' + '是否发送?')) {
                blockme();
                sendEmail(body);
            }
        }
        return false;
    }
 
    
</script>
        <!-- <apex:pageMessages /> -->
 
        <!-- oncomplete="clearApplyValue(); return false;" -->
        <apex:actionFunction name="passApplyMsgToController" action="{!showApplyMsg}"  rerender="allForm,checEventFrame"> <!-- 20210804 ljh add checEventFrame -->
            <apex:param name="applyMsg" value="" />
            <apex:param name="applyMsgType" value="" />
        </apex:actionFunction>
        <apex:actionFunction name="sendEmail" action="{!sendEmail}"  rerender="allForm,checEventFrame" oncomplete="unblockUI();"><!-- 20210804 ljh add checEventFrame -->
            <apex:param name="emailBody" value="" />
        </apex:actionFunction>
        <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>
                                <!-- {!pageB.dateOfDelivery} -->
                                <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>
                               <!-- 20210312 you WLIG-BV8CHF start -->
                               {!pageB.rn.ReceivingNoteNo_New__c}
                               <!-- 20210312 you WLIG-BV8CHF end-->
                            </td>
                            <td>
                                <span class="left20" style="font-weight:bold;">
                                收货清单状态&nbsp;
                               </span>
                               {!pageB.rn.RN_Status__c}
                            </td>
                        </tr>
                    </table>
                    <table class="searchTable" style="margin-bottom:5px;margin-top:5px;">
                        <!-- <tr> -->
                        <tr>
                            <td>
                                收货状态:
                                <apex:selectList value="{!pageB.status}" size="1">
                                    <apex:selectOptions value="{!StatusOps}"/>
                                </apex:selectList>
                            </td>
                            <td>
                                <span class="left20">
                                    备品类别:
                                    <apex:selectList value="{!pageB.rn.Asset_loaner_category__c}" size="1" >
                                        <apex:selectOptions value="{!categoryOps}"/>
                                    </apex:selectList>
                                </span>
                            </td>
                            <td>
                                <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>
                            </td>
                            <td>
                                <span style="margin-left: 50px;">
                                    <apex:commandButton value="检索" action="{!search}"/>
                                </span>
                            </td>
                        </tr>
                    </table>
 
                    <div style="background-color: black; height: 1px; width: 100%;"/>
 
                    <table class="searchTable" style="width:100%">
                        <tr>
                            <td style="padding-top:5px;">
                                <!-- 所在地区(本部) -->
                                {!$ObjectType.ReceivingNoteDetail__c.fields.Salesdepartment__c.label}
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Salesdepartment__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appSalesdepartment" value="{!pageB.assetInput.Salesdepartment__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!SalesdepartmentOps}"/>
                                </apex:selectList>
                            </td>
                                <!-- 所在地区(省) -->
                            <td style="padding-top:5px;">
                                {!$ObjectType.Asset.fields.SalesProvince__c.label}
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.SalesProvince__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appSalesProvince" value="{!pageB.assetInput.SalesProvince__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!SalesProvinceOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 产品分类(GI/SP) -->
                                {!$ObjectType.Asset.fields.Product_category__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Product_category__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appProduct_category" value="{!pageB.assetInput.Product_category__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appProduct_category" value="{!pageB.assetInput.Product_category__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!ProductCategoryOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 备品分类 -->
                                {!$ObjectType.Asset.fields.Equipment_Type__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Equipment_Type__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appEquipment_Type" value="{!pageB.assetInput.Equipment_Type__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!EquipmentTypeOps}"/>
                                </apex:selectList>
                            </td>
                            <td rowspan="2">
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="编辑" style="margin-top: 10px;" onclick="blockme();" action="{!changeFixModel}" reRender="allForm,checEventFrame" oncomplete="unblockUI();windowResize();"/><!-- 20210804 ljh add checEventFrame -->
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="适用" style="margin-top: 10px;" onclick="applyJs();return false;"/>
                                    <script type="text/javascript">
                                    // 适用按钮
                                    function applyJs() {
                                        var appliedFlag = true;
                                        var selectFlag = true;
                                        var isCheckFlag = false;
                                        var appSalesdepartment = j$(escapeVfId('{!$Component.appSalesdepartment}')).val();  // 所在地区(本部)
                                        var appSalesProvince= j$(escapeVfId('{!$Component.appSalesProvince}')).val();  // 所在地区(省)
                                        var appProduct_category = j$(escapeVfId('{!$Component.appProduct_category}')).val();  // 产品分类(GI/SP)
                                        var appEquipment_Type = j$(escapeVfId('{!$Component.appEquipment_Type}')).val();  // 备品分类
                                        var appManage_type = j$(escapeVfId('{!$Component.appManage_type}')).val();  // 管理种类
                                        var appunknow_serial_NO_product = j$(escapeVfId('{!$Component.appunknow_serial_NO_product}')).val();  // 无机身号码设备
                                        var appLoaner_accsessary = j$(escapeVfId('{!$Component.appLoaner_accsessary}')).val() // 备品用途附属品
                                        var appLoaner_fixture_arrival_product = j$(escapeVfId('{!$Component.appLoaner_fixture_arrival_product}')).val()   //备品入库产品
                                        console.log(appLoaner_fixture_arrival_product);
                                        var appSalesdepartments = [];  // 所在地区(本部)
                                        j$("td.intf.dataCellBorder1.Salesdepartment__c").each(function() {
                                            appSalesdepartments.push(j$(this));
                                        });
                                        var appSalesProvinces = [];  // 所在地区(省)
                                        j$("td.intf.dataCellBorder1.SalesProvince__c").each(function() {
                                            appSalesProvinces.push(j$(this));
                                        });
 
                                        var appProduct_categorys = [];  // 产品分类(GI/SP)
                                        j$("td.intf.dataCellBorder1.Product_category__c").each(function() {
                                            appProduct_categorys.push(j$(this));
                                        });
 
                                        var appEquipment_Types = [];  // 备品分类
                                        j$("td.intf.dataCellBorder1.Equipment_Type__c").each(function() {
                                            appEquipment_Types.push(j$(this));
                                        });
 
                                        var appManage_types = [];  // 管理种类
                                        j$("td.intf.dataCellBorder1.Manage_type__c").each(function() {
                                            appManage_types.push(j$(this));
                                        });
                                        var appunknow_serial_NO_products = [];  // 无机身号码设备
                                        j$("td.intf.dataCellBorder1.unknow_serial_NO_product__c").each(function() {
                                            appunknow_serial_NO_products.push(j$(this));
                                        });
 
                                        var appLoaner_accsessarys = [];  // 备品用途附属品
                                        j$("td.intf.dataCellBorder1.Loaner_accsessary__c").each(function() {
                                            appLoaner_accsessarys.push(j$(this));
                                        });
 
                                        var appLoaner_fixture_arrival_products = [];  //备品入库产品
                                        j$("td.intf.dataCellBorder1.Fixture_Arrival_Product__c").each(function(){
                                            appLoaner_fixture_arrival_products.push(j$(this));
                                        })
 
                                        var currentPageRecordCount = j$(escapeVfId('allPage:allForm:dataBlock:currentPageRecordCnt')).val();
                                        for (var i = 0; i < currentPageRecordCount; i++) {
                                            var checkBox = j$(escapeVfId('allPage:allForm:dataBlock:dataline_L:' + i + ':rowCheck'));
                                            if (checkBox.prop('checked') == true) {
                                                isCheckFlag = true;
                                                // 显示为空白时,option的value是'x'
                                                // 如果value是x的话,则不做适用
                                                if (appSalesdepartment != null && typeof(appSalesdepartment) != "undefined" && appSalesdepartment != 'x') {
                                                    // setChangeFlg();
                                                    appSalesdepartments[i].find("select").val(appSalesdepartment);
                                                    appliedFlag = false;
                                                }
 
                                                if (appSalesProvince != null && typeof(appSalesProvince) != "undefined" && appSalesProvince != 'x') {
                                                    // setChangeFlg();
                                                    appSalesProvinces[i].find("select").val(appSalesProvince);
                                                    appliedFlag = false;
                                                }
 
                                                if (appProduct_category != null && typeof(appProduct_category) != "undefined"  && appProduct_category != 'x') {
                                                    // setChangeFlg();
                                                    appProduct_categorys[i].find("select").val(appProduct_category);
                                                    appliedFlag = false;
                                                }
 
                                                if (appEquipment_Type != null && typeof(appEquipment_Type) != "undefined"  && appEquipment_Type != 'x') {
                                                    // setChangeFlg();
                                                    appEquipment_Types[i].find("select").val(appEquipment_Type);
                                                    appliedFlag = false;
                                                }
 
                                                if (appManage_type != null && typeof(appManage_type) != "undefined"  && appManage_type != 'x') {
                                                    // setChangeFlg();
                                                    appManage_types[i].find("select").val(appManage_type);
                                                    appliedFlag = false;
                                                }
 
                                                if (typeof(appunknow_serial_NO_product) != "undefined" && appunknow_serial_NO_product != null  && appunknow_serial_NO_product != 'x') {
                                                    // setChangeFlg();
                                                    appunknow_serial_NO_products[i].find("select").val(appunknow_serial_NO_product);
                                                    // appunknow_serial_NO_products[i].find("input").attr("checked", appunknow_serial_NO_product);
                                                    appliedFlag = false;
                                                }
 
                                                if (typeof(appLoaner_accsessary) != "undefined" && appLoaner_accsessary != null  && appLoaner_accsessary != 'x') {
                                                    // setChangeFlg();
                                                    appLoaner_accsessarys[i].find("select").val(appLoaner_accsessary);
                                                    // appLoaner_accsessarys[i].find("input").attr("checked", appLoaner_accsessary);
                                                    appliedFlag = false;
                                                }
 
                                                if(typeof(appLoaner_fixture_arrival_product) != "undefined" && appLoaner_fixture_arrival_product != null  && appLoaner_fixture_arrival_product != 'x'){
                                                    // j$(escapeVfId('allPage:allForm:dataBlock:dataline_R:1:inputField:2:j_id116')).val(appLoaner_fixture_arrival_product);
                                                    appLoaner_fixture_arrival_products[i].find("input:not(:hidden)").val(appLoaner_fixture_arrival_product);
                                                    appliedFlag = false;
                                                }
                                            }
                                        }
                                        j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
                                        // var clearApplyFlag = false;
                                        window.setTimeout(function () {
 
                                            if (isCheckFlag == false) {
                                                alert('未勾选任何待适用数据。');
                                                //var applyMsg = '未勾选任何待适用数据。';
                                                //passApplyMsgToController(applyMsg, 'Fail');
                                                return;
                                            }
 
                                            if (selectFlag) {
                                                if (!appliedFlag) {
                                                    var alertMsg = "适用完了";
                                                    if (appSalesdepartment != null && typeof(appSalesdepartment) != "undefined" && appSalesdepartment!='x') {
                                                        var alertMsg1 = "已将打勾数据中的 " + "所在地区(本部)" + " 适用为 " + appSalesdepartment + " \r\n";
                                                        alertMsg += alertMsg1;
                                                    }
                                                    if (appSalesProvince != null && typeof(appSalesProvince) != "undefined"  && appSalesProvince!='x') {
                                                        var alertMsg1 = "已将打勾数据中的 " + "所在地区(省)" + " 适用为 " + appSalesProvince + " \r\n";
                                                        alertMsg += alertMsg1;
                                                    }
                                                    if (appProduct_category != null && typeof(appProduct_category) != "undefined"  && appProduct_category!='x') {
                                                        var alertMsg2 = "已将打勾数据中的 " + "产品分类(GI/SP)" + " 适用为 " + appProduct_category + " \r\n";
                                                        alertMsg += alertMsg2;
                                                    }
                                                    if (appEquipment_Type != null && appEquipment_Type != ''  && appEquipment_Type!='x') {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + appEquipment_Type + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appManage_type != null && appManage_type != ''  && appManage_type!='x') {
                                                        var alertMsg3 = "已将打勾数据中的 " + "管理种类" + " 适用为 " + appManage_type + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appunknow_serial_NO_product != null  && appunknow_serial_NO_product!='x') {
                                                        var alertMsg3 = "已将打勾数据中的 " + "无机身号码设备" + " 适用为 " + appunknow_serial_NO_product + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appLoaner_accsessary != null  && appLoaner_accsessary!='x') {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品用途附属品" + " 适用为 " + appLoaner_accsessary + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appLoaner_fixture_arrival_product != null  && appLoaner_fixture_arrival_product!='x') {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品入库产品" + " 适用为 " + appLoaner_fixture_arrival_product + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    // alert(alertMsg);
                                                    // clearApplyFlag = true;
                                                    j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                                                    // passApplyMsgToController(alertMsg, 'Success');
                                                }
                                            } else {
                                                if (!appliedFlag) {
                                                    var alertMsg = "适用完了 \r\n";
                                                    if (appSalesdepartment != null && typeof(appSalesdepartment) != "undefined") {
                                                        var alertMsg1 = "已将打勾数据中的 " + "所在地区(本部)" + " 适用为 " + appSalesdepartment + " \r\n";
                                                        alertMsg += alertMsg1;
                                                    }
                                                    if (appSalesProvince != null && typeof(appSalesProvince) != "undefined") {
                                                        var alertMsg1 = "已将打勾数据中的 " + "所在地区(省)" + " 适用为 " + appSalesProvince + " \r\n";
                                                        alertMsg += alertMsg1;
                                                    }
                                                    if (appProduct_category != null && typeof(appProduct_category) != "undefined") {
                                                        var alertMsg2 = "已将打勾数据中的 " + "产品分类(GI/SP)" + " 适用为 " + appProduct_category + " \r\n";
                                                        alertMsg += alertMsg2;
                                                    }
                                                    if (appEquipment_Type != null) {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品分类" + " 适用为 " + appEquipment_Type + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appManage_type != null) {
                                                        var alertMsg3 = "已将打勾数据中的 " + "管理种类" + " 适用为 " + appManage_type + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appunknow_serial_NO_product != null) {
                                                        var alertMsg3 = "已将打勾数据中的 " + "无机身号码设备" + " 适用为 " + appunknow_serial_NO_product + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appLoaner_accsessary != null) {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品用途附属品" + " 适用为 " + appLoaner_accsessary + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    if (appLoaner_fixture_arrival_product != null) {
                                                        var alertMsg3 = "已将打勾数据中的 " + "备品入库产品" + " 适用为 " + appLoaner_fixture_arrival_product + " \r\n";
                                                        alertMsg += alertMsg3;
                                                    }
                                                    //passApplyMsgToController(alertMsg, 'Success');
                                                    j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(true);
                                                } else {
                                                    var alertMsg = "其他选项: " + otherSelectOptionText +"中无此选项值" + otherSelectOptionValue + ",无法更新。";
                                                    //passApplyMsgToController(alertMsg, 'Fail');
                                                }
                                            }
                                        }, 5);
                                    }
 
                                    function clearApplyValue() {
                                        var clearApplyValueFlag = j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val();
                                        if(clearApplyValueFlag) {
                                            j$(escapeVfId('{!$Component.stockId}')).val('');
                                            j$(escapeVfId('{!$Component.applyEquipmentTypeId}')).val('');
                                            j$(escapeVfId('{!$Component.applyAssetTypeListId}')).val('');
                                            j$(escapeVfId('{!$Component.otherSelectionId}')).val('');
                                        }
                                        j$(escapeVfId('allPage:allForm:pageBlockButton1:clearApplyFlagId')).val(false);
                                    }
 
                                    function checkSavingJs() {
                                        var isSavingSuccess = j$(escapeVfId('isSavingSuccessId')).val();
                                        // alert(isSavingSuccess);
                                        if (isSavingSuccess != 'false') {
                                            setSaveSuccessMsg();
                                        }
                                    }
                                </script>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="保存" style="margin-top: 10px;" onclick="blockme();" action="{!saveRecord}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="返回" style="margin-top: 10px;" onclick="window.close();"/>
                                </span>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- lightning改造   zyh   end -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="选择配套" style="margin-top: 10px;" action="{!selectRNS}" rendered="{!showSelectRnsButton}"/>
                                </span>
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="型号提醒邮件" style="margin-top: 10px;" onclick="return setEmailBody();" />
                                </span>
                                <!-- lightning改造   zyh   start -->
                                <!-- <br /> -->
                                <!-- lightning改造   zyh   end -->
                                <span style="margin-left: 10px;">
                                    <apex:commandButton value="打印收货清单" style="margin-top: 10px;" onclick="window.open('/apex/ReceivingNotePDF?rnid={!parId}');return false;"/>
                                </span>
                                
                            </td>
                        <!-- lightning改造   zyh   start -->
                        </tr>
                        <tr>
                        <!-- lightning改造   zyh   end -->
                            <td style="padding-top:5px;">
                                <!-- 管理种类 -->
                                {!$ObjectType.Asset.fields.Manage_type__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Manage_type__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appManage_type" value="{!pageB.assetInput.Manage_type__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appManage_type" value="{!pageB.assetInput.Manage_type__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!ManageTypeOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 无机身号码设备 -->
                                {!$ObjectType.Asset.fields.unknow_serial_NO_product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.unknow_serial_NO_product__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appunknow_serial_NO_product" value="{!pageB.assetInput.unknow_serial_NO_product__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!UnknowSerialNOProductOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 备品用途附属品 -->
                                {!$ObjectType.Asset.fields.Loaner_accsessary__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Loaner_accsessary__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:selectList id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}" size="1"> -->
                                <apex:selectList style="width:180px;" id="appLoaner_accsessary" value="{!pageB.assetInput.Loaner_accsessary__c}" size="1">
                                <!-- lightning改造   zyh   end -->
                                    <apex:selectOptions value="{!LoanerAccsessaryOps}"/>
                                </apex:selectList>
                            </td>
                            <td style="padding-top:5px;">
                                <!-- 备品入库产品 -->
                                {!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.label}:
                                <img src="/img/s.gif" alt="" class="helpOrb" title="{!$ObjectType.ReceivingNoteDetail__c.fields.Fixture_Arrival_Product__c.InlineHelpText}"/>
                                <!-- lightning改造   zyh   start -->
                                <br />
                                <!-- <apex:inputField id="appLoaner_fixture_arrival_product" value="{!rndInfo[0].Fixture_Arrival_Product__c}"/> -->
                                <!-- <apex:inputField style="width:180px;" id="appLoaner_fixture_arrival_product" value="{!rndInfo[0].Fixture_Arrival_Product__c}"/> -->
                                <apex:inputField style="width:180px;" id="appLoaner_fixture_arrival_product"  value="{!rndInfo[0].Fixture_Arrival_Product__c}"   onChange="" />
                                <!-- lightning改造   zyh   end -->
                                <!-- value="{!pageB.assetInput.Fixture_Arrival_Product__c}" -->
                            </td>
                        </tr>
                    </table>
                </apex:pageBlock>
                <!-- //从上面移动到下面 20210824 by rentx start -->
                <apex:pageMessages />
                <!-- //从上面移动到下面 20210824 by rentx end  -->
 
                <apex:pageBlock id="dataBlock">
                <apex:inputHidden id="currentPageRecordCnt" value="{!pageB.currentPageRecordCnt}"/>
                <!-- 20231029 ljh 注释 start -->
                <!-- <div>
                    <input type="hidden" name="hide"/>
                    <apex:commandButton reRender="allForm,checEventFrame" onclick="blockme();" disabled="{!canBefore = false}" action="{!beforePage}" value="back" oncomplete="unblockUI();"/>
                    {!nowPage}/{!maxPage}
                    <apex:commandButton reRender="allForm,checEventFrame" onclick="blockme();" disabled="{!canNext = false}" action="{!nextPage}" value="next" oncomplete="unblockUI();"/> -->
                    <!-- 20210804 ljh add checEventFrame -->
                <!-- </div> -->
                <!-- 20231029 ljh 注释 end -->
                <!-- {!pageB.rowBList} -->
<!--                     <table id="msgtable">
                <tr>
                    <td>
                        <apex:outputPanel id="message">
                            <apex:pageMessages />
                        </apex:outputPanel>
                    </td>
                </tr>
            </table> -->
            <div id="out_Div_L">
                <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="{!outputFieldList}" var="info">
                            <td class="col_{!info.value}">
                               {!info.label}
                            </td>
                        </apex:repeat>
                    </tr>
                </table>
            </div>
            <div id="out_Div" >
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableHeader">
                    <tr class="headerRow" height="30px">
                         <apex:repeat value="{!inputFieldList}" var="info">
                            <td class="{!IF(info.value == 'DataConfirmation__c', 'noClick', 'colViewing')} col_{!info.value}">
                                <input style="width:12px;height: 12px;margin: 0" type="{!IF(info.value == 'DataConfirmation__c', 'checkbox', 'hidden')}" onClick='checkAllConfirm()' id="checkAll{!info.value}" />
                                {!info.label}
                            </td>
                        </apex:repeat>
                        <td class="col_Scroll"></td>
                    </tr>
                    <script type="text/javascript">
                        function checkAllConfirm() {
                            var checkboxes = j$("td.dataCellBorder1.intf.DataConfirmation__c.col_DataConfirmation__c").find("input");
                            var firstboxes = j$(".rowchkcls");
                            if (j$(escapeVfId('checkAllDataConfirmation__c')).attr('checked') == 'checked') {
                                for (var i = 0; i < checkboxes.length; i++) {
                                    checkboxes[i].checked = true;
                                    firstboxes[i].checked = true;
                                }
                            } else {
                                for (var i = 0; i < checkboxes.length; i++) {
                                    checkboxes[i].checked = false;
                                    firstboxes[i].checked = true;
                                }
                            }
                        }
                    </script>
                </table>
            </div>
            <div style="clear:both;"/>
            <div id="in_Div_L">
                <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="{!outputFieldList}" 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:outputField value="{!var.rnd[info.value]}" /></td>
                                </apex:repeat>
                            </tr>
                        <apex:variable value="{!Cnt+1}" var="Cnt" />
                    </apex:repeat>
                </table>
            </div>
            <div id="in_Div" style="overflow:auto;">
                <table class="list" style="border-bottom-width: 0px; font-size:11px; border-spacing:0;" border="" id="tableData">
                    <apex:variable value="{!0}" var="Cnt_R" />
                    <apex:repeat id="dataline_R" value="{!pageB.showBList}" var="var">
                    <tr id="tableData_R_{!Cnt_R}" class="dataRow" onmouseover="if (window.hiOn){hiOn(this);} " onmouseout="if (window.hiOff){hiOff(this);} " onblur="if (window.hiOff){hiOff(this);}" onfocus="if (window.hiOn){hiOn(this);}" >
                        <apex:repeat value="{!inputFieldList}" var="info" id="inputField">
                            <td class="dataCellBorder1 intf {!info.value} col_{!info.value} {!IF(var.rnd['Change_Point__c']=='删除','deleted',IF(var.rnd['Change_Point__c']!=NULL,'newed',''))}" align="center">
 
                                <apex:outputPanel rendered="{!((contains(var.canChangeField, info.value) || var.canChangeField == '') && !contains(var.canNotChangeField,info.value) && pageB.fixMode && var.canChange && var.rnd['Change_Point__c']!='删除') &&IF('Fixture_Arrival_Process__c' == info.value || 'Fixture_Arrival_Product__c' == info.value, ISBLANK( var.rnd['Set_Arrival_Product__c']), true)}">
                                <!-- add by rentx 20210727 start 新品收货_集中备品_建立数据逻辑限制  -->
                                <!-- 备品类别为固定资产时,无机身号码设备、管理种类不可编辑-->
                                    <apex:outputPanel rendered="{!var.rnd['Asset_loaner_category_F__c'] =='固定资产'}">
                                        <apex:outputField value="{!var.rnd[info.value]}" rendered="{!(info.value != 'Asset_loaner_category__c' || var.haveAsset) && (info.value == 'unknow_serial_NO_product__c' || info.value == 'Manage_type__c')}"/>
                                    </apex:outputPanel>
 
                                    <!-- <apex:inputField value="{!var.rnd[info.value]}" onchange="setChangeFlg('{!var.lineNo}')" rendered="{!info.value != 'Asset_loaner_category__c' || var.haveAsset }" style="{!IF('Fixture_Arrival_Product__c' == info.value, 'width:70%;', '')}"/> -->
                                    <apex:inputField value="{!var.rnd[info.value]}" id="selectProduct" onchange="setChangeFlg('{!var.lineNo}')" rendered="{!(info.value != 'Asset_loaner_category__c' || var.haveAsset) && ((var.rnd['Asset_loaner_category_F__c'] =='固定资产' && info.value != 'unknow_serial_NO_product__c' && info.value != 'Manage_type__c') || var.rnd['Asset_loaner_category_F__c'] !='固定资产')}" style="{!IF('Fixture_Arrival_Product__c' == info.value || 'EquipmentSet_Managment_Code__c' == info.value, 'width:90%;', '')}"/>
                                    <!-- 20210804 ljh add id -->
                                <!-- update by rentx 20210727 end 新品收货_集中备品_建立数据逻辑限制  -->
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!(NOT((contains(var.canChangeField, info.value) || var.canChangeField == '') && !contains(var.canNotChangeField,info.value) && pageB.fixMode && var.canChange && var.rnd['Change_Point__c']!='删除')) || IF('Fixture_Arrival_Process__c' == info.value || 'Fixture_Arrival_Product__c' == info.value, NOT(ISBLANK(var.rnd['Set_Arrival_Product__c'])), false)}">
                                    <apex:outputField value="{!var.rnd[info.value]}" rendered="{!info.value != 'Asset_loaner_category__c' || var.haveAsset}"/>
                                </apex:outputPanel>
                                
                            </td>
                        </apex:repeat>
                        <!-- <td class="dataCellBorder1" align="center">
                            <apex:inputCheckbox styleClass="rowchkcls" value="{!var.dataConfirmation}" id="rowCheck2" disabled="{!var.canChange == false || pageB.fixMode == false}"/>
                        </td> -->
                        <td class="col_Scroll"></td>
                    </tr>
                    <apex:variable value="{!Cnt_R+1}" var="Cnt_R" />
                    </apex:repeat>
                </table>
            </div>
            </apex:pageBlock>
            <!-- 20231029 ljh start -->
            <div>
                <input type="hidden" name="hide"/>
                <apex:commandButton reRender="allForm,checEventFrame" onclick="blockme();" disabled="{!canBefore = false}" action="{!beforePage}" value="back" oncomplete="unblockUI();"/>
                {!nowPage}/{!maxPage}
                <apex:commandButton reRender="allForm,checEventFrame" onclick="blockme();" disabled="{!canNext = false}" action="{!nextPage}" value="next" oncomplete="unblockUI();"/> 
            </div>
            <!-- 20231029 ljh end -->
        </apex:outputPanel>
    </apex:form>
    <!-- 20210804 ljh add start -->
    <apex:outputPanel id="checEventFrame">
        <script type="text/javascript">
            j$("table#tableData tr.dataRow").each(function(index){
                if(index < j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code__c input").length) {
                    j$("tr.dataRow td.dataCellBorder1.col_EquipmentSet_Managment_Code__c input")[index].disabled = true;
                }
            });
        //     //标准控件弹出页面修改 start
        // // //查询参数列表  ------属于复杂
        // let SelectFieldParamList=[
        //     {
        //         //原apex:inputField的id值,需要在页面上获取
        //         inputFieldId : 'allPage:allForm:searchBlock:appLoaner_fixture_arrival_product',
        //         //查找字段所在对象
        //         ObjectType : 'ReceivingNoteDetail__c',
        //         //查找字段的api名称
        //         QueryFieldApiName : 'Fixture_Arrival_Product__c',
        //         //查找字段的查找对象
        //         SelectObj : 'Product2',
        //         //搜索时使用的字段
        //         SelectFld : 'Name',
        //     },
        // ]
        // //初始化
        // resetOpenPage(SelectFieldParamList);
 
        
        // function unblockUI(){
        //     j$("#sbArea").fadeOut(500, function(){
        //         j$("#sbArea").remove();
        //     });
        //     resetOpenPage(SelectFieldParamList);
        // }
    
        </script>
        <script type="text/javascript">
        // 复杂组件 start
        var baseURL = '';
        var QueryFieldApiName = 'Fixture_Arrival_Product__c';
        var ObjectType = 'ReceivingNoteDetail__c';
        var inputFieldId = '';
        var inputFieldId_lktp = '';
        var SelectObj = 'Product2';
        var SelectFld = 'Name';
        var cnt = j$(".lookupInput");
        console.log('cnt--------->>>',cnt.length);
        for (var i = 0; i < cnt.length; i++) {
            inputFieldId = cnt[i].children[0].id;
            inputFieldId_lktp = inputFieldId + '_lktp';
            baseURL = '/apex/SearchContactPageLWC?ObjectType=' + ObjectType + '&QueryFieldApiName=' + QueryFieldApiName +'&QueryFieldApiName=' + QueryFieldApiName +'&ObjectType=' + ObjectType +'&inputFieldId=' + inputFieldId +'&SelectObj=' + SelectObj +'&SelectFld=' + SelectFld;
            // var obj = document.getElementById('allPage:allForm:dataBlock:dataline_R:'+i+':inputField:2:selectProduct_lkwgt');
            var obj = document.getElementById(inputFieldId+'_lkwgt');
            console.log('obj-------->',obj);
            if (obj != null) {
                obj.setAttribute('href', 'javascript:%20openLookup%28%27' + baseURL + '%26lktp%3D%27%20%2B%20getElementByIdCS%28%27' + inputFieldId_lktp + '%27%29.value%2C670%2C%271%27%2C%27%26lksrch%3D%27%20%2B%20escapeUTF%28getElementByIdCS%28%27' + inputFieldId + '%27%29.value.substring%280%2C%2080%29%29%29');
            }
        }
        // 复杂组件 end
        </script>
    </apex:outputPanel>
     <!-- 20210804 ljh add end -->
</apex:page>