Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录
切换导航
S
shop-new
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
王天霸
shop-new
Commits
22e49199
提交
22e49199
authored
9月 10, 2021
作者:
huaxinzhu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
订单列表规格、数量、金额优化
上级
d9c6234b
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
35 行增加
和
30 行删除
+35
-30
index.vue
src/views/system/order/index.vue
+35
-30
没有找到文件。
src/views/system/order/index.vue
浏览文件 @
22e49199
...
@@ -101,15 +101,18 @@
...
@@ -101,15 +101,18 @@
<el-table-column
prop=
"goods_order_sn"
label=
"订单号"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goods_order_sn"
label=
"订单号"
width=
"180"
align=
"center"
></el-table-column>
<el-table-column
prop=
"goods_option_title"
label=
"商品名称"
align=
"center"
>
<el-table-column
prop=
"goods_option_title"
label=
"商品名称"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
style=
"width:60px;height:60px;"
:src=
"scope.row.thumb"
/>
<div
class=
"img-title-table"
>
<div>
{{
scope
.
row
.
goods_option_title
}}
</div>
<img
style=
"width:60px;height:60px;"
:src=
"scope.row.thumb"
/>
<div
class=
"ml10"
>
{{
scope
.
row
.
goods_option_title
}}
</div>
</div>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
label=
"规格/数量/金额"
width=
"180"
align=
"center"
>
<el-table-column
label=
"规格/数量/金额"
width=
"180"
align=
"center"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
goods_option_title
}}
<br/>
{{
scope
.
row
.
goods_option_title
}}
<br/>
{{
scope
.
row
.
total
}}
<br/>
{{
scope
.
row
.
goods_price
/
100
}}
元
<br/>
{{
scope
.
row
.
goods_price
/
100
}}
<br/>
x
{{
scope
.
row
.
total
}}
<br/>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
prop=
"created_time"
label=
"下单时间"
width=
"180"
align=
"center"
>
<el-table-column
prop=
"created_time"
label=
"下单时间"
width=
"180"
align=
"center"
>
...
@@ -268,7 +271,7 @@
...
@@ -268,7 +271,7 @@
/** 获取 seller_id*/
/** 获取 seller_id*/
this
.
sellerId
=
this
.
$store
.
state
.
user
.
sellerid
;
this
.
sellerId
=
this
.
$store
.
state
.
user
.
sellerid
;
// 获取 订单 状态对应数量
// 获取 订单 状态对应数量
//
this.getOrderTab()
this
.
getOrderTab
()
// 订单列表 搜索
// 订单列表 搜索
this
.
getListOrder
()
this
.
getListOrder
()
//
//
...
@@ -345,7 +348,7 @@
...
@@ -345,7 +348,7 @@
this
.
goodsStatus
=
3
this
.
goodsStatus
=
3
break
break
case
'fourth'
:
case
'fourth'
:
this
.
goodsStatus
=
-
2
this
.
goodsStatus
=
0
break
break
default
:
default
:
break
break
...
@@ -360,19 +363,19 @@
...
@@ -360,19 +363,19 @@
},
},
/** 获取 订单 状态对应数量 */
/** 获取 订单 状态对应数量 */
getOrderTab
()
{
getOrderTab
()
{
//
getOrderTabData().then(res => {
getOrderTabData
().
then
(
res
=>
{
//
//console.log("获取订单状态和对应订单数量",res);
//console.log("获取订单状态和对应订单数量",res);
//
if (res.code === 1 && res.data.length > 0) {
if
(
res
.
code
===
1
&&
res
.
data
.
length
>
0
)
{
//
// 1 表示 代发货;2 表示 已发货
// 1 表示 代发货;2 表示 已发货
//
for (let i = 0; i
<
res
.
data
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
data
.
length
;
i
++
)
{
//
if (res.data[i].Status === 1) {
if
(
res
.
data
[
i
].
Status
===
1
)
{
//
this.total1 = res.data[i].Count > 999 ? '999+' : res.data[i].Count;
this
.
total1
=
res
.
data
[
i
].
Count
>
999
?
'999+'
:
res
.
data
[
i
].
Count
;
//
} else if (res.data[i].Status === 2) {
}
else
if
(
res
.
data
[
i
].
Status
===
2
)
{
//
this.total2 = res.data[i].Count > 999 ? '999+' : res.data[i].Count;
this
.
total2
=
res
.
data
[
i
].
Count
>
999
?
'999+'
:
res
.
data
[
i
].
Count
;
//
}
}
//
}
}
//
}
}
//
});
});
},
},
// 获取订单列表
// 获取订单列表
getListOrder
()
{
getListOrder
()
{
...
@@ -519,10 +522,10 @@
...
@@ -519,10 +522,10 @@
},
},
// 订单详情
// 订单详情
handleInfo
(
row
)
{
handleInfo
(
row
)
{
this
.
detailDialog
=
true
let
order_id
=
row
.
order_id
let
order_id
=
row
.
order_id
orderInfo
({
order_id
:
order_id
}).
then
(
res
=>
{
orderInfo
({
order_id
:
order_id
}).
then
(
res
=>
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
if
(
res
.
code
==
1
&&
res
.
data
)
{
this
.
detailDialog
=
true
// 留言备注,需要单独处理
// 留言备注,需要单独处理
let
remarkList
=
[]
let
remarkList
=
[]
// res.data.order.remark 返回数据格式比较多,不判断了
// res.data.order.remark 返回数据格式比较多,不判断了
...
@@ -530,25 +533,18 @@
...
@@ -530,25 +533,18 @@
remarkList
=
JSON
.
parse
(
res
.
data
.
order
.
remark
)
remarkList
=
JSON
.
parse
(
res
.
data
.
order
.
remark
)
}
catch
(
e
)
{
}
catch
(
e
)
{
remarkList
=
[]
remarkList
=
[]
console
.
log
(
99
,
e
);
}
}
res
.
data
.
order
.
remark
=
remarkList
res
.
data
.
order
.
remark
=
remarkList
this
.
order_detail
=
res
.
data
.
order
;
this
.
order_detail
=
res
.
data
.
order
;
// let isArray = Array.isArray(remarkList)
//
// if(isArray) {
// res.data.order.remark = remarkList
// this.order_detail = res.data.order;
// }else {
//
// }
this
.
order_goods_detail
=
res
.
data
.
order_goods_detail
?
res
.
data
.
order_goods_detail
:
[];
this
.
order_goods_detail
=
res
.
data
.
order_goods_detail
?
res
.
data
.
order_goods_detail
:
[];
//console.log('备注留言返回原始数据',res.data.order.remark);
//console.log('备注留言返回原始数据',res.data.order.remark);
// this.$router.push({path: '/system/goods/management'});
// this.$router.push({path: '/system/goods/management'});
}
else
if
(
res
.
code
==
0
)
{
let
msg
=
res
.
message
?
res
.
message
:
'暂无数据'
this
.
$message
({
type
:
'error'
,
message
:
msg
});
}
}
})
})
},
},
...
@@ -600,6 +596,11 @@
...
@@ -600,6 +596,11 @@
.form-params
{
.form-params
{
}
}
.img-title-table
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
}
.footer_pagination
{
.footer_pagination
{
text-align
:
center
;
text-align
:
center
;
...
@@ -651,4 +652,8 @@
...
@@ -651,4 +652,8 @@
overflow-y
:
auto
;
overflow-y
:
auto
;
padding
:
0
20px
;
padding
:
0
20px
;
}
}
.ml10
{
margin-left
:
10px
;
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论