|
|
|
@ -20,23 +20,22 @@ |
|
|
|
|
<!-- 操作栏 --> |
|
|
|
|
<div class="actions mt-10"> |
|
|
|
|
<div v-if="$auth('/order/refund/index.audit')"> |
|
|
|
|
<a-button |
|
|
|
|
v-if="record.audit_status == AuditStatusEnum.WAIT.value" |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleAudit" |
|
|
|
|
>商家审核</a-button> |
|
|
|
|
<a-button v-if="record.audit_status == AuditStatusEnum.WAIT.value" type="primary" @click="handleAudit" |
|
|
|
|
>商家审核</a-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="$auth('/order/refund/index.receipt')"> |
|
|
|
|
<a-button |
|
|
|
|
v-if="( |
|
|
|
|
record.type == RefundTypeEnum.RETURN.value |
|
|
|
|
&& record.audit_status == AuditStatusEnum.REVIEWED.value |
|
|
|
|
&& record.is_user_send |
|
|
|
|
&& !record.is_receipt |
|
|
|
|
)" |
|
|
|
|
v-if=" |
|
|
|
|
record.type == RefundTypeEnum.RETURN.value && |
|
|
|
|
record.audit_status == AuditStatusEnum.REVIEWED.value && |
|
|
|
|
record.is_user_send && |
|
|
|
|
!record.is_receipt |
|
|
|
|
" |
|
|
|
|
type="primary" |
|
|
|
|
@click="handleReceipt" |
|
|
|
|
>确认收货</a-button> |
|
|
|
|
>确认收货</a-button |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<a-divider class="o-divider" /> |
|
|
|
@ -48,7 +47,8 @@ |
|
|
|
|
title="查看订单详情" |
|
|
|
|
:to="{ path: '/order/detail', query: { orderId: record.order_id } }" |
|
|
|
|
target="_blank" |
|
|
|
|
>{{ record.orderData.order_no }}</router-link> |
|
|
|
|
>{{ record.orderData.order_no }}</router-link |
|
|
|
|
> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="买家信息"> |
|
|
|
|
<a-tooltip> |
|
|
|
@ -66,9 +66,7 @@ |
|
|
|
|
<a-tag>{{ RefundTypeEnum[record.type].name }}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="售后单状态"> |
|
|
|
|
<a-tag |
|
|
|
|
:color="renderRefundStatusColor(record.status)" |
|
|
|
|
>{{ RefundStatusEnum[record.status].name }}</a-tag> |
|
|
|
|
<a-tag :color="renderRefundStatusColor(record.status)">{{ RefundStatusEnum[record.status].name }}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="申请时间">{{ record.create_time }}</a-descriptions-item> |
|
|
|
|
</a-descriptions> |
|
|
|
@ -76,22 +74,17 @@ |
|
|
|
|
<!-- 售后单信息 --> |
|
|
|
|
<a-descriptions title="处理进度"> |
|
|
|
|
<a-descriptions-item label="审核状态 (商家)"> |
|
|
|
|
<a-tag |
|
|
|
|
:color="renderAuditStatusColor(record.audit_status)" |
|
|
|
|
>{{ AuditStatusEnum[record.audit_status].name }}</a-tag> |
|
|
|
|
<a-tag :color="renderAuditStatusColor(record.audit_status)">{{ |
|
|
|
|
AuditStatusEnum[record.audit_status].name |
|
|
|
|
}}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item v-if="record.type == RefundTypeEnum.RETURN.value" label="发货状态 (买家)"> |
|
|
|
|
<a-tag |
|
|
|
|
:color="record.is_user_send ? 'green' : ''" |
|
|
|
|
>{{ record.is_user_send ? '已发货' : '待发货' }}</a-tag> |
|
|
|
|
<a-tag :color="record.is_user_send ? 'green' : ''">{{ record.is_user_send ? '已发货' : '待发货' }}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item v-if="record.type == RefundTypeEnum.RETURN.value" label="收货状态 (商家)"> |
|
|
|
|
<a-tag :color="record.is_receipt ? 'green' : ''">{{ record.is_receipt ? '已收货' : '待收货' }}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item |
|
|
|
|
v-if="record.audit_status == AuditStatusEnum.REJECTED.value" |
|
|
|
|
label="拒绝原因" |
|
|
|
|
> |
|
|
|
|
<a-descriptions-item v-if="record.audit_status == AuditStatusEnum.REJECTED.value" label="拒绝原因"> |
|
|
|
|
<span>{{ record.refuse_desc }}</span> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
</a-descriptions> |
|
|
|
@ -135,7 +128,7 @@ |
|
|
|
|
image: item.goods_image, |
|
|
|
|
imageAlt: '商品图片', |
|
|
|
|
title: item.goods_name, |
|
|
|
|
goodsProps: item.goods_props |
|
|
|
|
goodsProps: item.goods_props, |
|
|
|
|
}" |
|
|
|
|
/> |
|
|
|
|
</template> |
|
|
|
@ -153,7 +146,7 @@ |
|
|
|
|
|
|
|
|
|
<!-- 商家退货地址 --> |
|
|
|
|
<a-card |
|
|
|
|
v-if="record.audit_status == AuditStatusEnum.REVIEWED.value" |
|
|
|
|
v-if="record.audit_status == AuditStatusEnum.REVIEWED.value && record.type != RefundTypeEnum.RETURNPRICE.value" |
|
|
|
|
class="mt-20" |
|
|
|
|
:bordered="false" |
|
|
|
|
> |
|
|
|
@ -161,11 +154,7 @@ |
|
|
|
|
<a-descriptions-item label="收货人姓名">{{ record.address.name }}</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="联系电话">{{ record.address.phone }}</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="所在地区"> |
|
|
|
|
<span |
|
|
|
|
class="region mr-5" |
|
|
|
|
v-for="(region, idx) in record.address.region" |
|
|
|
|
:key="idx" |
|
|
|
|
>{{ region }}</span> |
|
|
|
|
<span class="region mr-5" v-for="(region, idx) in record.address.region" :key="idx">{{ region }}</span> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="详细地址">{{ record.address.detail }}</a-descriptions-item> |
|
|
|
|
</a-descriptions> |
|
|
|
@ -173,11 +162,11 @@ |
|
|
|
|
|
|
|
|
|
<!-- 用户发货信息 --> |
|
|
|
|
<a-card |
|
|
|
|
v-if="( |
|
|
|
|
record.type == RefundTypeEnum.RETURN.value |
|
|
|
|
&& record.audit_status == AuditStatusEnum.REVIEWED.value |
|
|
|
|
&& record.is_user_send |
|
|
|
|
)" |
|
|
|
|
v-if=" |
|
|
|
|
record.type == RefundTypeEnum.RETURN.value && |
|
|
|
|
record.audit_status == AuditStatusEnum.REVIEWED.value && |
|
|
|
|
record.is_user_send |
|
|
|
|
" |
|
|
|
|
class="mt-20" |
|
|
|
|
:bordered="false" |
|
|
|
|
> |
|
|
|
@ -185,14 +174,11 @@ |
|
|
|
|
<a-descriptions-item label="物流公司">{{ record.express.express_name }}</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="物流单号">{{ record.express_no }}</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="发货状态"> |
|
|
|
|
<a-tag |
|
|
|
|
:color="record.is_user_send ? 'green' : ''" |
|
|
|
|
>{{ record.is_user_send ? '已发货' : '待发货' }}</a-tag> |
|
|
|
|
<a-tag :color="record.is_user_send ? 'green' : ''">{{ record.is_user_send ? '已发货' : '待发货' }}</a-tag> |
|
|
|
|
</a-descriptions-item> |
|
|
|
|
<a-descriptions-item label="发货时间">{{ record.send_time }}</a-descriptions-item> |
|
|
|
|
</a-descriptions> |
|
|
|
|
</a-card> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
<AuditForm ref="AuditForm" @handleSubmit="handleRefresh" /> |
|
|
|
|
<ReceiptForm ref="ReceiptForm" @handleSubmit="handleRefresh" /> |
|
|
|
@ -210,33 +196,33 @@ import { AuditForm, ReceiptForm } from './modules' |
|
|
|
|
const goodsColumns = [ |
|
|
|
|
{ |
|
|
|
|
title: '商品信息', |
|
|
|
|
scopedSlots: { customRender: 'goodsInfo' } |
|
|
|
|
scopedSlots: { customRender: 'goodsInfo' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '商品编码', |
|
|
|
|
dataIndex: 'goods_no', |
|
|
|
|
scopedSlots: { customRender: 'goods_no' } |
|
|
|
|
scopedSlots: { customRender: 'goods_no' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '重量(Kg)', |
|
|
|
|
dataIndex: 'goods_weight', |
|
|
|
|
scopedSlots: { customRender: 'goods_weight' } |
|
|
|
|
scopedSlots: { customRender: 'goods_weight' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '单价', |
|
|
|
|
dataIndex: 'goods_price', |
|
|
|
|
scopedSlots: { customRender: 'goods_price' } |
|
|
|
|
scopedSlots: { customRender: 'goods_price' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '购买数量', |
|
|
|
|
dataIndex: 'total_num', |
|
|
|
|
scopedSlots: { customRender: 'total_num' } |
|
|
|
|
scopedSlots: { customRender: 'total_num' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '实际付款价', |
|
|
|
|
dataIndex: 'total_pay_price', |
|
|
|
|
scopedSlots: { customRender: 'total_pay_price' } |
|
|
|
|
} |
|
|
|
|
scopedSlots: { customRender: 'total_pay_price' }, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -245,9 +231,9 @@ export default { |
|
|
|
|
GoodsItem, |
|
|
|
|
UserItem, |
|
|
|
|
AuditForm, |
|
|
|
|
ReceiptForm |
|
|
|
|
ReceiptForm, |
|
|
|
|
}, |
|
|
|
|
data () { |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
// 正在加载 |
|
|
|
|
isLoading: true, |
|
|
|
@ -258,81 +244,79 @@ export default { |
|
|
|
|
// 商品内容表头 |
|
|
|
|
goodsColumns, |
|
|
|
|
// 商品列表数据 |
|
|
|
|
goodsList: [] |
|
|
|
|
goodsList: [], |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
beforeCreate () { |
|
|
|
|
beforeCreate() { |
|
|
|
|
// 批量给当前实例赋值 |
|
|
|
|
assignment(this, { |
|
|
|
|
AuditStatusEnum, |
|
|
|
|
RefundStatusEnum, |
|
|
|
|
RefundTypeEnum |
|
|
|
|
RefundTypeEnum, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
created () { |
|
|
|
|
created() { |
|
|
|
|
// 记录售后单ID |
|
|
|
|
this.orderRefundId = this.$route.query.orderRefundId |
|
|
|
|
// 刷新页面 |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
// 刷新页面 |
|
|
|
|
handleRefresh () { |
|
|
|
|
handleRefresh() { |
|
|
|
|
// 获取当前记录 |
|
|
|
|
this.getDetail() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 获取当前记录 |
|
|
|
|
getDetail () { |
|
|
|
|
getDetail() { |
|
|
|
|
const { orderRefundId } = this |
|
|
|
|
this.isLoading = true |
|
|
|
|
Api.detail({ orderRefundId }) |
|
|
|
|
.then(result => { |
|
|
|
|
.then((result) => { |
|
|
|
|
// 当前记录 |
|
|
|
|
this.record = result.data.detail |
|
|
|
|
// 商品列表 |
|
|
|
|
this.goodsList = [this.record.orderGoods] |
|
|
|
|
}) |
|
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 渲染商家审核状态标签颜色 |
|
|
|
|
renderAuditStatusColor (status) { |
|
|
|
|
renderAuditStatusColor(status) { |
|
|
|
|
const { AuditStatusEnum } = this |
|
|
|
|
const ColorEnum = { |
|
|
|
|
[AuditStatusEnum.WAIT.value]: '', |
|
|
|
|
[AuditStatusEnum.REVIEWED.value]: 'green', |
|
|
|
|
[AuditStatusEnum.REJECTED.value]: 'red' |
|
|
|
|
[AuditStatusEnum.REJECTED.value]: 'red', |
|
|
|
|
} |
|
|
|
|
return ColorEnum[status] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 渲染售后单状态标签颜色 |
|
|
|
|
renderRefundStatusColor (status) { |
|
|
|
|
renderRefundStatusColor(status) { |
|
|
|
|
const { RefundStatusEnum } = this |
|
|
|
|
const ColorEnum = { |
|
|
|
|
[RefundStatusEnum.NORMAL.value]: '', |
|
|
|
|
[RefundStatusEnum.REJECTED.value]: 'red', |
|
|
|
|
[RefundStatusEnum.COMPLETED.value]: 'green', |
|
|
|
|
[RefundStatusEnum.CANCELLED.value]: 'red' |
|
|
|
|
[RefundStatusEnum.CANCELLED.value]: 'red', |
|
|
|
|
} |
|
|
|
|
return ColorEnum[status] |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 商家审核 |
|
|
|
|
handleAudit () { |
|
|
|
|
handleAudit() { |
|
|
|
|
const { record } = this |
|
|
|
|
this.$refs.AuditForm.show(record) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 确认收货 |
|
|
|
|
handleReceipt () { |
|
|
|
|
handleReceipt() { |
|
|
|
|
const { record } = this |
|
|
|
|
this.$refs.ReceiptForm.show(record) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="less" scoped> |
|
|
|
|