提交 22e49199 authored 作者: huaxinzhu's avatar huaxinzhu

订单列表规格、数量、金额优化

上级 d9c6234b
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论