|
@@ -3,14 +3,14 @@
|
|
|
<ele-modal :width="1080" v-model="visible" title="订单日志">
|
|
<ele-modal :width="1080" v-model="visible" title="订单日志">
|
|
|
<ele-data-table :data="orderLog" :columns="columns">
|
|
<ele-data-table :data="orderLog" :columns="columns">
|
|
|
<template #status="{ row }">
|
|
<template #status="{ row }">
|
|
|
- <el-tag type="danger" v-if="row.cancelStatus == 1">已取消</el-tag>
|
|
|
|
|
- <dict-data
|
|
|
|
|
- v-else
|
|
|
|
|
- code="order_status"
|
|
|
|
|
- type="text"
|
|
|
|
|
- :model-value="row.status"
|
|
|
|
|
- />
|
|
|
|
|
- </template>
|
|
|
|
|
|
|
+ <el-tag type="danger" v-if="row.cancelStatus == 1">已取消</el-tag>
|
|
|
|
|
+ <dict-data
|
|
|
|
|
+ v-else
|
|
|
|
|
+ code="order_status"
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ :model-value="row.status"
|
|
|
|
|
+ />
|
|
|
|
|
+ </template>
|
|
|
</ele-data-table>
|
|
</ele-data-table>
|
|
|
|
|
|
|
|
<template #footer>
|
|
<template #footer>
|
|
@@ -23,6 +23,14 @@
|
|
|
import { ref, reactive, nextTick, getCurrentInstance } from 'vue';
|
|
import { ref, reactive, nextTick, getCurrentInstance } from 'vue';
|
|
|
|
|
|
|
|
import { pagePosts } from '@/api/system/post';
|
|
import { pagePosts } from '@/api/system/post';
|
|
|
|
|
+
|
|
|
|
|
+ const props = defineProps({
|
|
|
|
|
+ type: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default: 'order'
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
let { proxy } = getCurrentInstance();
|
|
let { proxy } = getCurrentInstance();
|
|
|
/** 弹窗是否打开 */
|
|
/** 弹窗是否打开 */
|
|
|
const visible = ref(false);
|
|
const visible = ref(false);
|
|
@@ -36,7 +44,9 @@
|
|
|
const handleOpen = (orderId) => {
|
|
const handleOpen = (orderId) => {
|
|
|
if (orderId) {
|
|
if (orderId) {
|
|
|
visible.value = true;
|
|
visible.value = true;
|
|
|
- getOrderLog(orderId);
|
|
|
|
|
|
|
+ props.type == 'refund'
|
|
|
|
|
+ ? getRefundOrderLog(orderId)
|
|
|
|
|
+ : getOrderLog(orderId);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -53,10 +63,22 @@
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
|
|
+ //退回订单日志
|
|
|
|
|
+ function getRefundOrderLog(orderId) {
|
|
|
|
|
+ proxy.$http
|
|
|
|
|
+ .get(`/order/orderInfo/refund/getOrderLogList?refundOrderId=${orderId}`)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ if (res.data.code === 200) {
|
|
|
|
|
+ orderLog.value = res.data.data;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ EleMessage.error(res.data.msg || '获取订单日志失败');
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
const columns = reactive([
|
|
const columns = reactive([
|
|
|
{ label: '订单编号', prop: 'orderId', width: 150 },
|
|
{ label: '订单编号', prop: 'orderId', width: 150 },
|
|
|
- { label: '状态', prop: 'status', width: 160, slot: 'status', },
|
|
|
|
|
|
|
+ { label: '状态', prop: 'status', width: 160 },
|
|
|
{ label: '操作者', prop: 'createName', width: 100 },
|
|
{ label: '操作者', prop: 'createName', width: 100 },
|
|
|
{ label: '日志描述', prop: 'content' },
|
|
{ label: '日志描述', prop: 'content' },
|
|
|
{ label: '操作时间', prop: 'createTime', width: 180 }
|
|
{ label: '操作时间', prop: 'createTime', width: 180 }
|