|
|
|
@ -8,37 +8,27 @@ |
|
|
|
|
<a-form class="search-form" :form="searchForm" layout="inline" @submit="handleSearch"> |
|
|
|
|
<a-form-item label="关键词查询"> |
|
|
|
|
<a-input style="width: 342px" placeholder="请输入关键词" v-decorator="['searchValue']"> |
|
|
|
|
<a-select |
|
|
|
|
slot="addonBefore" |
|
|
|
|
v-decorator="['searchType', { initialValue: 10 }]" |
|
|
|
|
style="width: 100px" |
|
|
|
|
> |
|
|
|
|
<a-select-option |
|
|
|
|
v-for="(item, index) in SearchTypeEnum" |
|
|
|
|
:key="index" |
|
|
|
|
:value="item.value" |
|
|
|
|
>{{ item.name }}</a-select-option> |
|
|
|
|
<a-select slot="addonBefore" v-decorator="['searchType', { initialValue: 10 }]" style="width: 100px"> |
|
|
|
|
<a-select-option v-for="(item, index) in SearchTypeEnum" :key="index" :value="item.value">{{ |
|
|
|
|
item.name |
|
|
|
|
}}</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-input> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="售后类型"> |
|
|
|
|
<a-select v-decorator="['refundType', { initialValue: -1 }]"> |
|
|
|
|
<a-select-option :value="-1">全部</a-select-option> |
|
|
|
|
<a-select-option |
|
|
|
|
v-for="(item, index) in RefundTypeEnum.data" |
|
|
|
|
:key="index" |
|
|
|
|
:value="item.value" |
|
|
|
|
>{{ item.name }}</a-select-option> |
|
|
|
|
<a-select-option v-for="(item, index) in RefundTypeEnum.data" :key="index" :value="item.value">{{ |
|
|
|
|
item.name |
|
|
|
|
}}</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="售后单状态"> |
|
|
|
|
<a-select v-decorator="['refundStatus', { initialValue: -1 }]"> |
|
|
|
|
<a-select-option :value="-1">全部</a-select-option> |
|
|
|
|
<a-select-option |
|
|
|
|
v-for="(item, index) in RefundStatusEnum.data" |
|
|
|
|
:key="index" |
|
|
|
|
:value="item.value" |
|
|
|
|
>{{ item.name }}</a-select-option> |
|
|
|
|
<a-select-option v-for="(item, index) in RefundStatusEnum.data" :key="index" :value="item.value">{{ |
|
|
|
|
item.name |
|
|
|
|
}}</a-select-option> |
|
|
|
|
</a-select> |
|
|
|
|
</a-form-item> |
|
|
|
|
<a-form-item label="申请时间"> |
|
|
|
@ -87,7 +77,7 @@ |
|
|
|
|
image: item.orderGoods.goods_image, |
|
|
|
|
imageAlt: '商品图片', |
|
|
|
|
title: item.orderGoods.goods_name, |
|
|
|
|
goodsProps: item.orderGoods.goods_props |
|
|
|
|
goodsProps: item.orderGoods.goods_props, |
|
|
|
|
}" |
|
|
|
|
/> |
|
|
|
|
</td> |
|
|
|
@ -107,49 +97,52 @@ |
|
|
|
|
<td> |
|
|
|
|
<p class="mtb-2"> |
|
|
|
|
<span class="f-13">商家审核:</span> |
|
|
|
|
<a-tag |
|
|
|
|
:color="renderAuditStatusColor(item.audit_status)" |
|
|
|
|
>{{ AuditStatusEnum[item.audit_status].name }}</a-tag> |
|
|
|
|
<a-tag :color="renderAuditStatusColor(item.audit_status)">{{ |
|
|
|
|
AuditStatusEnum[item.audit_status].name |
|
|
|
|
}}</a-tag> |
|
|
|
|
</p> |
|
|
|
|
<p v-if="item.type == RefundTypeEnum.RETURN.value" class="mtb-2"> |
|
|
|
|
<span class="f-13">用户发货:</span> |
|
|
|
|
<a-tag |
|
|
|
|
:color="item.is_user_send ? 'green' : ''" |
|
|
|
|
>{{ item.is_user_send ? '已发货' : '待发货' }}</a-tag> |
|
|
|
|
<a-tag :color="item.is_user_send ? 'green' : ''">{{ |
|
|
|
|
item.is_user_send ? '已发货' : '待发货' |
|
|
|
|
}}</a-tag> |
|
|
|
|
</p> |
|
|
|
|
<p v-if="item.type == RefundTypeEnum.RETURN.value" class="mtb-2"> |
|
|
|
|
<span class="f-13">商家收货:</span> |
|
|
|
|
<a-tag |
|
|
|
|
:color="item.is_receipt ? 'green' : ''" |
|
|
|
|
>{{ item.is_receipt ? '已收货' : '待收货' }}</a-tag> |
|
|
|
|
<a-tag :color="item.is_receipt ? 'green' : ''">{{ |
|
|
|
|
item.is_receipt ? '已收货' : '待收货' |
|
|
|
|
}}</a-tag> |
|
|
|
|
</p> |
|
|
|
|
</td> |
|
|
|
|
<td> |
|
|
|
|
<a-tag |
|
|
|
|
:color="renderRefundStatusColor(item.status)" |
|
|
|
|
>{{ RefundStatusEnum[item.status].name }}</a-tag> |
|
|
|
|
<a-tag :color="renderRefundStatusColor(item.status)">{{ |
|
|
|
|
RefundStatusEnum[item.status].name |
|
|
|
|
}}</a-tag> |
|
|
|
|
</td> |
|
|
|
|
<td> |
|
|
|
|
<div class="actions"> |
|
|
|
|
<router-link |
|
|
|
|
v-if="$auth('/order/refund/detail')" |
|
|
|
|
:to="{ path: '/order/refund/detail', query: { orderRefundId: item.order_refund_id } }" |
|
|
|
|
>详情</router-link> |
|
|
|
|
>详情</router-link |
|
|
|
|
> |
|
|
|
|
<a |
|
|
|
|
v-action:audit |
|
|
|
|
v-if="item.audit_status == AuditStatusEnum.WAIT.value" |
|
|
|
|
@click="handleAudit(item)" |
|
|
|
|
>审核</a> |
|
|
|
|
>审核</a |
|
|
|
|
> |
|
|
|
|
<a |
|
|
|
|
v-action:receipt |
|
|
|
|
v-if="( |
|
|
|
|
item.type == RefundTypeEnum.RETURN.value |
|
|
|
|
&& item.audit_status == AuditStatusEnum.REVIEWED.value |
|
|
|
|
&& item.is_user_send |
|
|
|
|
&& !item.is_receipt |
|
|
|
|
)" |
|
|
|
|
v-if=" |
|
|
|
|
item.type == RefundTypeEnum.RETURN.value && |
|
|
|
|
item.audit_status == AuditStatusEnum.REVIEWED.value && |
|
|
|
|
item.is_user_send && |
|
|
|
|
!item.is_receipt |
|
|
|
|
" |
|
|
|
|
@click="handleReceipt(item)" |
|
|
|
|
>确认收货</a> |
|
|
|
|
>确认收货</a |
|
|
|
|
> |
|
|
|
|
</div> |
|
|
|
|
</td> |
|
|
|
|
</tr> |
|
|
|
@ -165,8 +158,15 @@ |
|
|
|
|
<div v-if="refundList.data.length" class="pagination"> |
|
|
|
|
<a-pagination |
|
|
|
|
:current="page" |
|
|
|
|
:pageSize="refundList.per_page" |
|
|
|
|
:default-page-size="pageSize" |
|
|
|
|
:pageSizes="pageSize" |
|
|
|
|
:total="refundList.total" |
|
|
|
|
:showSizeChanger="true" |
|
|
|
|
:showQuickJumper="true" |
|
|
|
|
:pageSizeOptions="pageSizeOptions" |
|
|
|
|
:layout="'total, sizes, prev, pager, next, jumper'" |
|
|
|
|
:showTotal="showTotal" |
|
|
|
|
@showSizeChange="handleSizeChange" |
|
|
|
|
@change="onChangePage" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
@ -188,52 +188,52 @@ import { AuditForm, ReceiptForm } from './modules' |
|
|
|
|
const columns = [ |
|
|
|
|
{ |
|
|
|
|
title: '商品信息', |
|
|
|
|
align: 'center' |
|
|
|
|
align: 'center', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '单价/数量', |
|
|
|
|
align: 'center', |
|
|
|
|
scopedSlots: { customRender: 'unit_price' } |
|
|
|
|
scopedSlots: { customRender: 'unit_price' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '付款金额', |
|
|
|
|
align: 'center', |
|
|
|
|
dataIndex: 'total_pay_price', |
|
|
|
|
scopedSlots: { customRender: 'pay_price' } |
|
|
|
|
scopedSlots: { customRender: 'pay_price' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '买家', |
|
|
|
|
dataIndex: 'user', |
|
|
|
|
scopedSlots: { customRender: 'user' } |
|
|
|
|
scopedSlots: { customRender: 'user' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '售后类型', |
|
|
|
|
dataIndex: 'type', |
|
|
|
|
scopedSlots: { customRender: 'type' } |
|
|
|
|
scopedSlots: { customRender: 'type' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '处理进度', |
|
|
|
|
dataIndex: 'progress', |
|
|
|
|
scopedSlots: { customRender: 'progress' } |
|
|
|
|
scopedSlots: { customRender: 'progress' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '售后单状态', |
|
|
|
|
dataIndex: 'status', |
|
|
|
|
scopedSlots: { customRender: 'status' } |
|
|
|
|
scopedSlots: { customRender: 'status' }, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
title: '操作', |
|
|
|
|
dataIndex: 'action', |
|
|
|
|
width: '180px', |
|
|
|
|
scopedSlots: { customRender: 'action' } |
|
|
|
|
} |
|
|
|
|
scopedSlots: { customRender: 'action' }, |
|
|
|
|
}, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
// 搜索关键词类型枚举 |
|
|
|
|
const SearchTypeEnum = [ |
|
|
|
|
{ name: '订单号', value: 10 }, |
|
|
|
|
{ name: '会员昵称', value: 20 }, |
|
|
|
|
{ name: '会员ID', value: 30 } |
|
|
|
|
{ name: '会员ID', value: 30 }, |
|
|
|
|
] |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
@ -242,7 +242,7 @@ export default { |
|
|
|
|
GoodsItem, |
|
|
|
|
UserItem, |
|
|
|
|
AuditForm, |
|
|
|
|
ReceiptForm |
|
|
|
|
ReceiptForm, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
@ -256,8 +256,12 @@ export default { |
|
|
|
|
columns, |
|
|
|
|
// 当前页码 |
|
|
|
|
page: 1, |
|
|
|
|
pageSize: 15, |
|
|
|
|
// 列表数据 |
|
|
|
|
refundList: { data: [], total: 0, per_page: 10 } |
|
|
|
|
pageSizeOptions: ['15', '30', '50'], |
|
|
|
|
showTotal: (total) => `共 ${total} 条记录`, // 显示总数 |
|
|
|
|
// 列表数据 |
|
|
|
|
refundList: { data: [], total: 0 }, |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
beforeCreate() { |
|
|
|
@ -268,7 +272,7 @@ export default { |
|
|
|
|
RefundStatusEnum, |
|
|
|
|
RefundTypeEnum, |
|
|
|
|
SearchTypeEnum, |
|
|
|
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE |
|
|
|
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
created() { |
|
|
|
@ -276,7 +280,6 @@ export default { |
|
|
|
|
this.init() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
|
|
|
|
|
// 初始化页面 |
|
|
|
|
init() { |
|
|
|
|
this.searchForm.resetFields() |
|
|
|
@ -288,11 +291,11 @@ export default { |
|
|
|
|
getList() { |
|
|
|
|
const { queryParam, page } = this |
|
|
|
|
this.isLoading = true |
|
|
|
|
return Api.list({ ...queryParam, page }) |
|
|
|
|
.then(response => { |
|
|
|
|
return Api.list({ ...queryParam, page,pageSize:this.pageSize }) |
|
|
|
|
.then((response) => { |
|
|
|
|
this.refundList = response.data.list |
|
|
|
|
}) |
|
|
|
|
.finally(() => this.isLoading = false) |
|
|
|
|
.finally(() => (this.isLoading = false)) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 渲染商家审核状态标签颜色 |
|
|
|
@ -301,7 +304,7 @@ export default { |
|
|
|
|
const ColorEnum = { |
|
|
|
|
[AuditStatusEnum.WAIT.value]: '', |
|
|
|
|
[AuditStatusEnum.REVIEWED.value]: 'green', |
|
|
|
|
[AuditStatusEnum.REJECTED.value]: 'red' |
|
|
|
|
[AuditStatusEnum.REJECTED.value]: 'red', |
|
|
|
|
} |
|
|
|
|
return ColorEnum[status] |
|
|
|
|
}, |
|
|
|
@ -313,7 +316,7 @@ export default { |
|
|
|
|
[RefundStatusEnum.NORMAL.value]: '', |
|
|
|
|
[RefundStatusEnum.REJECTED.value]: 'red', |
|
|
|
|
[RefundStatusEnum.COMPLETED.value]: 'green', |
|
|
|
|
[RefundStatusEnum.CANCELLED.value]: 'red' |
|
|
|
|
[RefundStatusEnum.CANCELLED.value]: 'red', |
|
|
|
|
} |
|
|
|
|
return ColorEnum[status] |
|
|
|
|
}, |
|
|
|
@ -344,11 +347,16 @@ export default { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 翻页事件 |
|
|
|
|
onChangePage (current) { |
|
|
|
|
onChangePage(current, size) { |
|
|
|
|
this.page = current |
|
|
|
|
this.pageSize = size |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}, |
|
|
|
|
handleSizeChange(current, size){ |
|
|
|
|
this.page = current |
|
|
|
|
this.pageSize = size |
|
|
|
|
this.handleRefresh() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 商家审核 |
|
|
|
|
handleAudit(record) { |
|
|
|
|
this.$refs.AuditForm.show(record) |
|
|
|
@ -357,9 +365,8 @@ export default { |
|
|
|
|
// 确认收货 |
|
|
|
|
handleReceipt(record) { |
|
|
|
|
this.$refs.ReceiptForm.show(record) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
<style lang="less" scoped> |
|
|
|
|