提交 20f92a91 authored 作者: chengye's avatar chengye

test

上级 244a73b7
...@@ -28,11 +28,11 @@ class EmPayment extends Base ...@@ -28,11 +28,11 @@ class EmPayment extends Base
->field('epi.invoice_id') ->field('epi.invoice_id')
->field('em.em_numb') ->field('em.em_numb')
->field('r.region_name,station.station_name') ->field('r.region_name,station.station_name')
->join(['em_account'=>'ea'],'ea.account_id=pay.account_id') ->rightJoin(['em_account'=>'ea'],'ea.account_id=pay.account_id')
->join(['em_payment_invoice'=>'epi'],'epi.payment_id = pay.payment_id') ->rightJoin(['em_payment_invoice'=>'epi'],'epi.payment_id = pay.payment_id')
->join(['em'],'em.id=ea.em_id') ->rightJoin(['em'],'em.id=ea.em_id')
->join(['station_info'=>'station'],'station.station_id=em.station_id') ->rightJoin(['station_info'=>'station'],'station.station_id=em.station_id')
->join(['region'=>'r'],'station.area_id = r.id') ->rightJoin(['region'=>'r'],'station.area_id = r.id')
->where($map) ->where($map)
->order('pay.id desc') ->order('pay.id desc')
->page($Nowpage, $limits) ->page($Nowpage, $limits)
......
{extend name="public:base" /}
{block name="body"}
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<form class="layui-form">
<!--缴费-->
<div class="layui-form-box">
<div class="layui-form-head">
<div class="layui-form-item">
<label class="layui-form-label">
填写缴费信息
</label>
</div>
</div>
<div class="layui-form-body">
<div class="layui-row">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费金额:
</label>
<div class="layui-input-inline">
<input type="text" name="amount" id="paid_totle"
class="layui-input no-border" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费员:
</label>
<div class="layui-input-inline">
<select name="staff_id">
{foreach $staffs as $u}
<option value="{$u['id']}"}>{$u['name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费凭证:
</label>
<div class="layui-input-inline">
<a class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="showCert" οnclick="return false;">查看</a>
<button class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="addCert" οnclick="return false;"><i class="layui-icon layui-icon-add-circle-fine"></i></button>
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
发票凭证:
</label>
<div class="layui-input-inline">
<a class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="showReceipt" οnclick="return false;">查看</a>
<button class="layui-btn layui-btn-normal layui-right" lay-submit lay-filter="addReceipt" οnclick="return false;"><i class="layui-icon layui-icon-add-circle-fine"></i></button>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-col-md-offset4">
<button class="layui-btn" lay-filter="save" lay-submit="">保存</button>
</div>
</div>
</div>
<!--缴费结束-->
</form>
</div>
</div>
</div>
</div>
{/block}
{block name="js"}
<script>
//限制输入长度
function sliceDom(dom,len){
if(dom.value.length>len)
return dom.value = dom.value.slice(0,len)
}
//初始化Layui控件
layui.use(['form', 'layer', 'laydate', 'upload'],
function () {
$ = layui.jquery;
var form = layui.form,
layer = layui.layer,
laydate = layui.laydate,
upload = layui.upload;
//消息提示
function layMsg(msg,type=6,time=1000){
layer.msg(msg,{
icon: type,
time: time,
});
}
form.on('submit(submit)',
function (data) {
$.ajax({
url: '/payment/update',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//保存信息
form.on('submit(save)',
function (data) {
$.ajax({
url: '/payment/save',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//上传电表照片
var upPhoto = upload.render({
elem: '#up_photo' ,
url: '/up_photo',
field: 'cp_photo',
done: function (res) {
if(res.status == 1){
layMsg(res.message)
//将电表照片的ID填写
var $photoId = $("input[name='photo_id']")
$photoId.val(res.data.id)
var $a = $photoId.next('a');
$a.removeClass('layui-hide')
$a.attr('href',res.data.src);
}
else {
layMsg(res.message,5)
return;
}
}
});
});
</script>
{/block}
\ No newline at end of file
{extend name="public:base" /}
{block name="body"}
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-card">
<div class="layui-card-body">
<form class="layui-form">
<!--缴费-->
<div class="layui-form-box">
<div class="layui-form-head">
<div class="layui-form-item">
<label class="layui-form-label">
缴费详情
</label>
</div>
</div>
<div class="layui-form-body">
<div class="layui-row">
<input type="hidden" name="em_id" value="{$em.id}">
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
电表号:
</label>
<div class="layui-input-inline">
<input type="text" name="em_numb" autocomplete="off"
class="layui-input no-border" value="{$em.em_numb}" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费单号:
</label>
<div class="layui-input-inline">
<input type="text" name="payment_id" autocomplete="off"
class="layui-input no-border" value="{$payment.payment_id}" disabled="disabled">
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费金额:
</label>
<div class="layui-input-inline">
<input type="text" name="amount" id="amount"
class="layui-input" >
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费日期:
</label>
<div class="layui-input-inline">
<input type="text" name="pay_date" id="pay_date"
class="layui-input" >
</div>
</div>
</div>
<div class="layui-col-md5">
<div class="layui-form-item">
<label class="layui-form-label layui-text-left">
缴费员:
</label>
<div class="layui-input-inline">
<select name="staff_id">
{foreach $staffs as $u}
<option value="{$u['id']}"}>{$u['name']}</option>
{/foreach}
</select>
</div>
</div>
</div>
</div>
<div class="layui-form-item layui-col-md-offset4">
<button class="layui-btn" lay-filter="save" lay-submit="">
保存
</button>
</div>
</div>
</div>
<!--缴费结束-->
</form>
</div>
</div>
</div>
</div>
{/block}
{block name="js"}
<script>
//限制输入长度
function sliceDom(dom,len){
if(dom.value.length>len)
return dom.value = dom.value.slice(0,len)
}
//初始化Layui控件
layui.use(['form', 'layer', 'laydate', 'upload'],
function () {
$ = layui.jquery;
var form = layui.form,
layer = layui.layer,
laydate = layui.laydate,
upload = layui.upload;
//消息提示
function layMsg(msg,type=6,time=1000){
layer.msg(msg,{
icon: type,
time: time,
});
}
laydate.render({
elem:'#pay_date',
trigger:'click',
})
//审核通过
form.on('submit(save)',
function (data) {
$.ajax({
url: '/payment/save',
method: "POST",
data: data.field,
dataType: "json",
success: function (data) {
if (data.status == 1) {
layer.msg(data.message,{icon: 6,time: 1000})
} else {
layer.msg(data.message,{icon: 5,time: 1000 })
}
}
});
return false;
});
//上传电表照片
var upPhoto = upload.render({
elem: '#up_photo' ,
url: '/up_photo',
field: 'cp_photo',
done: function (res) {
if(res.status == 1){
layMsg(res.message)
//将电表照片的ID填写
var $photoId = $("input[name='photo_id']")
$photoId.val(res.data.id)
var $a = $photoId.next('a');
$a.removeClass('layui-hide')
$a.attr('href',res.data.src);
}
else {
layMsg(res.message,5)
return;
}
}
});
});
</script>
{/block}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论