Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-life-system
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f0074077
authored
Feb 04, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
订单列表,订单详情
1 parent
70162590
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
112 additions
and
65 deletions
src/views/financeManage/financeDetail.vue
src/views/orderManage/orderDetail.vue
src/views/orderManage/orderList.vue
src/views/financeManage/financeDetail.vue
View file @
f007407
...
@@ -143,7 +143,7 @@
...
@@ -143,7 +143,7 @@
</tr>
</tr>
</table>
</table>
<p
style=
"text-align:left;"
>
<p
style=
"text-align:left;"
>
<el-button
type=
"primary"
@
click=
"
close(
{ tagName: '/financeDetail' })
">返回
</el-button>
<el-button
type=
"primary"
@
click=
"
handleClose
"
>
返回
</el-button>
</p>
</p>
</div>
</div>
...
@@ -173,33 +173,25 @@ export default {
...
@@ -173,33 +173,25 @@ export default {
1
:
'价格敏感型'
,
1
:
'价格敏感型'
,
2
:
'价格不敏感型'
2
:
'价格不敏感型'
},
},
storeData
:
[{
name
:
'xx'
},{
name
:
'xx'
},{
name
:
'xx'
},{
name
:
'xx'
},{
name
:
'xx'
}],
detail
:
{},
detail
:
{},
shopProfitTypeOpts
:
{
shopProfitTypeOpts
:
{
'1'
:
'毛利'
,
'1'
:
'毛利'
,
'2'
:
'收入'
'2'
:
'收入'
}
,
}
}
}
},
},
mounted
()
{
mounted
()
{
this
.
detail
=
this
.
$route
.
params
.
detail
this
.
detail
=
this
.
$route
.
params
.
detail
console
.
log
()
},
},
methods
:
{
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
({
close
:
'd2admin/page/close'
}),
handleClose
()
{
this
.
close
({
tagName
:
'/financeList'
})
this
.
$router
.
push
({
name
:
'financeList'
})
this
.
close
({
tagName
:
'/financeDetail'
})
}
}
}
}
}
...
...
src/views/orderManage/orderDetail.vue
View file @
f007407
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<el-form-item
label=
"交易流水:"
>
{{
detail
.
outTradeNo
}}
</el-form-item>
<el-form-item
label=
"交易流水:"
>
{{
detail
.
outTradeNo
}}
</el-form-item>
<el-form-item
label=
"支付状态:"
>
{{
payStatusOpts
[
detail
.
payStatus
]
}}
</el-form-item>
<el-form-item
label=
"支付状态:"
>
{{
payStatusOpts
[
detail
.
payStatus
]
}}
</el-form-item>
<el-form-item
label=
"收款凭证:"
>
<el-form-item
label=
"收款凭证:"
>
<img
class=
"order-img"
src=
"https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3101694723,748884042&fm=26&gp=0.jpg
"
/>
<img
class=
"order-img"
:src=
"detail.payVoucher
"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -39,53 +39,61 @@
...
@@ -39,53 +39,61 @@
<div
class=
"form_table_gp"
>
<div
class=
"form_table_gp"
>
<h4>
订单商品
</h4>
<h4>
订单商品
</h4>
<el-table
<el-table
:data=
"detail.
goods
"
:data=
"detail.
subOrderList
"
border
border
header-cell-style=
"text-align:center; background-color:#fafafa"
header-cell-style=
"text-align:center; background-color:#fafafa"
show-summary
show-summary
:summary-method=
"getSummaries"
:summary-method=
"getSummaries"
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-table-column
<el-table-column
prop=
"goodsInfo.goodsCode
"
:prop=
"detail.upgradeFlag === 'Y' ? 'upgradeGoodsCode' : 'baseGoodsCode'
"
align=
"center"
align=
"center"
label=
"商品编号"
>
label=
"商品编号"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goodsInfo.goodsName
"
:prop=
"detail.upgradeFlag === 'Y' ? 'upgradeGoodsName' : 'baseGoodsName'
"
align=
"center"
align=
"center"
label=
"商品名称"
>
label=
"商品名称"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goodsInfo.goodsTypeName
"
:prop=
"detail.upgradeFlag === 'Y' ? 'upgradeGoodsTypeName' : 'baseGoodsTypeName'
"
align=
"center"
align=
"center"
label=
"商品分类"
>
label=
"商品分类"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"goodsInfo.brandMerchantName
"
:prop=
"detail.upgradeFlag === 'Y' ? 'upgradeBrandMerchantName' : 'baseBrandMerchantName'
"
align=
"center"
align=
"center"
label=
"品牌商"
>
label=
"品牌商"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"sellPrice
"
:prop=
"detail.upgradeFlag === 'Y' ? 'upgradePrice' : 'baseRetailPrice'
"
align=
"center"
align=
"center"
label=
"商品售价"
>
label=
"商品售价"
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"
d
iscount"
prop=
"
upgradeD
iscount"
align=
"center"
align=
"center"
label=
"优惠折扣"
>
label=
"优惠折扣"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"detail.upgradeFlag === 'Y'"
>
{{
scope
.
row
.
upgradeDiscount
===
'10'
?
'无'
:
scope
.
row
.
upgradeDiscount
}}
</span>
<span
v-else
>
0
</span>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"nums"
prop=
"nums"
align=
"center"
align=
"center"
label=
"数量(件)"
>
label=
"数量(件)"
>
<
template
>
<span>
1件
</span>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
prop=
"
actualMoney
"
prop=
"
totalPrice
"
align=
"center"
align=
"center"
label=
"支付金额"
>
label=
"支付金额"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<span>
¥
{{
scope
.
row
.
actualMoney
||
0
}}
</span>
<span
v-if=
"detail.upgradeFlag === 'Y'"
>
¥
{{
scope
.
row
.
totalPrice
||
0
}}
</span>
<span
v-else
>
0
</span>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
...
@@ -118,7 +126,7 @@
...
@@ -118,7 +126,7 @@
</el-table>
</el-table>
</div>
</div>
<p
style=
"text-align:left;"
>
<p
style=
"text-align:left;"
>
<el-button
type=
"primary"
@
click=
"
close({ tagName: '/orderDetail' })
"
>
返回
</el-button>
<el-button
type=
"primary"
@
click=
"
handleClose
"
>
返回
</el-button>
</p>
</p>
</div>
</div>
...
@@ -172,18 +180,18 @@ export default {
...
@@ -172,18 +180,18 @@ export default {
methods
:
{
methods
:
{
...
mapActions
({
close
:
'd2admin/page/close'
}),
...
mapActions
({
close
:
'd2admin/page/close'
}),
arraySpanMethod
({
row
,
column
,
rowIndex
,
columnIndex
})
{
//
arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if
(
rowIndex
===
1
)
{
//
if (rowIndex === 1) {
if
(
columnIndex
===
0
)
{
//
if (columnIndex === 0) {
return
[
1
,
6
]
//
return [1, 6]
}
else
{
//
} else {
return
[
1
,
1
]
//
return [1, 1]
}
//
}
}
//
}
},
//
},
getTotalNums
()
{
//
getTotalNums() {
return
this
.
detail
.
goods
.
reduce
((
prev
,
item
)
=>
prev
+
item
.
nums
,
0
)
// return this.detail.subOrderList
.reduce((prev, item) => prev + item.nums, 0)
},
//
},
getSummaries
(
param
)
{
getSummaries
(
param
)
{
const
{
columns
,
data
}
=
param
const
{
columns
,
data
}
=
param
const
sums
=
[]
const
sums
=
[]
...
@@ -196,33 +204,21 @@ export default {
...
@@ -196,33 +204,21 @@ export default {
}
}
if
(
index
===
1
)
{
if
(
index
===
1
)
{
sums
[
index
]
=
this
.
getTotalNums
()
sums
[
index
]
=
this
.
detail
.
subOrderList
.
length
+
'件'
return
return
}
}
if
(
index
===
2
)
{
if
(
index
===
2
)
{
sums
[
index
]
=
`¥
${
this
.
detail
.
totalPrice
}
`
sums
[
index
]
=
this
.
detail
.
upgradeFlag
===
'Y'
?
`¥
${
this
.
detail
.
totalPrice
}
`
:
'¥0'
return
}
return
const
values
=
data
.
map
(
item
=>
Number
(
item
[
column
.
property
]))
if
(
!
values
.
every
(
value
=>
isNaN
(
value
)))
{
sums
[
index
]
=
values
.
reduce
((
prev
,
curr
)
=>
{
const
value
=
Number
(
curr
)
if
(
!
isNaN
(
value
))
{
return
prev
+
curr
}
else
{
return
prev
}
},
0
)
sums
[
index
]
+=
' 元'
}
else
{
sums
[
index
]
=
'N/A'
}
}
})
})
return
sums
return
sums
},
handleClose
()
{
this
.
close
({
tagName
:
'/orderList'
})
this
.
$router
.
push
({
name
:
'orderList'
})
this
.
close
({
tagName
:
'/orderDetail'
})
}
}
}
}
}
}
...
...
src/views/orderManage/orderList.vue
View file @
f007407
...
@@ -30,9 +30,8 @@
...
@@ -30,9 +30,8 @@
</d2-table-header>
</d2-table-header>
<el-table
<el-table
:data=
"tableData"
:data=
"tableData"
border
border
>
:highlight-current-row=
"true"
>
<!--
<el-table-column
type=
"expand"
>
<el-table-column
type=
"expand"
>
<template
slot-scope=
"props"
>
<template
slot-scope=
"props"
>
<div
v-if=
"props.row.goods"
class=
"product_list"
>
<div
v-if=
"props.row.goods"
class=
"product_list"
>
<div
class=
"product_item"
v-for=
"(item, index) in props.row.goods"
:key=
"index"
>
<div
class=
"product_item"
v-for=
"(item, index) in props.row.goods"
:key=
"index"
>
...
@@ -44,23 +43,39 @@
...
@@ -44,23 +43,39 @@
<
/div
>
<
/div
>
<
/div
>
<
/div
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column>
--
>
<
el
-
table
-
column
<
el
-
table
-
column
type
=
"index"
type
=
"index"
label
=
"序号"
label
=
"序号"
:
index
=
"index => index + (page.pageNum - 1) * page.pageSize + 1"
align
=
"center"
>
align
=
"center"
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"订单编号"
label
=
"订单编号"
align
=
"center"
align
=
"center"
width
=
"150"
prop
=
"orderCode"
>
prop
=
"orderCode"
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"订单时间"
label
=
"订单时间"
align
=
"center"
align
=
"center"
width
=
"150"
prop
=
"orderTimeStr"
>
prop
=
"orderTimeStr"
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"客户姓名"
align
=
"center"
prop
=
"customerName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"升级状态"
align
=
"center"
prop
=
"upgradeFlag"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
{{
scope
.
row
.
upgradeFlag
?
upgradeOpts
[
scope
.
row
.
upgradeFlag
]
:
'待升级'
}}
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"订单状态"
label
=
"订单状态"
align
=
"center"
align
=
"center"
prop
=
"status"
>
prop
=
"status"
>
...
@@ -69,19 +84,58 @@
...
@@ -69,19 +84,58 @@
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"
客户姓名
"
label
=
"
商品名称
"
align
=
"center"
align
=
"center"
prop
=
"customerName"
>
prop
=
"subOrderList"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
for
=
"(item, index) in scope.row.subOrderList"
:
key
=
"index"
>
<
p
v
-
if
=
"item.upgradeGoodsId"
>
{{
item
.
upgradeGoodsName
}}
<
/p
>
<
p
v
-
else
>
{{
item
.
baseGoodsName
}}
<
/p
>
<
/span
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"订单总价"
label
=
"商品单价"
align
=
"center"
prop
=
"subOrderList"
>
<
template
slot
-
scope
=
"scope"
>
<
span
v
-
for
=
"(item, index) in scope.row.subOrderList"
:
key
=
"index"
>
<
p
v
-
if
=
"item.upgradeGoodsId"
>
¥
{{
item
.
upgradeShopPrice
}}
<
/p
>
<
p
v
-
else
>
¥
{{
item
.
baseShopPrice
}}
<
/p
>
<
/span
>
<
/template
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"总价"
align
=
"center"
align
=
"center"
prop
=
"totalPrice"
>
prop
=
"totalPrice"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
<
span
>
¥
{{
scope
.
row
.
totalPrice
}}
<
/span
>
<
span
>
¥
{{
scope
.
row
.
totalPrice
}}
<
/span
>
<
/template
>
<
/template
>
<
/el-table-column
>
<
/el-table-column
>
<
el
-
table
-
column
<
el
-
table
-
column
label
=
"流量来源"
align
=
"center"
width
=
"170"
prop
=
"merchantName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"服务门店"
align
=
"center"
width
=
"170"
prop
=
"sellerMerchantName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"推荐人"
align
=
"center"
prop
=
"employeeName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"转化员"
align
=
"center"
prop
=
"sellerName"
>
<
/el-table-column
>
<
el
-
table
-
column
label
=
"操作"
label
=
"操作"
align
=
"center"
>
align
=
"center"
>
<
template
slot
-
scope
=
"scope"
>
<
template
slot
-
scope
=
"scope"
>
...
@@ -124,6 +178,10 @@ export default {
...
@@ -124,6 +178,10 @@ export default {
// 5: '已退款',
// 5: '已退款',
6
:
'已完成'
6
:
'已完成'
}
,
}
,
upgradeOpts
:
{
'Y'
:
'已升级'
,
'N'
:
'不升级'
}
,
showFormData
:
[{
showFormData
:
[{
label
:
'订单状态'
,
label
:
'订单状态'
,
name
:
'status'
,
name
:
'status'
,
...
@@ -308,6 +366,7 @@ export default {
...
@@ -308,6 +366,7 @@ export default {
}
,
}
,
// 查看详情
// 查看详情
handleDetail
(
data
)
{
handleDetail
(
data
)
{
console
.
log
(
data
.
row
)
this
.
close
({
tagName
:
'/orderDetail'
}
)
this
.
close
({
tagName
:
'/orderDetail'
}
)
this
.
$router
.
push
({
this
.
$router
.
push
({
name
:
'orderDetail'
,
name
:
'orderDetail'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment