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
da1f3253
Commit
da1f3253
authored
Aug 10, 2019
by
denghr
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页数据统计,购房车列表
parent
8c2532b0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
116 additions
and
47 deletions
+116
-47
applyManagements.js
src/api/applyManagements.js
+17
-6
vehicleSchedulManage.js
src/api/vehicle/vehicleSchedulManage.js
+10
-0
carApplyList.vue
src/views/applyManagements/carApplyList.vue
+40
-34
index.vue
src/views/index/index.vue
+49
-7
No files found.
src/api/applyManagements.js
View file @
da1f3253
...
@@ -10,13 +10,24 @@ export function getAllBranchCompanyByZoneId(query) {
...
@@ -10,13 +10,24 @@ export function getAllBranchCompanyByZoneId(query) {
}
}
/**
/**
* 获取
优惠券列表--优惠券
列表
* 获取
申请列表--申请
列表
* @param query
* @param query
*/
*/
export
function
get
Coupon
List
(
query
)
{
export
function
get
Apply
List
(
query
)
{
return
fetch
({
return
fetch
({
url
:
'/api/a
ctivity/admin/user_coupon
/page'
,
url
:
'/api/a
pp/admin/buy_vehicle
/page'
,
method
:
'
Get
'
,
method
:
'
POST
'
,
params
:
query
data
:
query
});
});
}
}
\ No newline at end of file
/**
* 处理
* @param query
*/
export
function
changeStatus
(
id
)
{
return
fetch
({
url
:
'/api/app/admin/buy_vehicle/status/'
+
id
,
method
:
'POST'
,
});
}
\ No newline at end of file
src/api/vehicle/vehicleSchedulManage.js
View file @
da1f3253
...
@@ -75,3 +75,13 @@ export function getBookRecord(query) {
...
@@ -75,3 +75,13 @@ export function getBookRecord(query) {
params
:
query
params
:
query
});
});
}
}
/**
* 首页统计
*/
export
function
orderStatistics
(
type
)
{
return
fetch
({
url
:
'/api/order/orderStatistics/findAll/'
+
type
,
method
:
'get'
,
});
}
src/views/applyManagements/carApplyList.vue
View file @
da1f3253
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属大区"
>
<el-form-item
label=
"所属大区"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
zone
Id"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
area
Id"
placeholder=
"请选择"
@
change=
"getProvinceRegions"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
v-for=
"val in getAllZoneList"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属公司"
>
<el-form-item
label=
"所属公司"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
liftCompany
"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-select
class=
"filter-item"
v-model=
"listQuery.
companyId
"
placeholder=
"请选择"
@
change=
"getAllBranchCompanyChange"
>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
:key=
"undefined"
label=
"无"
:value=
"undefined"
></el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
<el-option
v-for=
"val in allBranchCompany"
:key=
"val.id"
:label=
"val.name"
:value=
"val.id"
>
</el-option>
</el-select>
</el-select>
...
@@ -48,13 +48,13 @@
...
@@ -48,13 +48,13 @@
<el-table-column
align=
"center"
label=
"申请人"
width=
"200"
>
<el-table-column
align=
"center"
label=
"申请人"
width=
"200"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
apply
Name
}}
</span>
<span>
{{
scope
.
row
.
contact
Name
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"电话"
width=
"200"
>
<el-table-column
align=
"center"
label=
"电话"
width=
"200"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
apply
Phone
}}
</span>
<span>
{{
scope
.
row
.
contact
Phone
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
...
@@ -68,14 +68,14 @@
...
@@ -68,14 +68,14 @@
<span>
{{
scope
.
row
.
companyName
}}
</span>
<span>
{{
scope
.
row
.
companyName
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"对接人/电话"
width=
"
3
00"
>
<el-table-column
align=
"center"
label=
"对接人/电话"
width=
"
4
00"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<span>
{{
scope
.
row
.
contactName
}}
/
{{
scope
.
row
.
contact
Phone
}}
</span>
<span>
{{
scope
.
row
.
leaderName
}}
/
{{
scope
.
row
.
leader
Phone
}}
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
align=
"center"
label=
"操作"
width=
"150"
fixed=
"right"
>
<el-table-column
align=
"center"
label=
"操作"
width=
"150"
fixed=
"right"
>
<
template
scope=
"scope"
>
<
template
scope=
"scope"
>
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
v-if=
"scope.row.status==0"
@
click=
"clickHandler"
>
处理
</el-button>
<el-button
class=
"el-button el-button--text el-button--small"
size=
"small"
v-if=
"scope.row.status==0"
@
click=
"clickHandler
(scope.row)
"
>
处理
</el-button>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -106,8 +106,9 @@
...
@@ -106,8 +106,9 @@
getToken
getToken
}
from
'utils/auth'
;
}
from
'utils/auth'
;
import
{
import
{
getCouponList
,
getApplyList
,
getAllBranchCompanyByZoneId
getAllBranchCompanyByZoneId
,
changeStatus
}
from
'api/applyManagements'
;
}
from
'api/applyManagements'
;
import
{
import
{
getAllZone
getAllZone
...
@@ -131,7 +132,7 @@
...
@@ -131,7 +132,7 @@
disabledDate
:
time
=>
{
disabledDate
:
time
=>
{
const
beginDateVal
=
new
Date
(
this
.
starTimeStr
).
getTime
()
const
beginDateVal
=
new
Date
(
this
.
starTimeStr
).
getTime
()
if
(
beginDateVal
)
{
if
(
beginDateVal
)
{
return
time
.
getTime
()
<
beginDateVal
return
time
.
getTime
()
<
beginDateVal
+
8.64e7
}
}
}
}
},
},
...
@@ -156,8 +157,8 @@
...
@@ -156,8 +157,8 @@
starTime
:
undefined
,
starTime
:
undefined
,
endTime
:
undefined
,
endTime
:
undefined
,
status
:
''
,
status
:
''
,
zone
Id
:
undefined
,
area
Id
:
undefined
,
liftCompany
:
undefined
,
companyId
:
undefined
,
},
},
inline
:
true
,
inline
:
true
,
tableKey
:
0
,
tableKey
:
0
,
...
@@ -182,15 +183,15 @@
...
@@ -182,15 +183,15 @@
methods
:
{
methods
:
{
//监听change事件
//监听change事件
getProvinceRegions
(
item
)
{
getProvinceRegions
(
item
)
{
this
.
listQuery
.
zone
Id
=
item
this
.
listQuery
.
area
Id
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
baranchQuery
.
zoneId
=
item
this
.
listQuery
.
liftCompany
=
undefined
;
this
.
listQuery
.
companyId
=
undefined
;
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
).
then
(
response
=>
{
getAllBranchCompanyByZoneId
(
this
.
baranchQuery
).
then
(
response
=>
{
this
.
allBranchCompany
=
response
.
data
;
this
.
allBranchCompany
=
response
.
data
;
})
})
},
},
getAllBranchCompanyChange
(
item
)
{
getAllBranchCompanyChange
(
item
)
{
this
.
listQuery
.
liftCompany
=
item
this
.
listQuery
.
companyId
=
item
},
},
/**
/**
* 获取列表
* 获取列表
...
@@ -204,11 +205,15 @@
...
@@ -204,11 +205,15 @@
}
}
if
(
this
.
starTimeStr
){
if
(
this
.
starTimeStr
){
this
.
listQuery
.
startTime
=
new
Date
(
this
.
starTimeStr
).
getTime
();
this
.
listQuery
.
startTime
=
new
Date
(
this
.
starTimeStr
).
getTime
();
}
else
{
this
.
listQuery
.
startTime
=
undefined
}
}
if
(
this
.
endTimeStr
){
if
(
this
.
endTimeStr
){
this
.
listQuery
.
endTime
=
new
Date
(
this
.
endTimeStr
).
getTime
();
this
.
listQuery
.
endTime
=
new
Date
(
this
.
endTimeStr
).
getTime
();
}
else
{
this
.
listQuery
.
endTime
=
undefined
}
}
get
Coupon
List
(
this
.
listQuery
).
then
(
response
=>
{
get
Apply
List
(
this
.
listQuery
).
then
(
response
=>
{
let
totalCountRs
=
undefined
;
let
totalCountRs
=
undefined
;
let
listRs
=
undefined
;
let
listRs
=
undefined
;
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
if
(
!
this
.
$utils
.
isEmpty
(
response
.
data
.
data
)
&&
this
.
$utils
.
isInteger
(
response
.
data
.
totalCount
))
{
...
@@ -244,29 +249,30 @@
...
@@ -244,29 +249,30 @@
this
.
getList
();
this
.
getList
();
},
},
clickHandler
(
row
){
clickHandler
(
row
){
console
.
log
(
row
)
this
.
$confirm
(
'确定处理吗?'
,
'提示'
,
{
this
.
$confirm
(
'确定处理吗?'
,
'提示'
,
{
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
}).
then
(()
=>
{
// delObjOne
(row.id).then(response => {
changeStatus
(
row
.
id
).
then
(
response
=>
{
//
if (response.status == 200) {
if
(
response
.
status
==
200
)
{
//
this.$notify({
this
.
$notify
({
//
title: '成功',
title
:
'成功'
,
//
message: '处理成功',
message
:
'处理成功'
,
//
type: 'success',
type
:
'success'
,
//
duration: 2000
duration
:
2000
//
});
});
//
this.getList();
this
.
getList
();
//
}else{
}
else
{
//
this.$notify({
this
.
$notify
({
//
title: '失败',
title
:
'失败'
,
//
message: response.message,
message
:
response
.
message
,
//
type: 'error',
type
:
'error'
,
//
duration: 2000
duration
:
2000
//
});
});
//
}
}
//
});
});
})
})
},
},
}
}
...
...
src/views/index/index.vue
View file @
da1f3253
...
@@ -2,32 +2,32 @@
...
@@ -2,32 +2,32 @@
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
class=
"app-container calendar-list-container"
v-loading
.
body=
"showLoadingBody"
>
<div
>
<div
>
<div
class=
"statisticsBox"
>
<div
class=
"statisticsBox"
>
<div
class=
"statisticsItem"
>
<
!--
<
div
class=
"statisticsItem"
>
<div
class=
"colorbg1"
></div>
<div
class=
"colorbg1"
></div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<div
class=
"detail-title"
>
今日收益(不含押金)
</div>
<div
class=
"detail-title"
>
今日收益(不含押金)
</div>
<div
class=
"detail-money"
>
¥ 6,666,66
</div>
<div
class=
"detail-money"
>
¥ 6,666,66
</div>
</div>
</div>
</div>
</div>
-->
<div
class=
"statisticsItem"
>
<div
class=
"statisticsItem"
>
<div
class=
"colorbg2"
></div>
<div
class=
"colorbg2"
></div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<div
class=
"detail-title"
>
订单总额(不含押金)
</div>
<div
class=
"detail-title"
>
订单总额(不含押金)
</div>
<div
class=
"detail-money"
>
¥
6,666,66
</div>
<div
class=
"detail-money"
>
¥
{{
totalGmv
|
NumFormat
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"statisticsItem"
>
<div
class=
"statisticsItem"
>
<div
class=
"colorbg3"
></div>
<div
class=
"colorbg3"
></div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<div
class=
"detail-title"
>
未退还押金总额
</div>
<div
class=
"detail-title"
>
未退还押金总额
</div>
<div
class=
"detail-money"
>
¥
6,666,66
</div>
<div
class=
"detail-money"
>
¥
{{
totalSecurityDeposit
|
NumFormat
}}
</div>
</div>
</div>
</div>
</div>
<div
class=
"statisticsItem"
>
<div
class=
"statisticsItem"
>
<div
class=
"colorbg4"
></div>
<div
class=
"colorbg4"
></div>
<div
class=
"detail"
>
<div
class=
"detail"
>
<div
class=
"detail-title"
>
额外赔款(取消损坏违章等)
</div>
<div
class=
"detail-title"
>
额外赔款(取消损坏违章等)
</div>
<div
class=
"detail-money"
>
¥
6,666,66
</div>
<div
class=
"detail-money"
>
¥
{{
peichang
|
NumFormat
}}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -145,7 +145,7 @@
...
@@ -145,7 +145,7 @@
<
style
scoped
>
<
style
scoped
>
.app-container
{
background-color
:
rgba
(
245
,
245
,
245
,
1
);}
.app-container
{
background-color
:
rgba
(
245
,
245
,
245
,
1
);}
.statisticsBox
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
40px
;}
.statisticsBox
{
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
margin-bottom
:
40px
;}
.statisticsItem
{
flex
:
1
;
background-color
:
#fff
;
-moz-box-shadow
:
1px
1px
3px
#ccc
;
-webkit-box-shadow
:
1px
1px
3px
#ccc
;
box-shadow
:
1px
1px
3px
#ccc
;
border-radius
:
4px
;
max-width
:
calc
(
25
%
-
40px
)}
.statisticsItem
{
flex
:
1
;
background-color
:
#fff
;
-moz-box-shadow
:
1px
1px
3px
#ccc
;
-webkit-box-shadow
:
1px
1px
3px
#ccc
;
box-shadow
:
1px
1px
3px
#ccc
;
border-radius
:
4px
;
max-width
:
calc
(
33.3
%
-
40px
)}
.colorbg1
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#1c9fff
,
#70d1fc
);
background
:
-o-linear-gradient
(
right
,
#1c9fff
,
#70d1fc
);
background
:
-moz-linear-gradient
(
right
,
#1c9fff
,
#70d1fc
);
background
:
linear-gradient
(
to
right
,
#1c9fff
,
#70d1fc
);}
.colorbg1
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#1c9fff
,
#70d1fc
);
background
:
-o-linear-gradient
(
right
,
#1c9fff
,
#70d1fc
);
background
:
-moz-linear-gradient
(
right
,
#1c9fff
,
#70d1fc
);
background
:
linear-gradient
(
to
right
,
#1c9fff
,
#70d1fc
);}
.colorbg2
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#1f51fc
,
#70a0fc
);
background
:
-o-linear-gradient
(
right
,
#1f51fc
,
#70a0fc
);
background
:
-moz-linear-gradient
(
right
,
#1f51fc
,
#70a0fc
);
background
:
linear-gradient
(
to
right
,
#1f51fc
,
#70a0fc
);}
.colorbg2
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#1f51fc
,
#70a0fc
);
background
:
-o-linear-gradient
(
right
,
#1f51fc
,
#70a0fc
);
background
:
-moz-linear-gradient
(
right
,
#1f51fc
,
#70a0fc
);
background
:
linear-gradient
(
to
right
,
#1f51fc
,
#70a0fc
);}
.colorbg3
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#fc201f
,
#fb6b5b
);
background
:
-o-linear-gradient
(
right
,
#fc201f
,
#fb6b5b
);
background
:
-moz-linear-gradient
(
right
,
#fc201f
,
#fb6b5b
);
background
:
linear-gradient
(
to
right
,
#fc201f
,
#fb6b5b
);}
.colorbg3
{
width
:
100%
;
height
:
6px
;
border-radius
:
4px
4px
0
0
;
background
:
-webkit-linear-gradient
(
left
,
#fc201f
,
#fb6b5b
);
background
:
-o-linear-gradient
(
right
,
#fc201f
,
#fb6b5b
);
background
:
-moz-linear-gradient
(
right
,
#fc201f
,
#fb6b5b
);
background
:
linear-gradient
(
to
right
,
#fc201f
,
#fb6b5b
);}
...
@@ -376,7 +376,8 @@
...
@@ -376,7 +376,8 @@
}
from
'utils/auth'
;
}
from
'utils/auth'
;
import
{
import
{
getVehiclePlanList
,
getVehiclePlanList
,
getVehicleOrderDetail
getVehicleOrderDetail
,
orderStatistics
}
from
'api/vehicle/vehicleSchedulManage'
;
}
from
'api/vehicle/vehicleSchedulManage'
;
import
Element1
from
"../admin/menu/components/element"
;
import
Element1
from
"../admin/menu/components/element"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
import
ElRow
from
"element-ui/packages/row/src/row"
;
...
@@ -449,10 +450,14 @@
...
@@ -449,10 +450,14 @@
rentCostDetail
:
{},
//租车订单费用明细
rentCostDetail
:
{},
//租车订单费用明细
tourDialogVisible
:
false
,
//旅游订单弹框
tourDialogVisible
:
false
,
//旅游订单弹框
tourRow
:
{},
//旅游订单详情-当前行
tourRow
:
{},
//旅游订单详情-当前行
totalGmv
:
0
,
totalSecurityDeposit
:
0
,
peichang
:
0
,
}
}
},
},
created
()
{
created
()
{
this
.
getList
();
this
.
getList
();
this
.
getOrderStatistics
();
let
currentMonth
=
getCurrentMonth
();
let
currentMonth
=
getCurrentMonth
();
this
.
currentMonth
=
parseInt
(
currentMonth
);
this
.
currentMonth
=
parseInt
(
currentMonth
);
if
(
this
.
currentMonth
<
12
){
if
(
this
.
currentMonth
<
12
){
...
@@ -471,6 +476,26 @@
...
@@ -471,6 +476,26 @@
this
.
allCompanies
=
codeAndBranchCompany
;
this
.
allCompanies
=
codeAndBranchCompany
;
});
});
},
},
filters
:
{
NumFormat
:
function
(
value
)
{
if
(
!
value
)
return
'0.00'
;
var
intPart
=
Number
(
value
)
|
0
;
//获取整数部分
var
intPartFormat
=
intPart
.
toString
().
replace
(
/
(\d)(?=(?:\d{3})
+$
)
/g
,
'$1,'
);
//将整数部分逢三一断
var
floatPart
=
".00"
;
//预定义小数部分
var
value2Array
=
String
(
value
).
split
(
"."
);
//=2表示数据有小数位
if
(
value2Array
.
length
==
2
)
{
floatPart
=
value2Array
[
1
].
toString
();
//拿到小数部分
if
(
floatPart
.
length
==
1
)
{
//补0,实际上用不着
return
intPartFormat
+
"."
+
floatPart
+
'0'
;
}
else
{
return
intPartFormat
+
"."
+
floatPart
;
}
}
else
{
return
intPartFormat
+
floatPart
;
}
}
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'elements'
,
'elements'
,
...
@@ -483,6 +508,23 @@
...
@@ -483,6 +508,23 @@
},
},
},
},
methods
:
{
methods
:
{
getOrderStatistics
(){
var
that
=
this
;
orderStatistics
(
4
).
then
(
res
=>
{
if
(
res
.
status
==
200
)
{
that
.
totalGmv
=
res
.
data
.
totalGmv
that
.
totalSecurityDeposit
=
res
.
data
.
totalSecurityDeposit
that
.
peichang
=
Number
(
res
.
data
.
totalCompensation
)
+
Number
(
res
.
data
.
totalForfeit
)
+
Number
(
res
.
data
.
totalPenalSum
)
+
Number
(
res
.
data
.
totalPostpone
)
}
else
{
this
.
$notify
({
title
:
'失败'
,
message
:
'操作失败!'
,
type
:
'error'
,
duration
:
2000
});
}
});
},
/**
/**
* 旅游订单详情弹框关闭
* 旅游订单详情弹框关闭
* */
* */
...
...
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