|
|
<!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="__ADMIN__/x-admin/css/font.css">
|
|
|
<link rel="stylesheet" href="__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="__ADMIN__/x-admin/lib/layui/layui.js" charset="utf-8"></script>
|
|
|
<script type="text/javascript" src="__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="{:url('check','','')}";
|
|
|
</script>
|
|
|
</head>
|
|
|
|
|
|
<body class="layui-anim layui-anim-up">
|
|
|
<div class="x-nav">
|
|
|
<span class="layui-breadcrumb">
|
|
|
<a href='{: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="{:url('index')}">
|
|
|
<input class="layui-input" name="code" placeholder="请输入流水号" value="{$code}">
|
|
|
<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon"></i></button>
|
|
|
</form>
|
|
|
</div>
|
|
|
|
|
|
|
|
|
{if condition="$check == 1"}
|
|
|
<xblock>
|
|
|
<span class="x-right" style="line-height:40px">共有数据:{$total} 条</span>
|
|
|
<div style="clear:both;"></div>
|
|
|
</xblock>
|
|
|
<table class="layui-table">
|
|
|
<tr>
|
|
|
<td style="background-color: #99CCCC" width="100">姓名</td>
|
|
|
<td>{$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>
|
|
|
{foreach name='$medicals' item='v'}
|
|
|
<tr>
|
|
|
<td>{$v.drugsName}</td>
|
|
|
<td>{$v.quantity}</td>
|
|
|
<td>{$v.price}</td>
|
|
|
<td>{$v.status}</td>
|
|
|
<td>{$v.type}</td>
|
|
|
<td>
|
|
|
<button class="layui-btn layui-btn-xs" onclick="cost(this,'{$v.id}')" href="javascript:;">缴费</button>
|
|
|
<button class="layui-btn layui-btn-xs" onclick="getMedical(this,'{$v.id}')" href="javascript:;">取药</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
{/foreach}
|
|
|
</tbody>
|
|
|
</table>
|
|
|
|
|
|
<table class="layui-table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<td width="100">总费用: {$totalPrice}</td>
|
|
|
<td width="180">是否缴费: {$totalStatus}</td>
|
|
|
<td width="180">是否取药: {$totalType}</td>
|
|
|
<td width="140">
|
|
|
<button class="layui-btn layui-btn-sm" onclick="costTotal(this,'{$code}')" href="javascript:;">总缴费</button>
|
|
|
<button class="layui-btn layui-btn-sm" onclick="getTotal(this,'{$code}')" href="javascript:;">总取药</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
</table>
|
|
|
<div class="page">
|
|
|
<div>
|
|
|
{$page}
|
|
|
</div>
|
|
|
</div>
|
|
|
{/if}
|
|
|
|
|
|
{if condition="$check == 2"}
|
|
|
<xblock>
|
|
|
<span class="x-right" style="line-height:40px">暂无数据,未有药单</span>
|
|
|
<div style="clear:both;"></div>
|
|
|
</xblock>
|
|
|
{/if}
|
|
|
|
|
|
|
|
|
|
|
|
{if condition="$check == 0"}
|
|
|
<xblock>
|
|
|
<span class="x-right" style="line-height:40px">共有数据:{$total} 条</span>
|
|
|
<div style="clear:both;"></div>
|
|
|
</xblock>
|
|
|
<table class="layui-table">
|
|
|
<thead>
|
|
|
<tr>
|
|
|
<td width="140">姓名</td>
|
|
|
<td width="140">就诊日期</td>
|
|
|
<td width="140">流水号</td>
|
|
|
<td width="140">操作</td>
|
|
|
</tr>
|
|
|
</tr>
|
|
|
</thead>
|
|
|
<tbody>
|
|
|
{foreach name='$patientInfo' item='v'}
|
|
|
<tr>
|
|
|
<td>{$v.name}</td>
|
|
|
<td>{$v.date | date='Y-m-d H:i:s',###}</td>
|
|
|
<td>{$v.code}</td>
|
|
|
<td>
|
|
|
<button class="layui-btn layui-btn-xs" onclick="x_admin_show('查看'+'{$v.name}'+'缴费',checkUrl+'/code/{$v.code}',800,500)" href="javascript:;">查看</button>
|
|
|
</td>
|
|
|
</tr>
|
|
|
{/foreach}
|
|
|
</tbody>
|
|
|
</table>
|
|
|
<div class="page">
|
|
|
<div>
|
|
|
{$page}
|
|
|
</div>
|
|
|
</div>
|
|
|
{/if}
|
|
|
</div>
|
|
|
|
|
|
<script>
|
|
|
//单个缴费 id:患者药单的id
|
|
|
function cost(obj,id){
|
|
|
const url = "{: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 = "{: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 = "{: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 = "{: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>
|