|
|
@ -157,44 +157,44 @@ |
|
|
|
v-if="$auth('/order/detail')" |
|
|
|
v-if="$auth('/order/detail')" |
|
|
|
:to="{ path: '/order/detail', query: { orderId: item.order_id } }" |
|
|
|
:to="{ path: '/order/detail', query: { orderId: item.order_id } }" |
|
|
|
target="_blank" |
|
|
|
target="_blank" |
|
|
|
>详情</router-link |
|
|
|
>详情</router-link |
|
|
|
> |
|
|
|
> |
|
|
|
<a |
|
|
|
<a |
|
|
|
v-action:deliver |
|
|
|
v-action:deliver |
|
|
|
v-if=" |
|
|
|
v-if=" |
|
|
|
item.pay_status == PayStatusEnum.SUCCESS.value && |
|
|
|
item.pay_status == PayStatusEnum.SUCCESS.value && |
|
|
|
inArray(item.delivery_type, [ |
|
|
|
inArray(item.delivery_type, [ |
|
|
|
DeliveryTypeEnum.EXPRESS.value, |
|
|
|
DeliveryTypeEnum.EXPRESS.value, |
|
|
|
DeliveryTypeEnum.NOTHING.value, |
|
|
|
DeliveryTypeEnum.NOTHING.value, |
|
|
|
]) && |
|
|
|
]) && |
|
|
|
item.delivery_status != DeliveryStatusEnum.DELIVERED.value && |
|
|
|
item.delivery_status != DeliveryStatusEnum.DELIVERED.value && |
|
|
|
!inArray(item.order_status, [ |
|
|
|
!inArray(item.order_status, [ |
|
|
|
OrderStatusEnum.CANCELLED.value, |
|
|
|
OrderStatusEnum.CANCELLED.value, |
|
|
|
OrderStatusEnum.APPLY_CANCEL.value, |
|
|
|
OrderStatusEnum.APPLY_CANCEL.value, |
|
|
|
]) |
|
|
|
]) |
|
|
|
" |
|
|
|
" |
|
|
|
@click="handleDelivery(item)" |
|
|
|
@click="handleDelivery(item)" |
|
|
|
>发货</a |
|
|
|
>发货</a |
|
|
|
> |
|
|
|
> |
|
|
|
<a |
|
|
|
<a |
|
|
|
v-action:extract |
|
|
|
v-action:extract |
|
|
|
v-if=" |
|
|
|
v-if=" |
|
|
|
item.pay_status == PayStatusEnum.SUCCESS.value && |
|
|
|
item.pay_status == PayStatusEnum.SUCCESS.value && |
|
|
|
item.delivery_type == DeliveryTypeEnum.EXTRACT.value && |
|
|
|
item.delivery_type == DeliveryTypeEnum.EXTRACT.value && |
|
|
|
item.delivery_status != DeliveryStatusEnum.DELIVERED.value && |
|
|
|
item.delivery_status != DeliveryStatusEnum.DELIVERED.value && |
|
|
|
!inArray(item.order_status, [ |
|
|
|
!inArray(item.order_status, [ |
|
|
|
OrderStatusEnum.CANCELLED.value, |
|
|
|
OrderStatusEnum.CANCELLED.value, |
|
|
|
OrderStatusEnum.APPLY_CANCEL.value, |
|
|
|
OrderStatusEnum.APPLY_CANCEL.value, |
|
|
|
]) |
|
|
|
]) |
|
|
|
" |
|
|
|
" |
|
|
|
@click="handleExtract(item)" |
|
|
|
@click="handleExtract(item)" |
|
|
|
>自提核销</a |
|
|
|
>自提核销</a |
|
|
|
> |
|
|
|
> |
|
|
|
<a |
|
|
|
<a |
|
|
|
v-action:cancel |
|
|
|
v-action:cancel |
|
|
|
v-if="item.order_status == OrderStatusEnum.APPLY_CANCEL.value" |
|
|
|
v-if="item.order_status == OrderStatusEnum.APPLY_CANCEL.value" |
|
|
|
@click="handleCancel(item)" |
|
|
|
@click="handleCancel(item)" |
|
|
|
>审核取消</a |
|
|
|
>审核取消</a |
|
|
|
> |
|
|
|
> |
|
|
|
<a v-action:delete @click="handleDelete(item)">删除</a> |
|
|
|
<a v-action:delete @click="handleDelete(item)">删除</a> |
|
|
|
<a @click="copyText(item.copy_text)">复制</a> |
|
|
|
<a @click="copyText(item.copy_text)">复制</a> |
|
|
@ -248,7 +248,7 @@ import { |
|
|
|
OrderSourceEnum, |
|
|
|
OrderSourceEnum, |
|
|
|
OrderStatusEnum, |
|
|
|
OrderStatusEnum, |
|
|
|
PayStatusEnum, |
|
|
|
PayStatusEnum, |
|
|
|
ReceiptStatusEnum, |
|
|
|
ReceiptStatusEnum |
|
|
|
} from '@/common/enum/order' |
|
|
|
} from '@/common/enum/order' |
|
|
|
import { PaymentMethodEnum } from '@/common/enum/payment' |
|
|
|
import { PaymentMethodEnum } from '@/common/enum/payment' |
|
|
|
import { DeliveryForm, ExtractForm, CancelForm } from './modules' |
|
|
|
import { DeliveryForm, ExtractForm, CancelForm } from './modules' |
|
|
@ -259,45 +259,45 @@ const columns = [ |
|
|
|
title: '商品信息', |
|
|
|
title: '商品信息', |
|
|
|
align: 'center', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'goods', |
|
|
|
dataIndex: 'goods', |
|
|
|
scopedSlots: { customRender: 'goods' }, |
|
|
|
scopedSlots: { customRender: 'goods' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '单价/数量', |
|
|
|
title: '单价/数量', |
|
|
|
align: 'center', |
|
|
|
align: 'center', |
|
|
|
scopedSlots: { customRender: 'unit_price' }, |
|
|
|
scopedSlots: { customRender: 'unit_price' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '实付款', |
|
|
|
title: '实付款', |
|
|
|
align: 'center', |
|
|
|
align: 'center', |
|
|
|
dataIndex: 'pay_price', |
|
|
|
dataIndex: 'pay_price', |
|
|
|
scopedSlots: { customRender: 'pay_price' }, |
|
|
|
scopedSlots: { customRender: 'pay_price' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '买家', |
|
|
|
title: '买家', |
|
|
|
dataIndex: 'user', |
|
|
|
dataIndex: 'user', |
|
|
|
scopedSlots: { customRender: 'user' }, |
|
|
|
scopedSlots: { customRender: 'user' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '支付方式', |
|
|
|
title: '支付方式', |
|
|
|
dataIndex: 'pay_method', |
|
|
|
dataIndex: 'pay_method', |
|
|
|
scopedSlots: { customRender: 'pay_method' }, |
|
|
|
scopedSlots: { customRender: 'pay_method' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '配送方式', |
|
|
|
title: '配送方式', |
|
|
|
dataIndex: 'delivery_type', |
|
|
|
dataIndex: 'delivery_type', |
|
|
|
scopedSlots: { customRender: 'delivery_type' }, |
|
|
|
scopedSlots: { customRender: 'delivery_type' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '交易状态', |
|
|
|
title: '交易状态', |
|
|
|
dataIndex: 'status', |
|
|
|
dataIndex: 'status', |
|
|
|
scopedSlots: { customRender: 'status' }, |
|
|
|
scopedSlots: { customRender: 'status' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
title: '操作', |
|
|
|
title: '操作', |
|
|
|
dataIndex: 'action', |
|
|
|
dataIndex: 'action', |
|
|
|
width: '180px', |
|
|
|
width: '180px', |
|
|
|
scopedSlots: { customRender: 'action' }, |
|
|
|
scopedSlots: { customRender: 'action' } |
|
|
|
}, |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
// 搜索关键词类型枚举 |
|
|
|
// 搜索关键词类型枚举 |
|
|
@ -306,7 +306,7 @@ const SearchTypeEnum = [ |
|
|
|
{ name: '会员昵称', value: 20 }, |
|
|
|
{ name: '会员昵称', value: 20 }, |
|
|
|
{ name: '会员ID', value: 30 }, |
|
|
|
{ name: '会员ID', value: 30 }, |
|
|
|
{ name: '收货人姓名', value: 40 }, |
|
|
|
{ name: '收货人姓名', value: 40 }, |
|
|
|
{ name: '收货人电话', value: 50 }, |
|
|
|
{ name: '收货人电话', value: 50 } |
|
|
|
] |
|
|
|
] |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
@ -317,9 +317,9 @@ export default { |
|
|
|
UserItem, |
|
|
|
UserItem, |
|
|
|
DeliveryForm, |
|
|
|
DeliveryForm, |
|
|
|
ExtractForm, |
|
|
|
ExtractForm, |
|
|
|
CancelForm, |
|
|
|
CancelForm |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
// 订单类型 |
|
|
|
// 订单类型 |
|
|
|
dataType: this.getDataType(), |
|
|
|
dataType: this.getDataType(), |
|
|
@ -337,13 +337,13 @@ export default { |
|
|
|
textToCopy: '', |
|
|
|
textToCopy: '', |
|
|
|
// 列表数据 |
|
|
|
// 列表数据 |
|
|
|
orderList: { data: [], total: 0 }, |
|
|
|
orderList: { data: [], total: 0 }, |
|
|
|
pageSizeOptions: ['15', '30', '50', '100','200','300','400','500'], |
|
|
|
pageSizeOptions: ['15', '30', '50', '100', '200', '300', '400', '500'], |
|
|
|
showTotal: (total) => `共 ${total} 条记录`, // 显示总数 |
|
|
|
showTotal: (total) => `共 ${total} 条记录`, // 显示总数 |
|
|
|
// 自提门店列表 |
|
|
|
// 自提门店列表 |
|
|
|
shopList: [], |
|
|
|
shopList: [] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
beforeCreate() { |
|
|
|
beforeCreate () { |
|
|
|
// 批量给当前实例赋值 |
|
|
|
// 批量给当前实例赋值 |
|
|
|
assignment(this, { |
|
|
|
assignment(this, { |
|
|
|
inArray, |
|
|
|
inArray, |
|
|
@ -355,16 +355,16 @@ export default { |
|
|
|
ReceiptStatusEnum, |
|
|
|
ReceiptStatusEnum, |
|
|
|
PaymentMethodEnum, |
|
|
|
PaymentMethodEnum, |
|
|
|
SearchTypeEnum, |
|
|
|
SearchTypeEnum, |
|
|
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE, |
|
|
|
simpleImage: Empty.PRESENTED_IMAGE_SIMPLE |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
// 监听路由变化 |
|
|
|
// 监听路由变化 |
|
|
|
$route() { |
|
|
|
$route () { |
|
|
|
this.init() |
|
|
|
this.init() |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
created() { |
|
|
|
created () { |
|
|
|
// 初始化页面 |
|
|
|
// 初始化页面 |
|
|
|
this.init() |
|
|
|
this.init() |
|
|
|
// 获取门店列表 |
|
|
|
// 获取门店列表 |
|
|
@ -372,7 +372,7 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
// 初始化页面 |
|
|
|
// 初始化页面 |
|
|
|
init() { |
|
|
|
init () { |
|
|
|
this.dataType = this.getDataType() |
|
|
|
this.dataType = this.getDataType() |
|
|
|
this.searchForm.resetFields() |
|
|
|
this.searchForm.resetFields() |
|
|
|
this.queryParam = {} |
|
|
|
this.queryParam = {} |
|
|
@ -380,16 +380,16 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取门店列表 |
|
|
|
// 获取门店列表 |
|
|
|
getShopList() { |
|
|
|
getShopList () { |
|
|
|
ShopApi.all().then((result) => (this.shopList = result.data.list)) |
|
|
|
ShopApi.all().then((result) => (this.shopList = result.data.list)) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 获取当前标签 |
|
|
|
// 获取当前标签 |
|
|
|
getDataType() { |
|
|
|
getDataType () { |
|
|
|
return this.$route.path.split('/')[3].replace('-', '_') |
|
|
|
return this.$route.path.split('/')[3].replace('-', '_') |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
async copyText(text) { |
|
|
|
async copyText (text) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
const textToCopy = text |
|
|
|
const textToCopy = text |
|
|
|
await navigator.clipboard.writeText(textToCopy) |
|
|
|
await navigator.clipboard.writeText(textToCopy) |
|
|
@ -399,7 +399,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取列表数据 |
|
|
|
// 获取列表数据 |
|
|
|
getList() { |
|
|
|
getList () { |
|
|
|
const { dataType, queryParam, page } = this |
|
|
|
const { dataType, queryParam, page } = this |
|
|
|
this.isLoading = true |
|
|
|
this.isLoading = true |
|
|
|
return Api.list({ dataType, ...queryParam, page, pageSize: this.pageSizes }) |
|
|
|
return Api.list({ dataType, ...queryParam, page, pageSize: this.pageSizes }) |
|
|
@ -410,13 +410,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 渲染订单状态标签颜色 |
|
|
|
// 渲染订单状态标签颜色 |
|
|
|
renderOrderStatusColor(orderStatus) { |
|
|
|
renderOrderStatusColor (orderStatus) { |
|
|
|
const { OrderStatusEnum } = this |
|
|
|
const { OrderStatusEnum } = this |
|
|
|
const ColorEnum = { |
|
|
|
const ColorEnum = { |
|
|
|
[OrderStatusEnum.NORMAL.value]: '', |
|
|
|
[OrderStatusEnum.NORMAL.value]: '', |
|
|
|
[OrderStatusEnum.CANCELLED.value]: 'red', |
|
|
|
[OrderStatusEnum.CANCELLED.value]: 'red', |
|
|
|
[OrderStatusEnum.APPLY_CANCEL.value]: 'red', |
|
|
|
[OrderStatusEnum.APPLY_CANCEL.value]: 'red', |
|
|
|
[OrderStatusEnum.COMPLETED.value]: 'green', |
|
|
|
[OrderStatusEnum.COMPLETED.value]: 'green' |
|
|
|
} |
|
|
|
} |
|
|
|
return ColorEnum[orderStatus] |
|
|
|
return ColorEnum[orderStatus] |
|
|
|
}, |
|
|
|
}, |
|
|
@ -425,13 +425,13 @@ export default { |
|
|
|
* 刷新列表 |
|
|
|
* 刷新列表 |
|
|
|
* @param Boolean bool 强制刷新到第一页 |
|
|
|
* @param Boolean bool 强制刷新到第一页 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
handleRefresh(bool = false) { |
|
|
|
handleRefresh (bool = false) { |
|
|
|
bool && (this.page = 1) |
|
|
|
bool && (this.page = 1) |
|
|
|
this.getList() |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 确认搜索 |
|
|
|
// 确认搜索 |
|
|
|
handleSearch(e) { |
|
|
|
handleSearch (e) { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
|
this.searchForm.validateFields((error, values) => { |
|
|
|
this.searchForm.validateFields((error, values) => { |
|
|
|
if (!error) { |
|
|
|
if (!error) { |
|
|
@ -442,53 +442,53 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 重置搜索表单 |
|
|
|
// 重置搜索表单 |
|
|
|
handleReset() { |
|
|
|
handleReset () { |
|
|
|
this.searchForm.resetFields() |
|
|
|
this.searchForm.resetFields() |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 翻页事件 |
|
|
|
// 翻页事件 |
|
|
|
onChangePage(current, size) { |
|
|
|
onChangePage (current, size) { |
|
|
|
this.page = current |
|
|
|
this.page = current |
|
|
|
this.pageSizes = size |
|
|
|
this.pageSizes = size |
|
|
|
this.handleRefresh() |
|
|
|
this.handleRefresh() |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSizeChange(current, size) { |
|
|
|
handleSizeChange (current, size) { |
|
|
|
this.page = current |
|
|
|
this.page = current |
|
|
|
this.pageSizes = size |
|
|
|
this.pageSizes = size |
|
|
|
this.handleRefresh() |
|
|
|
this.handleRefresh() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 删除记录 |
|
|
|
// 删除记录 |
|
|
|
handleDelete(item) { |
|
|
|
handleDelete (item) { |
|
|
|
const app = this |
|
|
|
const app = this |
|
|
|
const modal = app.$confirm({ |
|
|
|
const modal = app.$confirm({ |
|
|
|
title: '您确定要删除该订单记录吗?', |
|
|
|
title: '您确定要删除该订单记录吗?', |
|
|
|
content: '删除后不可恢复,请谨慎操作', |
|
|
|
content: '删除后不可恢复,请谨慎操作', |
|
|
|
onOk() { |
|
|
|
onOk () { |
|
|
|
return EventApi.deleted(item.order_id) |
|
|
|
return EventApi.deleted(item.order_id) |
|
|
|
.then((result) => { |
|
|
|
.then((result) => { |
|
|
|
app.$message.success(result.message, 1.5) |
|
|
|
app.$message.success(result.message, 1.5) |
|
|
|
app.handleRefresh() |
|
|
|
app.handleRefresh() |
|
|
|
}) |
|
|
|
}) |
|
|
|
.finally((result) => modal.destroy()) |
|
|
|
.finally((result) => modal.destroy()) |
|
|
|
}, |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 订单发货 |
|
|
|
// 订单发货 |
|
|
|
handleDelivery(record) { |
|
|
|
handleDelivery (record) { |
|
|
|
this.$refs.DeliveryForm.show(record) |
|
|
|
this.$refs.DeliveryForm.show(record) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 自提核销 |
|
|
|
// 自提核销 |
|
|
|
handleExtract(record) { |
|
|
|
handleExtract (record) { |
|
|
|
this.$refs.ExtractForm.show(record) |
|
|
|
this.$refs.ExtractForm.show(record) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
// 审核取消订单 |
|
|
|
// 审核取消订单 |
|
|
|
handleCancel(record) { |
|
|
|
handleCancel (record) { |
|
|
|
this.$refs.CancelForm.show(record) |
|
|
|
this.$refs.CancelForm.show(record) |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
<style lang="less" scoped> |
|
|
|
<style lang="less" scoped> |
|
|
|