Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
html
/
small-program-web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
f2f0a2ae
authored
Jul 03, 2019
by
duanguohui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单统计
parent
8ae8ba28
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
9 deletions
+39
-9
src/views/cookManage/CookAdd.vue
+2
-0
src/views/orderList/OrderList.vue
+37
-9
No files found.
src/views/cookManage/CookAdd.vue
View file @
f2f0a2ae
...
@@ -120,6 +120,8 @@ export default {
...
@@ -120,6 +120,8 @@ export default {
if
(
this
.
$route
.
params
.
id
)
{
if
(
this
.
$route
.
params
.
id
)
{
delete
param
.
createDate
delete
param
.
createDate
param
.
status
?
param
.
status
=
'Y'
:
param
.
status
=
'N'
param
.
status
?
param
.
status
=
'Y'
:
param
.
status
=
'N'
param
.
starDate
=
moment
(
param
.
starDate
).
format
(
'YYYY-MM-DD HH:MM:SS'
)
param
.
endDate
=
moment
(
param
.
endDate
).
format
(
'YYYY-MM-DD HH:MM:SS'
)
this
.
$axios
.
post
(
'/pccook/update/cook'
,
param
).
then
(()
=>
{
this
.
$axios
.
post
(
'/pccook/update/cook'
,
param
).
then
(()
=>
{
this
.
$message
.
success
(
'修改成功'
)
this
.
$message
.
success
(
'修改成功'
)
this
.
goBack
()
this
.
goBack
()
...
...
src/views/orderList/OrderList.vue
View file @
f2f0a2ae
...
@@ -142,19 +142,19 @@
...
@@ -142,19 +142,19 @@
<el-row>
<el-row>
<div
class=
"order-list"
>
<div
class=
"order-list"
>
<el-card
class=
"box-card no-margin-card margin-bottom20"
>
<el-card
class=
"box-card no-margin-card margin-bottom20"
>
<el-form
:inline=
"true"
:model=
"
formInline
"
class=
"demo-form-inline"
>
<el-form
:inline=
"true"
:model=
"
statisParams
"
class=
"demo-form-inline"
>
<el-col
:sm=
"12"
style=
"margin-bottom: 10px;"
>
<el-col
:sm=
"12"
style=
"margin-bottom: 10px;"
>
<el-form-item
label=
"下单时间"
>
<el-form-item
label=
"下单时间"
>
<el-col
:sm=
"11"
>
<el-col
:sm=
"11"
>
<el-form-item
prop=
"date1"
>
<el-form-item
prop=
"date1"
>
<el-date-picker
v-model=
"
formInline
.startTime"
type=
"datetime"
placeholder=
"开始时间"
>
<el-date-picker
v-model=
"
statisParams
.startTime"
type=
"datetime"
placeholder=
"开始时间"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
<el-col
class=
"line"
:sm=
"2"
style=
"text-align: center"
>
-
</el-col>
<el-col
class=
"line"
:sm=
"2"
style=
"text-align: center"
>
-
</el-col>
<el-col
:sm=
"11"
>
<el-col
:sm=
"11"
>
<el-form-item
prop=
"date2"
>
<el-form-item
prop=
"date2"
>
<el-date-picker
v-model=
"
formInline
.endTime"
type=
"datetime"
placeholder=
"结束时间"
>
<el-date-picker
v-model=
"
statisParams
.endTime"
type=
"datetime"
placeholder=
"结束时间"
>
</el-date-picker>
</el-date-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-col>
...
@@ -162,7 +162,7 @@
...
@@ -162,7 +162,7 @@
</el-col>
</el-col>
<el-col
:sm=
"8"
:offset=
"1"
>
<el-col
:sm=
"8"
:offset=
"1"
>
<el-form-item
label=
"类型"
style=
"margin-left: 30px"
>
<el-form-item
label=
"类型"
style=
"margin-left: 30px"
>
<el-select
v-model=
"
formInline
.type"
>
<el-select
v-model=
"
statisParams
.type"
>
<!-- <el-option label="全部" value=""></el-option> -->
<!-- <el-option label="全部" value=""></el-option> -->
<el-option
label=
"外卖"
value=
"WM"
></el-option>
<el-option
label=
"外卖"
value=
"WM"
></el-option>
<el-option
label=
"家政"
value=
"JZ"
></el-option>
<el-option
label=
"家政"
value=
"JZ"
></el-option>
...
@@ -180,7 +180,7 @@
...
@@ -180,7 +180,7 @@
<el-card
class=
"box-card no-margin-card"
>
<el-card
class=
"box-card no-margin-card"
>
<div
class=
"order_table"
>
<div
class=
"order_table"
>
<el-table
<el-table
:data=
"
orderList
Data"
:data=
"
statis
Data"
stripe
stripe
:key=
"Math.random()"
:key=
"Math.random()"
class=
"my-table margin-bottom20"
class=
"my-table margin-bottom20"
...
@@ -195,7 +195,7 @@
...
@@ -195,7 +195,7 @@
>
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"
titleN
ame"
prop=
"
n
ame"
label=
"名称"
label=
"名称"
align=
"center"
align=
"center"
>
>
...
@@ -220,6 +220,7 @@
...
@@ -220,6 +220,7 @@
</template>
</template>
<
script
>
<
script
>
import
moment
from
'moment'
export
default
{
export
default
{
name
:
'orderList'
,
name
:
'orderList'
,
data
()
{
data
()
{
...
@@ -233,9 +234,17 @@ export default {
...
@@ -233,9 +234,17 @@ export default {
},
},
allPage
:
1
,
allPage
:
1
,
currentPage
:
10
,
currentPage
:
10
,
allPage1
:
1
,
currentPage1
:
100
,
countPage
:
''
,
countPage
:
''
,
page
:
''
,
page
:
''
,
orderListData
:
[],
orderListData
:
[],
statisParams
:
{
startTime
:
moment
().
format
(
'YYYY-MM-DD'
),
endTime
:
moment
().
format
(
'YYYY-MM-DD'
),
type
:
'WM'
},
statisData
:
[],
// 统计数据
dialogVisible
:
false
dialogVisible
:
false
}
}
},
},
...
@@ -307,7 +316,7 @@ export default {
...
@@ -307,7 +316,7 @@ export default {
this
.
$router
.
push
({
name
:
'orderDetail'
,
params
:
{
id
:
row
.
id
,
type
:
row
.
type
}
})
this
.
$router
.
push
({
name
:
'orderDetail'
,
params
:
{
id
:
row
.
id
,
type
:
row
.
type
}
})
},
},
searchList
()
{
searchList
()
{
this
.
get
OrderList
()
this
.
get
StatisData
()
},
},
goPage
(
num
)
{
goPage
(
num
)
{
this
.
allPage
=
Number
(
this
.
allPage
)
+
num
this
.
allPage
=
Number
(
this
.
allPage
)
+
num
...
@@ -317,10 +326,29 @@ export default {
...
@@ -317,10 +326,29 @@ export default {
this
.
getOrderList
()
this
.
getOrderList
()
},
},
statistical
()
{
statistical
()
{
this
.
formInline
.
type
=
'WM'
this
.
dialogVisible
=
true
this
.
dialogVisible
=
true
this
.
get
OrderList
()
this
.
get
StatisData
()
},
},
getStatisData
()
{
// 获取统计信息
var
params
=
{
'endDate'
:
moment
(
this
.
statisParams
.
endTime
).
format
(
'YYYY-MM-DD'
),
'starDate'
:
moment
(
this
.
statisParams
.
startTime
).
format
(
'YYYY-MM-DD'
),
'type'
:
this
.
statisParams
.
type
,
}
this
.
$axios
({
method
:
'post'
,
url
:
'/pc/trade/get/group'
,
data
:
params
}).
then
((
res
)
=>
{
res
.
data
.
data
.
forEach
((
item
)
=>
{
item
.
num
=
parseInt
(
item
.
num
)
if
(
item
.
name
==
'BJ'
)
item
.
name
=
'保洁'
if
(
item
.
name
==
'CSSM'
)
item
.
name
=
'厨师上门'
if
(
item
.
name
==
'WX'
)
item
.
name
=
'维修'
})
this
.
statisData
=
res
.
data
.
data
})
}
},
},
computed
:
{
computed
:
{
renderStatus
(
status
,
type
)
{
renderStatus
(
status
,
type
)
{
...
...
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