118 lines
3.1 KiB
HTML
118 lines
3.1 KiB
HTML
{extend name="../../base/view/common/base" /}
|
|
<!-- 主体 -->
|
|
{block name="body"}
|
|
<div class="p-page">
|
|
<form class="layui-form gg-form-bar border-x border-t" id="barsearchform">
|
|
<div class="layui-input-inline" style="width:175px;">
|
|
<input type="text" class="layui-input" id="diff_time" placeholder="选择回款时间区间" readonly name="diff_time">
|
|
</div>
|
|
<div class="layui-input-inline" style="width:150px">
|
|
<input type="hidden" name="tab" value="0"/>
|
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="table-search"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
|
<button type="reset" class="layui-btn layui-btn-reset" lay-filter="table-reset">清空</button>
|
|
</div>
|
|
</form>
|
|
<table class="layui-hide" id="test" lay-filter="test"></table>
|
|
</div>
|
|
<script type="text/html" id="toolbarDemo">
|
|
<div class="layui-btn-container">
|
|
<h3 class="h3-title" style="height:32px;">回款列表</h3>
|
|
</div>
|
|
</script>
|
|
{/block}
|
|
<!-- /主体 -->
|
|
|
|
<!-- 脚本 -->
|
|
{block name="script"}
|
|
<script>
|
|
const moduleInit = ['tool','tablePlus','laydatePlus'];
|
|
function gouguInit() {
|
|
var table = layui.tablePlus, tool = layui.tool, laydatePlus = layui.laydatePlus, element = layui.element;
|
|
//tab切换
|
|
element.on('tab(tab)', function(data){
|
|
$('[name="tab"]').val(data.index);
|
|
$("#barsearchform")[0].reset();
|
|
layui.pageTable.reload({where:{tab:data.index},page:{curr:1}});
|
|
return false;
|
|
});
|
|
|
|
//日期范围
|
|
var diff_time = new laydatePlus({'target':'diff_time'});
|
|
layui.pageTable = table.render({
|
|
elem: "#test"
|
|
,toolbar: "#toolbarDemo"
|
|
,url: "/finance/income/record"
|
|
,page: true
|
|
,limit: 20
|
|
,cellMinWidth: 80
|
|
,height: 'full-114'
|
|
,cellMinWidth: 80
|
|
,page: true //开启分页
|
|
,limit: 20
|
|
,totalRow: true
|
|
,cols: [
|
|
[
|
|
{
|
|
field: 'id',
|
|
title: 'ID号',
|
|
align: 'center',
|
|
width: 80,
|
|
totalRowText: '<div style="text-align:right">合计</div>'
|
|
},{
|
|
field: 'amount',
|
|
title: '回款金额(元)',
|
|
style: 'color:#16b777',
|
|
align: 'right',
|
|
width: 120,
|
|
totalRow: function (d) {return d.TOTAL_ROW.amount}
|
|
},{
|
|
field: 'enter_time',
|
|
title: '回款时间',
|
|
align: 'center',
|
|
width: 110
|
|
},{
|
|
field: 'remarks',
|
|
title: '回款备注'
|
|
},{
|
|
field: 'admin_name',
|
|
title: '登记人',
|
|
align: 'center',
|
|
width: 90
|
|
},{
|
|
field: 'create_time',
|
|
title: '登记时间',
|
|
align: 'center',
|
|
width: 150
|
|
},{
|
|
field: 'code',
|
|
title: '关联发票号',
|
|
align: 'center',
|
|
width: 150
|
|
},{
|
|
field: 'right',
|
|
fixed: 'right',
|
|
title: '操作',
|
|
width: 90,
|
|
align: 'center',
|
|
templet:function(d){
|
|
var html='<span class="layui-btn layui-btn-normal layui-btn-xs" lay-event="view">回款详情</span>';
|
|
return html;
|
|
}
|
|
}
|
|
]
|
|
]
|
|
});
|
|
|
|
//监听行工具事件
|
|
table.on('tool(test)', function(obj) {
|
|
var data = obj.data;
|
|
if (obj.event === 'view') {
|
|
tool.side("/finance/income/view?id="+data.invoice_id);
|
|
return;
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
{/block}
|
|
<!-- /脚本 -->
|