Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform-ui
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform-ui
Commits
8b1a8355
Commit
8b1a8355
authored
Sep 30, 2019
by
guoyou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员订单统计
parent
8f0e59c8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
92 additions
and
43 deletions
+92
-43
rentVehicle.js
src/api/order/rentVehicle.js
+20
-1
index.vue
src/views/order/createOrder/index.vue
+7
-5
index.vue
src/views/order/orderStatistics/index.vue
+65
-37
No files found.
src/api/order/rentVehicle.js
View file @
8b1a8355
...
@@ -97,3 +97,22 @@ export function calculate(no, params) {
...
@@ -97,3 +97,22 @@ export function calculate(no, params) {
data
:
params
data
:
params
});
});
}
}
//创建订单
export
function
orderStatistics
(
params
)
{
return
fetch
({
url
:
'api/order/orderStatistics/order'
,
method
:
'post'
,
data
:
params
});
}
//订单下载
export
function
downloadExcel
(
params
)
{
return
fetch
({
url
:
'/api/order/orderStatistics/excel'
,
method
:
'post'
,
data
:
params
,
responseType
:
'blob'
});
}
src/views/order/createOrder/index.vue
View file @
8b1a8355
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
value-format=
"timestamp"
value-format=
"timestamp"
@
change=
"changeTime"
@
change=
"changeTime"
:picker-options=
"pickerOptions"
:picker-options=
"pickerOptions"
></el-date-picker>
>
>
</el-date-picker>
<el-button
<el-button
class=
"filter-item"
class=
"filter-item"
...
@@ -106,7 +106,8 @@ export default {
...
@@ -106,7 +106,8 @@ export default {
return
{
return
{
pickerOptions
:
{
pickerOptions
:
{
disabledDate
(
time
)
{
disabledDate
(
time
)
{
return
time
.
getTime
()
<
Date
.
now
();
// console.log(Date.now());
return
time
.
getTime
()
<
Date
.
now
()
-
24
*
60
*
60
*
1000
;
}
}
},
},
appUserId
:
null
,
appUserId
:
null
,
...
@@ -281,6 +282,7 @@ export default {
...
@@ -281,6 +282,7 @@ export default {
damageSafe
:
""
,
damageSafe
:
""
,
rentFreeDay
:
""
rentFreeDay
:
""
};
};
this
.
userFreeDay
=
true
;
}
}
});
});
}
else
{
}
else
{
...
...
src/views/order/orderStatistics/index.vue
View file @
8b1a8355
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
v-for=
"(item,index) in way"
v-for=
"(item,index) in way"
:key=
"index"
:key=
"index"
:class=
"
{active:isactive==item.label}"
:class=
"
{active:isactive==item.label}"
@click="changeWay(item
.label
)"
@click="changeWay(item)"
>
{{
item
.
label
}}
</span>
>
{{
item
.
label
}}
</span>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -32,78 +32,69 @@
...
@@ -32,78 +32,69 @@
</el-row>
</el-row>
</el-form>
</el-form>
<!--
<el-table
<el-table
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
:key=
"tableKey"
:data=
"list"
border
fit
highlight-current-row
style=
"width: 100%"
>
<el-table-column
align=
"center"
label=
"时间"
>
<el-table-column
align=
"center"
label=
"时间"
>
<template
scope=
"scope"
>
<template
scope=
"scope"
>
<span>
{{
scope
.
row
.
id
}}
</span>
<span>
{{
scope
.
row
.
timeSlot
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"普通会员购买量"
>
<el-table-column
align=
"center"
label=
"普通会员购买量"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
>
{{
scope
.
row
.
no
}}
</span>
<span
v-if=
"scope.row.members[0].level == 1"
>
{{
scope
.
row
.
members
[
0
].
number
||
0
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"支付金额(普通会员)"
>
<el-table-column
align=
"center"
label=
"支付金额(普通会员)"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.members[0].level == 1"
>
{{
scope
.
row
.
members
[
0
].
amount
||
0
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"黄金会员购买量"
>
<el-table-column
align=
"center"
label=
"黄金会员购买量"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.members[0].level == 2"
>
{{
scope
.
row
.
members
[
0
].
number
||
0
}}
</span>
</
template
>
</el-table-column>
<el-table-column
align=
"center"
label=
"支付金额(普通会员)"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"支付金额(黄金会员)"
>
<el-table-column
align=
"center"
label=
"支付金额(黄金会员)"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span
>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.members[0].level == 2"
>
{{
scope
.
row
.
members
[
0
].
amount
||
0
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"钻石会员购买量"
>
<el-table-column
align=
"center"
label=
"钻石会员购买量"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.members[0].level == 3"
>
{{
scope
.
row
.
members
[
0
].
number
||
0
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"支付金额(钻石会员)"
>
<el-table-column
align=
"center"
label=
"支付金额(钻石会员)"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span
v-if=
"scope.row.members[0].level == 3"
>
{{
scope
.
row
.
members
[
0
].
amount
||
0
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"总支付金额"
>
<el-table-column
align=
"center"
label=
"总支付金额"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
name
}}
</span>
<span>
{{
scope
.
row
.
totalPayment
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
-->
</el-table>
</div>
</div>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
orderStatistics
,
downloadExcel
}
from
"api/order/rentVehicle"
;
export
default
{
export
default
{
created
()
{},
created
()
{
this
.
getList
();
},
data
()
{
data
()
{
return
{
return
{
list
:
[],
// 统计时间筛选
// 统计时间筛选
listQuery
:
{
listQuery
:
{
time
:
"null"
time
:
"null"
,
type
:
"1"
,
startTime
:
null
,
endTime
:
null
},
},
//统计方式筛选
//统计方式筛选
way
:
[
way
:
[
{
label
:
"全部"
,
id
:
"0"
},
{
{
label
:
"日统计"
,
label
:
"日统计"
,
id
:
"1"
id
:
"1"
...
@@ -123,14 +114,51 @@ export default {
...
@@ -123,14 +114,51 @@ export default {
methods
:
{
methods
:
{
//统计时间筛选
//统计时间筛选
changeTime
()
{
changeTime
()
{
console
.
log
(
"----"
);
!!
this
.
listQuery
.
time
[
0
]
?
(
this
.
listQuery
.
startTime
=
this
.
listQuery
.
time
[
0
].
getTime
())
:
(
this
.
listQuery
.
startTime
=
null
);
!!
this
.
listQuery
.
time
[
1
]
?
(
this
.
listQuery
.
endTime
=
this
.
listQuery
.
time
[
1
].
getTime
())
:
(
this
.
listQuery
.
endTime
=
null
);
this
.
getList
();
},
},
//统计方式筛选
//统计方式筛选
changeWay
(
val
)
{
changeWay
(
val
)
{
this
.
isactive
=
val
;
this
.
isactive
=
val
.
label
;
this
.
listQuery
.
type
=
val
.
id
;
this
.
getList
();
},
},
//导出
//导出
handleFilter
()
{}
handleFilter
()
{
downloadExcel
(
this
.
listQuery
).
then
(
res
=>
{
const
content
=
res
;
const
blob
=
new
Blob
([
content
]);
const
fileName
=
"导出信息.xlsx"
;
if
(
"download"
in
document
.
createElement
(
"a"
))
{
// 非IE下载
const
elink
=
document
.
createElement
(
"a"
);
elink
.
download
=
fileName
;
elink
.
style
.
display
=
"none"
;
elink
.
href
=
URL
.
createObjectURL
(
blob
);
document
.
body
.
appendChild
(
elink
);
elink
.
click
();
URL
.
revokeObjectURL
(
elink
.
href
);
// 释放URL 对象
document
.
body
.
removeChild
(
elink
);
}
else
{
// IE10+下载
navigator
.
msSaveBlob
(
blob
,
fileName
);
}
});
},
//列表
getList
()
{
orderStatistics
(
this
.
listQuery
).
then
(
data
=>
{
console
.
log
(
data
);
if
(
data
.
status
==
200
)
{
this
.
list
=
data
.
data
;
}
});
}
}
}
};
};
</
script
>
</
script
>
...
...
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