buli
2022-05-09 248433c920f935ffcaee52b240f0c162decc1564
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
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
<apex:page Controller="OrderPdfController" showHeader="false" sidebar="false" id="allPage" action="{!init2}" >
    <!-- <apex:page Controller="OrderPdfController" showHeader="false" sidebar="false" id="allPage" action="{!init2}" renderAs="pdf"> -->
<html>
    <head>
        <style>
        @page {
            size: A4 landscape;
            margin: 12mm 12mm 5mm 12mm;
 
            @bottom-center {
                content: counter(page) " / " counter(pages);
            }
        }
 
        table { border-collapse: collapse; }
 
        td.border-thick-title { border-width: 1pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
        td.border-thick-bottom { border-width: 0pt 0pt 1pt 0pt; border-style: solid; border-color: black; text-align: center;}
        td.detail { text-align: center; }
 
        </style>
    </head>
    <body style="font-family: Arial Unicode MS; page-break-inside: auto">
        <div id="pdf-wrapper">
            <div class="pdf-page">
                <table style="border-style:none;float: left;">
                    <tr style="font-size: 8pt;">
                        <td>
                            <div>合同号</div>
                            <div>Contract No</div>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'  && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                                layout="none">
                                <div>报备单号</div>
                                <div>代理商全称</div>
                            </apex:outputPanel>
                        </td>
                        <td>
                            <div>:&nbsp;</div>
                            <div>:&nbsp;</div>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                                layout="none">
                                <div>:&nbsp;</div>
                                <div>:&nbsp;</div>
                            </apex:outputPanel>
                        </td>
                        <td>
                            <div>&nbsp;{!contra.order.PDF_Order_No__c}</div>
                            <div>&nbsp;{!contra.order.PDF_Order_No__c}</div>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                                layout="none">
                                <div>&nbsp;{!contra.order.PDF_I_Report__c}</div>
                                <div>&nbsp;{!contra.order.Dealer__c}</div>
                            </apex:outputPanel>
                        </td>
                    </tr>
                </table>
                <table style="border-style:none; float:right">
                    <tr style="font-size: 8pt;">
                        <td>
                            <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>签订日期</div>
                                <div>Signature Date</div>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>签订地点</div>
                                <div>Signature Place</div>
                            </apex:outputPanel>
                        </td>
                        <td>
                            <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>:&nbsp;</div>
                                <div>:&nbsp;</div>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>:&nbsp;</div>
                                <div>:&nbsp;</div>
                            </apex:outputPanel>
                        </td>
                        <td>
                            <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>&nbsp;{!contra.SignatureDate}</div>
                                <div>&nbsp;{!contra.SignatureDates}</div>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT' ||Opp.ProductSegment__c = 'ANI'&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                                layout="none">
                                <div>&nbsp;{!contra.order.PDF_SignaturePlace__c}</div>
                                <div>&nbsp;{!contra.order.PDF_SignaturePlaces__c}</div>
                            </apex:outputPanel>
                        </td>
                    </tr>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0">
                    <colgroup>
                        <col width="25%" />
                        <col width="25%" />
                        <col width="25%" />
                        <col width="25%" />
                    </colgroup>
                    <tr>
                        <td colspan="4" height="5px"></td>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align: center;font-size: 14pt;">合同</td>
                    </tr>
                    <tr>
                        <td colspan="4" style="text-align: center;font-size: 12pt;">CONTRACT</td>
                    </tr>
        
                    <tr>
                        <td style="font-size: 8pt;">买方:&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Name}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">THE BUYER:&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.EnglishName__c}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">地址:&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Address1__c}</td>
                    </tr>
                    <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_Add__c}</td>
                        </tr>
                    </apex:outputPanel>
                    <tr>
                        <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;" id="Phone">{!specialDeliveryAddress.Phone}</td>
                    </tr>
                    <apex:outputPanel rendered="{!IF(Opp.TradeType__c != 'Taxation', 'true', 'false')}" layout="none">
                        <tr>
                            <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!specialDeliveryAddress.Fax}</td>
                        </tr>
                    </apex:outputPanel>
                    <tr>
                        <td style="font-size: 8pt;">联系人:&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;">{!specialDeliveryContact.Name}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">CONTACT PERSON:&nbsp;</td>
                        <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_contactperson__c}</td>
                    </tr>
        
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">E-Mail:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!specialDeliveryContact.Email}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE', 'true', 'false')}" layout="none">
                        <tr>
                            <td style="font-size: 8pt;">用户属性:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_B_Attri__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">用户产品:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'RVI', 'true', 'false')}" layout="none">
                        <tr>
                            <td style="font-size: 8pt;">市场:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.account.Sub_Use__c}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <tr>
                        <td height="1px">&nbsp;</td>
                    </tr>
        
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'BC' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">卖方:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">THE SELLER:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
                        </tr>
        
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) &&Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">卖方:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话 (TEL):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_TEL__c}</td>
                        </tr>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI')&& Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">卖方:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_SELLER__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">THE SELLER:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_THE_SELLER__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Adds__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;" id="PDF_S_TEL__c">{!contra.order.PDF_S_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">传真(FAX):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">Bank Name:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Name__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">Branch:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Branch__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">Address:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Bank_Address__c}</td>
                        </tr>
                        <!-- <tr>
                        <td style="font-size: 8pt;">Address:&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_S_Address__c}</td>
                    </tr> -->
                        <tr>
                            <td style="font-size: 8pt;">Account no:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_No__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">Swift code:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Swift_Code__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">Account name:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_S_Account_Name__c}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <tr style="line-height: 4px">
                        <td height="1px">&nbsp;</td>
                    </tr>
        
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                        layout="none">
                        <!-- <tr>
                        <td style="font-size: 8pt;">&nbsp;</td>
                    </tr> -->
                        <tr>
                            <td style="font-size: 8pt;">收货人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Consignee__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">THE CONSIGNEE:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Address__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;" id="PDF_C_FAX__c">{!contra.order.PDF_C_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">联系人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_CONTACT__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">CONTACT PERSON:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
                        </tr>
                    </apex:outputPanel>
                    <!--             <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI') && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
                    <tr>
                        <td style="font-size: 8pt;">THE CONSIGNEE:&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_THECONSIGNE__c}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">ADD:&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_Add__c}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.pdf_c_fax}</td>
                    </tr>
                    <tr>
                        <td style="font-size: 8pt;">CONTACT PERSON:&nbsp;</td>
                        <td colspan = "3" style="font-size: 8pt;">{!contra.order.PDF_C_contactperson__c}</td>
                    </tr>
                    </apex:outputPanel> -->
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">收货人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_consignee}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_address}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_tel}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">联系人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.pdf_c_contact}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <tr height="1px">
                        <td height="1px">&nbsp;</td>
                    </tr>
        
                    <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'BS'||Opp.ProductSegment__c = 'NDT'||Opp.ProductSegment__c = 'ANI'||Opp.ProductSegment__c = 'IE'||Opp.ProductSegment__c = 'RVI'), 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">通知人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;" id="PDF_N_NotifyParty__c">{!contra.order.PDF_N_NotifyParty__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">THE NOTIFY PARTY:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Address__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">联系人:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;" id="PDF_N_CONTACT__c">{!contra.order.PDF_N_CONTACT__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">CONTACT PERSON:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
                        </tr>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption' && (Opp.ProductSegment__c = 'ABC'), 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">THE NOTIFY PARTY:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_NOTIFY_PARTY__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_Add__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">CONTACT PERSON:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_N_CONTACTPERSON__c}</td>
                        </tr>
                    </apex:outputPanel>
        
                    <tr>
                        <td height="1px">&nbsp;</td>
                    </tr>
        
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' ) && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">转运商 (英文):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_Forwarder__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">ADD:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话(Tel):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">传真(Fax):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">联系人 (中文):&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;" id="PDF_F_ContactPerson__c">{!contra.order.PDF_F_ContactPerson__c}</td>
                        </tr>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT'|| Opp.ProductSegment__c = 'ANI' ) && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td style="font-size: 8pt;">中间商公司:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!Opp.SubDealer__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">公司名称:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_Add__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">地址:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_TEL__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">电话:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.PDF_F_FAX__c}</td>
                        </tr>
                        <tr>
                            <td style="font-size: 8pt;">系统编号:&nbsp;</td>
                            <td colspan="3" style="font-size: 8pt;">{!contra.order.Id}</td>
                        </tr>
                    </apex:outputPanel>
                </table>
            </div>
    
            <apex:outputPanel layout="none">
                <div style="page-break-after: always;" />
            </apex:outputPanel>
    
            <div class="pdf-page">
                <table style="font-size: 9pt;">
                    <tr>
                        <td style="text-align:left">
                            1. 兹经买卖双方同意, 缔结本合同并按本合同下述条款,买方同意购入及卖方同意出售以下货物:
                            <br/> 1. This Contract is made by and between the Buyer and the Seller,whereby the Buyer agrees to buy and
                            the Seller
                            <br/> agrees to sell the under-mentioned goods subject to the terms and conditions stipulated below:</td>
                    </tr>
                    <tr>
                        <td style="text-align: right;">(USD)</td>
                    </tr>
                </table>
                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}"
                    layout="none">
                    <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
                        <tr>
                            <td width="5%" style="text-align: center;">序号</td>
                            <td style="text-align: center;">货物名称及规格</td>
                            <td width="10%" style="text-align: center;">单 位</td>
                            <td width="10%" style="text-align: center;">数 量</td>
                            <td width="15%" style="text-align: center;">单 价</td>
                            <td width="15%" style="text-align: center;">总 价</td>
                        </tr>
                        <tr>
                            <td width="5%" style="text-align: center;">Item</td>
                            <td style="text-align: center;">Goods &amp; Specification</td>
                            <td width="10%" style="text-align: center;">Unit</td>
                            <td width="10%" style="text-align: center;">Qty</td>
                            <td width="15%" style="text-align: center;">Unit Price</td>
                            <td width="15%" style="text-align: center;">Total Amount</td>
                        </tr>
        
                        <apex:repeat value="{!printSetInfo}" var="set">
                            <tr>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.No__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Goods__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Unit__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Qty__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.UnitPrice__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Total_Amount__c}" />
                                </td>
                            </tr>
                        </apex:repeat>
                    </table>
                </apex:outputPanel>
        
                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
                    layout="none">
        
                    <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
                        <colgroup>
                            <col width="5%" />
                            <col width="10%" />
                            <col width="23%" />
                            <col width="5%" />
                            <col width="8%" />
                            <col width="10%" />
                            <col width="8%" />
                            <col width="11%" />
                            <col width="10%" />
                            <col width="10%" />
                        </colgroup>
                        <tr>
                            <td style="text-align: center;">序号</td>
                            <td style="text-align: center;">U8号码</td>
                            <td style="text-align: center;">产品型号</td>
                            <td style="text-align: center;">单位</td>
                            <td style="text-align: center;">数量</td>
                            <td style="text-align: center;">单价</td>
                            <td style="text-align: center;">折扣</td>
                            <td style="text-align: center;">折后单价</td>
                            <td style="text-align: center;">总价</td>
                            <td style="text-align: center;">备注</td>
                        </tr>
                        <tr>
                            <td style="text-align: center;">Item</td>
                            <td style="text-align: center;">U8</td>
                            <td style="text-align: center;">Part Number</td>
                            <td style="text-align: center;">Unit</td>
                            <td style="text-align: center;">Quantity</td>
                            <td style="text-align: center;">Unit Price</td>
                            <td style="text-align: center;">Discount </td>
                            <td style="text-align: center;">Discounted Price/Unit</td>
                            <td style="text-align: center;">Total Amount</td>
                            <td style="text-align: center;">Remark</td>
                        </tr>
        
                        <apex:repeat value="{!printSetInfo}" var="set">
                            <tr>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.No__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.U8__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <!-- <apex:outputText value="{!set.Goods__c}" style="width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!set.Goods__c}" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Unit__c}" style="width: 95%; text-align: right;" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Qty__c}" style="width: 95%; text-align: right;" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.UnitPrice__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.discount__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.discountprice__c}" style="width: 95%; text-align: right;" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!set.Total_AmountNDT__c}" style="width: 95%; text-align: right;" />
                                </td>
                                <td style="text-align: center;">
                                    <!-- <apex:outputText value="{!set.Remark__c}" style="width: 95%"/> -->
                                    <c:PDFWbr targetStr="{!set.Remark__c}" />
                                </td>
                            </tr>
                        </apex:repeat>
                    </table>
                </apex:outputPanel>
        
                <table style="font-size: 9pt;" width="100%">
                    <colgroup>
                        <col width="30%" />
                        <col width="60%" />
                        <col width="10%" />
                    </colgroup>
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td>总金额:&nbsp;</td>
                            <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
                            <td>US$&nbsp;
                                <apex:outputText value="{0, number, ##0.00}">
                                    <apex:param value="{!TotalMoney}" />
                                </apex:outputText>
                            </td>
                            <!-- </apex:outputPanel> -->
                            <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
                            <td>{!contra.order.CustomerContractPrice__c}</td>
                            </apex:outputPanel> -->
                        </tr>
                        <tr>
                            <td>Total Value:&nbsp;</td>
                            <td>{!contra.order.Shipment_Term_D__c}
                                <u>&nbsp;&nbsp;&nbsp;&nbsp;{!contra.order.PDF_Shipment_Term2_Text__c}&nbsp;&nbsp;&nbsp;&nbsp;</u>
                            </td>
                        </tr>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
                        layout="none">
                        <tr>
                            <td>运保费/Shipping Charge:&nbsp;</td>
                            <td style="text-indent: 45px">US$&nbsp;
                                <apex:outputText value="{0,number,##0.00}">
                                    <apex:param value="{!TrAndPre}" />
                                </apex:outputText>
                            </td>
                        </tr>
                        <tr>
                            <td>总金额:&nbsp;</td>
                            <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
                            <td style="text-indent: 45px;">US$&nbsp;
                                <apex:outputText value="{0, number, ##0.00}">
                                    <apex:param value="{!TotalMoney}" />
                                </apex:outputText>
                            </td>
                            <!-- </apex:outputPanel> -->
                            <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
                            <td>{!contra.order.CustomerContractPrice__c}</td>
                            </apex:outputPanel> -->
                        </tr>
                        <tr>
                            <td>Total Value:&nbsp;</td>
                            <td>{!contra.order.Shipment_Term_D__c}
                                <u>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</u>{!contra.order.PDF_Shipment_Term2_Text__c}&nbsp;&nbsp;&nbsp;&nbsp;
                                </td>
                        </tr>
                    </apex:outputPanel>
                    <tr>
                        <td>Say: U.S. DOLLARS:&nbsp;</td>
                        <!-- <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' && Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none"> -->
                        <td>{!contra.order.Total_price_E__c}</td>
                        <!-- </apex:outputPanel> -->
                        <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS') &&Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
                        <td>{!contra.order.CustomerContractPrice__c}</td>
                        </apex:outputPanel> -->
                    </tr>
                    <tr>
                        <td colspan="3">
                            2. 生产国别及制造厂商:&nbsp;{!contra.order.PDF_Bi_manufacturers__c}
                            <br/> 2. COUNTRY OF ORIGIN OF GOODS AND MANUFACTURERS:&nbsp;{!contra.order.PDF_Bi_manufacturersEn__c}
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            3. 包装:
                            <br/> 商品應以坚固的出口纸皮箱或木箱包装,适于长途空运、天气或气候变化、防潮、抗震、防锈及多次搬运。由于包装不良而产生的
                            <br/> 直接损失, 由卖方负责。
                            <br/> 3. PACKING:
                            <br/> The goods should be packed in strong export carton box or wooden box, which is suitable for long haul
                            air transportation and
                            <br/> change of weather or climate, well protected against moisture, shocks, rust and withstand numerous transits.
                            All direct losses
                            <br/> incurred on account of improper packing shall be borne by the Seller.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            4.运输标识:
                            <br/> 卖方须在每件货物的包装外表上以不褪色的颜料标明件号、毛重、尺码及下列字句:
                            <br/> ”勿使受潮” 、“小心轻放”、 “此面向上”等字样及下列唛头:
                            <br/> 4. SHIPPING MARK:
                            <br/> The Seller shall mark on the surface of each package with fadeless paint, the package number,gross weight,measurement
                            <br/> and the following wordings:
                            <br/> “KEEP AWAY FROM MOISTURE”,“HANDLE WITH CARE” ,“THIS SIDE UP” etc. And the below shipping mark:
                            <br/>
                            <div>
                                <apex:outputField value="{!contra.order.PDF_Sp_SHIPPINGMARK__c}" />
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            5.装运条款: {!contra.order.PDF_Sp_ShippingTerms__c}
                            <br/> 5.TERMS OF SHIPMENT: {!contra.ShippingTerms}
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4">
                            6.交货期:
                            <apex:outputField value="{!contra.order.DeliveryTimeText__c}" />
                            <br/> 6.THE DELIVERY TIME:
                            <apex:outputField value="{!contra.order.DeliveryTimeTextEn__c}" />
                            <br/> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;by
                            the Buyer.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            7.卖方应保留货物和零部件的产权和所有权,该等权利只有在全额收到货款时方自动转移到买方。
                            <br/> 7.The Seller shall maintain title and ownership of the goods and spare parts thereof which shall automatically
                            pass to the Buyer
                            <br/> only on receipt of the full payment.
                            <br/>
                        </td>
                    </tr>
        
                    <tr>
                        <td colspan="3">
                            8. 装运口岸:&nbsp;{!contra.order.PDF_Sp_LOADING__c}
                            <br/> 8. PORT OF LOADING:&nbsp;{!contra.order.PDF_Sp_LOADING_E__c}
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            9. 目的口岸:&nbsp;{!contra.order.PDF_Sp_DestinationPort__c}
                            <br/> 9. PORT OF DESTINATION:&nbsp;{!contra.order.PDF_Sp_DestinationPort_E__c}
                            <br/>
                        </td>
                    </tr>
        
                    <tr>
                        <td colspan="3">
                            10. 保险:
                            <br/> 由卖方按发票金额的110%投保全险及战争险,并说明可以在中国境内索赔,空白背书。
                            <br/> 10. INSURANCE:
                            <br/> To be covered by the Seller for 110% of the invoice value covering all risks and war risk, indicating
                            claims payable in China,
                            <br/> in currency of the draft, blank endorsed.
                        </td>
                    </tr>
        
                    <tr>
                        <td colspan="3">
                            11. 付款方式: {!contra.order.PDF_PaymentTerms__c};
                            <br/> 所有因付款而在汇款方银行发生的手续费及其它费用,均由买方承担。
                            <br/> 11. TERMS OF PAYMENT: {!contra.order.PDF_PaymentTerms_E__c};
                            <br/> All the bank charges and other expenses arising from the payment at the remitting bank shall be borne
                            by the Buyer.
                            <br/>
                        </td>
                    </tr>
                </table>
                <!--<apex:outputPanel layout="none">
                        <div style="page-break-after: always;"/>
                    </apex:outputPanel>-->
                <table style="font-size: 9pt;">
                    <tr>
                        <td>
                            12. 所需的文件:
                            <br/>
                            <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS'|| Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI') && Opp.TradeType__c = 'Taxation', 'true', 'false')}"
                                layout="none">
                                1) {!contra.order.PDF_Bi_Quality__c}份由卖方出具的质量和数量证明;
                                <br/> 2) {!contra.order.PDF_Bi_Origin__c}份卖方出具的原产地证明;及
                                <br/> 3) {!contra.order.PDF_Bi_Non_Wooden__c}份非木质包装证明。
                                <br/>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!IF(Opp.TradeType__c = 'Tax Exemption', 'true', 'false')}" layout="none">
                                请在发货后{!contra.order.PDF_Bi_q1__c}个工作日内将以下所需的文件传真/电邮给买方;
                                <br/> 1) 空运提单正本{!contra.order.PDF_Bi_airway__c}份,副本{!contra.order.PDF_Bi_copyairway__c}份。并注明“运费已付”;
                                <br/> 2) 发票{!contra.order.PDF_Bi_invoice__c}份, 注明合同号和运输标识(如有一个以上运输标识, 应分别出具发票)及合同中其它细节;
                                <br/> 3) 如保险由卖方负责的情况下,卖方需提供保险单{!contra.order.PDF_Bi_Insurance__c}套,投一切险, 按发票金额110%投保一切险;
                                <br/> 4) {!contra.order.PDF_Bi_Packing__c}份由卖方出具的装箱单;
                                <br/> 5) {!contra.order.PDF_Bi_Quality__c}份由卖方出具的质量和数量证明;
                                <br/> 6) {!contra.order.PDF_Bi_Origin__c}份卖方出具的原产地证明;及
                                <br/> 7) {!contra.order.PDF_Bi_Non_Wooden__c}份非木质包装证明。
                                <br/>
                                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'ANI' ||Opp.ProductSegment__c = 'NDT', 'true', 'false')}"
                                    layout="none">
                                    8) 所有单据 {!contra.order.PDF_Bi_AllBill__c}
                                    <br/>
                                </apex:outputPanel>
                                12. DOCUMENTS REQUIRED (please don’t attach any documents of contract value with the shipment):
                                <br/> Please fax/e-mail the below required documents to the Buyer within {!contra.order.PDF_Bi_q1__c}
                                working days after shipment;
                                <br/> 1) {!contra.order.PDF_Bi_airway__c} original and {!contra.order.PDF_Bi_copyairway__c} copy of clean
                                air waybills marked “freight prepaid”;
                                <br/> 2) Invoice in {!contra.order.PDF_Bi_invoice__c} copies indicating contract number and shipping mark
                                (in case of more than one shipping mark,the invoice shall be
                                <br/> issued separately), made out in details as per relative contract;
                                <br/> 3) Insurance Policy/Certificate in one original and {!contra.order.PDF_Bi_Insurance__c} copies for
                                110% of the invoice value if the insurance is bought by the Seller;
                                <br/> 4) Packing list in {!contra.order.PDF_Bi_Packing__c} copies issued by the Seller;
                                <br/> 5) Certificate of Quality and Quantity in {!contra.order.PDF_Bi_Quality__c} copies issued by the
                                Seller;
                                <br/> 6) Certificate of Origin in {!contra.order.PDF_Bi_Origin__c} copies issued by the Seller; and
                                <br/> 7) {!contra.order.PDF_Bi_Non_Wooden__c} Certificate of Non-wood material packing.
                                <br/>
                                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS', 'true', 'false')}" layout="none">
                                    8) All the documents {!contra.AllBills} cargo
                                    <br/>
                                </apex:outputPanel>
                                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI', 'true', 'false')}" layout="none">
                                    8) All the documents not with cargo
                                </apex:outputPanel>
                            </apex:outputPanel>
                        </td>
                    </tr>
        
                    <tr>
                        <td>
                            13. 装运通知:
                            <br/> 卖方应于发货四十八(48)小时内以传真或电邮形式提供发货通知告知买方合同号、货物名称、实装数量、重量、件数、发票价
                            <br/> 值、航班号及日期、空运单号等
                            <br/> 13. SHIPPING ADVICE:
                            <br/> The Seller, within forty eight (48) hours after shipment is made, shall notify the Buyer of the contract
                            no., name ofgoods,
                            <br/> quantity, weight loaded, number of packages, invoice value, flight number and date, air waybill number
                            etc. by fax or email.
                            <br/>
                        </td>
                    </tr>
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'BS' || Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI', 'true', 'false')}"
                        layout="none">
                        <tr>
                            <td>
                                14. 质量保证:
                                <br/> A. 卖方保证本合同之货物是用最好的材料以上等的工艺制造,崭新及未用过的,其质量与规格一切方面与本合同的规定相符。
                                <br/> 保证期为最终验收报告签署之日起的{!contra.QAeng}但不超过发货日后的{!contra.QAeng4}。
                                <br/> 在保证期内,如买方按照货物使用说明书在正常条件下使用,由于卖方设计或制造上的缺陷而发生的损坏,由卖方负责。
                                <br/> 在保证期内如果货物的重要零部件需要更换,则该零部件的保证期从更换之日起重新计算,外购件以原供应商的保证期为准。
                                <br/> B. 如果双方共同商定并确认的供货范围中有遗漏的部件和设备并有可能导致整套货物不能按时验收投产或影响生产,卖方
                                <br/> 有义务和责任在制造过程中与买方商量做出相应的调整和补救,并保证整套以上货物能通过验收。
                                <br/> C. 本合同中所述的保证是适用于根据合同货物提供的的唯一保证。本保证条款取代并排除法律、惯例、法令或其他规定施加
                                <br/> 或默示的任何其他担保、保证和/或条件和/或因此而产生的责任。对于任何有缺陷的或不符合标准的货物,买方所适用的只有
                                <br/> 本条特别规定的救济。
                                <br/> 14. WARRANTY:
                                <br/> A.The Seller warrant that the goods hereof is made of the best materials with first class workmanship,
                                brand new and
                                <br/> unused and complies in all respects with the quality and specification stipulated in this Contract.
                                <br/> The warranty period shall be {!contra.QAeng3}counting from the date on which the goods have been
                                accepted by the end user
                                <br/> but limited to a maximum of {!contra.QAeng2} from the date of shipment.
                                <br/> Within the warranty period, the Seller shall be liable for the damage incurred on account of the
                                defects attributable to the design
                                <br/> and emerging during the course of manufacturing of the Seller’s side if the Buyer operate under
                                regular conditions in accordance
                                <br/> with the instruction to the equipments or the machines. Within the warranty period, if some important
                                units and parts of the goods
                                <br/> need to change, the warranty period of the new units and parts should be counted from the changing
                                date. If the new units and
                                <br/> parts are bought from the third party, the warranty period of the new units and parts should be
                                counted according to the original suppliers.
                                <br/> B.In case there’s any missing parts &amp; machines which are out of the agreed scope of supply and
                                most possibly would influence
                                <br/> the commissioning or production on time, the Seller has the obligation and responsibility to discuss
                                with Buyer to make concerned
                                <br/> adjustments and amendments to warrant the acceptance of the goods.
                                <br/> C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant
                                to this Contract. This
                                <br/> warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied
                                by law, custom, statute or
                                <br/> otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause
                                are available to the Buyer
                                <br/> in respect of any defective or non-conforming goods.
                                <br/>
                            </td>
                        </tr>
                    </apex:outputPanel>
                    <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI', 'true', 'false')}" layout="none">
                        <tr>
                            <td>
                                14. 质量保证:
                                <br/> A. 卖方保证本合同之货物是用最好的材料以上等的工艺制造,崭新及未用过的,其质量与规格一切方面与本合同的规定相符。
                                <br/> 保证期配件为3个月,主机为1年至3年,根据产品具体型号确定。
                                <br/> 在保证期内,如买方按照货物使用说明书在正常条件下使用,由于卖方设计或制造上的缺陷而发生的损坏,由卖方负责。
                                <br/> 在保证期内如果货物的重要零部件需要更换,则该零部件的保证期从更换之日起重新计算,外购件以原供应商的保证期为准。
                                <br/> B. 如果双方共同商定并确认的供货范围中有遗漏的部件和设备并有可能导致整套货物不能按时验收投产或影响生产,卖方
                                <br/> 有义务和责任在制造过程中与买方商量做出相应的调整和补救,并保证整套以上货物能通过验收。
                                <br/> C. 本合同中所述的保证是适用于根据合同货物提供的的唯一保证。本保证条款取代并排除法律、惯例、法令或其他规定施加
                                <br/> 或默示的任何其他担保、保证和/或条件和/或因此而产生的责任。对于任何有缺陷的或不符合标准的货物,买方所适用的只有
                                <br/> 本条特别规定的救济。
                                <br/> 14. WARRANTY:
                                <br/> A.The Seller warrant that the goods hereof is made of the best materials with first class workmanship,
                                brand new and unused and
                                <br/> complies in all respects with the quality and specification stipulated in this Contract.
                                <br/> The warranty period shall be three months for accessory, 1-3 years for instrument.
                                <br/> counting from the date on which the goods have been accepted by the end user but limited to a maximum
                                of
                                <br/> {!contra.QAeng2} from the date of shipment.
                                <br/> Within the warranty period, the Seller shall be liable for the damage incurred on account of the
                                defects attributable to the design
                                <br/> and emerging during the course of manufacturing of the Seller’s side if the Buyer operate under
                                regular conditions in accordance
                                <br/> with the instruction to the equipments or the machines. Within the warranty period, if some important
                                units and parts of the goods
                                <br/> need to change, the warranty period of the new units and parts should be counted from the changing
                                date. If the new units and
                                <br/> parts are bought from the third party, the warranty period of the new units and parts should be
                                counted according to the original suppliers.
                                <br/> B.In case there’s any missing parts &amp; machines which are out of the agreed scope of supply and
                                most possibly would influence
                                <br/> the commissioning or production on time, the Seller has the obligation and responsibility to discuss
                                with Buyer to make concerned
                                <br/> adjustments and amendments to warrant the acceptance of the goods.
                                <br/> C. The warranty set out in this Contract is the only warranty applicable to the goods supplied pursuant
                                to this Contract. This
                                <br/> warranty replaces and excludes any other guarantee, warranty and/or condition imposed or implied
                                by law, custom, statute or
                                <br/> otherwise and/or resulting liabilities. Only those remedies specifically set out in this clause
                                are available to the Buyer
                                <br/> in respect of any defective or non-conforming goods.
                                <br/>
                            </td>
                        </tr>
                    </apex:outputPanel>
                </table>
                <!--<apex:outputPanel layout="none">
                    <div style="page-break-after: always;"/>
                </apex:outputPanel>-->
                <table style="font-size: 9pt;">
                    <tr>
                        <td>
                            15. 检验与索赔:
                            <br/> (1)交货之前,制造厂应对货物的质量规格、性能和数量进行精确和全面的检查并出具证明货物与本合同规定相符的证明书。
                            <br/> (2)货物到目的港或目的地后90天内,以较早者为准,买方應向中国出入境检验检疫局申请对有关货物的质量、规格和数量进
                            <br/> 行初步检验并由其出具检验报告。如中国出入境检验检疫局发现到货物的规格或/和数量与本合同规定不符,除应由保险公司或
                            <br/> 船运公司负责外,买方有权拒收货物或向卖方提出赔偿。
                            <br/> (3)如货物的质量和规格与本合同不符,或在本合同第13条规定的保证期内证明货物有缺陷,买方应申请中国出入境检验检疫
                            <br/> 局检验,并有权根据该检验报告向卖方提出索赔。
                            <br/> (4)卖方对与本合同不符部分,应在合理的期限内无偿换货或补发短缺或贬低货价,并负担由此产生的一切费用和损失,包括:
                            <br/> 利息、银行费用、运费、保险费、检验费、仓储、码头装卸费以及其他一切必要费用。
                            <br/> 15. INSPECTION AND CLAIMS:
                            <br/> (1)The manufacturer shall,before making delivery,make a precise and comprehensive inspection of the
                            goods with regard
                            <br/> to the quality, specification and quantity and issue certificates certifying that the goods are in conformity
                            with the stipulations of
                            <br/> the Contract.
                            <br/> (2)Within ninety (90) days after arrival of the goods at the port of destination or the place of destination,
                            whichever is the earlier,
                            <br/> the Buyer shall apply to the China Entry &amp; Exit Inspection &amp; Quarantine Bureau (CIQ) for a preliminary
                            inspection in respect of the
                            <br/> quality, specification and quantity of the goods and a survey report shall be issued thereof. If discrepancies
                            are found by the CIQ
                            <br/> regarding specifications or the quantity or both, except when the responsibilities lie with Insurance
                            Company or Shipping Company,
                            <br/> the Buyer has the right to reject the goods or to claim against the Seller.
                            <br/> (3)Should the quality and specification of the goods not in conformity with the Contract or should the
                            goods be proved defective
                            <br/> during the warranty period stipulated in Clause 13, the Buyer shall arrange for a survey to be carried
                            out by the CIQ and have the
                            <br/> right to claim against the Seller on the strength of the survey report.
                            <br/> (4)For any goods which are not in conformity with the Contract, the Seller,within a reasonable time,shall
                            make replacement
                            <br/>free of charge,deliver the short ones or devalue the goods and bear all the charges and losing incurred
                            thereof. The charges
                            <br/>include interest, banking charges, freight, premium, inspecting charges, storing charges, discharging
                            charges and other charges
                            <br/>incurred since the goods are not in conformity with the contract.
                        </td>
                    </tr>
                    <!-- </table>
                    <apex:outputPanel layout="none">
                        <div style="page-break-after: always;"/>
                    </apex:outputPanel> 
                    <table style="font-size: 9pt;">-->
                    <tr>
                        <td>
                            16. 人力不可抗拒事故:
                            <br/> 由于在生产、装运过程中发生的人力不可抗拒事故(如:战争、严重火灾、水灾、台风、地震以及双方均认为属于人不可抗拒事故)
                            <br/> 而使得卖方延期装船或不能交货,卖方可不负担责任。但是卖方应在上述事故发生后立即传真通知买方,并在传真后14天内,提供
                            <br/> 不可抗拒事故发生地域的主管政府当局或商会出具的证件,空邮交买方以资证明。在此情况下,卖方仍须采取一切必要措施加速货
                            <br/> 物的发运。如不可抗拒事故延续90天以上,任何一方有权向另一方发出书面通知中止本合同。
                            <br/> 16. FORCE MAJEURE:
                            <br/> The Seller shall not be held responsible for the delay in shipment or non-delivery of the goods due
                            to force majeure, such as war,
                            <br/> serious fire, flood, typhoon and earthquake occur during the process of manufacturing or in the course
                            of loading or transit. The
                            <br/> Seller shall immediately advise the Buyer by fax of the occurrence mentioned above and within fourteen
                            (14) days thereafter, the
                            <br/> Seller shall send by airmail to the Buyer for their acceptance a certificate of the accident issued
                            by the competent government
                            <br/> authorities or the Chamber of Commerce where the accident occurs as evidence thereof. Under such circumstance
                            the Seller,
                            <br/> however, are still under the obligation to take all necessary measures to hasten the delivery of the
                            goods. In case the accident lasts
                            <br/> for more than ninety (90) days, both parties shall have the right to terminate this Contract by written
                            notice to the other party.
                        </td>
                    </tr>
                    <tr>
                        <td>
                            17. 迟交货物及违约金:
                            <br/> 除本合同第15条所规定的不可抗拒事故原因外,如卖方不能按合同规定准时交货,在卖方同意承担
                            <br/> 迟交违约金并由付款銀行在支付货款时扣除的条件下,买方应同意延期交货。但迟交违约金总额不
                            <br/> 應超过合同总额的5%。迟交违约金率为每七(7)天千分之五,不足七(7)天者应按七(7)天计算。
                            <br/>如延期交货超过本合同所规定的装运期十(10)周,买方有权向卖方发出书面通知中止本合同。
                            <br/> 17. LATE DELIVERY AND LIQUIDATED DAMAGES:
                            <br/> Should the Seller fail to make delivery on time as stipulated in the Contract with the exception of
                            force majeure causes specified in
                            <br/> Clause 15 of this Contract, the Buyer shall agree to postpone the delivery on the condition that the
                            Seller agree to pay a liquidated
                            <br/> damages which shall be deducted by the paying bank from the payment under negotiation. The liquidated
                            damages, however, shall
                            <br/> not exceed five percent (5%) of the total value of the goods involved in the late delivery. The rate
                            of liquidated damages is charge
                            <br/> at one half percent (0.5%) for every seven (7) days, odd days less than seven (7) days should count
                            as seven (7) days. In case the
                            <br/> late delivery exceed ten (10) weeks of the time of shipment stipulated in the Contract, the Buyer shall
                            have the right to terminate
                            <br/> this Contract by written notice to the Seller.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            18. 专利权:
                            <br/> 卖方必须保障买方在中国使用其货物及其任何部分不受到第三方关于侵犯专利权、商标权或工业设计权的指控。任何第三方如果提出侵
                            <br/> 权指控,卖方须与第三方交涉并承担由此引起的一切法律责任和费用。
                            <br/> 18. PATENT RIGHTS
                            <br/> The Seller shall indemnify the Buyer against all third-party claims of infringement of patent, trademark,
                            or industrial design rights
                            <br/> arising from use of the goods or any part thereof in China. In case any third party brings a charge
                            of infringement, the Seller shall
                            <br/> negotiate with the third-party and be liable for any legal duty and expenses.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            19. 合同文件及资料的使用:
                            <br/> (1)在未经买方书面同意的情况下,卖方不得将由买方或代表买方提供的有关合同条文、规格、计划、图纸、模型、样品或资料提供
                            <br/> 给与履行本合同无关的任何人。即使向与履行本合同有关的人员提供,也应注意保密并仅限于履行合同必须的范围。
                            <br/> (2)除非执行合同需要,在事先未得到买方书面同意的情况下,卖方不得使用条款(1)中所列举的任何文件和资料。
                            <br/> (3)除合同本身外,条款(1)列明的所有文件始终为买方的财产,若买方要求,卖方应于其合同义务履行完毕以后将这些文件及全
                            <br/> 部复制件退还给买方。
                            <br/> 19. USE OF CONTRACT’S DOCUMENTS AND INFORMATION:
                            <br/> (1) The Seller shall not, without the Buyer’s prior written consent, disclose this Contract, or any
                            provision hereof, or any
                            <br/> specification, plan, drawing, pattern, sample, or information furnished by or on behalf of the Buyer
                            in connection therewith, to any
                            <br/> person other than the person employed by the Seller in the performance of this Contract. Disclosure
                            to any such employed person
                            <br/> shall be made in confidence and shall extend only so far as may be necessary for purposes of such performance.
                            <br/> (2) The Seller shall not, without the Buyer’s prior written consent, make use of any document or information
                            enumerated in
                            <br/> Clause (1) except for purposes of performing this Contract.
                            <br/> (3) Any document, other than this Contract itself, enumerated in Clause (1) shall remain the property
                            of the Buyer and shall be
                            <br/> returned (including all copies) to the Buyer on completion of the Seller’s performance under this Contract
                            if so required by the Buyer.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            20. 仲裁:
                            <br/> 与本合同有关的或因执行本合同所发生的一切争执,由签订合同的双方友好协商解决。若不能解决时,案件可提交中国国际经济贸易
                            <br/> 仲裁委员会仲裁。仲裁按原合同进行。仲裁委员会的裁决为最终决定,签约双方都应服从;任何一方均不得向法院或其他当局求助申
                            <br/> 请修改该裁决。或者在双方同意的第三国或地区进行仲裁。仲裁费用由双方方负担。在仲裁期间,除了在仲裁过程中进行仲裁的部分
                            <br/> 外,本合同应继续执行。
                            <br/> 20. ARBITRA
                            <br/> All disputes in connection with this Contract or the execution thereof shall be settled friendly through
                            negotiation by the parties hereof.
                            <br/> In case no settlement can be reached, the case may then be submitted for arbitration to the China International
                            Economic and Trade
                            <br/> Arbitration Commission, in accordance with the Rulers of Procedures promulgated by they said Arbitration
                            Commission. The
                            <br/> arbitration shall take place in China and the decision of the Arbitration Commission shall be final
                            and binding upon both parties,
                            <br/> neither party shall seek recourse to a law court or other authorities to appeal to revision of the decision.
                            Or the arbitration may be
                            <br/> taken place in a third country or place mutually agreed by both parties. Arbitration fee shall be borne
                            by continue to execute
                            <br/> this Contract except those under arbitration.
                            <br/>
                        </td>
                    </tr>
                </table>
                <!-- <apex:outputPanel layout="none">
                        <div style="page-break-after: always;"/>
                    </apex:outputPanel> -->
                <table style="font-size: 9pt;">
                    <colgroup>
                        <col width="50%" />
                        <col width="50%" />
                    </colgroup>
                    <tr>
                        <td colspan="2">
                            21. 进出口许可证:
                            <br/> 进口本合同项下货物所需的中国政府及海关要求的进口许可证和其他进口文件由买方负责办理。出口本合同项下货物所需的出口国政
                            <br/> 府及海关要求的出口许可证和其他出口文件由卖方负责办理。
                            <br/> 21. IMPORT AND EXPORT LICENCES:
                            <br/> It is the responsibility of the Buyer to arrange import licenses or other import documents, if required
                            for the goods covered by this
                            <br/> Contract from the Chinese Government and Custom at the Buyer’s expense. It is the responsibility of
                            the Seller to arrange export
                            <br/> licenses or other export documents, if required for the Goods covered by this Contract from its country
                            Government and Custom at
                            <br/> the Seller’s expense.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            22. 税费:
                            <br/> 中国政府根据现行税法向买方征收的与履行本合同有关的一切税费由买方支付。
                            <br/> 中国政府根据现行税法向卖方征收的与履行本合同有关的一切税费由卖方支付。
                            <br/> 发生在中国境外的,与履行本合同有关的一切税费,应由卖方承担。
                            <br/> 22. TAX AND DUTIES:
                            <br/> All taxes in connection with the execution of this Contract levied by the Chinese Government on the
                            Buyer in accordance with the
                            <br/> tax laws in effect shall be borne by the Buyer.All taxes in connection with the execution of this Contract
                            levied by the Chinese
                            <br/> Government on the Seller in accordance with the tax laws in effect shall be borne by the Seller. All
                            taxes arising outside China in
                            <br/> connection with the execution of this Contract shall be borne by the Seller.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            23.适用法律:
                            <br/> 本合同应按照中华人民共和国的法律管辖及解释。
                            <br/> 23. APPLICABLE LAW:
                            <br/> This Contract shall be governed and construed in accordance with the laws of People’s Republic of China.
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            24.其他:
                            <br/> (1)本合同应以中文和英文书写,如中文和英文版本之间有任何不一致,则以英文本为主。技术图纸,买卖双方的所有函电以及与合
                            <br/> 同有关的文件均应以中文或英文书写。
                            <br/> (2)除技术规格中另有规定外,计量单位均使用公制。
                            <br/> (3)欲对合同条款做出任何修改,均须由买卖双方签署书面的合同修改书。
                            <br/> (4)本合同所有附件将是本合同不可分割的组成部分并具有同等效力。
                            <br/> (5)未在本合同中说明的商务惯例应符合INCOTERMS 2000条款的规定。
                            <br/> (6)本合同由买卖双方签订后立即生效。
                            <br/> &nbsp;&nbsp;此合同由买卖双方签署正本 {!contra.order.PDF_Co_Contract__c}份。 买方持有 {!contra.order.PDF_Co_BContra__c}份。
                            卖方持有 {!contra.order.PDF_Co_SContra__c}份。
                            <br/> 24. OTHERS:
                            <br/> (1)This Contract shall be written in both Chinese and English, in case there is any inconsistency between
                            the Chinese version
                            <br/> and the English version, the English version shall prevail. The technical drawings, all correspondence
                            and other documents
                            <br/>pertaining to this Contract exchanged by the parties shall be written in Chinese or English.
                            <br/> (2)All measurement shall be in SI unit, unless otherwise specified in the Technical Specifications.
                            <br/> (3)No variation in or modification of the terms of this Contract shall be valid except by written amendment
                            signed by the parties.
                            <br/> (4)All appendixes to this Contract shall be formed as an integral part of this Contract and shall be
                            equally effective.
                            <br/> (5) The commercial customs not described in this Contract shall be in accordance with the terms and
                            conditions of INCOTERMS
                            <br/> 2000.
                            <br/> (6)This Contract shall become effective upon execution by the Buyer and the Seller.
                            <br/> Both parties sign this Contract in {!contra.order.PDF_Co_Contract_E__c} .The buyer holds {!contra.order.PDF_Co_BContra_E__c}
                            .The seller holds {!contra.order.PDF_Co_SContra_E__c} .
                            <br/>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top;">
                            卖方:&nbsp;&nbsp;仪景通光学科技(上海)有限公司
                        </td>
                        <td style="vertical-align: top;">
                            买方:&nbsp;&nbsp;{!specialDeliveryAddress.Name}
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top;">
                            THE SELLER:&nbsp;&nbsp;Evident (Shanghai) Co., Ltd
                        </td>
                        <td style="vertical-align: top;">
                            THE BUYER:&nbsp;&nbsp;{!specialDeliveryAddress.EnglishName__c}
                        </td>
                    </tr>
                    <tr>
                        <td>
                            For and on behalf of&nbsp;&nbsp;
                        </td>
                        <td>
                            For and on behalf of&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            [*]&nbsp;&nbsp;
                        </td>
                        <td>
                            [*]&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2" height="100px"></td>
                    </tr>
                    <tr>
                        <td>
                            签名:&nbsp;&nbsp;
                        </td>
                        <td>
                            签名:&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
                                <td>
                                Name: &nbsp;&nbsp;Mitsuyuki Shirakawa
                                </td>
                            </apex:outputPanel>
                            <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'true')}" layout="none"> -->
                        <td>
                            Name: &nbsp;&nbsp;Wei Liu
                        </td>
                        <!-- </apex:outputPanel> -->
                        <td>
                            Name: &nbsp;&nbsp;{!contra.order.PDF_Sign_Name__c}
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Title: &nbsp;&nbsp;Division Manager
                        </td>
                        <td>
                            Title: &nbsp;&nbsp;
                            <span id="PDF_Sign_Title__c">{!contra.order.PDF_Sign_Title__c}</span>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            日期:&nbsp;&nbsp;
                        </td>
                        <td>
                            日期:&nbsp;&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Signed on&nbsp;&nbsp;
                        </td>
                        <td>
                            Signed on&nbsp;&nbsp;
                        </td>
                    </tr>
                </table>
            </div>
            <apex:outputPanel layout="none">
                <div style="page-break-after: always;" />
            </apex:outputPanel>
            <div class="pdf-page">
                <table width="100%">
                    <tr>
                        <td style="text-align: center;">附件</td>
                    </tr>
                    <tr>
                        <td style="text-align: center;">Appendix</td>
                    </tr>
                </table>
                <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none">
                    <apex:variable value="{!1}" var="cnt1" />
                    <apex:repeat value="{!printRecords}" var="set">
                        <apex:repeat value="{!set.setPage}" var="sp">
        
                            <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
                                <tr>
                                    <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
                                    <td width="50%" style="text-align: center;">EC Code</td>
                                    <td style="text-align: center;">Quantity</td>
                                    <!--    </apex:outputPanel> -->
                                    <!--   <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
                                        <td width="25%" style="text-align: center;">U8 Code</td>
                                        <td width="25%" style="text-align: center;">Part Number</td>
                                        <td width="25%" style="text-align: center;">Quantity</td>
                                        <td style="text-align: center;">Name of Goods</td>
                                    </apex:outputPanel> -->
                                </tr>
                                <!--  <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
                                <tr>
                                    <td width="50%" style="text-align: center;">EC编码</td>
                                    <td style="text-align: center;">数量</td>
                                </tr>
                                <!--  </apex:outputPanel> -->
                                <apex:repeat value="{!sp}" var="line">
                                    <tr>
                                        <!-- <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'false', 'true')}" layout="none"> -->
                                        <td style="text-align: center;">
                                            <apex:outputText value="{!line.productEC}" />
                                        </td>
                                        <td style="text-align: center;">
                                            <apex:outputText value="{!line.quantity}" />
                                        </td>
                                        <!-- </apex:outputPanel> -->
                                        <!--  <apex:outputPanel rendered="{!IF((Opp.ProductSegment__c = 'NDT' || Opp.ProductSegment__c = 'ANI' ), 'true', 'false')}" layout="none">
                                        <td width="25%" style="text-align: center;"><apex:outputText value="{!line.U8Code}" /></td>
                                        <td width="25%" style="text-align: center;"><apex:outputText value="{!line.productEC}" /></td>
                                        <td width="25%" style="text-align: center;"><apex:outputText value="{!line.quantity}" /></td>
                                        <td style="text-align: center;"><apex:outputText value="{!line.productName}" /></td>
                                    </apex:outputPanel> -->
                                    </tr>
                                </apex:repeat>
                            </table>
        
                            <!-- <apex:outputPanel rendered="{!cnt1 < pageCnt - 1}" layout="none">
                            <div style="page-break-after: always;"/>
                        </apex:outputPanel> -->
                            <apex:variable value="{!cnt1 + 1}" var="cnt1" />
        
                        </apex:repeat>
                    </apex:repeat>
                </apex:outputPanel>
        
                <apex:outputPanel rendered="{!IF(Opp.ProductSegment__c = 'IE' || Opp.ProductSegment__c = 'RVI' || Opp.ProductSegment__c = 'BS' , 'false', 'true')}"
                    layout="none">
        
                    <table width="100%" border="1" cellspacing="0" cellpadding="0" style="table-layout:auto;font-size: 9pt;">
                        <tr>
                            <td width="25%" style="text-align: center;">U8 Code</td>
                            <td width="25%" style="text-align: center;">Part Number</td>
                            <td width="25%" style="text-align: center;">Quantity</td>
                            <td style="text-align: center;">Name of Goods</td>
                        </tr>
                        <apex:repeat value="{!ndtList}" var="ndt">
                            <tr>
        
                                <td style="text-align: center;">
                                    <apex:outputText value="{!ndt.U8_Code__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!ndt.Part_Number__c}" style="width: 95%" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!ndt.Quantity__c}" style="width: 95%; text-align: center;" />
                                </td>
                                <td style="text-align: center;">
                                    <apex:outputText value="{!ndt.Name_of_Goods__c}" style="width: 95%" />
                                </td>
                            </tr>
                        </apex:repeat>
                    </table>
                </apex:outputPanel>
            </div>
            
        </div>
    </body>
    <style>
        /* 20220221 PI改造 by 徐亮 start */
        body{margin: 0 auto;width: 780px;}
        .title1{height: 30px;}
        .title2{height: 110px;}
        /* 20220221 PI改造 by 徐亮 end */
    </style>
    <!-- 20220221 PI改造 by 徐亮 start  -->
    <apex:includeScript value="{! URLFOR($Resource.AWSService, 'AWSService.js') }" />
    <script src="../../soap/ajax/53.0/connection.js" type="text/javascript"></script>
    <apex:stylesheet value="{!URLFOR($Resource.blockUIcss)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jquery183minjs)}"/>
    <apex:includeScript value="{!URLFOR($Resource.PleaseWaitDialog)}"/>
    <apex:includeScript value="{!URLFOR($Resource.jspdf)}"/>
    <apex:includeScript value="{!URLFOR($Resource.html2canvas)}"/>
    
    <script>
        AWSService.sfSessionId = '{!GETSESSIONID()}';
        sforce.connection.serverUrl = '{!$Site.Prefix}/services/Soap/u/53.0';
        var staticResourceContact = JSON.parse('{!staticResourceContact}');
        var staticResourceOrder = JSON.parse('{!staticResourceOrder}');
        var staticResourceFile = JSON.parse('{!staticResourceFile}');
        function Fun(pdf) {
    
            var form = jQuery("<form method='post'></form>");
            jQuery(document.body).append(form);
            let href = window.location.href
            let arr = href.split('/')
            form.attr({ "action": staticResourceFile.hostUrl + staticResourceFile.extraInfo + "?from=" + encodeURIComponent(href) + "&fileName=" + encodeURIComponent(arr[arr.length - 1].split('?')[0]) });
            // form.attr({"action":"http://127.0.0.1:8080/a/d?from="+encodeURIComponent(window.location.href)});
            let input = jQuery("<input type='hidden'/>");
            input.attr({ "name": "base64Str" });
            input.val(pdf.output('datauristring').substr(28));
            form.append(input);
            form.submit();
    
            // jQuery("body > *").each(function(){
            //     jQuery(this).css('display','none');
            // })
            // jQuery("body").append('<embed style="position:absolute; left: 0; top: 0;" width="100%" height="100%" src="'+pdf.output('datauristring')+'" type="application/pdf"/>')
    
        }
    
        let id = "pdf-wrapper";
        var target = document.getElementById(id);
        // 把imageDta转换成url
            // page_height:一页的高度
            function ImageDataToUrl(img_data,page_height){
                let cvs = document.createElement("CANVAS");
                cvs.width = img_data.width;
                cvs.height = page_height;
                var ctx= cvs.getContext("2d");
                ctx.fillStyle="white";
                ctx.fillRect(0,0,cvs.width,cvs.height);// 填充canvas所有区域为白色
                let aheight = img_data.height
                for (let i = 0;  i < img_data.height && img_data.height > page_height-5; i++) {
                    aheight = img_data.height-i;
                    let index = img_data.width*4*(aheight-1)
                    let blank_count=0;
                    for (let j = 0; j < img_data.width * 4; j+=4) {
                        
                        if (img_data.data[index+j] > 222 && img_data.data[index+j+1] > 222 && img_data.data[index+j+2] > 222) {
                            //console.log(img_data.data[index+j] + ',' + img_data.data[index+j+1] + ',' + img_data.data[index+j+2]);
                            blank_count++;
                        }else{
                            //console.log(index + ',' + j);
                        }
                    }
                    if (blank_count > img_data.width * 0.99) {
                        break;
                    }
                }
 
                ctx.putImageData(img_data,0,0,0,0,img_data.width,aheight);
                return {
                    data : cvs.toDataURL('image/jpeg', 1.0),
                    height : aheight
                };
            }
            function jsPdfDownload() {
        
                let jtargets = jQuery("#pdf-wrapper .pdf-page");
                let j_arr = new Array(jtargets.length + 1).join(0).split('').map(function () { return false });
                let landscape = false;
                let pw = 595.28;
                let ph = 841.89;
                const marginw = 40;
                const marginh = 40;
        
                let orientation = '';
                if (landscape) {
                    pw += ph; ph = pw - ph; pw = pw - ph;
                    orientation = 'l';
                }
                var pdf = new jsPDF(orientation, 'pt', 'a4');// 第一个参数填字母l,注意不是数字1,为横向pdf
                jtargets.each(function (i, e) {
                    e.style.background = "#FFFFFF";
                })
        
                let rei = 0;
                let recursion = null;
                recursion = function (i) {
                    if (i >= jtargets.length) {
                        Fun(pdf);
                        return;
                    }
                    e = jtargets[i];
                    html2canvas(e, {
                        scale: 2,
                        onrendered: function (canvas) {
                            /**
                            本方法需要做几个事情
                            1.需要把canvas的内容分页显示到pdf的页中
                            2.canvas的宽高需要和pdf的宽高进行映射
                            3.截取到的内容需要放进一页宽高的canvas里面,并对其余区域刷白
                            */
                            var ctx = canvas.getContext("2d");
                            let canvas_max_page_num = 9;
                            let canvas_current_page_num = 0;
                            var contentWidth = canvas.width;
                            var contentHeight = canvas.height;
        
                            
                            //未生成pdf的html页面高度
                            var leftHeight = contentHeight;
                            //页面偏移
                            var position = 0;
                            
                            //a4纸的尺寸[595.28,841.89],html页面生成的canvas在pdf中图片的宽高
                            var outputWidth = pw - 2 * marginw;//595.28//左右边距20
                            let rate = outputWidth / 780;//输出宽度和内容宽度的比例
                            var outputHeight = ph - 2 * marginh;//左右边距20
                            let onePdfPageInCanvasHeight = contentWidth/outputWidth*outputHeight;//一页pdf在canvas中的高度;
                            //var pageData = canvas.toDataURL('image/jpeg', 1.0);
                            var pageData = null;
                            var imgData = null;
                            
                            var captureHeight = null;// 截取的当前canvas页的高度
                            
                            let j = i;
                            while(position < contentHeight){
                                
                                if (j++) {
                                    pdf.addPage();
                                }
    
                                if(position+onePdfPageInCanvasHeight>contentHeight){
                                    captureHeight = contentHeight-position;
                                }else{
                                    captureHeight = onePdfPageInCanvasHeight;
                                }
        
                                imgData = ctx.getImageData(0,position,contentWidth,captureHeight);
                                pageData = ImageDataToUrl(imgData,onePdfPageInCanvasHeight);
                                pdf.addImage(pageData.data, 'JPEG', marginw, marginh, outputWidth, outputHeight);//左右边距20,被输出的图片会被拉伸为outputWidth,outputHeight的宽高
                                canvas_current_page_num++;
                                position += pageData.height;
                                if (canvas_max_page_num > 0 && canvas_current_page_num >= canvas_max_page_num) {
                                    break;
                                }
                            }
        
                            recursion(i + 1);
                        }
                    })
                };
                recursion(rei);
        
        
        
            }
        
            function ReplaceDecrypt(staticResource,data){
                for (let index = 0; index < staticResource.PIDetails.length; index++) {
                    let pi = staticResource.PIDetails[index];
                    let e = document.getElementById(pi.SF_Field_API_Name__c);
                    if (e && data && data.object && data.object[pi.AWS_Field_API__c]) {
                        e.innerHTML = data[pi.AWS_Field_API__c]
                    }
                }
            }
 
 
            //blockme();
            document.body.onload = function(){
                
                let i = 0;
                let Foo = function(){
                    if ( i == 2) {
                        if(confirm("PDF已加载完毕,是否显示?")){
                            jsPdfDownload(); 
                        }
                    }
                }
    
                if ('{!specialDeliveryContact.AWS_Data_Id__c}') {
                    AWSService.query(staticResourceContact.queryUrl, '{!specialDeliveryContact.AWS_Data_Id__c}', function(data){
                        ReplaceDecrypt(staticResourceContact,data);
                        
                        i++;
                        Foo();
                    }, staticResourceContact.token);
                }else{
                    i++;
                    Foo();
                }
    
                if ('{!contra.order.AWS_Data_Id__c}') {
                    AWSService.query(staticResourceOrder.queryUrl, '{!contra.order.AWS_Data_Id__c}', function(data){
                        
                        ReplaceDecrypt(staticResourceOrder,data);
                        
                        i++;
                        Foo();
                    }, staticResourceOrder.token);
                }else{
                    i++;
                    Foo();
                }
            }
            
            
        
    </script>
    <!-- 20220221 PI改造 by 徐亮 end  -->
</html>
</apex:page>