|
|
|
|
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:91:"/alidata/www/myproject/hospital/public/../application/admin/view/patient_medical/index.html";i:1590930494;}*/ ?>
|
|
|
|
|
<!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 addMedicalUrl = "<?php echo url('addMedical','',''); ?>";
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body class="layui-anim layui-anim-up">
|
|
|
|
|
<div class="x-nav">
|
|
|
|
|
<span class="layui-breadcrumb">
|
|
|
|
|
<a href='<?php echo url("Index/welcome"); ?>'>首页</a>
|
|
|
|
|
<a href=""><cite>患者药单</cite></a>
|
|
|
|
|
</span>
|
|
|
|
|
<a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
|
|
|
|
|
<i class="layui-icon" style="line-height:30px">ဂ</i></a>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="x-body">
|
|
|
|
|
<div class="layui-row">
|
|
|
|
|
<form class="layui-form layui-col-md12 x-so" method="post" action="<?php echo url('index'); ?>">
|
|
|
|
|
<input class="layui-input" name="code" placeholder="请输入流水号" value="<?php echo $code; ?>">
|
|
|
|
|
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
|
|
|
|
<a title="添加药单" onclick="x_admin_show('添加药单',addMedicalUrl,800,500)" href="javascript:;">
|
|
|
|
|
<i class="layui-btn">添加药单</i>
|
|
|
|
|
</a>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|
|
|
|
|
<xblock>
|
|
|
|
|
<span class="x-right" style="line-height:40px">共有数据:<?php echo $total; ?> 条</span>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
</xblock>
|
|
|
|
|
<table class="layui-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="140">名字</td>
|
|
|
|
|
<td width="140">科</td>
|
|
|
|
|
<td width="300">药品</td>
|
|
|
|
|
<td width="140">数量</td>
|
|
|
|
|
<td width="140">价格</td>
|
|
|
|
|
<td width="140">开方医生</td>
|
|
|
|
|
<td width="100">操作</td></tr>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php if(is_array($medicals) || $medicals instanceof \think\Collection || $medicals instanceof \think\Paginator): if( count($medicals)==0 ) : echo "" ;else: foreach($medicals as $key=>$v): ?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td><?php echo $v['patientName']; ?></td>
|
|
|
|
|
<td><?php echo $v['departmentName']; ?></td>
|
|
|
|
|
<td><?php echo $v['drugsName']; ?></td>
|
|
|
|
|
<td><?php echo $v['quantity']; ?></td>
|
|
|
|
|
<td><?php echo $v['price']; ?></td>
|
|
|
|
|
<td><?php echo $v['doctorName']; ?></td>
|
|
|
|
|
<td class="td-manage">
|
|
|
|
|
<a title="删除患者 <?php echo $v['drugsName']; ?> 药单" onclick="patientMedicalDel(this,'<?php echo $v['id']; ?>')" href="javascript:;">
|
|
|
|
|
<i class="layui-icon">ဆ</i>
|
|
|
|
|
</a>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="page">
|
|
|
|
|
<div>
|
|
|
|
|
<?php echo $page; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
function patientMedicalDel(obj,id){
|
|
|
|
|
const url = "<?php echo url('PatientMedical/delHandle'); ?>";
|
|
|
|
|
layer.confirm('确认要删除吗?',function(index){
|
|
|
|
|
//发异步删除数据
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:url,
|
|
|
|
|
data:{id},
|
|
|
|
|
type:"Post",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
const status = data.status;
|
|
|
|
|
const message = data.message;
|
|
|
|
|
if(!status){
|
|
|
|
|
layer.msg(message,{icon: 6, time: 2000});
|
|
|
|
|
$(obj).parents("tr").remove();
|
|
|
|
|
$('.count').text(($('.count').text()) - 1);
|
|
|
|
|
// console.log($(obj).parents("tbody").length);
|
|
|
|
|
// if($(obj).parents("tbody")){
|
|
|
|
|
// window.location.reload();
|
|
|
|
|
// }
|
|
|
|
|
} else {
|
|
|
|
|
layer.msg(message,{icon: 5, time: 2000});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(data){
|
|
|
|
|
console.log(data);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
//layer.msg('已删除!',{icon:1,time:1000});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|