regBasePersonFormReadCard.jsp
29.7 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
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>人员信息管理</title>
<style type="text/css">
.gradient{
background: -moz-linear-gradient(top, #000000 0%, #ffffff 100%);
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#000000), color-stop(100%,#ffffff));
background: -webkit-linear-gradient(top, #000000 0%,#ffffff 100%);
background: -o-linear-gradient(top, #000000 0%,#ffffff 100%);
background: -ms-linear-gradient(top, #000000 0%,#ffffff 100%);
background: linear-gradient(to bottom, #000000 0%,#ffffff 100%);
}
</style>
<script type="text/javascript" src="${ctxStatic}/readcard/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="${ctxStatic}/readcard/js/baseISSObject.js"></script>
<script type="text/javascript" src="${ctxStatic}/readcard/js/baseISSOnline.js"></script>
<script type="text/javascript" src="${ctxStatic}/readcard/js/common.js"></script>
<meta name="decorator" content="default"/>
<script type="text/javascript">
$(document).ready(function() {
//$("#name").focus();
$("#inputForm").validate({
submitHandler: function(form){
loading('正在提交,请稍等...');
form.submit();
},
errorContainer: "#messageBox",
errorPlacement: function(error, element) {
$("#messageBox").text("输入有误,请先更正。");
if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
error.appendTo(element.parent().parent());
} else {
error.insertAfter(element);
}
}
});
views();
var imgdata = $("#id_img_perstext").val();
$("#id_img_per").attr("src","data:image/jpg;base64,"+imgdata);
<c:if test="${not empty regBasePerson}">
//changeZjzlByRylx($("#rylxtext"));
</c:if>
});
function readValue(){
var sczt = $("#veritysczt_text").val();
if(sczt == '1'){
var si_code = "";
var params = new Object();
var interHis = new Object();
var rylx = $("#rylxtext").val();
var zjzl = $("#zjzltext").val();
var zjh = $("#zjhtext").val();
var rymc = $("#rymctext").val();
var sczt = $("#veritysczt_text").val();
var id = $("#id").val();
var pcode = $("#pcode").val();
var veritydata_label = $("#veritydata_label").html();
interHis.rymc = rymc;
interHis.zjhm = zjh;
interHis.jkmc = veritydata_label;
interHis.rylx = rylx;
if(rylx == '1'){
if(zjzl != '1'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
si_code = 'out/rkjzxxcx';
params.sfzh = zjh;
params.name = rymc;
}else{
var rylx_text = $("#rylxtext").find("option:selected").text();;
alert("集成接口未开通人员类型【"+rylx_text+"】的数据接口");
return;
}
$('#t_zjzl').val($("#zjzltext").data("select2").val());
$('#t_rylx').val($("#rylxtext").data("select2").val());
$("#rylxtext").attr("disabled","disabled");
$("#zjzltext").attr("disabled","disabled");
verityswzm(params,interHis);
}
}
//身份证
function isCardNo(card){
// 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if(reg.test(card) === false){
$(".error").remove();
$("<label for='name' class='error'>身份证输入不合法!</label>").insertAfter("#zjhtext");
return false;
}else{
return true;
}
}
//组织机构代码
function isOrgon(OrgCode){
var reg = /^[a-zA-Z\d]{8}\-[a-zA-Z\d]$/;
if(reg.test(OrgCode) === false){
$(".error").remove();
$("<label for='name' class='error'>组织机构代码输入不合法!</label>").insertAfter("#zjhtext");
return false;
}else{
return true;
}
}
//营业执照
function isIng(ingCode){
var reg = /^\d{15}$|^[0-9a-zA-Z]{18}$/;
//var reg = /(^\d{15}$)|(^\d{18}$)/;
if(reg.test(ingCode) === false){
$(".error").remove();
$("<label for='name' class='error'>营业执照输入不合法!</label>").insertAfter("#zjhtext");
return false;
}else{
return true;
}
}
//其他证件只能以数字开头
function isOther(ingCode){
var reg = /^[0-9].*$/;
if(reg.test(ingCode) === false){
$(".error").remove();
$("<label for='name' class='error'>【其他】证件类型只能以数字开头!</label>").insertAfter("#zjhtext");
return false;
}else{
return true;
}
}
function views(){
var viewid = "${VIEWS}";
if(viewid == undefined || viewid == null || viewid ==""){
return;
}
$("input:not(:button,:submit,:hidden),select,textarea").attr("disabled","disabled");
}
function personSubmit(){
$(".error").remove();
var veritydatazt_text = $("#veritydatazt_text").data("select2").val();
if($("#rymctext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#rymctext");
return;
}
if($("#zjzltext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zjzltext");
return;
}
if($("#zjhtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#zjhtext");
return;
}
if($("#dz").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#dz");
return;
}
if($("#rylxtext").val() == ""){
$("<label for='name' class='error'>必填信息</label>").insertAfter("#rylxtext");
return;
}
var codeVal = $("#zjhtext").attr("value");
var rymcVal = $("#rymctext").attr("value");
var isnew = "${regBasePerson.id}";
//证件号验证
var zjzl = $("#zjzltext").val();
if(zjzl == "1" && !isCardNo(codeVal)){
return;
}
if(zjzl == "4" && !isCardNo(codeVal)){
return;
}
if(zjzl == "6" && !isOrgon(codeVal)){
return;
}
if(zjzl == "7" && !isIng(codeVal)){
return;
}
var success = 0;
$.ajax({
type:"POST",
url:"${ctx}/reg/base/regBasePerson/commitperson",
cache: false,
data:"zjh="+codeVal+"&zjzl="+zjzl,
async:false,
success:function(modelmap){
success = modelmap.success;
if(success != 0){
alert(modelmap.msg);
return;
}
}
});
if(success == 0){
//证件号去重
if(isnew == undefined || isnew == null || isnew ==""){
$.ajax({
type:"POST",
url:"${ctx}/reg/base/regBasePerson/isnotexist",
cache: false,
data:"CODE="+codeVal+"&ZJZL="+zjzl+"&RYMC="+rymcVal+"&qlrlx="+$("#rylxtext").val(),
async : false,
success:function(modelmap){
var isnot = modelmap.data;
if(isnot == "2"){
alert("包含有此人员名称【"+rymcVal+"】的信息已存在!");
document.getElementById("btnSubmit").disabled="disabled";
$('#t_zjzl').val($("#zjzltext").data("select2").val());
$('#t_rylx').val($("#rylxtext").data("select2").val());
$("#rylxtext").attr("disabled","disabled");
$("#zjzltext").attr("disabled","disabled");
$('#t_veritydatazt').val(veritydatazt_text);
document.inputForms.action = "${ctx}/reg/base/regBasePerson/save?WO=${WO}&CHXXXZ=${CHXXXZ}&fshbj=${fshbj}";
document.inputForms.submit();
}else if(isnot == "1"){
alert("此证件种类下的证件号【"+codeVal+"】已存在,请重新输入!");
return;
}else if(isnot == "3"){
alert("此证件种类下的人员名称已存在,请重新输入!");
return;
}else{
$('#t_zjzl').val($("#zjzltext").data("select2").val());
$('#t_rylx').val($("#rylxtext").data("select2").val());
$("#rylxtext").attr("disabled","disabled");
$("#zjzltext").attr("disabled","disabled");
$('#t_veritydatazt').val(veritydatazt_text);
document.getElementById("btnSubmit").disabled="disabled";
document.inputForms.action = "${ctx}/reg/base/regBasePerson/save?WO=${WO}&CHXXXZ=${CHXXXZ}&fshbj=${fshbj}";
document.inputForms.submit();
}
}
});
}else{
$('#t_zjzl').val($("#zjzltext").data("select2").val());
$('#t_rylx').val($("#rylxtext").data("select2").val());
$("#rylxtext").attr("disabled","disabled");
$("#zjzltext").attr("disabled","disabled");
$('#t_veritydatazt').val(veritydatazt_text);
document.getElementById("btnSubmit").disabled="disabled";
document.inputForms.action = "${ctx}/reg/base/regBasePerson/save?WO=${WO}&CHXXXZ=${CHXXXZ}&fshbj=${fshbj}";
document.inputForms.submit();
}
}
}
function setCertificateData(result)
{
$("#zjhtext").val(result.Certificate.IDNumber);
imgData =result.Certificate.Base64Photo;
$("#id_img_perstext").val(imgData);
$("#id_img_per").attr("src","data:image/jpg;base64,"+imgData);
$("#fzjgtext").val(result.Certificate.IDIssued);
$("#rymctext").val(result.Certificate.Name);
if(result.Certificate.Sex=="男"){
$("#xbtext").data("select2").val("1");
}else{
$("#xbtext").data("select2").val("2");
}
$("#rylxtext").data("select2").val("1");
$("#zjzltext").data("select2").val("1");
$("#dz").val(result.Certificate.Address);
}
var bgcs = 0;
function changeZjzlByRylx(obj){
var va = $(obj).data("select2").val();
$("#zjzltext").data("select2").val("");
$("#interhis_id").val("");
if( va == '2010' || va == '2020' || va == '2030' || va == '2040'){
$("#zjzltext").data("select2").val("10");
$("#veritydata_label").html("民政社会组织核验");
//$("#zjzltext").attr("disabled","disabled");
}else if(va == '2050' || va == '2060'){
$("#zjzltext").data("select2").val("1301");
$("#veritydata_label").html("银保监机构核验");
//$("#zjzltext").attr("disabled","disabled");
}else if(va == '1' ){
$("#zjzltext").data("select2").val("1");
$("#veritydata_label").html("公安公民身份核验");
//$("#zjzltext").attr("disabled","disabled");
}else if(va == '2' ){
$("#zjzltext").data("select2").val("10");
$("#veritydata_label").html("市场监管企业核验");
//$("#zjzltext").attr("disabled",false);
}else if(va == '3' ||va == '4' ){
$("#zjzltext").data("select2").val("10");
$("#veritydata_label").html("中编办部门核验");
//$("#zjzltext").attr("disabled",false);
}else{
$("#veritydata_label").html("数据核验状态");
}
}
function clearInterId(){
$("#interhis_id").val("");
}
function verityData() {
var si_code = "";
var params = new Object();
var interHis = new Object();
var rylx = $("#rylxtext").val();
var zjzl = $("#zjzltext").val();
var zjh = $("#zjhtext").val();
var rymc = $("#rymctext").val();
var sczt = $("#veritysczt_text").val();
if(rylx ==''){
alert("请选择人员类型!!!");
return;
}
if(rymc ==''){
alert("请输入人员名称!");
return;
}
if(zjh ==''){
alert("请输入证件号!!!");
return;
}
var id = $("#id").val();
var pcode = $("#pcode").val();
if(id == null || id == ""){
interHis.chyw="人员信息添加";
}else{
interHis.chyw="人员信息修改";
interHis.personid = id;
interHis.pcode = pcode;
}
var veritydata_label = $("#veritydata_label").html();
interHis.rymc = rymc;
interHis.zjhm = zjh;
interHis.jkmc = veritydata_label;
interHis.rylx = rylx;
if(rylx == '3' || rylx == '4'){
if(zjzl != '10'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
si_code = 'in/ZB01';
params.tyshxydm = zjh;
params.name = rymc;
}else if(rylx == '2010' || rylx == '2020' || rylx == '2030' || rylx == '2040'){
if(zjzl != '10'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
var jklx = "";
if(rylx == '2010'){
jklx = '10';
}else if(rylx == '2020'){
jklx = '20';
}else if(rylx == '2030'){
jklx = '30';
}else if(rylx == '2040'){
jklx = '40';
}
si_code = 'in/MZ02';
params.tyshxydm = zjh;
params.name = rymc;
params.search_type = jklx;
}else if(rylx == '2050' || rylx == '2060'){
if(zjzl != '1301'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
var jklx = "";
if(rylx == '2050'){
jklx = '01';
}else if(rylx == '2060'){
jklx = '02';
}
si_code = 'in/YB01';
params.certCode = zjh;
params.typeId = jklx;
}else if(rylx == '1'){
if(zjzl != '1'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
si_code = 'out/rkjzxxcx';
params.sfzh = zjh;
params.name = rymc;
}else if(rylx == '2'){
if(zjzl != '10'){
alert("使用集成接口验证数据,请选择正确的证件种类");
return;
}
si_code = 'out/qyjbxxcx';
params.tyshxydm = zjh;
params.ztmc = rymc;
}else{
var rylx_text = $("#rylxtext").find("option:selected").text();;
alert("集成接口未开通人员类型【"+rylx_text+"】的数据接口");
return;
}
$('#t_zjzl').val($("#zjzltext").data("select2").val());
$('#t_rylx').val($("#rylxtext").data("select2").val());
$("#rylxtext").attr("disabled","disabled");
$("#zjzltext").attr("disabled","disabled");
$.ajax({
type : "POST",
url : "${ctx}/InterSi/" + si_code,
cache : false,
data : {"data":JSON.stringify(params),
"interdata":JSON.stringify(interHis)
},
async : false,
success : function(modelmap) {
if (modelmap.success == 0) {
var res_data = modelmap.data;
$("#veritydatamsg").val(JSON.stringify(res_data));
var interhis_id = $("#interhis_id").val();
if(interhis_id != null && interhis_id != ""){
interhis_id =interhis_id+","+ modelmap.interhis_id
}else{
interhis_id = modelmap.interhis_id;
}
$("#interhis_id").val(interhis_id);
var china_msg = "";
var china_info = modelmap.china_info;
$.each(china_info,function(i,o){
china_msg += i+":"+o+"\n";
});
if(china_msg){
$("#veritydatazt_text").select2("val", "1");
$("#t_veritydatazt").val("1");
}
$("#bz").val(china_msg);
if(rylx == '3' || rylx == '4'){//机关群团事业单位信息查询接口
$("#dz").val(res_data.jgdz==null ||res_data.jgdz == ''?res_data.zs:res_data.jgdz);
$("#bfrq").val(res_data.bfrq);
$("#datazt").val(res_data.zt);
$("#datazttext").val(res_data.zt_text);
$("#fzr").val(res_data.fzr);
$("#djgljg").val(res_data.djgljg);
$("#yxqxz").val(res_data.yxqx_z);
$("#yxqxs").val(res_data.yxqx_s);
$("#onemc").val(res_data.onemc);
}else if(rylx == '2010' || rylx == '2020' || rylx == '2030' || rylx == '2040'){//社会组织信息查询
$("#dz").val(res_data.domicile_addres);
$("#yxqxs").val(res_data.valid_from);
$("#yxqxz").val(res_data.valid_to);
$("#bfrq").val(res_data.registration_date);
$("#fzr").val(res_data.legal_name);
$("#fzjgtext").val(res_data.issue_certificate_dept);
$("#gzdw").val(res_data.manager_dept);
}else if(rylx == '2050' || rylx == '2060'){//金融许可证查询
$("#bfrq").val(res_data.setDate);
$("#djgljg").val(res_data.organName);
$("#dz").val(res_data.address);
$("#gzdw").val(res_data.fullName);
}else if(rylx == '1'){//个人信息
$("#xbtext").data("select2").val(res_data.XBDM);
var str = "";
if("1" != res_data.XM_PPDDM){
str +="姓名"
}
if("1" != res_data.GMSFHM_PPDDM){
str += (str==""?"":"、");
str +="证件号码"
}
if(str != ""){
alert("请注意,人员信息中"+str+"与公安部人口库不匹配");
$("#veritydatazt_text").select2("val", "2");
}
if(sczt == '1' && res_data.SWBS =='1'){
$("#veritysczt_text").attr("disabled","disabled");
$("#t_veritysczt").val("1");//死亡验证通过
$("#sczt_jk").html('<span>公安人口库生存状态:</span> <label style="color:red;">死亡</label> ');
}else{
$("#sczt_jk").html('<span>公安人口库生存状态:</span> <label style="color:#32CD32;">正常</label> ');
readValue();
//有效人口
//verityswzm(params,interHis);
//veritybzfw(params,interHis)
}
}else if(rylx == '2'){
$("#datazttext").val(res_data.regstateCn);
var d=new Date(res_data.estdate);
$("#bfrq").val(formatDate(d));
}
} else {
alert(modelmap.error_msg);
$("#veritydatazt_text").select2("val", "2");
$("#bz").val("");
$("#dz").val("");
$("#bfrq").val("");
$("#datazt").val("");
$("#datazttext").val("");
$("#fzr").val("");
$("#djgljg").val("");
$("#yxqxz").val("");
$("#yxqxs").val("");
$("#onemc").val("");
$("#gzdw").val("");
$("#fzjgtext").val("");
$("#rylxtext").attr("disabled",false);
$("#zjzltext").attr("disabled",false);
return;
}
}
});
}
function verityswzm(params,interHis){
params = new Object();
var zjh = $("#zjhtext").val();
var rymc = $("#rymctext").val();
var pcode = $("#pcode").val();
params.sfzhm = zjh;
params.xm = rymc;
var interHis = new Object();
interHis.chyw="人员信息";
interHis.personid = "";
interHis.pcode = pcode;
var veritydata_label = "死亡医学证明查询";
interHis.rymc = rymc;
interHis.zjhm = zjh;
interHis.jkmc = veritydata_label;
interHis.rylx = "个人";
var si_code = "out/swyxzmcx";
$.ajax({
type : "POST",
url : "${ctx}/InterSi/" + si_code,
cache : false,
data : {"data":JSON.stringify(params),
"interdata":JSON.stringify(interHis)
},
async : false,
success : function(modelmap) {
if (modelmap.success == 0) {
console.log(modelmap.data);
var res_data = modelmap.data;
var html = $("#sczt_jk").html();
if(res_data.SWRQ.length == 0){
$("#sczt_jk").html(html+'<span style="padding: 0 0 0 50px;">卫健委死亡证明生存状态: </span> <label style="color:#32CD32;">正常</label> ');
}else{
$("#sczt_jk").html(html+'<span style="padding: 0 0 0 50px;">卫健委死亡证明生存状态: </span> <label style="color:red;">死亡</label> ');
$("#veritysczt_text").attr("disabled","disabled");
$("#t_veritysczt").val("1");//死亡验证通过
}
veritybzfw(params,interHis);
}
}
})
}
function veritybzfw(params,interHis){
params = new Object();
var zjh = $("#zjhtext").val();
var rymc = $("#rymctext").val();
var pcode = $("#pcode").val();
params.sfzh = zjh;
params.xm = rymc;
var interHis = new Object();
interHis.chyw="人员信息";
interHis.personid = "";
interHis.pcode = pcode;
var veritydata_label = "殡葬服务火化信息查询";
interHis.rymc = rymc;
interHis.zjhm = zjh;
interHis.jkmc = veritydata_label;
interHis.rylx = "个人";
var si_code = "out/bzfwhhxxcx";
$.ajax({
type : "POST",
url : "${ctx}/InterSi/" + si_code,
cache : false,
data : {"data":JSON.stringify(params),
"interdata":JSON.stringify(interHis)
},
async : false,
success : function(modelmap) {
if (modelmap.success == 0) {
var res_data = modelmap.data;
var html = $("#sczt_jk").html();
console.log(res_data);
if(res_data.data.length == 0){
$("#sczt_jk").html(html+'<span style="padding: 0 0 0 50px;">民政殡葬服务生存状态:</span> <label style="color:#32CD32;">正常</label> ');
}else{
$("#sczt_jk").html(html+'<span style="padding: 0 0 0 50px;">民政殡葬服务生存状态:</span> <label style="color:red;">死亡</label> ');
}
}
}
})
}
function formatDate(now) {
var year=now.getFullYear();
var month=now.getMonth()+1;
var date=now.getDate();
var hour=now.getHours();
var minute=now.getMinutes();
var second=now.getSeconds();
return year+"-"+month+"-"+date;
}
</script>
</head>
<body>
<p id="cert_message" style="display: none;"></p>
<p id="cert_message_type" style="display: none;"></p>
<ul class="nav nav-tabs">
<li><a href="${ctx}/reg/base/regBasePerson/?WO=${WO}&CHXXXZ=${CHXXXZ}&addPerson=${addPerson}">人员信息列表</a></li>
<li class="active">
<c:if test="${not empty VIEWS}">
<a href="#">人员信息查看</a>
</c:if>
<c:if test="${empty VIEWS}">
<a href="${ctx}/reg/base/regBasePerson/form?id=${regBasePerson.id}&WO=${WO}&CHXXXZ=${CHXXXZ}">
人员信息
<shiro:hasPermission name="reg:base:regBasePerson:edit">${not empty regBasePerson.id?'修改':'添加'}
</shiro:hasPermission>
<shiro:lacksPermission name="reg:base:regBasePerson:edit">查看</shiro:lacksPermission>
</a>
</c:if>
</li>
</ul><br/>
<form:form id="inputForm" name="inputForms" modelAttribute="regBasePerson" action="#" method="post" class="form-horizontal">
<form:hidden path="id"/>
<sys:message content="${message}"/>
<table class="table-form">
<tr>
<form:input id="id_img_perstext" path="idimgpers" type="hidden" readOnly="ture" htmlEscape="false" class="input-xxlarge"/>
<td class="tit">人员名称</td>
<td ><form:input id="rymctext" path="rymc" htmlEscape="false" maxlength="100" class="input-xlarge required" onchange="clearInterId()"/>
<span class="help-inline"><font color="red">*</font> </span></td>
<td class="tit">人员类型</td>
<td ><form:select id="rylxtext" path="rylx" class="input-large required" onchange="changeZjzlByRylx(this)">
<form:options items="${fns:getDictList('reg_bus_qlrlx')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
<form:hidden path="rylx" id="t_rylx"/>
<span class="help-inline"><font color="red">*</font> </span>
</td>
<td rowspan="6" colspan="2">
<div align="center">
<div id="localImag">
<img width="120px" height="140px" src="${ctxStatic}/readcard/images/userImage.png" onerror="this.src='${ctxStatic}/readcard/images/userImage.png'" style="margin-left:5px" id="id_img_per">
<br/>
<span>(尺寸大小120×140)</span>
</div>
</div>
</td>
</tr>
<tr>
<td class="tit" >证件号</td>
<td>
<form:input id="zjhtext" path="zjh" htmlEscape="false" maxlength="50" class="input-xlarge required" onchange="clearInterId()"/>
<span class="help-inline"><font color="red">*</font></span>
</td>
<td class="tit">证件种类</td>
<td><form:select id="zjzltext" path="zjzl" class="input-large required">
<form:options items="${fns:getDictList('reg_bus_zjlx')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
<span class="help-inline"><font color="red">*</font> </span>
<form:hidden path="zjzl" id="t_zjzl"/>
</td>
</tr>
<tr>
</tr>
<tr>
<td colspan="4" style="text-align: center;">
<input id="button_readInfo" class="btn btn-primary" type="button" value="验证数据信息" onclick="verityData()"/>
<font color="red"> 若使用此按钮验证数据,则证件类型随人员类型生成后不得随意修改</font>
</td>
<form:hidden path="datazt" id="datazt"/>
<form:hidden path="fzr" id="fzr"/>
<form:hidden path="djgljg" id="djgljg"/>
<form:hidden path="yxqxz" id="yxqxz"/>
<form:hidden path="yxqxs" id="yxqxs"/>
<form:hidden path="onemc" id="onemc"/>
<form:hidden path="veritydatamsg" id="veritydatamsg"/>
<input type="hidden" id="interhis_id" name="interhis_id"/>
</tr>
<tr>
<td style="text-align: right;color:#32CD32;font-style:inherit;font-weight: bold; " id="veritydata_label" colspan="2">数据核验状态</td>
<td colspan="2" >
<form:select id="veritydatazt_text" path="veritydatazt" class="input-xlarge" disabled="true">
<form:option value="0" label="未核验"/>
<form:option value="1" label="核验通过"/>
<form:option value="2" label="核验未通过"/>
</form:select>
<form:hidden path="veritydatazt" id="t_veritydatazt"/>
</td>
</tr>
<tr>
<td class="tit" >生存状态</td>
<td>
<form:select id="veritysczt_text" path="sczt" class="input-large" onchange="readValue()" >
<form:options items="${fns:getDictList('reg_bus_sczt')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
<form:hidden path="veritysczt" id="t_veritysczt"/>
</td>
<td colspan="2" id="sczt_jk">
<!--
<span>公安人口库生存状态:</span> <label style="color:#32CD32;">正常</label>
<span style="padding: 0 0 0 50px;">民政殡葬服务生存状态:</span> <label>正常</label>
<span style="padding: 0 0 0 50px;">卫健委死亡证明生存状态: </span> <label>正常</label>
-->
</td>
<tr>
<tr>
<td class="tit" >人员编码</td>
<td>
<form:input id="pcode" path="pcode"
htmlEscape="false" maxlength="300" readonly="true" class="input-large" />
</td>
<td class="tit" rowspan="3">备注</td>
<td rowspan="3">
<form:textarea id="bz" path="bz"
htmlEscape="false" rows="4" class="input-xlarge" />
</td>
<tr>
<tr>
<td class="tit">颁发日期</td>
<td>
<form:input id="bfrq" path="bfrq" htmlEscape="false" readonly="true" class="input-large required"/>
</td>
</tr>
<tr>
<td class="tit">机构状态</td>
<td>
<form:input id="datazttext" path="datazttext" htmlEscape="false" readonly="true" class="input-large required"/>
</td>
</tr>
<tr>
<td class="tit" rowspan="2">地址</td>
<td rowspan="2">
<form:textarea id="dz" path="dz"
width="98%" htmlEscape="false" rows="2" maxlength="200"
class="input-xlarge required" />
<span class="help-inline"><font color="red">*</font> </span>
</td>
<td class="tit">性别</td>
<td>
<form:select id="xbtext" path="xb" class="input-large ">
<form:option value="" label=""/>
<form:options items="${fns:getDictList('sex')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</td>
<td class="tit">电话</td>
<td><form:input path="dh" htmlEscape="false" maxlength="50" class="input-large "/>
</td>
</tr>
<tr>
<td class="tit">国家/地区</td>
<td><form:select path="gj" class="input-large ">
<form:option value="142"
label="${fns:getDictLabel('142', 'reg_bus_gjhdq', '')}" />
<form:options items="${fns:getDictList('reg_bus_gjhdq')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</td>
<td class="tit">发证机关</td>
<td><form:input id="fzjgtext" path="fzjg" htmlEscape="false" maxlength="50" class="input-large"/>
</td>
</tr>
<tr>
<td class="tit" rowspan="2">工作单位</td>
<td rowspan="2">
<form:textarea id="gzdw" path="gzdw"
htmlEscape="false" rows="2" maxlength="100" class="input-xlarge" />
</td>
<td class="tit">所属行业</td>
<td ><form:select path="sshy" class="input-large ">
<form:option value="0" label="${fns:getDictLabel('0', 'reg_bus_sshy', '')}" />
<form:options items="${fns:getDictList('reg_bus_sshy')}" itemLabel="label" itemValue="value" htmlEscape="false"/>
</form:select>
</td>
<td class="tit" >电子邮件</td>
<td ><form:input path="dzyj" htmlEscape="false" maxlength="50" class="input-large"/>
</td>
</tr>
<tr>
<td class="tit" >户籍所在省市</td>
<td ><form:input path="hjszss" id="hjszsstext" htmlEscape="false" maxlength="200" class="input-large "/>
</td>
<td class="tit" >邮编</td>
<td ><form:input path="yb" htmlEscape="false" maxlength="6" class="input-largel number"/>
</td>
</tr>
<tr>
</tr>
</table>
<div class="form-actions">
<c:if test="${empty VIEWS}">
<shiro:hasPermission name="reg:base:regBasePerson:edit">
<input id="btnSubmit" class="btn btn-primary" type="button" onclick="personSubmit();" value="保 存"/>
<input id="button_readID" class="btn btn-primary" type="button" value="读取身份证信息"/>
</shiro:hasPermission>
</c:if>
<input id="btnCancel" class="btn btn-primary" type="button" value=" 重 置 " onclick="location.reload()"/>
<input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
</div>
<br>
<div class="control-group">
<label class="control-label">身份证规则:</label>
<div class="controls">
<span class="lbl">15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X</span>
</div>
</div>
<div class="control-group">
<label class="control-label">组织机构代码:</label>
<div class="controls">
<span class="lbl">组织机构代码以8位本体代码,1位校验码和一个连字符构成,如:00000000-0</span>
</div>
</div>
<div class="control-group">
<label class="control-label">营业执照:</label>
<div class="controls">
<span class="lbl">旧营业执照为15位数字,三证合一的营业执照为18位数字或字母</span>
</div>
</div>
<div class="control-group">
<label class="control-label">户口簿:</label>
<div class="controls">
<span class="lbl">户口簿同身份证号码</span>
</div>
</div>
</form:form>
</body>
</html>