完善发票管理
This commit is contained in:
parent
783ef2c10d
commit
f95867244c
@ -58,12 +58,16 @@ class Income extends BaseController
|
|||||||
if (request()->isAjax()) {
|
if (request()->isAjax()) {
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
$where = [];
|
$where = [];
|
||||||
$where[] = ['status', 'in', [3,4,5]];
|
$where[] = ['status', '=', 1];
|
||||||
|
$where[] = ['invoice_status', '=', 3];
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0;
|
$start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0;
|
||||||
$end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0;
|
$end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'])) : 0;
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
if ($start_time > 0 && $end_time > 0) {
|
||||||
$where[] = ['expense_time', 'between', [$start_time, $end_time]];
|
$where[] = ['enter_time', 'between', [$start_time, $end_time]];
|
||||||
|
}
|
||||||
|
if (isset($param['is_cash']) && $param['is_cash']!='') {
|
||||||
|
$where[] = ['is_cash', '=', $param['is_cash']];
|
||||||
}
|
}
|
||||||
$invoice = $this->get_list($param, $where);
|
$invoice = $this->get_list($param, $where);
|
||||||
return table_assign(0, '', $invoice);
|
return table_assign(0, '', $invoice);
|
||||||
|
@ -2,6 +2,26 @@
|
|||||||
<!-- 主体 -->
|
<!-- 主体 -->
|
||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="body-content">
|
<div class="body-content">
|
||||||
|
<form class="layui-form">
|
||||||
|
<div id="barDate" class="layui-input-inline">
|
||||||
|
<div class="layui-input-inline" style="width:110px;">
|
||||||
|
<input type="text" class="layui-input" id="start_time" placeholder="选择时间区间" readonly name="start_time">
|
||||||
|
</div>
|
||||||
|
~
|
||||||
|
<div class="layui-input-inline" style="width:110px;">
|
||||||
|
<input type="text" class="layui-input" id="end_time" placeholder="选择时间区间" readonly name="end_time">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select name="is_cash">
|
||||||
|
<option value="">请选择状态</option>
|
||||||
|
<option value="0">未到账</option>
|
||||||
|
<option value="1">部分到账</option>
|
||||||
|
<option value="2">全部到账</option>
|
||||||
|
</select>
|
||||||
|
</div>
|
||||||
|
<button class="layui-btn layui-btn-danger" lay-submit="" lay-filter="webform">提交搜索</button>
|
||||||
|
</form>
|
||||||
<table class="layui-hide" id="test" lay-filter="test"></table>
|
<table class="layui-hide" id="test" lay-filter="test"></table>
|
||||||
</div>
|
</div>
|
||||||
{/block}
|
{/block}
|
||||||
@ -13,7 +33,20 @@
|
|||||||
function init(layui) {
|
function init(layui) {
|
||||||
var table = layui.table,
|
var table = layui.table,
|
||||||
rightpage = layui.rightpage,
|
rightpage = layui.rightpage,
|
||||||
form = layui.form;
|
form = layui.form,
|
||||||
|
laydate = layui.laydate;
|
||||||
|
//日期范围
|
||||||
|
laydate.render({
|
||||||
|
elem: '#barDate',
|
||||||
|
range: ['#start_time', '#end_time']
|
||||||
|
});
|
||||||
|
|
||||||
|
//监听搜索提交
|
||||||
|
form.on('submit(webform)', function(data){
|
||||||
|
let f=data.field;
|
||||||
|
tableIns.reload({where:{is_cash:f.is_cash,start_time:f.start_time,end_time:f.end_time},page:{curr:1}});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
|
||||||
var tableIns = table.render({
|
var tableIns = table.render({
|
||||||
elem: '#test',
|
elem: '#test',
|
||||||
@ -30,13 +63,8 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 80
|
width: 80
|
||||||
},{
|
},{
|
||||||
field: 'status',
|
|
||||||
title: '到账状态',
|
|
||||||
align: 'center',
|
|
||||||
width: 100,
|
|
||||||
{
|
|
||||||
field: 'is_cash',
|
field: 'is_cash',
|
||||||
title: '审核状态',
|
title: '到账状态',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: 100,
|
width: 100,
|
||||||
templet:function(d){
|
templet:function(d){
|
||||||
@ -49,16 +77,30 @@
|
|||||||
}
|
}
|
||||||
return html;
|
return html;
|
||||||
}
|
}
|
||||||
},
|
|
||||||
},{
|
},{
|
||||||
field: 'enter_amount',
|
field: 'enter_amount',
|
||||||
title: '到账金额(元)',
|
title: '到账金额(元)',
|
||||||
align: 'right',
|
align: 'right',
|
||||||
width: 120,
|
width: 120,
|
||||||
|
},{
|
||||||
|
field: 'check_time',
|
||||||
|
title: '最新到账时间',
|
||||||
|
align: 'center',
|
||||||
|
width: 150
|
||||||
}, {
|
}, {
|
||||||
field: 'invoice_title',
|
field: 'invoice_title',
|
||||||
title: '发票抬头',
|
title: '发票抬头',
|
||||||
width: 240,
|
width: 300,
|
||||||
|
templet:function(d){
|
||||||
|
var html='';
|
||||||
|
if(d.type==1){
|
||||||
|
html='<span class="layui-badge layui-bg-blue">企业</span> '+d.invoice_title;
|
||||||
|
}
|
||||||
|
else if(d.type==2){
|
||||||
|
html='<span class="layui-badge layui-bg-green">个人</span> '+d.invoice_title;
|
||||||
|
}
|
||||||
|
return html;
|
||||||
|
}
|
||||||
},{
|
},{
|
||||||
field: 'amount',
|
field: 'amount',
|
||||||
title: '发票金额(元)',
|
title: '发票金额(元)',
|
||||||
@ -95,36 +137,21 @@
|
|||||||
align: 'center',
|
align: 'center',
|
||||||
width: 150
|
width: 150
|
||||||
},{
|
},{
|
||||||
field: 'check_name',
|
field: 'code',
|
||||||
title: '审核人',
|
|
||||||
align: 'center',
|
|
||||||
width: 90
|
|
||||||
},{
|
|
||||||
field: 'check_time',
|
|
||||||
title: '审核时间',
|
|
||||||
align: 'center',
|
|
||||||
width: 136
|
|
||||||
},{
|
|
||||||
field: 'pay_name',
|
|
||||||
title: '开票人',
|
|
||||||
align: 'center',
|
|
||||||
width: 90
|
|
||||||
},{
|
|
||||||
field: 'pay_time',
|
|
||||||
title: '开票时间',
|
|
||||||
align: 'center',
|
|
||||||
width: 136
|
|
||||||
},{
|
|
||||||
field: 'pay_time',
|
|
||||||
title: '发票号码',
|
title: '发票号码',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
width: 150
|
||||||
|
},{
|
||||||
|
field: 'open_time',
|
||||||
|
title: '开票时间',
|
||||||
|
align: 'center',
|
||||||
width: 136
|
width: 136
|
||||||
}, {
|
}, {
|
||||||
field: 'right',
|
field: 'right',
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 60,
|
width: 80,
|
||||||
align: 'right',
|
align: 'center',
|
||||||
templet:function(d){
|
templet:function(d){
|
||||||
var html='<span class="layui-btn layui-btn-normal layui-btn-xs" lay-event="view">详情</span>';
|
var html='<span class="layui-btn layui-btn-normal layui-btn-xs" lay-event="view">详情</span>';
|
||||||
return html;
|
return html;
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
}, {
|
}, {
|
||||||
field: 'invoice_title',
|
field: 'invoice_title',
|
||||||
title: '开票抬头',
|
title: '开票抬头',
|
||||||
width: 260,
|
width: 300,
|
||||||
templet:function(d){
|
templet:function(d){
|
||||||
var html='';
|
var html='';
|
||||||
if(d.type==1){
|
if(d.type==1){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user