|
|
|
|
<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:83:"/alidata/www/myproject/hospital/public/../application/admin/view/payment/check.html";i:1591259257;}*/ ?>
|
|
|
|
|
<!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 checkUrl="<?php echo url('check','',''); ?>";
|
|
|
|
|
</script>
|
|
|
|
|
</head>
|
|
|
|
|
|
|
|
|
|
<body class="layui-anim layui-anim-up">
|
|
|
|
|
|
|
|
|
|
<?php if($check == 1): ?>
|
|
|
|
|
<xblock>
|
|
|
|
|
<span class="x-right" style="line-height:40px">共有数据:<?php echo $total; ?> 条</span>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
</xblock>
|
|
|
|
|
<table class="layui-table">
|
|
|
|
|
<tr>
|
|
|
|
|
<td style="background-color: #99CCCC" width="100">姓名</td>
|
|
|
|
|
<td><?php echo $patientName; ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</table>
|
|
|
|
|
<table class="layui-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="140">药品</td>
|
|
|
|
|
<td width="140">数量</td>
|
|
|
|
|
<td width="140">价格</td>
|
|
|
|
|
<td width="140">是否缴费</td>
|
|
|
|
|
<td width="140">是否取药</td>
|
|
|
|
|
<td width="140">操作</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['drugsName']; ?></td>
|
|
|
|
|
<td><?php echo $v['quantity']; ?></td>
|
|
|
|
|
<td><?php echo $v['price']; ?></td>
|
|
|
|
|
<td><?php echo $v['status']; ?></td>
|
|
|
|
|
<td><?php echo $v['type']; ?></td>
|
|
|
|
|
<td>
|
|
|
|
|
<button class="layui-btn layui-btn-xs" onclick="cost(this,'<?php echo $v['id']; ?>')" href="javascript:;">缴费</button>
|
|
|
|
|
<button class="layui-btn layui-btn-xs" onclick="getMedical(this,'<?php echo $v['id']; ?>')" href="javascript:;">取药</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
|
|
|
|
|
<table class="layui-table">
|
|
|
|
|
<thead>
|
|
|
|
|
<tr>
|
|
|
|
|
<td width="100">总费用: <?php echo $totalPrice; ?></td>
|
|
|
|
|
<td width="180">是否缴费: <?php echo $totalStatus; ?></td>
|
|
|
|
|
<td width="180">是否取药: <?php echo $totalType; ?></td>
|
|
|
|
|
<td width="140">
|
|
|
|
|
<button class="layui-btn layui-btn-sm" onclick="costTotal(this,'<?php echo $code; ?>')" href="javascript:;">总缴费</button>
|
|
|
|
|
<button class="layui-btn layui-btn-sm" onclick="getTotal(this,'<?php echo $code; ?>')" href="javascript:;">总取药</button>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
</table>
|
|
|
|
|
<div class="page">
|
|
|
|
|
<div>
|
|
|
|
|
<?php echo $page; ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php endif; if($check == 2): ?>
|
|
|
|
|
<xblock>
|
|
|
|
|
<span class="x-right" style="line-height:40px">暂无数据,未有药单</span>
|
|
|
|
|
<div style="clear:both;"></div>
|
|
|
|
|
</xblock>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
//单个缴费 id:患者药单的id
|
|
|
|
|
function cost(obj,id){
|
|
|
|
|
const url = "<?php echo url('Payment/costAlong'); ?>";
|
|
|
|
|
console.log(id);
|
|
|
|
|
layer.confirm('确认缴费?',function(index){
|
|
|
|
|
//发异步删除数据
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:url,
|
|
|
|
|
data:{id},
|
|
|
|
|
type:"Post",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
console.log("data");
|
|
|
|
|
const status = data.status;
|
|
|
|
|
const message = data.message;
|
|
|
|
|
if(!status){
|
|
|
|
|
console.log("yesssss");
|
|
|
|
|
layer.msg(message,{icon: 6, time: 2000});
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
console.log("okkkk");
|
|
|
|
|
layer.msg(message,{icon: 5, time: 2000});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(data){
|
|
|
|
|
console.log("noooooo");
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//单个领取 id:患者药单id
|
|
|
|
|
function getMedical(obj,id){
|
|
|
|
|
const url = "<?php echo url('Payment/getMedical'); ?>";
|
|
|
|
|
console.log(id);
|
|
|
|
|
layer.confirm('确认领取?',function(index){
|
|
|
|
|
//发异步删除数据
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:url,
|
|
|
|
|
data:{id},
|
|
|
|
|
type:"Post",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
console.log('data');
|
|
|
|
|
const status = data.status;
|
|
|
|
|
const message = data.message;
|
|
|
|
|
if(!status){
|
|
|
|
|
console.log('yessss');
|
|
|
|
|
layer.msg(message,{icon: 6, time: 2000});
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
console.log('okkkk');
|
|
|
|
|
layer.msg(message,{icon: 5, time: 2000});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(data){
|
|
|
|
|
console.log('noooo');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//总缴费 code:流水号
|
|
|
|
|
function costTotal(obj,code){
|
|
|
|
|
const url = "<?php echo url('Payment/total'); ?>";
|
|
|
|
|
console.log(code);
|
|
|
|
|
layer.confirm('确认缴费?',function(index){
|
|
|
|
|
//发异步删除数据
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:url,
|
|
|
|
|
data:{code},
|
|
|
|
|
type:"Post",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
console.log('data');
|
|
|
|
|
const status = data.status;
|
|
|
|
|
const message = data.message;
|
|
|
|
|
if(!status){
|
|
|
|
|
console.log('yessss');
|
|
|
|
|
layer.msg(message,{icon: 6, time: 2000});
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
console.log('okkkk');
|
|
|
|
|
layer.msg(message,{icon: 5, time: 2000});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(data){
|
|
|
|
|
console.log('noooo');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//总领取 code:流水号
|
|
|
|
|
function getTotal(obj,code){
|
|
|
|
|
console.log(code);
|
|
|
|
|
const url = "<?php echo url('Payment/getTotal'); ?>";
|
|
|
|
|
layer.confirm('确认领取全部药品?',function(index){
|
|
|
|
|
//发异步删除数据
|
|
|
|
|
$.ajax({
|
|
|
|
|
url:url,
|
|
|
|
|
data:{code},
|
|
|
|
|
type:"Post",
|
|
|
|
|
dataType:"json",
|
|
|
|
|
success:function(data){
|
|
|
|
|
console.log('data');
|
|
|
|
|
const status = data.status;
|
|
|
|
|
const message = data.message;
|
|
|
|
|
if(!status){
|
|
|
|
|
console.log('yessss');
|
|
|
|
|
layer.msg(message,{icon: 6, time: 2000});
|
|
|
|
|
window.location.reload();
|
|
|
|
|
} else {
|
|
|
|
|
console.log('okkkk');
|
|
|
|
|
layer.msg(message,{icon: 5, time: 2000});
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
error:function(data){
|
|
|
|
|
console.log('noooo');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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>
|