Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
朱继来
/
后台订单管理
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
58007519
authored
Oct 12, 2018
by
叶明星
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
修复导出问题
parent
b0edff9f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
4 deletions
.idea/workspace.xml
app/Http/Controllers/ApiController.php
app/Model/PaymentDaysModel.php
public/js/PaymentDaysList.js
resources/views/PaymentDays/PaymentDaysList.blade.php
.idea/workspace.xml
View file @
58007519
This diff is collapsed.
Click to expand it.
app/Http/Controllers/ApiController.php
View file @
58007519
...
...
@@ -26,13 +26,13 @@ class ApiController extends Controller
}
}
private
function
ExportLayui
(
$errcode
=
0
,
$errmsg
=
0
,
$data
=
[],
$count
=
0
){
private
function
ExportLayui
(
$errcode
=
0
,
$errmsg
=
0
,
$data
=
[],
$count
=
0
,
$total
=
''
){
if
(
is_array
(
$errcode
)){
ErrorLog
(
$errcode
[
0
],
$errcode
[
1
]);
echo
json_encode
([
'code'
=>
$errcode
[
0
],
'msg'
=>
$errcode
[
1
],
'data'
=>
$errcode
[
2
],
'count'
=>
$errcode
[
3
]]);
echo
json_encode
([
'code'
=>
$errcode
[
0
],
'msg'
=>
$errcode
[
1
],
'data'
=>
$errcode
[
2
],
'count'
=>
$errcode
[
3
]
,
'total'
=>!
empty
(
$errcode
[
4
])
?
$errcode
[
4
]
:
''
]);
}
else
{
ErrorLog
(
$errcode
,
$errmsg
);
echo
json_encode
([
'code'
=>
$errcode
,
'msg'
=>
$errmsg
,
'data'
=>
$data
,
'count'
=>
$count
]);
echo
json_encode
([
'code'
=>
$errcode
,
'msg'
=>
$errmsg
,
'data'
=>
$data
,
'count'
=>
$count
,
'total'
=>
$total
]);
}
exit
();
}
...
...
app/Model/PaymentDaysModel.php
View file @
58007519
...
...
@@ -44,7 +44,7 @@ class PaymentDaysModel extends Model
});
})
->
export
(
'xls'
);
}
return
[
0
,
'成功'
,
$list
[
'data'
],
$list
[
'total'
]];
return
[
0
,
'成功'
,
$list
[
'data'
],
$list
[
'total'
]
,
$limit
];
}
public
function
AuthPaymentDays
(){
...
...
public/js/PaymentDaysList.js
View file @
58007519
...
...
@@ -35,6 +35,10 @@ layui.use(['table','form','laydate','layer'], function() {
,
page
:
{
// layout: ['prev', 'page', 'next', 'count', 'skip'] //自定义分页布局
}
,
done
:
function
(
res
,
curr
,
count
){
$
(
'input[name=limit]'
).
val
(
res
.
total
);
$
(
'input[name=p]'
).
val
(
curr
);
}
});
form
.
on
(
'submit(load)'
,
function
(
data
){
if
(
$
(
data
.
elem
).
data
(
'type'
)
==
'Export'
){
...
...
resources/views/PaymentDays/PaymentDaysList.blade.php
View file @
58007519
...
...
@@ -25,6 +25,8 @@
@endforeach
@endif
</div>
<input
type=
"hidden"
value=
"1"
name=
"p"
>
<input
type=
"hidden"
value=
"10"
name=
"limit"
>
<button
lay-submit
lay-filter=
"load"
class=
"layui-btn layui-btn-lg reload"
data-type=
"reload"
>
搜索
</button>
<button
lay-submit
lay-filter=
"load"
data-type=
"Export"
class=
"layui-btn float-r"
type=
"submit"
><i
class=
"layui-icon"
>

</i>
导出
</button>
</div>
...
...
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