printedit.jsp
59.9 KB
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
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="<%=basePath %>resource/css/base.css" rel="stylesheet">
<link href="<%=basePath %>resource/css/basic_info.css" rel="stylesheet">
<link rel="stylesheet" href="<%=basePath %>resource/easyui/uimaker/easyui.css">
<link rel="stylesheet" type="text/css" href="<%=basePath %>resource/easyui/uimaker/icon.css">
<link rel="stylesheet" href="<%=basePath %>resource/css/form.css">
<link href="<%=basePath %>resource/css/form.css" rel="stylesheet">
<script type="text/javascript" src="<%=basePath %>resource/easyui/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/js/jquery.json.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/validate/validate-extends.js"></script>
<!-- validate 验证中英文 -->
<script type="text/javascript" src="<%=basePath %>resource/validate/jquery.validate-${pageContext.response.locale}.js"></script>
<style>
#form input{
width: 160px;
}
#form select{
width: 172px;
}
.setbg{
background:url(<%=basePath %>resource/images/billprint.jpg) no-repeat;
}
.only_for_print{display: none}
#print1{left:50px;top:50px;}
#print2{padding-left:400px;margin-top:-11px;}
#print3{left:50px;padding-top:20px;}
#print4{left:50px;padding-top:60px;}
#print5{left:50px;padding-top:60px;}
#print6{left:50px;padding-top:60px;}
#print7{left:50px;padding-top:10px;}
#print8{left:50px;padding-top:20px;}
#print9{left:50px;padding-top:7px;}
#print10{left:50px;padding-top:20px;}
#print11{left:50px;padding-top:90px;}
#print12{left:50px;padding-top:95px;}
#print13{left:50px;padding-top:30px;}
#print14{left:310px;padding-top:30px;}
#print15{left:50px;padding-top:20px;}
#print16{left:260px;padding-top:20px;}
#print17{left:350px;margin-top:15px;}
#print18{left:350px;margin-top:15px;}
</style>
</head>
<body>
<div class="container">
<div class="content">
<form class="from-control" id="form">
<input type="hidden" class="bill" id="id" name="id" value="${bill.id}">
<%-- <input type="hidden" class="bill" id="billType" name="billType" value="${bill.billType}"> --%>
<input type="hidden" id="mawbNo" name="mawbNo" value="${bill.mawbNo}">
<table class="kv-table" style="border:1px solid #000;width:900px;">
<tbody>
<!-- 制单最上面3个信息 -->
<input type="text" style="width:30px;" maxlength="3" minlength="3" id="way1" >
<select style="width:70px;" id="cgo" name="cgo" >
<option value ="CGO"<c:if test="${bill.cgo == 'CGO'}"> checked="checked"</c:if>>CGO</option>
</select>
<input type="text" style="width:80px;" maxlength="8" minlength="8" id="way2">
<!-- 第一行 发货人信息 -->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:100px;">
<tbody>
<tr>
<td style="width:200px;">
<span>Shipper's Name &Address</span>
</td>
<td style="">
<input type="button"style="width:40px;height:20px;" value="IMP"/>
</td>
<td style="padding-left:22px;">
<table style="width:210px;">
<tr style="padding-top:2px;">
<td>Shipper's Account Number</td>
</tr>
<tr>
<td>
<input type="text" value="">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<textarea style="overflow-y:auto;width:438px;height:130px;"id="co_infor" name="co_infor">${bill.co_infor }</textarea>
</td>
</tr>
</tbody>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:150px;">
<tbody>
<tr>
<td>
<textarea style="width:437px;height:145px;border-buttom:1px solde #000;"></textarea>
</td>
</tr>
<tr>
<td>
<span style="font-size:10px;">Copies1,2 and 3 of this Air Waybill are originals and have the sane validily</span>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- 第二行 收货人信息 -->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:100px;">
<tbody>
<tr>
<td style="width:250px;">
<span>Consignee's Name &Address</span>
</td>
<td style="padding-left:22px;">
<table style="width:210px;">
<tr style="padding-top:2px;">
<td>Consignee's Account Number</td>
</tr>
<tr>
<td style="">
<input style="" type="text" value="">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<textarea style="overflow-y:auto;width:438px;height:130px;"id="sh_infor" name="sh_infor">${bill.sh_infor }</textarea>
</td>
</tr>
</tbody>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:150px;">
<tbody>
<tr>
<td>
<textarea style="width:437px;height:130px;"></textarea>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- 第三行 代理人信息 -->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:100px;">
<tbody>
<tr>
<td>
<span>Issuing Carrier's Agent Name and City</span>
</td>
</tr>
<tr>
<td colspan="3" >
<textarea style="overflow-y:auto;width:438px;height:90px;" id="is_infor" name="is_infor">${bill.is_infor }</textarea>
</td>
</tr>
<tr>
<td colspan="3">
<table>
<tr>
<td>
Agent's IATA Code<br/>
<input type="text" id="iata_code" name="iata_code" value="${bill.iata_code }" style="border:1px solid #000;">
</td>
<td style="padding-left:100px;" >
Account No.<br/>
<input type="text" id="acc_no" name="acc_no" value="${bill.acc_no }" style="border:1px solid #000;">
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="width:450px;height:150px;">
<tbody>
<tr>
<td>
Accounting Information
<textarea style="width:437px;height:130px;border-buttom:1px solde #000;">FREIGHT PREPAID</textarea>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<!-- 第四行 文字-->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:50px;">
<span style="font-size:13px;">Airport of Departure (Addr. of First Carrier) and Requested Routing</span>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:50px;">
<span tyle="font-size:13px;"> Reference Number \ Optional Shipping Information /</span>
</td>
</tr>
<!-- 第五行 文字-->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:80px;">
<table >
<tr>
<td style="border-right:1px solid #000;text-align:center; ">to</td>
<td style="border-right:1px solid #000;text-align:center; ">By <br/>First Carrier</td>
<td style="border-right:1px solid #000;text-align:center; ">to</td>
<td style="border-right:1px solid #000;text-align:center; ">by</td>
<td style="border-right:1px solid #000;text-align:center; ">to</td>
<td>by</td>
</tr>
<tr>
<td><input type="text" id="to_one" name="to_one" value="${bill.to_one }" style="width:37px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="by_one" name="by_one" value="${bill.by_one }" style="width:202px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="to_two" name="to_two" value="${bill.to_two }" style="width:37px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="by_two" name="by_two" value="${bill.by_two }" style="width:37px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="to_rhree" name="to_rhree" value="${bill.to_rhree }" style="width:37px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="by_three" name="by_three" value="${bill.by_three }" style="width:50px;border:1px solid #000;height:36px;"></td>
</tr>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:80px;">
<table style="">
<tr>
<td style="border-right:1px solid #000;font-size:13px;text-align:center; ">Currency</td>
<td style="border-right:1px solid #000;font-size:13px;text-align:center; ">chgscode</td>
<td style="border-right:1px solid #000;font-size:13px;text-align:center; ">Wtnal</td>
<td style="border-right:1px solid #000;font-size:13px;text-align:center; ">Other</td>
<td style="border-right:1px solid #000;font-size:13px;text-align:center; ">Declared Value for Carriage</td>
<td>Declared Value for Customs</td>
</tr>
<tr>
<td><input type="text" id="cur" name="cur" value="${bill.cur }"style="width:50px;border:1px solid #000;height:36px;"></td>
<td><input type="text" id="chgs_code" name="chgs_code" value="${bill.chgs_code }"style="width:53px;border:1px solid #000;height:36px;"></td>
<td>
<table style="border:1px solid #000;">
<tr>
<td style="border:1px solid #000;text-align:center; ">ppd</td>
<td style="border:1px solid #000;text-align:center; ">coll</td>
</tr>
<tr>
<td><input type="radio" <c:if test="${bill.wtanal == 'PP'}"> checked="checked"</c:if> name="wtanal" value="PP"style="width:35px;border:1px solid #000;"></td>
<td><input type="radio" <c:if test="${bill.wtanal == 'C'}"> checked="checked"</c:if> name="wtanal" value="C"style="width:35px;border:1px solid #000;"></td>
</tr>
</table>
</td>
<td>
<table style="border:1px solid #000;">
<tr>
<td style="border:1px solid #000;text-align:center; ">ppd</td>
<td style="border:1px solid #000;text-align:center; ">coll</td>
</tr>
<tr>
<td><input type="radio" <c:if test="${bill.other == 'PP'}"> checked="checked"</c:if> name="other" value="PP" style="width:35px;border:1px solid #000;"></td>
<td><input type="radio" <c:if test="${bill.other == 'C'}"> checked="checked"</c:if> name="other" value="C" style="width:35px;border:1px solid #000;"></td>
</tr>
</table>
</td>
<td><input type="text" id="carriage_value" name="carriage_value" value="${bill.carriage_value }"style="width:110px;height:36px;border:1px solid #000;"></td>
<td><input type="text" id="customs_value" name="customs_value" value="${bill.customs_value }"style="width:110px;height:36px;border:1px solid #000;"></td>
</tr>
</table>
</td>
</tr>
<!-- 第六行 -->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:70px;">
<table>
<tr>
<td>
<table>
<tr>
<td style="">Airport of Destination</td>
</tr>
</table>
<table>
<tr>
<td style=""><input type="text" id="airport" name="airport" value="${bill.airport }" ></td>
</tr>
</table>
</td>
<td colspan="2">
<table style="border-left:1px solid #000;height:45px;width:312px;">
<tr>
<td style="width:50px;">Flight/date</td>
<td style="width:150px;text-align:center;border:1px solid #000;">For carrier use only</td>
<td style="width:50px;">Flight/date</td>
</tr>
</table>
<table style="border-left:1px solid #000;height:45px;width:312px;">
<tr>
<td>
<input type="text" style="width:50px;" id="filght_one" name="filght_one" value="${bill.filght_one }">
<input type="text" class="date bill Wdate" id="date_one" name="date_one" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${bill.date_one}'></fmt:formatDate>">
</td>
<td>
<input type="text" style="width:50px;" id="filght_two" name="filght_two" value="${bill.filght_two }">
<input type="text" class="date bill Wdate" id="date_two" name="date_two" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${bill.date_two}'></fmt:formatDate>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:70px;">
<table>
<tr>
<td>
<table style="border-right:1px solid #000;">
<tr>
<td style="border-right:1px solid #000;">Amount of Insurance</td>
</tr>
<tr>
<td style="border-right:1px solid #000;"><input type="text" id="insurance" name="insurance" value="${bill.insurance }"></td>
</tr>
</table>
</td>
<td colspan="2">
<table>
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<!-- 第七行 -->
<tr>
<td colspan="12" style="border:1px solid #000;width:50%;height:50px;">
<table>
<tr>
<td>
Handing Information
</td>
</tr>
<tr>
<td>
<textarea style="overflow-y:auto;" id="handing" name="handing">${bill.handing }</textarea>
</td>
</tr>
<tr>
<td>
(for USA only)These commodities licensed by U.S.for ultimate destination.........Diversion contrary to U.S.law is prohibited
</td>
</tr>
</table>
</td>
</tr>
<!-- 第八行 -->
<tr style="border:1px solid #000;width:100%;">
<td colspan="8" style="border:1px solid #000;width:700px;height:500px;">
<table style="border:1px solid #000;width:100%;height:100%;">
<!-- 名称 -->
<tr>
<td style="width:50px;border:1px solid #000;text-align:center;">
No of
Pieces
RCP
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Gross
Weight
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
kg
lb
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Rate
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Commodity
item No.
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Chargeatble
Weight
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Rate?Charge
</td>
<td style="width:50px;border:1px solid #000;text-align:center;">
Total
</td>
</tr>
<!-- 数据 -->
<tr>
<td>
<input type="text"style="width:70px;" id="pieces" name="pieces" value="${bill.pieces }">
</td>
<td>
<input type="text" style="width:70px;" id="weight" name="weight" value="${bill.weight }">
</td>
<td>
<select style="width:70px;" id="kg" name="kg">
<option value ="KG" <c:if test="${bill.kg == 'KG'}"> checked="checked"</c:if>>KG</option>
<option value ="LB" <c:if test="${bill.kg == 'LB'}"> checked="checked"</c:if>>LB</option>
</select>
</td>
<td>
<select style="width:70px;" id="rate_val" name="rate_val">
<option value ="Q" <c:if test="${bill.rate_val == 'LB'}"> checked="checked"</c:if>>Q</option>
</select>
</td>
<td>
<input type="text" style="width:70px;" id="commodity" name="commodity" value="${bill.commodity }">
</td>
<td>
<input type="text" style="width:70px;" id="ch_weight" name="ch_weight" value="${bill.ch_weight }">
</td>
<td>
<input type="text" style="width:70px;" id="rate_charge" name="rate_charge" value="${bill.rate_charge }">
</td>
<td>
<input type="text" style="width:70px;" id="total" name="total" value="${bill.total }">
</td>
</tr>
<!-- 文本 -->
<!-- <tr> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- <td><input type="text" style="width:70px;"></td> -->
<!-- </tr> -->
<!-- 一个文本域 -->
<tr style="padding:1px;margin:1px;">
<td colspan="8" style="padding:1px;margin:1px;">
<textarea style="overflow-y:auto;border:1px solid #000;"></textarea>
Notify:
<textarea style="overflow-y:auto;border:1px solid #000;"></textarea>
</td>
</tr>
<tr style="margin-top:-100px;">
<td>
<input type="text"style="width:70px;" >
</td>
<td colspan="6">
<input type="text" style="width:70px;">
</td>
<td>
<input type="text" style="width:70px;">
</td>
</tr>
<tr style="border:1px solid #000;">
<td colspan="5">
<table style="text-align: center;">
<tr>
<td style="padding-left:20px;text-align: center;">Prepaid Collect</td>
<td style="padding-left:30px;text-align: center;">\ Weight Charge / </td>
<td style="padding-left:30px;text-align: center;">Collect</td>
</tr>
</table>
<table>
<tr>
<td>
<input type="text" id="weight_one" name="weight_one" value="${bill.weight_one }">
</td>
<td style="padding-left:30px;">
<input type="text" id="weight_two" name="weight_two" value="${bill.weight_two }" >
</td>
</tr>
</table>
</td>
<td colspan="3" rowspan="3" style="border:1px solid #000;">
Other Charges<input type="button" value="其他费用" onclick="othermessage()" style="width:80px;">
<textarea style="overflow-y:auto;height:130px;" id="other_charges" name="other_charges">${bill.other_charges }</textarea>
</td>
</tr>
<tr>
<td colspan="5">
<table style="text-align: center;">
<tr>
<td style="padding-left:120px;text-align: center;">\ Valuation Charge / </td>
</tr>
</table>
<table>
<tr>
<td>
<input type="text" id="valuation_one" name="valuation_one" value="${bill.valuation_one }" >
</td>
<td style="padding-left:30px;">
<input type="text" id="valuation_two" name="valuation_two" value="${bill.valuation_two }">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="5">
<table style="text-align: center;">
<tr>
<td style="padding-left:150px;text-align: center;">\ Tax / </td>
</tr>
</table>
<table>
<tr>
<td>
<input type="text" id="tax_one" name="tax_one" value="${bill.tax_one }">
</td>
<td style="padding-left:30px;">
<input type="text" id="tax_two" name="tax_two" value="${bill.tax_two }" >
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td colspan="4" style="border:1px solid #000;width:200px;height:500px;">
Nature and Quantity of Goods
(incl.Dimensions or Volume)<input type="button" onclick="detailed()" value="货物明细" style="width:80px;">
<textarea style="overflow-y:auto;height:455px;border:1px solid #000;" id="of_goods" name="of_goods">${bill.of_goods }</textarea>
</td>
</tr>
<!-- 第九行 -->
<tr>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table style="text-align: center;">
<tr>
<td style="padding-left:120px;text-align: center;">\ Total Other Charges Due Agent / </td>
</tr>
</table>
<table>
<tr>
<td>
<input type="text" id="agen_one" name="agen_one" value="${bill.agen_one }">
</td>
<td style="padding-left:30px;">
<input type="text" id="agen_two" name="agen_two" value="${bill.agen_two }">
</td>
</tr>
</table>
<table style="text-align: center;">
<tr>
<td style="padding-left:120px;text-align: center;">\ Total Other Charges Due Carrier / </td>
</tr>
</table>
<table>
<tr>
<td>
<input type="text" id="carri_one" name="carri_one" value="${bill.carri_one }">
</td>
<td style="padding-left:30px;">
<input type="text" id="carri_two" name="carri_two" value="${bill.carri_two }" >
</td>
</tr>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table>
<tr>
<td>
<textarea style="overflow-y:auto;height:100px;"></textarea>
Signature of Shipper or his Agent
</td>
</tr>
</table>
</td>
</tr>
<!-- 第十行 -->
<tr>
<td colspan="3" style="border:1px solid #000;width:50%;height:100px;border:1px solid #000;">
<table>
<tr>
<td>Total Prepaid</td>
</tr>
<tr>
<td><input type="text" id="total_prepaid" name="total_prepaid" value="${bill.total_prepaid }"></td>
</tr>
</table>
<table>
<tr>
<td>Currency Conversion Rates</td>
</tr>
<tr>
<td><input type="text" id="currency_rates" name="currency_rates" value="${bill.currency_rates }"></td>
</tr>
</table>
</td>
<td colspan="3" style="border:1px solid #000;width:50%;height:100px;border:1px solid #000;">
<table>
<tr>
<td>Total Collect</td>
</tr>
<tr>
<td><input type="text" id="total_collect" name="total_collect" value="${bill.total_collect }"></td>
</tr>
</table>
<table>
<tr>
<td>CC Charges in Dest Currency</td>
</tr>
<tr>
<td><input type="text" id="cc_currency" name="cc_currency" value="${bill.cc_currency }"></td>
</tr>
</table>
</td>
<td colspan="6" style="border:1px solid #000;width:50%;height:100px;">
<table>
<tr>
<td>Executed on(date)</td>
<td>
<input type="text" class="date bill Wdate" id="execute_date" name="execute_date" value="<fmt:formatDate pattern='yyyy-MM-dd' value='${bill.execute_date}'></fmt:formatDate>">
</td>
<td>Signature of lssuing Camer or its Agent</td>
<td><input type="text" id="its_agent" name="its_agent" value="${bill.its_agent }"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td colspan="12">
<div class="opt-buttons" style="padding-top:20px;">
<!-- <button type="submit" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true"> -->
<%-- <span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.temsave"/></span></span> --%>
<!-- </button> -->
<button type="button" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true" id="printButton" onclick="doPrint()">
<span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.print"/></span></span></span>
</button>
</div>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
</div>
<div id="printContent" style="display:none;" onload="loadData();">
<INPUT id=TABLETEMPLATEID class=dataItem value=40288004504fb65a01504fc445ca0084 type=hidden name=TABLETEMPLATEID flabel="" ftype="文本" validatext="" validator="">
<table width=200 align=center style="border-collapse: collapse;">
<tr style="height: 50px;">
<td colspan="2" style="text-align: center;border-collapse: collapse;text-align: center;">
<h3>南方航空 |||||||||||||||||||</h3>
<hr/>
</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">主单号</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.mawbNo}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">件数</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.totalPieces}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">重量</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.feeWeight}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">目的港</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.destinationStation}</td>
</tr>
</table>
<table width=200 align=center style="border-collapse: collapse;">
<tr style="height: 50px;">
<td colspan="2" style="text-align: center;border-collapse: collapse;text-align: center;">
<h3>南方航空 |||||||||||||||||||</h3>
<hr/>
</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">主单号</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.mawbNo}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">分单单号</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.mawbNo}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">分单件数</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.totalPieces}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">分单重量</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.feeWeight}</td>
</tr>
<tr style="height: 50px;">
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">分单目的港</td>
<td style="border: solid 3px;border-color: #000000;text-align: center;width: 50%;">${bill.destinationStation}</td>
</tr>
</table>
</div>
<div id="DialogShunt" class="easyui-dialog" title="报文" style="width: 600px; height: 400px;"
data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
<div style="margin-left: 5px;margin-right: 5px;margin-top: 5px;">
<div class="data-tips-info">
<div class="data-tips-tip icon-tip">
</div>
</div>
<div class="modal-body" style="padding-top: 3px;padding-left: 20px;padding-right: 3px;">
<textarea id="xmlContent" style="width: 100%;height: 400px;"></textarea>
</div>
<div style="text-align: center;padding-top: 30px;">
</div>
</div>
</div>
<%--包装尺寸--%>
<div id="packageDialog" class="easyui-dialog" title="包装尺寸设置" style="width: 450px; height: 25%;"
data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
<div style="margin-left: 5px;margin-right: 5px;margin-top: 5px;" ms-controller="size">
<div class="data-tips-info">
<div class="data-tips-tip icon-tip">
</div>
</div>
<div class="modal-body" style="padding-left: 20px;padding-right: 20px;">
<table style="width: 400px;margin-top: 15px;">
<tr>
<td class="t_head">包装尺寸</th>
<td class="t_head"><a href="javascript:void(0)" style="text-decoration: none;cursor: pointer;color: #11a9e2;" onclick="addSize();">新增</a></th>
</tr>
<tr ms-for="(key,val) in @sizeList">
<td class="t_body">
<input type="text" style="width: 200px;" ms-duplex="val.size">
</td>
<td class="t_body">
<a href="javascript:void(0)" style="text-decoration: none;cursor: pointer;color: #11a9e2;" onclick="removeSize(this);" ms-attr="{cid:val.id,index:key}">删除</a>
</td>
</tr>
</table>
</div>
<div style="text-align: center;padding-top: 30px;margin-bottom: 30px;">
<button type="button" class="easyui-linkbutton l-btn l-btn-small l-btn-selected " data-options="selected:true" onclick="closeDialog('#packageDialog')">
<span class="l-btn-left"><span class="l-btn-text"><spring:message code="opt.save"/></span></span>
</button>
<button type="button" class="easyui-linkbutton l-btn l-btn-small" onclick="closeDialog('#packageDialog')" style="margin-left: 20px;"><span class="l-btn-left">
<span class="l-btn-text"><spring:message code="opt.cancel"/></span></span>
</button>
</div>
</div>
</div>
<div id="Dialog" class="easyui-dialog" title="计算" style="width: 600px; height: 400px;"
data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
<div style="margin-left: 5px;margin-right: 5px;margin-top: 5px;">
<table>
<tr>
<td><div id="diavalue" style="font-size:20px;">
</td>
</tr>
<tr>
<td><br/><br/>
<input type="button" name="Submit" value="添加" onClick="addTable();">
<input type="button" name="Submit" value="保存" onClick="saveTable();">
</td>
</tr>
</table>
<table id="myTable">
<tr>
<td width="50px;">长</td>
<td width="50px;">宽</td>
<td width="50px;">高</td>
<td width="50px;">总体积</td>
</tr>
</table>
</div>
</div>
<div id="otherss" class="easyui-dialog" title="计算费用" style="width: 600px; height: 400px;"
data-options="iconCls:'pag-list',modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,closed:true">
<div style="margin-left: 5px;margin-right: 5px;margin-top: 5px;">
<table>
<tr>
<td><div id="diavalues" style="font-size:20px;">
</td>
</tr>
<tr>
<td><br/><br/>
<input type="button" name="Submit" value="添加" onClick="otheraddTable();">
<input type="button" name="Submit" value="保存" onClick="otherTable();">
</td>
</tr>
</table>
<table id="myTables">
<tr>
<td width="50px;">项目名字</td>
<td width="50px;">显示名字</td>
<td width="50px;">单价</td>
<td width="50px;">数量</td>
<td width="50px;">总额</td>
</tr>
</table>
</div>
</div>
<div class='only_for_print'>
<div id="page1" class='pagestyle' >
<div id="print1">${way1 } ${cgo} ${way2 }</div>
<div id="print3" style="width:300px;">${bill.co_infor}</div>
<div id="print4" style="width:300px;">${bill.sh_infor }</div>
<div id="print5" style="width:300px;">${bill.is_infor }</div>
<div id="print6">
<table>
<tr>
<td>${bill.iata_code }</td>
<td style="padding-left:200px;">${bill.acc_no }</td>
</tr>
</table>
</div>
<div id="print7">
<table>
<tr>
<td>${bill.to_one }</td>
<td style="padding-left:30px;">${bill.by_one }</td>
<td style="padding-left:80px;">${bill.to_two }</td>
<td style="padding-left:10px;">${bill.by_two }</td>
<td style="padding-left:10px;">${bill.to_rhree }</td>
<td style="padding-left:10px;">${bill.by_three }</td>
<td style="padding-left:100px;">${bill.cur }</td>
<td style="padding-left:50px;">${bill.chgs_code }</td>
<c:if test="${bill.wtanal == 'PP'}">
<td style="padding-left:10px;">${bill.wtanal }</td>
</c:if>
<c:if test="${bill.wtanal == 'C'}">
<td style="padding-left:10px;">${bill.wtanal }</td>
</c:if>
<c:if test="${bill.other == 'PP'}">
<td style="padding-left:10px;">${bill.other }</td>
</c:if>
<c:if test="${bill.other == 'C'}">
<td style="padding-left:10px;">${bill.other }</td>
</c:if>
<td style="padding-left:50px;">${bill.carriage_value }</td>
<td style="padding-left:50px;">${bill.customs_value }</td>
</tr>
</table>
</div>
<div id="print8">
<table>
<tr>
<td>${bill.airport }</td>
<td style="padding-left:50px;">${bill.filght_one }</td>
<td style="padding-left:10px;">${dateOne }</td>
<td style="padding-left:10px;">${bill.filght_two }</td>
<td style="padding-left:10px;">${dateTwe }</td>
<td style="padding-left:80px;">${bill.insurance }</td>
</tr>
</table>
</div>
<%-- <div id="print9">${bill.destinationStation }</div> --%>
<div id="print10" style="text-align:center;">${bill.handing }</div>
<div id="print11">
<table>
<tr>
<td>${bill.pieces }</td>
<td style="padding-left:20px;">${bill.weight }</td>
<td style="padding-left:20px;">${bill.kg }</td>
<td style="padding-left:50px;">${bill.rate_val }</td>
<td style="padding-left:50px;">${bill.commodity }</td>
<td style="padding-left:50px;">${bill.ch_weight }</td>
<td style="padding-left:50px;">${bill.rate_charge }</td>
<td style="padding-left:50px;">${bill.total }</td>
<td style="padding-left:50px;">${bill.of_goods }</td>
</tr>
</table>
</div>
<div id="print12">
<table>
<tr>
<td>${bill.weight_one }</td>
<td style="padding-left:100px;">${bill.weight_two }</td>
<td style="padding-left:130px;">${bill.other_charges }</td>
</tr>
</table>
</div>
<div id="print13">
<table>
<tr>
<td>${bill.valuation_one }</td>
<td style="padding-left:100px;">${bill.valuation_two }</td>
</tr>
</table>
</div>
<div id="print14">
<table>
<tr>
<td>${bill.tax_one }</td>
<td style="padding-left:100px;">${bill.tax_two }</td>
</tr>
</table>
</div>
<div id="print15">
<table>
<tr>
<td>${bill.agen_one }</td>
<td style="padding-left:100px;">${bill.agen_two }</td>
</tr>
</table>
</div>
<div id="print16">
<table>
<tr>
<td>${bill.carri_one }</td>
<td style="padding-left:100px;">${bill.carri_two }</td>
</tr>
</table>
</div>
<div id="print17">
<table>
<tr>
<td>${bill.total_prepaid }</td>
<td style="padding-left:100px;">${bill.total_collect }</td>
</tr>
</table>
</div>
<div id="print18" >
<table>
<tr>
<td>${bill.currency_rates }</td>
<td style="padding-left:100px;">${bill.cc_currency }</td>
<td style="padding-left:100px;">${execute_date }</td>
<td style="padding-left:30px;">${bill.its_agent }</td>
</tr>
</table>
</div>
</div>
</div>
<OBJECT id="jatoolsPrinter" CLASSID="CLSID:B43D3361-D075-4BE2-87FE-057188254255" codebase="<%=basePath %>resource/jatoolsPrinter.cab#version=8,6,0,0"></OBJECT>
<script type="text/javascript" src="<%=basePath %>resource/layer-v3.0.3/layer/layer.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/My97DatePicker/WdatePicker.js"></script>
<script src="<%=basePath %>resource/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="<%=basePath %>resource/js/tools.js"></script>
<script src="<%=basePath %>resource/js/LodopFuncs.js"></script>
<script src="<%=basePath %>resource/avalon/dist/avalon.js"></script>
<script type="text/javascript">
var num = 0;
var mnu = 0;
function addTable(){
var tableHtml ="";
tableHtml += '<tr id="tr'+num+'">'
+'<td><input class="addtd" id="cnashu1'+num+'" style="width:80px;" type="text" name="cnashu1'+num+'" /></td>'
+'<td><input class="addtd" id="cnashu2'+num+'" style="width:80px;" type="text" name="cnashu2'+num+'"/></td>'
+'<td><input class="addtd" onkeyup="keys('+num+')" id="cnashu3'+num+'" style="width:80px;" type="text" name="cnashu3'+num+'"/></td>'
+'<td><input value="0" class="addtd" id="cnashu4'+num+'" style="width:80px;" type="text" name="cnashu4'+num+'"/></td>'
+'<td><a style="cursor: pointer; color: blue;" onclick="removeTr('+num+')">删除</a>'
+'</td>'
+'</tr>';
var elements = $("#myTable").children().length; //表示id为“mtTable”的标签下的子标签的个数
$("#myTable").children().eq(elements - 1).after(tableHtml); //在表头之后添加空白行
num++;
}
//删除行
function removeTr(trNum){
$("#tr"+trNum).remove();
}
//获取当前行的 所有数据
function keys(trNum){
var id1 = $("#cnashu1"+trNum).val();
var id2 = $("#cnashu2"+trNum).val();
var id3 = $("#cnashu3"+trNum).val();
var id4 = parseFloat(id1)*parseFloat(id2)*parseFloat(id3)
$("#cnashu4"+trNum).val(id4.toFixed(2));
}
//保存所有的 数据
function saveTable(){
var str ="";
$("#myTable input").each(function(i){
if( i == 0){
str += $(this).val()+"*";
}else if(i/4 == 1|| i%4 == 0){
str += "\n"+$(this).val()+"*";
}else{
str += $(this).val()+"*";
}
})
$("#of_goods").val(str);
}
//其他费用
function otheraddTable(){
var pie = $("#pieces").val();
var tableHtml ="";
tableHtml += '<tr id="tr'+mnu+'">'
+'<td><select>'
+' <option value ="volvo">燃油附加费(MYC)</option>'
+' <option value ="saab">安全附加费(MOC)</option>'
+' <option value="opel">运(提)单费(AWC)</option>'
+' <option value="audi">其他杂费(OTHER)</option>'
+' </select> </td>'
+'<td><input value="MYC" class="addtd" id="cnashu2'+mnu+'" style="width:80px;" type="text" name="cnashu2'+mnu+'"/></td>'
+'<td><input onkeyup="keyt('+mnu+')" id="cnashu3'+mnu+'" style="width:80px;" type="text" name="cnashu3'+mnu+'"/></td>'
+'<td><input value="'+pie+'" class="addtd" id="cnashu4'+mnu+'" style="width:80px;" type="text" name="cnashu4'+mnu+'"/></td>'
+'<td><input class="addtd" id="cnashu5'+mnu+'" style="width:80px;" type="text" name="cnashu5'+mnu+'"/></td>'
+'<td><a style="cursor: pointer; color: blue;" onclick="otherremoveTr('+mnu+')">删除</a>'
+'</td>'
+'</tr>';
var elements = $("#myTables").children().length; //表示id为“mtTable”的标签下的子标签的个数
$("#myTables").children().eq(elements - 1).after(tableHtml); //在表头之后添加空白行
mnu++;
}
//删除行
function otherremoveTr(mnu){
$("#tr"+mnu).remove();
}
function keyt(mnu){
var ds = $("#cnashu4"+mnu).val();
var dd = $("#cnashu3"+mnu).val();
var con = parseFloat(ds)*parseFloat(dd)
$("#cnashu5"+mnu).val(con.toFixed(2))
}
//保存所有的 数据 并且计算其他费用 和总费用
function otherTable(){
var str ="";
var mc = 0;
$("#myTables input").each(function(i){
if($("#cnashu2"+i).val() != undefined){
str +=$("#cnashu2"+i).val()+":"+$("#cnashu5"+i).val()+"\n";
mc += parseFloat($("#cnashu5"+i).val());
console.log(parseFloat($("#cnashu5"+i).val()))
}
})
$("#other_charges").val(str);
$("#agen_one").val(mc.toFixed(2));
var we = $("#weight_one").val();
var counm = parseFloat(mc.toFixed(2))+parseFloat(we)
if(parseInt(we) > 0 || we != ""){
$("#total_prepaid").val("");
$("#total_prepaid").val(counm)
}else{
$("#total_prepaid").val("");
$("#total_prepaid").val(we)
}
}
//费率 keyup 事件 将total的费用放到 Prepaid Collect 和 Total Prepaid 中 并且计算 其他费用是否存在
$("#rate_charge").keyup(function(){
var wei = $("#ch_weight").val();
var ch = $("#rate_charge").val();
var coun = parseFloat(wei)*parseFloat(ch)
//放入total
$("#total").val(coun.toFixed(2));
//放入Prepaid Collect
$("#weight_one").val(coun.toFixed(2));
//放入Prepaid Collect 并且计算总费用
var ag = $("#agen_one").val();
if(parseInt(ag) > 0 || ag != ""){
console.log(ag)
$("#total_prepaid").val("");
$("#total_prepaid").val(parseFloat(coun.toFixed(2))+parseInt(ag));
}else{
$("#total_prepaid").val("");
$("#total_prepaid").val(coun.toFixed(2))
}
})
var id = $("#id").val();
var vm = avalon.define({
$id: "size",
sizeList:[]
});
$(function(){
$("#form").validate({
submitHandler:function(form){
submit();
}
});
$(".seqCon").keyup(function(){
var code = $("#sCode").val();
var name = $("#sName").val();
if(code!=""){
$.post("<%=basePath %>bill/getCon",{sCode:code,sName:name},function(data){
if(data.status==200){
var consignee = data.data;
$("#sName").val(consignee.name);
$("#sTel").val(consignee.tel);
$("#sAddress").val(consignee.address);
}
})
}
});
$(".weightCharge").keyup(function(){
var rate = $("#rate").val();
var charge = $("#weightCharge").val();
if(rate!="" && charge!=""){
$("#weightCharge1").val(rate*charge);
}
});
$(".otherFee").keyup(function(){
var rate = $("#feeRate").val();
var charge = $("#fee").val();
if(rate!="" && charge!=""){
$("#otherFee").val(rate*charge);
}
});
$(".totalFee").change(function(){
calTotalFee();
});
/* $("#packingDimensions").change(function(){
calVolume();
});*/
$.post("<%=basePath %>bill/size/get",{hostId:id},function(data){
vm.sizeList = data;
if(vm.sizeList.length==0){
addSize();
}
})
var mawbNo =$("#mawbNo").val();
if(mawbNo !=null){
$("#way1").val(mawbNo.substring(0,3));
$("#way2").val(mawbNo.substring(4,12));
}
var d = new Date();
function addzero(v) {if (v < 10) return '0' + v;return v.toString();}
var s = d.getFullYear().toString() +'-'+ addzero(d.getMonth() + 1) +'-'+ addzero(d.getDate());
if($("#execute_date").val()==''){
$("#execute_date").val(s);
}
if($("#date_one").val()==''){
$("#date_one").val(s);
}
if($("#date_two").val()==''){
$("#date_two").val(s);
}
})
//弹窗计算明细
function detailed(){
var pie = $("#pieces").val();
var wei = $("#weight").val();
$("#diavalue").html("件数:"+pie+" 重量:"+wei);
$("#Dialog").window('open');
}
//其他费用
function othermessage(){
var wei = $("#weight").val();
var jswei = $("#ch_weight").val();
$("#diavalues").html("毛重:"+wei+" 计费重量"+jswei);
$("#otherss").window('open');
}
function nextMawb(id){
if(id==undefined){
layer.open({content:"<spring:message code="opt.nonext"/>"})
}else{
window.location.href="<%=basePath %>bill/edit?id="+id+'&type='+$("#billType").val();
}
}
function createHawb(){
//calVolume();
calTotalFee();
$.post("<%=basePath %>bill/save",
{billJson: $.toJSON(loadFormJson("bill")),otherFeeJson:$.toJSON(loadFormJson("otherFeeData")),conJson:$.toJSON(loadFormJson("consingee")),sizeJson:$.toJSON(vm.sizeList)},
function(data){
if(data.status==200){
window.location.href="<%=basePath %>bill/sub/edit?mawbId="+data.data.id+'&type='+data.data.billType;
}else{
layer.open({content:"<spring:message code="opt.savesuccess"/>"});
}
})
}
function calTotalFee(){
var totalFee = 0;
var weightCharge1 = $("#weightCharge1").val();
var extraCharge = $("#extraCharge").val();
var groundCharge = $("#groundCharge").val();
var otherFee = $("#otherFee").val();
if(weightCharge1!=""){
totalFee +=parseFloat(weightCharge1);
}
if(extraCharge!=""){
totalFee +=parseFloat(extraCharge);
}
if(groundCharge!=""){
totalFee +=parseFloat(groundCharge);
}
if(otherFee!=""){
totalFee +=parseFloat(otherFee);
}
$("#totalCharge").val(totalFee);
}
function calVolume(){
var str = $("#packingDimensions").val();
var reg = /^\d+(\*)+\d+(\*)+\d$/;
if(reg.test(str)){
var array = str.split("*");
$("#cbm").val(array[0]*array[1]*array[2]);
}
}
function submit(){
var id1 = $("#way1").val();
var id2 = $("#way2").val();
$("#mawbNo").val(id1+"-"+id2);
var pp = $("input[name='wtanal']:checked").val();
var cc = $("input[name='other']:checked").val();
$("#wtanal").val(pp);
$("#other").val(cc);
var data = $("#form").serialize();
$.post("<%=basePath %>bill/save",data,function (data) {
if (data.status == 200) {
window.location.href = "<%=basePath %>bill/list" ;
} else {
layer.open({content: "<spring:message code="opt.savefailed"/>"});
}
})
}
function sendXml(){
calTotalFee();
//calVolume();
$.post("<%=basePath %>bill/queryMawbNo",{id:$("#id").val(),mawbNo:$("#mawbNo").val()},function(data) {
if (data.status == 500) {
layer.open({content: "<spring:message code="opt.repeatno"/>"});
return false;
} else {
$.post("<%=basePath %>bill/save",
{
billJson: $.toJSON(loadFormJson("bill")),
otherFeeJson: $.toJSON(loadFormJson("otherFeeData")),
conJson: $.toJSON(loadFormJson("consingee")),
sizeJson: $.toJSON(vm.sizeList)
},
function (data) {
if(data.status==200){
$("#id").val(data.data);
layer.open({content:"发送成功!"});
}else{
layer.open({content:"发送失败!"});
}
})
}
});
}
function viewXml(){
if($("#id").val()==''){
layer.open({content:"未生成报文!"});
}else{
$.post("<%=basePath%>bill/xml",{id:$("#id").val()},function(data){
// layer.open({content:data.data});
$("#xmlContent").val(data.data);
$("#DialogShunt").window('open');
})
}
}
//保留两位小数
jQuery.validator.addMethod("lrunlv", function(value, element) {
var reg = /^\d+((\.\d{1,2})){0,1}$/;
return this.optional(element) || reg.test(value);
}, "<spring:message code="opt.keeptwopoint"/>");
/* //包装尺寸
jQuery.validator.addMethod("package", function(value, element) {
var reg = /^(\d+((\.\d{1,2})){0,1})+(\*)+(\d+((\.\d{1,2})){0,1})+(\*)+(\d+((\.\d{1,2})){0,1})+$/;
return this.optional(element) || reg.test(value);
}, "<spring:message code="opt.errorsize"/>");*/
jQuery.validator.addMethod("reference", function(value, element) {
var reg = /^(\d{3})+(\-)+\d{8}$/;
return this.optional(element) || reg.test(value);
}, "<spring:message code="opt.errorrefer"/>");
function addSize(){
vm.sizeList.push({id:'',type:'',hostId:'',size:''});
}
function removeSize(obj){
var index = $(obj).attr("index");
vm.sizeList.removeAt(parseInt(index));
}
function openDialog(obj){
$(obj).dialog('open');
}
function closeDialog(obj){
$(obj).dialog('close');
}
</script>
<script type="text/javascript">
function printInfo(){
document.getElementById("printButton").style.display="none";
CreateWholePage();
LODOP.PREVIEW();
document.getElementById("printButton").style.display="";
}
function CreateWholePage(){
LODOP=getLodop();
LODOP.PRINT_INIT("制单");//如果是使用pdf打印机的话 会另存为成“准考证.pdf”
LODOP.SET_PRINT_PAGESIZE(2, 2970, 2100,"条码打印");
LODOP.ADD_PRINT_HTM(60,0,"100%","100%",document.getElementById("printContent").innerHTML);
LODOP.SET_SHOW_MODE("LANDSCAPE_DEFROTATED",1);//横向时的正向显示
}
function doPrint() {
var zj = parseInt($("#packingDimensions").val())+parseInt($("#otherFee").val());
myDoc = {
// settings:{
// paperWidth : 2100,
// paperHeight : 2970,
// orientation : 2
// },
documents: document,
classesReplacedWhenPrint: new Array('.only_for_print{display:block}'),
/* //头 如果新增数据 需要减去指定行的br标签 要不然格式会乱
documents: {html:['<span>'+$("#mawbNo").val()+'</span> <span>'+$("#mawbNo").val()+'</span><br/><br/>'
//发货人
+'<span>'+$("#fCode").val()+","+$("#fName").val()+'</span><br/>'
+'<span>'+$("#fAddress").val()+","+$("fTel").val()+'</span><br/><br/><br/><br/>'
//收货人
+'<span>'+$("#sCode").val()+","+$("#sName").val()+'</span><br/>'
+'<span>'+$("#sAddress").val()+","+$("#sTel").val()+'</span><br/><br/><br/><br/>'
//代理人
+'<span>'+$("#agent").val()+'</span><br/><br/><br/>'
//IATA代码和账户 IATA代码没有
+'<span>假装有数据'+$("#agentAccount").val()+'</span><br/>'
//起始地
+'<span>'+$("#departureStation").val()+'</span><br/><br/>'
//承运人总共3个
+' <span>'+$("#carrierOne").val()+' '+$("#carrierTwo").val()+' '+$("#carrierThree").val()+'</span><br/><br/>'
//目的地
+'<span>'+$("#destinationStation").val()+' '+$('#flightTwo').val()+'</span><br/><br/>'
//信息处理
+'有信息在<br/><br/><br/><br/><br/><br/>'
//件数 重量 总价值
+'<span>'+$("#totalPieces").val()+' '+$("#grossWeight").val()+' '+K+' '+Q+' '+$("#feeWeight").val()+' '+$("#rate").val()+' '+$("#totalCharge").val()+' '+$("#packingDimensions").val()+'</span><br/><br/><br/><br/><br/><br/><br/>'
//总价值
+'<br/>'
+'<br/>'
+'<br/>'
+'<span>'+$("#packingDimensions").val()+'</span><br/><br/>'
+'<br/>'
+'<br/>'
+'<br/>'
+'<br/>'
//其他费用 代理人签名
+'<span>'+$("#otherFee").val()+' '+$("#agent").val()+'</span><br/><br/>'
+'<br/>'
//总费用和 其他费用合计 日期 目的地
+'<span>'+zj+' '+$("#flightOneDate").val()+' '+$("#departureStation").val()+'</span><br/><br/>'
+'<br/>']},
// importedStyle:['printc.css'],s */
/*
要打印的div 对象在本文档中,控件将从本文档中的 id 为 'page1' 的div对象,
作为首页打印id 为'page2'的作为第二页打印 */
copyrights: '杰创软件拥有版权 www.jatools.com' // 版权声明,必须
};
// if(how == '打印预览...')
// jatoolsPrinter.printPreview(myDoc ); // 打印预览
// else if(how == '打印...')
// jatoolsPrinter.print(myDoc ,true); // 打印前弹出打印设置对话框
// else
// jatoolsPrinter.print(myDoc ,false); // 不弹出对话框打印
jatoolsPrinter.printPreview(myDoc);
// document.getElementById("jatoolsPrinter").print(myDoc, true); // 直接打印,不弹出打印机设置对话框
}
</script>
</body>
</html>