| xqd
@@ -56,6 +56,42 @@
|
|
|
left: 0;
|
|
|
background: rgba(0,0,0,0.5);
|
|
|
}
|
|
|
+ #tanchuang .tanbox{
|
|
|
+ width: 240px;
|
|
|
+ height: 120px;
|
|
|
+ background: #fff;
|
|
|
+ position: absolute;
|
|
|
+ left: 50%;
|
|
|
+ top: 50%;
|
|
|
+ margin-left: -120px;
|
|
|
+ margin-top: -60px;
|
|
|
+ border-radius: 15px;
|
|
|
+ }
|
|
|
+ .tanbox .status{
|
|
|
+ width: 80%;
|
|
|
+ height: 70%;
|
|
|
+ margin: 10%;
|
|
|
+ }
|
|
|
+ .tanbox .status text{
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .tanbox .status .title{
|
|
|
+ display: inline-block;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 700;
|
|
|
+ text-align: center;
|
|
|
+ color: #f04;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
+ .tanbox .status button{
|
|
|
+ width: 80px;
|
|
|
+ margin-left: 52px;
|
|
|
+ margin-top: 10px;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
| xqd
@@ -81,9 +117,79 @@
|
|
|
settime(obj);
|
|
|
}, 1000)
|
|
|
}
|
|
|
- function tijiao(){
|
|
|
+ function submits(){
|
|
|
+ $.ajax({
|
|
|
+ url:"{{ url('/web/Index/index') }}",
|
|
|
+ headers: {
|
|
|
+ 'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
|
|
+ },
|
|
|
+ type:'POST',
|
|
|
+ data:{
|
|
|
+ mobile:$('#mobile').val(),
|
|
|
+ name:$('#name').val(),
|
|
|
+ age:$('#age').val(),
|
|
|
+ sex:$('input[name="sex"]:checked ').val(),
|
|
|
+ sample_type:$('input[name="sample_type"]:checked ').val(),
|
|
|
+ nationality:$('#nationality').val(),
|
|
|
+ native_place:$('#native_place').val(),
|
|
|
+ email:$('#email').val(),
|
|
|
+ work:$('#work').val(),
|
|
|
+ address:$('#address').val(),
|
|
|
+ verify:$('#verify').val()
|
|
|
+ },
|
|
|
+ success:function (msg) {
|
|
|
+ if(msg.state ==0){
|
|
|
+ tijiao(0,msg.err);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ function tijiao(status){
|
|
|
var tanc=document.getElementById("tanchuang")
|
|
|
- tanc.style="display:auto;";
|
|
|
+ tanc.style="display:auto;"
|
|
|
+ // var status = 0
|
|
|
+ var tbox = document.getElementsByClassName("status");
|
|
|
+
|
|
|
+ if(status==0){
|
|
|
+ tbox[0].style="display:auto;"
|
|
|
+ tbox[1].style="display:none;"
|
|
|
+ tbox[2].style="display:none;"
|
|
|
+ }else if(status==1){
|
|
|
+ tbox[1].style="display:auto;"
|
|
|
+ tbox[0].style="display:none;"
|
|
|
+ tbox[2].style="display:none;"
|
|
|
+ }else{
|
|
|
+ tbox[1].style="display:none;"
|
|
|
+ tbox[0].style="display:none;"
|
|
|
+ tbox[2].style="display:auto;"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function close(e){
|
|
|
+ var id = e.id;
|
|
|
+ console.log(id)
|
|
|
+ if(id=='fail'){
|
|
|
+ closebox();
|
|
|
+ }else if(id=='yeah'){
|
|
|
+ var tanc=document.getElementById("tanchuang")
|
|
|
+ tanc.style="display:none;"
|
|
|
+ }else if(id=='download'){
|
|
|
+ var tanc=document.getElementById("tanchuang")
|
|
|
+ tanc.style="display:none;"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ function closebox(){
|
|
|
+ var tanc=document.getElementById("tanchuang")
|
|
|
+ tanc.style="display:none;"
|
|
|
+ }
|
|
|
+ function phonenum(phone) {
|
|
|
+ var myreg=/^[1][3,4,5,7,8][0-9]{9}$/;
|
|
|
+ if (!myreg.test(phone)) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
function closeyan(){
|
|
|
var yanz=document.getElementById("yanz")
|
| xqd
@@ -92,8 +198,8 @@
|
|
|
function yanzhengma(){
|
|
|
|
|
|
var mobile = $('#mobile').val();
|
|
|
- if(mobile == ''){
|
|
|
- alert('请输入手机号');
|
|
|
+ if(mobile == '' || phonenum(mobile)){
|
|
|
+ alert('请输入正确手机号');
|
|
|
}else{
|
|
|
var yanzheng = document.getElementById("yzma");
|
|
|
yanzheng.style="display:auto;";
|
| xqd
@@ -104,7 +210,7 @@
|
|
|
headers: {
|
|
|
'X-CSRF-TOKEN': "{{ csrf_token() }}"
|
|
|
},
|
|
|
- type:'post',
|
|
|
+ type:'POST',
|
|
|
data:{
|
|
|
mobile:mobile
|
|
|
},
|
| xqd
@@ -124,7 +230,7 @@
|
|
|
<div class="all">
|
|
|
<div class="col-xs-0 col-lg-2"></div>
|
|
|
<div class="col-xs-12 col-lg-8 main" style="margin: 0 auto;margin-top: 10px;">
|
|
|
- <div class="col-xs-12 col-lg-12 imgbox" style="width:100%;margin-bottom:20px;display: flex;height: auto;">
|
|
|
+ <div class="col-xs-12 col-lg-12 imgbox" style="width:100%;margin-bottom:20px;display: flex;height: auto;" >
|
|
|
<div class="col-xs-0 col-lg-2"></div>
|
|
|
<img class="col-xs-3 col-lg-1" src="{{cdn_asset('/assets/img/logo.jpg')}}">
|
|
|
<h3 class="col-lg-8">健康体检服务知情同意书</h3>
|
| xqd
@@ -133,31 +239,31 @@
|
|
|
<form class="bs-example bs-example-form main" role="form">
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">姓名:</span>
|
|
|
- <input type="text" class="form-control" name="name" placeholder="请输入姓名" required>
|
|
|
+ <input type="text" class="form-control" name="name" id="name" placeholder="请输入姓名" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">籍贯:</span>
|
|
|
- <input type="text" class="form-control" name="native_place" placeholder="请输入籍贯" required>
|
|
|
+ <input type="text" class="form-control" name="native_place" id="native_place" placeholder="请输入籍贯" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">民族:</span>
|
|
|
- <input type="text" class="form-control" name="nationality" placeholder="请输入民族" required>
|
|
|
+ <input type="text" class="form-control" name="nationality" id="nationality" placeholder="请输入民族" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">年龄:</span>
|
|
|
- <input type="text" class="form-control" name="age" placeholder="请输入年龄" required>
|
|
|
+ <input type="text" class="form-control" name="age" id="age" placeholder="请输入年龄" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">职业:</span>
|
|
|
- <input type="text" class="form-control" name="work" placeholder="请输入职业" required>
|
|
|
+ <input type="text" class="form-control" name="work" id="work" placeholder="请输入职业" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-4 input-group input">
|
|
|
<span class="input-group-addon">邮箱地址:</span>
|
|
|
- <input type="text" class="form-control" name="email" placeholder="请输入邮箱" required>
|
|
|
+ <input type="text" class="form-control" name="email" id="email" placeholder="请输入邮箱" required>
|
|
|
</div>
|
|
|
<div class="col-xs-12 col-lg-6 input-group">
|
|
|
<span class="input-group-addon">住址:</span>
|
|
|
- <input type="text" class="form-control" name="address" placeholder="请输入住址" required>
|
|
|
+ <input type="text" class="form-control" name="address" id="address" placeholder="请输入住址" required>
|
|
|
</div>
|
|
|
|
|
|
|
| xqd
@@ -167,8 +273,8 @@
|
|
|
<input style="width: 44%;" type="text" name="mobile" id="mobile" class="form-control" placeholder="请输入手机号" required>
|
|
|
<input style="width:36%;font-size: 10px;" class="btn btn-default" id="fasong" value="获取验证码" onclick="yanzhengma()"/>
|
|
|
</div>
|
|
|
- <div id="yzma" class="col-xs-12 col-lg-4 input-group" style="margin:4px 0;display: none;">
|
|
|
- <input style="width: 100%;" type="text" name="verify" class="form-control" placeholder="请输入验证码" required>
|
|
|
+ <div id="yzma" class="col-xs-12 col-lg-4 input-group" style="margin:4px 0;">
|
|
|
+ <input style="width: 100%;" type="text" name="verify" id="verify" class="form-control" placeholder="请输入验证码" required>
|
|
|
</div>
|
|
|
|
|
|
</div>
|
| xqd
@@ -176,26 +282,41 @@
|
|
|
<label for="name">性别:</label>
|
|
|
<div>
|
|
|
<label class="checkbox-inline">
|
|
|
- <input name="sex" type="radio" value="nan" checked>男
|
|
|
+ <input name="sex" type="radio" value="1" checked>男
|
|
|
</label>
|
|
|
<label class="checkbox-inline">
|
|
|
- <input name="sex" type="radio" value="nv">女
|
|
|
+ <input name="sex" type="radio" value="0">女
|
|
|
</label>
|
|
|
</div>
|
|
|
<label for="name">样本类型:</label>
|
|
|
<div class="checkbox">
|
|
|
- <label><input type="radio" value="l1" name="sample_type" checked>EDTA抗凝静脉血</label>
|
|
|
+ <label><input type="radio" value="0" name="sample_type" checked>EDTA抗凝静脉血</label>
|
|
|
</div>
|
|
|
<div class="checkbox">
|
|
|
- <label><input type="radio" value="l2" name="sample_type">口腔拭子</label>
|
|
|
+ <label><input type="radio" value="1" name="sample_type">口腔拭子</label>
|
|
|
</div>
|
|
|
<div class="checkbox">
|
|
|
- <label><input type="radio" value="l3" name="sample_type">宫颈刷</label>
|
|
|
+ <label><input type="radio" value="2" name="sample_type">宫颈刷</label>
|
|
|
</div>
|
|
|
- <button style="margin-left: 45%;margin-bottom: 20px;" type="button" onclick="tijiao()" class="btn btn-default">提交</button>
|
|
|
+ <button style="margin-left: 45%;margin-bottom: 20px;" type="button" onclick="submits()" class="btn btn-default">提交</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="tanchuang" style="display: none;">
|
|
|
+ <div class="tanbox">
|
|
|
+ <div style="width: 20px;height: 20px;text-align: center;position: absolute;top: -5px;right: -5px;background: #000;font-weight:700;color:#fff;border-radius: 20px;" onclick="closebox()">X</div>
|
|
|
+ <div class="status b0">
|
|
|
+ <text class="title">提交失败!!</text>
|
|
|
+ <text style="font-size: 10px;color: #999;">请重新提交!!</text>
|
|
|
+ </div>
|
|
|
+ <div class="status b1">
|
|
|
+ <text class="title">提交成功!!</text>
|
|
|
+ <button class="btn btn-default" id="yeah" type="button" onclick="close(this)">下一页!</button>
|
|
|
+ </div>
|
|
|
+ <div class="status b2">
|
|
|
+ <text class="title">下载****!!</text>
|
|
|
+ <button class="btn btn-default" id="download" type="button" onclick="close(this)">下载!</button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</form>
|
|
|
</div>
|