提交 fe012fab authored 作者: chengye's avatar chengye

test

上级 6c76226a
......@@ -297,13 +297,19 @@ class Payment extends Base
$this->assign('receipts',$receipts);
$account = (new EmAccount())->get(['account_id'=>$payment->account_id]);
$em = (new \app\em\model\Em())->field('em_type_id')->get(['id'=>$account->em_id]);
if($em->em_type_id == 2 || $em->em_type_id == 4){
$this->assign('em',$em);
$this->assign('account',$account);
if($account){
$em = (new \app\em\model\Em())->field('em_type_id')->get(['id'=>$account->em_id]);
if($em->em_type_id == 2 || $em->em_type_id == 4){
$this->assign('em',$em);
$this->assign('account',$account);
}
} else {
$this->assign('em',[]);
$this->assign('account',[]);
}
return $this->fetch();
}
......
......@@ -99,7 +99,7 @@
<div class="layui-text-left">
<button title="抄表" class="layui-btn layui-btn-sm" lay-filter="check" lay-submit="" data-id="{{d.id}}">抄表</button>
{{# if(d.em_type_id == 2 || d.em_type_id == 4){ }}
<a href="/payment/pay/{{d.id}}" class="layui-btn layui-btn-sm">缴费</a>
<a href="/payment/pay/{{d.id}}" class="layui-btn layui-btn-sm">充值</a>
{{# } }}
<a title="编辑" class="layui-btn layui-btn-sm" href="/em_edit/{{d.id}}">
编辑
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论