Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
67a2193a
Commit
67a2193a
authored
Sep 28, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
税费列表导出excel
parent
7e3e923d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
9 deletions
+29
-9
Finance.php
application/index/controller/Finance.php
+29
-9
No files found.
application/index/controller/Finance.php
View file @
67a2193a
...
...
@@ -1159,7 +1159,7 @@ class Finance extends Basic
*/
public
function
getTallAgeList
()
{
if
(
!
$this
->
request
->
isAjax
())
{
if
(
!
$this
->
request
->
isAjax
()
&&
(
$this
->
params
[
'excel'
]
!=
1
)
)
{
return
view
(
'tax'
);
}
...
...
@@ -1170,8 +1170,6 @@ class Finance extends Basic
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$fields
=
'a.id,a.operation_date,e.name,e.phone,a.fee,b.house_number,d.internal_address,a.agent_id,b.father_id,b.id as bargain_id,b.order_id'
;
$where
[
'c.is_del'
]
=
0
;
$where
[
'b.status'
]
=
[
'in'
,
[
10
,
11
,
13
]
];
//10已提交 11审核成功
$where
[
'a.father_id'
]
=
[
'neq'
,
0
];
...
...
@@ -1180,11 +1178,11 @@ class Finance extends Basic
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'a.operation_date'
]
=
[
'< time'
,
$this
->
params
[
'
create
_time'
]
.
' 23:59:59'
];
$where
[
'a.operation_date'
]
=
[
'< time'
,
$this
->
params
[
'
end
_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'a.operation_date'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'
create
_time'
]
.
' 23:59:59'
]
];
$where
[
'a.operation_date'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'
end
_time'
]
.
' 23:59:59'
]
];
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
...
...
@@ -1204,11 +1202,33 @@ class Finance extends Basic
}
$m_fee
=
new
OTaxes
();
$data
[
'data'
][
'list'
]
=
$m_fee
->
getTaxesList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
$data
[
'data'
][
'total'
]
=
$m_fee
->
getTaxesListTotal
(
$where
);
$data
[
'data'
][
'total_fee'
]
=
$m_fee
->
getTaxesListTotalFee
(
$where
);
$fields
=
'a.id,a.operation_date,e.name,e.phone,a.fee,b.house_number,d.internal_address,a.agent_id,b.father_id,b.id as bargain_id,b.order_id'
;
if
(
$this
->
params
[
'excel'
]
!=
1
)
{
$data
[
'data'
][
'list'
]
=
$m_fee
->
getTaxesList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$fields
,
$where
);
$data
[
'data'
][
'total'
]
=
$m_fee
->
getTaxesListTotal
(
$where
);
$data
[
'data'
][
'total_fee'
]
=
$m_fee
->
getTaxesListTotalFee
(
$where
);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
else
{
$data
[
'data'
]
=
$m_fee
->
getTaxesList
(
$pageNo
,
50000
,
'a.id desc'
,
$fields
,
$where
);
if
(
count
(
$data
[
'data'
])
>
0
)
{
$excel_data
=
[];
foreach
(
$data
[
'data'
]
as
$k
=>
$v
)
{
$excel_data
[
$k
][
'bargain_id'
]
=
$v
[
'bargain_id'
];
$excel_data
[
$k
][
'operation_date'
]
=
$v
[
'operation_date'
];
$excel_data
[
$k
][
'district_store'
]
=
$v
[
'district_store'
];
$excel_data
[
$k
][
'name'
]
=
$v
[
'name'
];
$excel_data
[
$k
][
'internal_address'
]
=
$v
[
'internal_address'
];
$excel_data
[
$k
][
'house_number'
]
=
$v
[
'house_number'
];
$excel_data
[
$k
][
'fee'
]
=
$v
[
'fee'
];
}
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
$export
=
new
ExportExcelUntil
();
$title
=
[
'成交报告ID'
,
'开票日期'
,
'所属部门/门店'
,
'业务员'
,
'商铺地址'
,
'商铺号'
,
'税费(元)'
];
$export
->
exportTable
(
'税费明细'
,
$excel_data
,
7
,
'税费明细'
,
$title
);
}
else
{
return
$this
->
response
(
101
,
'数据为空'
);
}
}
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment