Skip to content

Commit

Permalink
!44 添加售后详情状态显示,添加订单根据id查询
Browse files Browse the repository at this point in the history
Merge pull request !44 from 滑稽刘/master
  • Loading branch information
linlinjava authored and gitee-org committed Jun 27, 2020
2 parents ef91b16 + 9d2c07a commit eeeaf38
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
5 changes: 4 additions & 1 deletion litemall-admin/src/views/mall/aftersale.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@
<el-tag>{{ aftersaleDetail.amount }}</el-tag>
</el-form-item>
<el-form-item label="订单状态">
<el-tag>{{ aftersaleDetail.status }}</el-tag>
<el-tag v-if="aftersaleDetail.status === 1">已申请,待审核</el-tag>
<el-tag v-if="aftersaleDetail.status === 2">审核通过,待退款</el-tag>
<el-tag v-if="aftersaleDetail.status === 3">退款成功</el-tag>
<el-tag v-if="aftersaleDetail.status === 4">审核不通过,已拒绝</el-tag>
</el-form-item>
<el-form-item label="订单用户id">
<el-tag>{{ aftersaleDetail.userId }}</el-tag>
Expand Down
38 changes: 27 additions & 11 deletions litemall-admin/src/views/mall/order.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<!-- 查询和其他操作 -->
<div class="filter-container">
<el-input v-model="listQuery.userId" clearable class="filter-item" style="width: 160px;" placeholder="请输入用户ID" />
<el-input v-model="listQuery.orderId" clearable class="filter-item" style="width: 160px;" placeholder="请输入订单ID" />
<el-input v-model="listQuery.orderSn" clearable class="filter-item" style="width: 160px;" placeholder="请输入订单编号" />
<el-date-picker v-model="listQuery.timeArray" type="datetimerange" value-format="yyyy-MM-dd HH:mm:ss" class="filter-item" range-separator="" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions" />
<el-select v-model="listQuery.orderStatusArray" multiple style="width: 200px" class="filter-item" placeholder="请选择订单状态">
Expand Down Expand Up @@ -190,7 +191,8 @@ export default {
timeArray: [],
orderStatusArray: [],
sort: 'add_time',
order: 'desc'
order: 'desc',
orderId:undefined
},
pickerOptions: {
shortcuts: [{
Expand Down Expand Up @@ -256,16 +258,30 @@ export default {
this.listQuery.start = null
this.listQuery.end = null
}
listOrder(this.listQuery).then(response => {
this.list = response.data.data.list
this.total = response.data.data.total
this.listLoading = false
}).catch(() => {
this.list = []
this.total = 0
this.listLoading = false
})
if(this.listQuery.orderId){
detailOrder(this.listQuery.orderId).then(response => {
this.list = [];
if(response.data.data.order){
this.list.push(response.data.data.order);
this.total = 1;
this.listLoading = false
}
}).catch(() => {
this.list = []
this.total = 0
this.listLoading = false
})
}else{
listOrder(this.listQuery).then(response => {
this.list = response.data.data.list
this.total = response.data.data.total
this.listLoading = false
}).catch(() => {
this.list = []
this.total = 0
this.listLoading = false
})
}
},
getChannel() {
listChannel().then(response => {
Expand Down

0 comments on commit eeeaf38

Please sign in to comment.