Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
inclass-partners
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
趣选课
inclass-partners
Commits
0b59cc72
Commit
0b59cc72
authored
Jun 10, 2020
by
lvxiaowu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
excel
parent
6e755f68
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
11 deletions
+32
-11
index.tsx
src/pages/exchangeCode/index.tsx
+5
-3
index.tsx
src/pages/generateCode/index.tsx
+8
-3
index.tsx
src/pages/orderList/index.tsx
+4
-5
list.tsx
src/pages/orderList/list.tsx
+15
-0
No files found.
src/pages/exchangeCode/index.tsx
View file @
0b59cc72
...
...
@@ -39,14 +39,16 @@ const ExchangeCode: React.FC = () => {
};
const
download
=
()
=>
{
api
(
'/
yizhi_server/api/account/analyse/download
'
,
{
api
(
'/
51business/api/course/back/export/redeem
'
,
{
type
:
'GET'
,
data
:
{
product
:
'JSON.stringify(info.product)'
class_name
:
class_name
,
limit
:
limit
,
page
:
page
},
responseType
:
'arrayBuffer'
}).
then
(
r
=>
{
excelFn
(
r
,
`
分析明细
`
);
excelFn
(
r
,
`
兑换码列表
`
);
});
};
...
...
src/pages/generateCode/index.tsx
View file @
0b59cc72
...
...
@@ -15,7 +15,7 @@ const tailLayout = {
const
GenerateCode
:
React
.
FC
=
()
=>
{
const
[
courseData
,
set_courseData
]
=
useState
([]);
const
[
classData
,
set_classData
]
=
useState
([]);
const
[
classData
,
set_classData
]
=
useState
([]
as
any
[]
);
const
[
institution_name
,
set_institutionName
]
=
useState
(
''
);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -50,8 +50,13 @@ const GenerateCode: React.FC = () => {
const
onChange
=
(
val
:
any
)
=>
{
form
.
resetFields
([
'class_id'
]);
let
d
:
any
=
courseData
[
val
-
1
];
set_classData
((
d
&&
d
.
class
)
||
[]);
let
d
:
any
[]
=
[];
courseData
.
map
((
item
:
any
)
=>
{
if
(
item
.
id
===
val
)
{
d
=
item
.
class
;
}
});
set_classData
(
d
);
};
const
onSearch
=
(
val
:
string
)
=>
{
getClassData
(
val
);
...
...
src/pages/orderList/index.tsx
View file @
0b59cc72
...
...
@@ -87,18 +87,17 @@ const OrderList: React.FC = () => {
};
const
download
=
()
=>
{
api
(
'/
yizhi_server/api/account/analyse/download
'
,
{
api
(
'/
51business/api/course/back/export/order
'
,
{
type
:
'GET'
,
data
:
{
class_name
,
user_name
,
start_time
,
end_time
,
product
:
'JSON.stringify(info.product)'
start_time
:
start_time
?
start_time
+
' 00:00:00'
:
''
,
end_time
:
end_time
?
end_time
+
' 23:59:59'
:
''
},
responseType
:
'arrayBuffer'
}).
then
(
r
=>
{
excelFn
(
r
,
`
分析明细
${
start_time
}
_
${
end_time
}
`
);
excelFn
(
r
,
`
购买订单列表
${
start_time
}
_
${
end_time
}
`
);
});
};
...
...
src/pages/orderList/list.tsx
View file @
0b59cc72
...
...
@@ -8,6 +8,8 @@ interface DeatilI {
class_name
:
string
|
number
;
address
:
()
=>
{};
pay
:
string
|
number
;
redeem
:
string
|
number
;
type
:
string
|
number
;
pay_time
:
string
;
}
...
...
@@ -68,6 +70,19 @@ const columns = [
}
},
{
title
:
'支付方式'
,
dataIndex
:
'type'
,
key
:
'type'
,
render
:
(
row
:
any
)
=>
{
return
<
span
>
{
row
===
1
?
'微信'
:
'兑换码'
}
</
span
>;
}
},
{
title
:
'兑换码'
,
dataIndex
:
'redeem'
,
key
:
'redeem'
},
{
title
:
'付款金额(元)'
,
dataIndex
:
'pay'
,
key
:
'pay'
...
...
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