|
|
|
|
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:82:"/alidata/www/myproject/hospital/public/../application/admin/view/register/add.html";i:1590930494;}*/ ?>
|
|
|
|
|
<!DOCTYPE html>
|
|
|
|
|
<html lang="en">
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>Title</title>
|
|
|
|
|
</head>
|
|
|
|
|
<body>
|
|
|
|
|
|
|
|
|
|
</body><!DOCTYPE html>
|
|
|
|
|
<html>
|
|
|
|
|
|
|
|
|
|
<head>
|
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
|
<title>挂号登记</title>
|
|
|
|
|
<meta name="renderer" content="webkit">
|
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
|
<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
|
|
|
|
|
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
|
|
|
|
|
<link rel="stylesheet" href="/hospital/public/static/admin/x-admin/css/font.css">
|
|
|
|
|
<link rel="stylesheet" href="/hospital/public/static/admin/x-admin/css/xadmin.css">
|
|
|
|
|
<script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
|
|
|
|
|
<script type="text/javascript" src="/hospital/public/static/admin/x-admin/lib/layui/layui.js" charset="utf-8"></script>
|
|
|
|
|
<script type="text/javascript" src="/hospital/public/static/admin/x-admin/js/xadmin.js"></script>
|
|
|
|
|
<!-- 让IE8/9支持媒体查询,从而兼容栅格 -->
|
|
|
|
|
<!--[if lt IE 9]>
|
|
|
|
|
<script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
|
|
|
|
|
<script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
|
|
|
|
|
<![endif]-->
|
|
|
|
|
<script>
|
|
|
|
|
const addContentUrl = "<?php echo url('addContent','',''); ?>";
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body class="layui-anim layui-anim-up">
|
|
|
|
|
<div class="x-body">
|
|
|
|
|
<div class="layui-row">
|
|
|
|
|
<form class="layui-form layui-col-md12 x-so" method="post" action="<?php echo url('Register/submit'); ?>">
|
|
|
|
|
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">姓名:</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="text" name="name" placeholder="请输入姓名" class="layui-input">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label" >性别:</label>
|
|
|
|
|
<div class="layui-input-block">
|
|
|
|
|
<input type="radio" name="sex" value="1" title="男">
|
|
|
|
|
<input type="radio" name="sex" value="2" title="女">
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">挂号:</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<select class="form-control select" name="department" lay-filter="test">
|
|
|
|
|
<option value="">请选择科室</option>
|
|
|
|
|
<?php if(is_array($department) || $department instanceof \think\Collection || $department instanceof \think\Paginator): if( count($department)==0 ) : echo "" ;else: foreach($department as $key=>$v): ?>
|
|
|
|
|
<option value="<?php echo $v['id']; ?>" name="<?php echo $v['name']; ?>"><?php echo $v['name']; ?></option>
|
|
|
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-input-inline" style="margin-left: 10px">
|
|
|
|
|
<select name="doctor" id="second" class="form-control select" ></select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-form-item">
|
|
|
|
|
<label class="layui-form-label">填写护士:</label>
|
|
|
|
|
<div class="layui-input-inline">
|
|
|
|
|
<select class="form-control select" name="nurse">
|
|
|
|
|
<option value="">请选择</option>
|
|
|
|
|
<?php if(is_array($nurse) || $nurse instanceof \think\Collection || $nurse instanceof \think\Paginator): if( count($nurse)==0 ) : echo "" ;else: foreach($nurse as $key=>$v): ?>
|
|
|
|
|
<option value="<?php echo $v['id']; ?>" name="<?php echo $v['name']; ?>"><?php echo $v['name']; ?></option>
|
|
|
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
|
|
|
</select>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="layui-input-block" style="margin-top: 20px">
|
|
|
|
|
<input type="submit" value="立即提交" class="layui-btn" />
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<script>
|
|
|
|
|
// 一二级联动
|
|
|
|
|
$(function(){
|
|
|
|
|
layui.use("form",function(){ //监听form标签
|
|
|
|
|
var form = layui.form;
|
|
|
|
|
form.on('select(test)',function (data) { //监听select标签,lay-filter
|
|
|
|
|
console.log(data.value);//得到被选中的值
|
|
|
|
|
var department=data.value;
|
|
|
|
|
const url ="<?php echo url('Register/indexHandle'); ?>";//发送一个Ajax给后台处理的地址
|
|
|
|
|
$.ajax({
|
|
|
|
|
url,
|
|
|
|
|
type:'POST',
|
|
|
|
|
dataType:'text',
|
|
|
|
|
data:{'id':department},
|
|
|
|
|
success:function(data){
|
|
|
|
|
$("#second").empty();//先清空之前append的内容 select里的id
|
|
|
|
|
// console.log(data);
|
|
|
|
|
var dataObj = eval("("+data+")");
|
|
|
|
|
var dataObj1= eval("("+dataObj+")");//json格式的字符串要转两次才会变成json数组
|
|
|
|
|
// var str = '<option value="">请选择栏目</option>';
|
|
|
|
|
$("#second").append('<option value="">请选择预约医生</option>');
|
|
|
|
|
for (var key in dataObj1){ //将得到的值遍历在option里,此处key为数组dataObj1的下标
|
|
|
|
|
console.log(key+':'+dataObj1[key].name);
|
|
|
|
|
$("#second").append('<option id="'+dataObj1[key].name+'" value="'+dataObj1[key].id+'">'+dataObj1[key].name+'</option>');
|
|
|
|
|
};
|
|
|
|
|
form.render('select');//刷新select选择框渲染
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
<script>
|
|
|
|
|
var _hmt = _hmt || []; (function() {
|
|
|
|
|
var hm = document.createElement("script");
|
|
|
|
|
hm.src = "https://hm.baidu.com/hm.js?b393d153aeb26b46e9431fabaf0f6190";
|
|
|
|
|
var s = document.getElementsByTagName("script")[0];
|
|
|
|
|
s.parentNode.insertBefore(hm, s);
|
|
|
|
|
})();
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|
</html>
|
|
|
|
|
</html>
|