From f95867244cbc08009bfab0109ec2a351143fe1e6 Mon Sep 17 00:00:00 2001 From: hdm Date: Wed, 24 Nov 2021 23:30:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=8F=91=E7=A5=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/home/controller/Income.php | 8 ++- app/home/view/income/index.html | 91 +++++++++++++++++++++----------- app/home/view/invoice/index.html | 2 +- 3 files changed, 66 insertions(+), 35 deletions(-) diff --git a/app/home/controller/Income.php b/app/home/controller/Income.php index 3c70e12..19d475e 100644 --- a/app/home/controller/Income.php +++ b/app/home/controller/Income.php @@ -58,12 +58,16 @@ class Income extends BaseController if (request()->isAjax()) { $param = get_params(); $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; $end_time = isset($param['end_time']) ? strtotime(urldecode($param['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); return table_assign(0, '', $invoice); diff --git a/app/home/view/income/index.html b/app/home/view/income/index.html index c5fe860..c3c924d 100644 --- a/app/home/view/income/index.html +++ b/app/home/view/income/index.html @@ -2,6 +2,26 @@ {block name="body"}
+
+
+
+ +
+ ~ +
+ +
+
+
+ +
+ +
{/block} @@ -13,7 +33,20 @@ function init(layui) { var table = layui.table, 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({ elem: '#test', @@ -30,13 +63,8 @@ align: 'center', width: 80 },{ - field: 'status', - title: '到账状态', - align: 'center', - width: 100, - { field: 'is_cash', - title: '审核状态', + title: '到账状态', align: 'center', width: 100, templet:function(d){ @@ -49,16 +77,30 @@ } return html; } - }, },{ field: 'enter_amount', title: '到账金额(元)', align: 'right', width: 120, + },{ + field: 'check_time', + title: '最新到账时间', + align: 'center', + width: 150 }, { field: 'invoice_title', title: '发票抬头', - width: 240, + width: 300, + templet:function(d){ + var html=''; + if(d.type==1){ + html='企业 '+d.invoice_title; + } + else if(d.type==2){ + html='个人 '+d.invoice_title; + } + return html; + } },{ field: 'amount', title: '发票金额(元)', @@ -95,36 +137,21 @@ align: 'center', width: 150 },{ - field: 'check_name', - 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', + field: 'code', title: '发票号码', align: 'center', + width: 150 + },{ + field: 'open_time', + title: '开票时间', + align: 'center', width: 136 }, { field: 'right', fixed: 'right', title: '操作', - width: 60, - align: 'right', + width: 80, + align: 'center', templet:function(d){ var html='详情'; return html; diff --git a/app/home/view/invoice/index.html b/app/home/view/invoice/index.html index 7f59df0..0a710d0 100644 --- a/app/home/view/invoice/index.html +++ b/app/home/view/invoice/index.html @@ -72,7 +72,7 @@ }, { field: 'invoice_title', title: '开票抬头', - width: 260, + width: 300, templet:function(d){ var html=''; if(d.type==1){