feat: 退款状态调整
This commit is contained in:
parent
02ba78a6a9
commit
bb694d86c5
|
|
@ -15,8 +15,8 @@
|
||||||
*/
|
*/
|
||||||
export function paidFilter(status) {
|
export function paidFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
true: '已支付',
|
true: "已支付",
|
||||||
false: '未支付',
|
false: "未支付"
|
||||||
};
|
};
|
||||||
return statusMap[status];
|
return statusMap[status];
|
||||||
}
|
}
|
||||||
|
|
@ -27,46 +27,38 @@ export function paidFilter(status) {
|
||||||
*/
|
*/
|
||||||
export function orderStatusFilter(status) {
|
export function orderStatusFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
0: '待付款',
|
0: "待付款",
|
||||||
1: '待发货',
|
1: "待发货",
|
||||||
2: '部分发货',
|
2: "部分发货",
|
||||||
3: '待核销',
|
3: "待核销",
|
||||||
4: '待收货',
|
4: "待收货",
|
||||||
5: '已收货',
|
5: "已收货",
|
||||||
6: '已完成',
|
6: "已完成",
|
||||||
9: '已取消',
|
9: "已取消"
|
||||||
};
|
};
|
||||||
return statusMap[status];
|
return statusMap[status];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description 订单中的退款状态
|
* @description 订单业务状态
|
||||||
*/
|
*/
|
||||||
export function orderRefundStatusFilter(status) {
|
export function orderBusinessStatusFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
0: '未退款',
|
0: "待支付",
|
||||||
1: '申请退款中',
|
1: "待接单",
|
||||||
2: '部分退款',
|
2: "待备货",
|
||||||
3: '已退款',
|
3: "待取货",
|
||||||
|
4: "已取货(待配送)",
|
||||||
|
5: "配送中(待送达)",
|
||||||
|
6: "已配送(待收货或已送达自提点)",
|
||||||
|
8: "完成(待评价或自动完成)",
|
||||||
|
"-1": "未支付订单取消",
|
||||||
|
"-2": "申请退款",
|
||||||
|
"-3": "同意退款",
|
||||||
|
"-4": "整单退款完成",
|
||||||
|
"-5": "部分退款完成"
|
||||||
};
|
};
|
||||||
return statusMap[status];
|
return statusMap[status] || statusMap[String(status)] || "未知状态";
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 退款单退款状态
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export function refundStatusFilter(status) {
|
|
||||||
const statusMap = {
|
|
||||||
0: '待审核',
|
|
||||||
1: '商家拒绝',
|
|
||||||
2: '退款中',
|
|
||||||
3: '退款成功',
|
|
||||||
4: '用户退货',
|
|
||||||
5: '商家待收货',
|
|
||||||
6: '已撤销',
|
|
||||||
};
|
|
||||||
return statusMap[status];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -74,9 +66,9 @@ export function refundStatusFilter(status) {
|
||||||
*/
|
*/
|
||||||
export function payTypeFilter(status) {
|
export function payTypeFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
weixin: '微信',
|
weixin: "微信",
|
||||||
alipay: '支付宝',
|
alipay: "支付宝",
|
||||||
yue: '余额',
|
yue: "余额"
|
||||||
};
|
};
|
||||||
return statusMap[status];
|
return statusMap[status];
|
||||||
}
|
}
|
||||||
|
|
@ -86,11 +78,11 @@ export function payTypeFilter(status) {
|
||||||
*/
|
*/
|
||||||
export function orderTypeFilter(status) {
|
export function orderTypeFilter(status) {
|
||||||
const statusMap = {
|
const statusMap = {
|
||||||
0: '普通订单',
|
0: "普通订单",
|
||||||
1: '视频号订单',
|
1: "视频号订单",
|
||||||
2: '秒杀订单',
|
2: "秒杀订单",
|
||||||
5: '云盘订单',
|
5: "云盘订单",
|
||||||
6: '卡密订单',
|
6: "卡密订单"
|
||||||
};
|
};
|
||||||
return statusMap[status];
|
return statusMap[status];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
ruleForm.preSaleStage === 1
|
ruleForm.preSaleStage === 1
|
||||||
? '已付定金'
|
? "已付定金"
|
||||||
: ruleForm.preSaleStage === 2
|
: ruleForm.preSaleStage === 2
|
||||||
? '已付尾款'
|
? "已付尾款"
|
||||||
: '待付定金'
|
: "待付定金"
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</el-form-item></el-col
|
</el-form-item></el-col
|
||||||
|
|
@ -220,7 +220,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { debounce, cloneDeep } from 'lodash'
|
import { debounce, cloneDeep } from "lodash";
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
|
|
@ -229,15 +229,15 @@ export default {
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
//表格属性
|
//表格属性
|
||||||
modalConfig: {
|
modalConfig: {
|
||||||
title: '订单详情',
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: '1200px',
|
width: "1200px",
|
||||||
fullscreen: true
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: []
|
tableData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// "modalConfig.show"(newVal) {
|
// "modalConfig.show"(newVal) {
|
||||||
|
|
@ -253,56 +253,39 @@ export default {
|
||||||
queryTableData(pageNo, pageSize) {},
|
queryTableData(pageNo, pageSize) {},
|
||||||
toggle(e) {
|
toggle(e) {
|
||||||
if (this.modalConfig.show == false) {
|
if (this.modalConfig.show == false) {
|
||||||
this.modalConfig.show = true
|
this.modalConfig.show = true;
|
||||||
} else {
|
} else {
|
||||||
this.modalConfig.show = false
|
this.modalConfig.show = false;
|
||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
this.init(cloneDeep(e))
|
this.init(cloneDeep(e));
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: () => {
|
add: () => {
|
||||||
this.modalConfig.title = '订单详情'
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = true
|
this.isAdd = true;
|
||||||
},
|
},
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = '订单详情'
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = false
|
this.isAdd = false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
console.log(row)
|
console.log(row);
|
||||||
this.ruleForm = row
|
this.ruleForm = row;
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e)
|
console.log(e);
|
||||||
},
|
|
||||||
getRefundStatus(val) {
|
|
||||||
if (val == 0) {
|
|
||||||
return '正常'
|
|
||||||
} else if (val == 1) {
|
|
||||||
return '退款中'
|
|
||||||
} else if (val == 2) {
|
|
||||||
return '完全退款'
|
|
||||||
} else if (val == 3) {
|
|
||||||
return '部分退款'
|
|
||||||
} else if (val == 4) {
|
|
||||||
return '拒绝用户退款'
|
|
||||||
} else if (val == -1) {
|
|
||||||
return '退款失败'
|
|
||||||
} else if (val == -2) {
|
|
||||||
return '用户申请退款中'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: '关闭',
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle()
|
this.toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
|
|
@ -312,10 +295,10 @@ export default {
|
||||||
// handle: () => {
|
// handle: () => {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {}
|
asyncComputed: {}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
|
|
@ -109,11 +109,11 @@ export default {
|
||||||
title: "订单详情",
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: "1200px",
|
width: "1200px",
|
||||||
fullscreen: true,
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: [],
|
tableData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -145,7 +145,7 @@ export default {
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = "店铺详情";
|
this.modalConfig.title = "店铺详情";
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
|
|
@ -154,24 +154,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
}
|
||||||
getRefundStatus(val) {
|
|
||||||
if (val == 0) {
|
|
||||||
return "正常";
|
|
||||||
} else if (val == 1) {
|
|
||||||
return "退款中";
|
|
||||||
} else if (val == 2) {
|
|
||||||
return "完全退款";
|
|
||||||
} else if (val == 3) {
|
|
||||||
return "部分退款";
|
|
||||||
} else if (val == 4) {
|
|
||||||
return "拒绝用户退款";
|
|
||||||
} else if (val == -1) {
|
|
||||||
return "退款失败";
|
|
||||||
} else if (val == -2) {
|
|
||||||
return "用户申请退款中";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
|
|
@ -180,8 +163,8 @@ export default {
|
||||||
label: "关闭",
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// label: "确认",
|
// label: "确认",
|
||||||
// type: "primary",
|
// type: "primary",
|
||||||
|
|
@ -190,10 +173,9 @@ export default {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {},
|
asyncComputed: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -100,10 +100,10 @@
|
||||||
<el-tab-pane label="已配送" name="已配送"></el-tab-pane>
|
<el-tab-pane label="已配送" name="已配送"></el-tab-pane>
|
||||||
<el-tab-pane label="完成" name="完成"></el-tab-pane>
|
<el-tab-pane label="完成" name="完成"></el-tab-pane>
|
||||||
<el-tab-pane label="未支付订单取消" name="未支付订单取消"></el-tab-pane>
|
<el-tab-pane label="未支付订单取消" name="未支付订单取消"></el-tab-pane>
|
||||||
<el-tab-pane label="用户申请退款中" name="用户申请退款中"></el-tab-pane>
|
<el-tab-pane label="申请退款" name="申请退款"></el-tab-pane>
|
||||||
<el-tab-pane label="用户申请已退款" name="用户申请已退款"></el-tab-pane>
|
<el-tab-pane label="同意退款" name="同意退款"></el-tab-pane>
|
||||||
<el-tab-pane label="商家取消订单" name="商家取消订单"></el-tab-pane>
|
<el-tab-pane label="整单退款完成" name="整单退款完成"></el-tab-pane>
|
||||||
<el-tab-pane label="平台取消订单" name="平台取消订单"></el-tab-pane>
|
<el-tab-pane label="部分退款完成" name="部分退款完成"></el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<el-table :data="tableData" height="70%" border style="width: 100%">
|
<el-table :data="tableData" height="70%" border style="width: 100%">
|
||||||
<el-table-column type="expand">
|
<el-table-column type="expand">
|
||||||
|
|
@ -179,9 +179,9 @@
|
||||||
{{ filterUnitStatus(scope.row.status) }}
|
{{ filterUnitStatus(scope.row.status) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单退款状态" prop="refundStatus">
|
<el-table-column label="原始业务状态" prop="unitOrderOriginStatus">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ filterUnitRefundStatus(scope.row.refundStatus) }}
|
{{ filterUnitStatus(scope.row.unitOrderOriginStatus) }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="订单结算状态" prop="settleStatus">
|
<el-table-column label="订单结算状态" prop="settleStatus">
|
||||||
|
|
@ -218,20 +218,20 @@ export default {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
brandId: "",
|
brandId: "",
|
||||||
agentId: "",
|
agentId: ""
|
||||||
},
|
},
|
||||||
form: {
|
form: {
|
||||||
name: "",
|
name: "",
|
||||||
orderNo: "",
|
orderNo: "",
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: ""
|
||||||
},
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
state: "",
|
state: "",
|
||||||
tableData: [],
|
tableData: [],
|
||||||
time: "",
|
time: "",
|
||||||
overviewList: {},
|
overviewList: {},
|
||||||
isBrand: false,
|
isBrand: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
@ -257,9 +257,9 @@ export default {
|
||||||
.distributorOrBrandOrderPage({
|
.distributorOrBrandOrderPage({
|
||||||
...this.formInline,
|
...this.formInline,
|
||||||
state: this.state,
|
state: this.state,
|
||||||
...this.form,
|
...this.form
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
this.tableData = res.data.data.data;
|
this.tableData = res.data.data.data;
|
||||||
this.total = Number(res.data.data.total);
|
this.total = Number(res.data.data.total);
|
||||||
|
|
@ -267,7 +267,7 @@ export default {
|
||||||
this.$api.mer_admin
|
this.$api.mer_admin
|
||||||
.orderOverview({ ...this.formInline, ...this.form })
|
.orderOverview({ ...this.formInline, ...this.form })
|
||||||
.then()
|
.then()
|
||||||
.then((res) => {
|
.then(res => {
|
||||||
this.overviewList = res.data.data;
|
this.overviewList = res.data.data;
|
||||||
console.log(res);
|
console.log(res);
|
||||||
});
|
});
|
||||||
|
|
@ -277,7 +277,7 @@ export default {
|
||||||
name: "",
|
name: "",
|
||||||
orderNo: "",
|
orderNo: "",
|
||||||
startTime: "",
|
startTime: "",
|
||||||
endTime: "",
|
endTime: ""
|
||||||
};
|
};
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
|
|
@ -313,16 +313,16 @@ export default {
|
||||||
case "未支付订单取消":
|
case "未支付订单取消":
|
||||||
this.state = -1;
|
this.state = -1;
|
||||||
break;
|
break;
|
||||||
case "用户申请退款中":
|
case "申请退款":
|
||||||
this.state = -2;
|
this.state = -2;
|
||||||
break;
|
break;
|
||||||
case "用户申请已退款":
|
case "同意退款":
|
||||||
this.state = -3;
|
this.state = -3;
|
||||||
break;
|
break;
|
||||||
case "商家取消订单":
|
case "整单退款完成":
|
||||||
this.state = -4;
|
this.state = -4;
|
||||||
break;
|
break;
|
||||||
case "平台取消订单":
|
case "部分退款完成":
|
||||||
this.state = -5;
|
this.state = -5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -370,30 +370,13 @@ export default {
|
||||||
} else if (val == -1) {
|
} else if (val == -1) {
|
||||||
return "未支付订单取消";
|
return "未支付订单取消";
|
||||||
} else if (val == -2) {
|
} else if (val == -2) {
|
||||||
return "用户申请退款中";
|
return "申请退款";
|
||||||
} else if (val == -3) {
|
} else if (val == -3) {
|
||||||
return "用户申请已退款";
|
return "同意退款";
|
||||||
} else if (val == -4) {
|
} else if (val == -4) {
|
||||||
return "商家取消订单";
|
return "整单退款完成";
|
||||||
} else if (val == -5) {
|
} else if (val == -5) {
|
||||||
return "平台取消订单";
|
return "部分退款完成";
|
||||||
}
|
|
||||||
},
|
|
||||||
filterUnitRefundStatus(val) {
|
|
||||||
if (val === 0) {
|
|
||||||
return "正常";
|
|
||||||
} else if (val == 1) {
|
|
||||||
return "退款中";
|
|
||||||
} else if (val == 2) {
|
|
||||||
return "完全退款";
|
|
||||||
} else if (val == 3) {
|
|
||||||
return "部分退款";
|
|
||||||
} else if (val == 4) {
|
|
||||||
return "拒绝用户退款";
|
|
||||||
} else if (val == -1) {
|
|
||||||
return "退款失败";
|
|
||||||
} else if (val == -2) {
|
|
||||||
return "用户申请退款中";
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeTime(e) {
|
changeTime(e) {
|
||||||
|
|
@ -404,8 +387,8 @@ export default {
|
||||||
this.form.startTime = "";
|
this.form.startTime = "";
|
||||||
this.form.endTime = "";
|
this.form.endTime = "";
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -431,4 +414,4 @@ export default {
|
||||||
.stat-title {
|
.stat-title {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -153,11 +153,11 @@ export default {
|
||||||
title: "订单详情",
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: "1200px",
|
width: "1200px",
|
||||||
fullscreen: true,
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: [],
|
tableData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -189,7 +189,7 @@ export default {
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = "店铺详情";
|
this.modalConfig.title = "店铺详情";
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
|
|
@ -198,24 +198,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
}
|
||||||
getRefundStatus(val) {
|
|
||||||
if (val == 0) {
|
|
||||||
return "正常";
|
|
||||||
} else if (val == 1) {
|
|
||||||
return "退款中";
|
|
||||||
} else if (val == 2) {
|
|
||||||
return "完全退款";
|
|
||||||
} else if (val == 3) {
|
|
||||||
return "部分退款";
|
|
||||||
} else if (val == 4) {
|
|
||||||
return "拒绝用户退款";
|
|
||||||
} else if (val == -1) {
|
|
||||||
return "退款失败";
|
|
||||||
} else if (val == -2) {
|
|
||||||
return "用户申请退款中";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
|
|
@ -224,8 +207,8 @@ export default {
|
||||||
label: "关闭",
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// label: "确认",
|
// label: "确认",
|
||||||
// type: "primary",
|
// type: "primary",
|
||||||
|
|
@ -234,10 +217,9 @@ export default {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {},
|
asyncComputed: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -64,8 +64,19 @@
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="24" class="search-buttons">
|
<el-col :span="24" class="search-buttons">
|
||||||
<el-button type="primary" @click="handleSearch" icon="el-icon-search" size="small">搜索</el-button>
|
<el-button
|
||||||
<el-button @click="handleReset" icon="el-icon-refresh" size="small">重置</el-button>
|
type="primary"
|
||||||
|
@click="handleSearch"
|
||||||
|
icon="el-icon-search"
|
||||||
|
size="small"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button
|
||||||
|
@click="handleReset"
|
||||||
|
icon="el-icon-refresh"
|
||||||
|
size="small"
|
||||||
|
>重置</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
@ -102,170 +113,212 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 表格 -->
|
<!-- 表格 -->
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
row-key="unitOrderNo"
|
row-key="unitOrderNo"
|
||||||
size="small"
|
size="small"
|
||||||
:expand-row-keys="expandedRows"
|
:expand-row-keys="expandedRows"
|
||||||
@expand-change="handleExpandChange"
|
@expand-change="handleExpandChange"
|
||||||
:default-expand-all="false">
|
:default-expand-all="false"
|
||||||
|
>
|
||||||
|
<el-table-column type="expand" width="50">
|
||||||
|
<template slot-scope="props">
|
||||||
|
<div class="expand-content">
|
||||||
|
<!-- 二级子列表: 店铺订单信息 -->
|
||||||
|
<el-table
|
||||||
|
:data="props.row.shopOrderList"
|
||||||
|
size="small"
|
||||||
|
style="width: 100%;"
|
||||||
|
row-key="shopOrderNo"
|
||||||
|
:expand-row-keys="expandedShopRows[props.row.unitOrderNo] || []"
|
||||||
|
@expand-change="
|
||||||
|
(row, expanded) => handleShopExpandChange(props.row, expanded)
|
||||||
|
"
|
||||||
|
:show-header="true"
|
||||||
|
>
|
||||||
|
<el-table-column type="expand">
|
||||||
|
<template slot-scope="shopScope">
|
||||||
|
<!-- 三级子列表: 商品信息 -->
|
||||||
|
<el-table
|
||||||
|
:data="shopScope.row.productOrderList"
|
||||||
|
size="small"
|
||||||
|
style="width: 100%"
|
||||||
|
:show-header="true"
|
||||||
|
>
|
||||||
|
<el-table-column prop="productName" label="商品名称">
|
||||||
|
<template slot-scope="productScope">{{
|
||||||
|
productScope.row.productName || "-"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="productCount" label="商品数量">
|
||||||
|
<template slot-scope="productScope">{{
|
||||||
|
productScope.row.productCount || "-"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品原价">
|
||||||
|
<template slot-scope="productScope">
|
||||||
|
¥
|
||||||
|
{{
|
||||||
|
(productScope.row.originPrice / 100).toFixed(2) ||
|
||||||
|
"0.00"
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品终价">
|
||||||
|
<template slot-scope="productScope">
|
||||||
|
¥
|
||||||
|
{{
|
||||||
|
(productScope.row.finalPrice / 100).toFixed(2) ||
|
||||||
|
"0.00"
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品订单金额">
|
||||||
|
<template slot-scope="productScope">
|
||||||
|
¥
|
||||||
|
{{
|
||||||
|
(productScope.row.productOrderMoney / 100).toFixed(
|
||||||
|
2
|
||||||
|
) || "0.00"
|
||||||
|
}}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="productImg" label="商品图片">
|
||||||
|
<template slot-scope="productScope">
|
||||||
|
<el-image
|
||||||
|
v-if="productScope.row.productImg"
|
||||||
|
:src="productScope.row.productImg"
|
||||||
|
style="width: 40px; height: 40px;"
|
||||||
|
fit="cover"
|
||||||
|
:preview-src-list="[productScope.row.productImg]"
|
||||||
|
></el-image>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="序号">
|
||||||
|
<template slot-scope="shopScope">
|
||||||
|
{{ shopScope.$index + 1 }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="shopOrderNo" label="店铺订单号">
|
||||||
|
<template slot-scope="shopScope">{{
|
||||||
|
shopScope.row.shopOrderNo || "-"
|
||||||
|
}}</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="shopName" label="店铺名称">
|
||||||
|
<template slot-scope="shopScope">
|
||||||
|
{{ shopScope.row.shopName || "-" }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="status" label="订单状态">
|
||||||
|
<template slot-scope="shopScope">
|
||||||
|
<el-tag
|
||||||
|
:type="getShopStatusType(shopScope.row.status)"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ getShopStatusText(shopScope.row.status) || "-" }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<el-table-column type="expand" width="50">
|
<!-- 一级列表字段 -->
|
||||||
<template slot-scope="props">
|
<el-table-column label="序号" width="50">
|
||||||
<div class="expand-content">
|
<template slot-scope="scope">
|
||||||
<!-- 二级子列表: 店铺订单信息 -->
|
{{
|
||||||
<el-table
|
(pagination.pageNumber - 1) * pagination.pageSize + scope.$index + 1
|
||||||
:data="props.row.shopOrderList"
|
}}
|
||||||
size="small"
|
</template>
|
||||||
style="width: 100%;"
|
</el-table-column>
|
||||||
row-key="shopOrderNo"
|
<el-table-column prop="unitOrderNo" label="结算订单号" min-width="120">
|
||||||
:expand-row-keys="expandedShopRows[props.row.unitOrderNo] || []"
|
<template slot-scope="scope">{{
|
||||||
@expand-change="(row, expanded) => handleShopExpandChange(props.row, expanded)"
|
scope.row.unitOrderNo || "-"
|
||||||
:show-header="true">
|
}}</template>
|
||||||
<el-table-column type="expand">
|
</el-table-column>
|
||||||
<template slot-scope="shopScope">
|
<el-table-column prop="createTime" label="下单时间" width="90">
|
||||||
<!-- 三级子列表: 商品信息 -->
|
<template slot-scope="scope">{{
|
||||||
<el-table
|
scope.row.createTime || "-"
|
||||||
:data="shopScope.row.productOrderList"
|
}}</template>
|
||||||
size="small"
|
</el-table-column>
|
||||||
style="width: 100%"
|
<el-table-column prop="receiverName" label="收货人姓名" width="80">
|
||||||
:show-header="true">
|
<template slot-scope="scope">{{
|
||||||
<el-table-column prop="productName" label="商品名称">
|
scope.row.receiverName || "-"
|
||||||
<template slot-scope="productScope">{{ productScope.row.productName || '-' }}</template>
|
}}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productCount" label="商品数量">
|
<el-table-column prop="receiverPhone" label="收货人电话" width="100">
|
||||||
<template slot-scope="productScope">{{ productScope.row.productCount || '-' }}</template>
|
<template slot-scope="scope">{{
|
||||||
</el-table-column>
|
scope.row.receiverPhone || "-"
|
||||||
<el-table-column label="商品原价">
|
}}</template>
|
||||||
<template slot-scope="productScope">
|
</el-table-column>
|
||||||
¥ {{ (productScope.row.originPrice / 100).toFixed(2) || '0.00' }}
|
<el-table-column prop="poi" label="收货人地址" min-width="150">
|
||||||
</template>
|
<template slot-scope="scope">{{ scope.row.poi || "-" }}</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品终价">
|
<el-table-column label="市场订单金额" min-width="100">
|
||||||
<template slot-scope="productScope">
|
<template slot-scope="scope">
|
||||||
¥ {{ (productScope.row.finalPrice / 100).toFixed(2) || '0.00' }}
|
<span>¥ {{ scope.row.unitOrderMoney }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="商品订单金额">
|
<el-table-column label="市场订单商品金额" min-width="120">
|
||||||
<template slot-scope="productScope">
|
<template slot-scope="scope">
|
||||||
¥ {{ (productScope.row.productOrderMoney / 100).toFixed(2) || '0.00' }}
|
<span>¥ {{ scope.row.productMoney }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="productImg" label="商品图片">
|
<el-table-column label="市场订单配送费" min-width="110">
|
||||||
<template slot-scope="productScope">
|
<template slot-scope="scope">
|
||||||
<el-image v-if="productScope.row.productImg"
|
<span>¥ {{ scope.row.deliveryMoney }}</span>
|
||||||
:src="productScope.row.productImg"
|
</template>
|
||||||
style="width: 40px; height: 40px;"
|
</el-table-column>
|
||||||
fit="cover"
|
<el-table-column label="调度费" width="60">
|
||||||
:preview-src-list="[productScope.row.productImg]"></el-image>
|
<template slot-scope="scope">
|
||||||
<span v-else>-</span>
|
<span>¥ {{ scope.row.dispatchMoney }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
<el-table-column label="包装费" width="60">
|
||||||
</template>
|
<template slot-scope="scope">
|
||||||
</el-table-column>
|
<span>¥ {{ scope.row.packageMoney }}</span>
|
||||||
<el-table-column label="序号">
|
</template>
|
||||||
<template slot-scope="shopScope">
|
</el-table-column>
|
||||||
{{ shopScope.$index + 1 }}
|
<el-table-column prop="status" label="订单状态" width="100">
|
||||||
</template>
|
<template slot-scope="scope">
|
||||||
</el-table-column>
|
<el-tag :type="getStatusTagType(scope.row.status)" size="small">
|
||||||
<el-table-column prop="shopOrderNo" label="店铺订单号">
|
{{ getStatusText(scope.row.status) || "-" }}
|
||||||
<template slot-scope="shopScope">{{ shopScope.row.shopOrderNo || '-' }}</template>
|
</el-tag>
|
||||||
</el-table-column>
|
</template>
|
||||||
<el-table-column prop="shopName" label="店铺名称">
|
</el-table-column>
|
||||||
<template slot-scope="shopScope">
|
<el-table-column prop="marketId" label="市场编号" width="90">
|
||||||
{{ shopScope.row.shopName || "-" }}
|
<template slot-scope="scope">{{ scope.row.marketId || "-" }}</template>
|
||||||
</template>
|
</el-table-column>
|
||||||
</el-table-column>
|
<el-table-column prop="marketName" label="市场名称" min-width="100">
|
||||||
<el-table-column prop="status" label="订单状态">
|
<template slot-scope="scope">{{
|
||||||
<template slot-scope="shopScope">
|
scope.row.marketName || "-"
|
||||||
<el-tag :type="getShopStatusType(shopScope.row.status)" size="small">
|
}}</template>
|
||||||
{{ getShopStatusText(shopScope.row.status) || '-' }}
|
</el-table-column>
|
||||||
</el-tag>
|
<el-table-column prop="refundReason" label="申请退款原因" min-width="80">
|
||||||
</template>
|
<template slot-scope="scope">{{
|
||||||
</el-table-column>
|
scope.row.refundReason || "-"
|
||||||
</el-table>
|
}}</template>
|
||||||
</div>
|
</el-table-column>
|
||||||
</template>
|
</el-table>
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<!-- 一级列表字段 -->
|
<!-- 分页 -->
|
||||||
<el-table-column label="序号" width="50">
|
<el-pagination
|
||||||
<template slot-scope="scope">
|
@size-change="handleSizeChange"
|
||||||
{{ (pagination.pageNumber - 1) * pagination.pageSize + scope.$index + 1 }}
|
@current-change="handleCurrentChange"
|
||||||
</template>
|
:current-page="pagination.pageNumber"
|
||||||
</el-table-column>
|
:page-sizes="[10, 20, 30, 50]"
|
||||||
<el-table-column prop="unitOrderNo" label="结算订单号" min-width="120">
|
:page-size="pagination.pageSize"
|
||||||
<template slot-scope="scope">{{ scope.row.unitOrderNo || '-' }}</template>
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
</el-table-column>
|
:total="pagination.total"
|
||||||
<el-table-column prop="createTime" label="下单时间" width="90">
|
class="pagination-container"
|
||||||
<template slot-scope="scope">{{ scope.row.createTime || '-' }}</template>
|
></el-pagination>
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="receiverName" label="收货人姓名" width="80">
|
|
||||||
<template slot-scope="scope">{{ scope.row.receiverName || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="receiverPhone" label="收货人电话" width="100">
|
|
||||||
<template slot-scope="scope">{{ scope.row.receiverPhone || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="poi" label="收货人地址" min-width="150">
|
|
||||||
<template slot-scope="scope">{{ scope.row.poi || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="市场订单金额" min-width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>¥ {{ scope.row.unitOrderMoney }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="市场订单商品金额" min-width="120">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>¥ {{ scope.row.productMoney }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="市场订单配送费" min-width="110">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>¥ {{ scope.row.deliveryMoney }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="调度费" width="60">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>¥ {{ scope.row.dispatchMoney }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="包装费" width="60">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span>¥ {{ scope.row.packageMoney }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="status" label="订单状态" width="100">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<el-tag :type="getStatusTagType(scope.row.status)" size="small">
|
|
||||||
{{ getStatusText(scope.row.status) || '-' }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="marketId" label="市场编号" width="90">
|
|
||||||
<template slot-scope="scope">{{ scope.row.marketId || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="marketName" label="市场名称" min-width="100">
|
|
||||||
<template slot-scope="scope">{{ scope.row.marketName || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="refundReason" label="申请退款原因" min-width="80">
|
|
||||||
<template slot-scope="scope">{{ scope.row.refundReason || '-' }}</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
|
|
||||||
<!-- 分页 -->
|
|
||||||
<el-pagination
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handleCurrentChange"
|
|
||||||
:current-page="pagination.pageNumber"
|
|
||||||
:page-sizes="[10, 20, 30, 50]"
|
|
||||||
:page-size="pagination.pageSize"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="pagination.total"
|
|
||||||
class="pagination-container"
|
|
||||||
></el-pagination>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -280,13 +333,13 @@ export default {
|
||||||
receiverName: "",
|
receiverName: "",
|
||||||
unitOrderNo: "",
|
unitOrderNo: "",
|
||||||
statusList: [],
|
statusList: [],
|
||||||
dateRange: [],
|
dateRange: []
|
||||||
},
|
},
|
||||||
stats: {
|
stats: {
|
||||||
totalCount: 0,
|
totalCount: 0,
|
||||||
totalMoney: 0,
|
totalMoney: 0,
|
||||||
completeRate: 0,
|
completeRate: 0,
|
||||||
agentCommission: 0,
|
agentCommission: 0
|
||||||
},
|
},
|
||||||
orderStatusOptions: [
|
orderStatusOptions: [
|
||||||
{ label: "待支付", value: 0 },
|
{ label: "待支付", value: 0 },
|
||||||
|
|
@ -298,20 +351,20 @@ export default {
|
||||||
{ label: "已配送(待收货)", value: 6 },
|
{ label: "已配送(待收货)", value: 6 },
|
||||||
{ label: "完成", value: 8 },
|
{ label: "完成", value: 8 },
|
||||||
{ label: "未支付订单取消", value: -1 },
|
{ label: "未支付订单取消", value: -1 },
|
||||||
{ label: "用户申请退款中", value: -2 },
|
{ label: "申请退款", value: -2 },
|
||||||
{ label: "用户申请已退款", value: -3 },
|
{ label: "同意退款", value: -3 },
|
||||||
{ label: "商家取消订单", value: -4 },
|
{ label: "整单退款完成", value: -4 },
|
||||||
{ label: "平台取消订单", value: -5 },
|
{ label: "部分退款完成", value: -5 }
|
||||||
],
|
],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
pagination: {
|
pagination: {
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
total: 0,
|
total: 0
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
expandedRows: [],
|
expandedRows: [],
|
||||||
expandedShopRows: {},
|
expandedShopRows: {}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -319,8 +372,8 @@ export default {
|
||||||
handler(query) {
|
handler(query) {
|
||||||
this.applyQueryParamsAndSearch(query);
|
this.applyQueryParamsAndSearch(query);
|
||||||
},
|
},
|
||||||
immediate: true,
|
immediate: true
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
applyQueryParamsAndSearch(query) {
|
applyQueryParamsAndSearch(query) {
|
||||||
|
|
@ -342,9 +395,11 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
receiverName: this.searchForm.receiverName || null,
|
receiverName: this.searchForm.receiverName || null,
|
||||||
unitOrderNo: this.searchForm.unitOrderNo || null,
|
unitOrderNo: this.searchForm.unitOrderNo || null,
|
||||||
statusList: this.searchForm.statusList.length ? this.searchForm.statusList.join(',') : null,
|
statusList: this.searchForm.statusList.length
|
||||||
|
? this.searchForm.statusList.join(",")
|
||||||
|
: null,
|
||||||
startTime: null,
|
startTime: null,
|
||||||
endTime: null,
|
endTime: null
|
||||||
};
|
};
|
||||||
if (this.searchForm.dateRange && this.searchForm.dateRange.length === 2) {
|
if (this.searchForm.dateRange && this.searchForm.dateRange.length === 2) {
|
||||||
params.startTime = this.searchForm.dateRange[0];
|
params.startTime = this.searchForm.dateRange[0];
|
||||||
|
|
@ -357,41 +412,48 @@ export default {
|
||||||
const params = {
|
const params = {
|
||||||
...this.getCommonParams(),
|
...this.getCommonParams(),
|
||||||
pageNumber: this.pagination.pageNumber,
|
pageNumber: this.pagination.pageNumber,
|
||||||
pageSize: this.pagination.pageSize,
|
pageSize: this.pagination.pageSize
|
||||||
};
|
};
|
||||||
|
|
||||||
mer_admin.orderV2Page(params).then(res => {
|
mer_admin
|
||||||
if (res.data && res.data.data) {
|
.orderV2Page(params)
|
||||||
this.tableData = res.data.data.data;
|
.then(res => {
|
||||||
this.pagination.total = parseInt(res.data.data.total) || 0;
|
if (res.data && res.data.data) {
|
||||||
} else {
|
this.tableData = res.data.data.data;
|
||||||
|
this.pagination.total = parseInt(res.data.data.total) || 0;
|
||||||
|
} else {
|
||||||
|
this.tableData = [];
|
||||||
|
this.pagination.total = 0;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error("Error fetching order data:", err);
|
||||||
this.tableData = [];
|
this.tableData = [];
|
||||||
this.pagination.total = 0;
|
this.pagination.total = 0;
|
||||||
}
|
})
|
||||||
}).catch(err => {
|
.finally(() => {
|
||||||
console.error("Error fetching order data:", err);
|
this.loading = false;
|
||||||
this.tableData = [];
|
});
|
||||||
this.pagination.total = 0;
|
|
||||||
}).finally(() => {
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
fetchOverview() {
|
fetchOverview() {
|
||||||
const params = this.getCommonParams();
|
const params = this.getCommonParams();
|
||||||
mer_admin.orderV2Overview(params).then(res => {
|
mer_admin
|
||||||
if (res.data && res.data.data) {
|
.orderV2Overview(params)
|
||||||
this.stats = res.data.data;
|
.then(res => {
|
||||||
} else {
|
if (res.data && res.data.data) {
|
||||||
this.stats = {
|
this.stats = res.data.data;
|
||||||
totalCount: 0,
|
} else {
|
||||||
totalMoney: 0,
|
this.stats = {
|
||||||
completeRate: 0,
|
totalCount: 0,
|
||||||
agentCommission: 0,
|
totalMoney: 0,
|
||||||
};
|
completeRate: 0,
|
||||||
}
|
agentCommission: 0
|
||||||
}).catch(err => {
|
};
|
||||||
console.error("Error fetching overview data:", err);
|
}
|
||||||
});
|
})
|
||||||
|
.catch(err => {
|
||||||
|
console.error("Error fetching overview data:", err);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
handleSearch() {
|
handleSearch() {
|
||||||
this.pagination.pageNumber = 1;
|
this.pagination.pageNumber = 1;
|
||||||
|
|
@ -415,27 +477,32 @@ export default {
|
||||||
if (status === undefined || status === null) {
|
if (status === undefined || status === null) {
|
||||||
return "未知状态";
|
return "未知状态";
|
||||||
}
|
}
|
||||||
const statusOption = this.orderStatusOptions.find(opt => opt.value === status);
|
const statusOption = this.orderStatusOptions.find(
|
||||||
|
opt => opt.value === status
|
||||||
|
);
|
||||||
return statusOption ? statusOption.label : "未知状态";
|
return statusOption ? statusOption.label : "未知状态";
|
||||||
},
|
},
|
||||||
getStatusTagType(status) {
|
getStatusTagType(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0: return 'warning'; // 待支付
|
case 0:
|
||||||
|
return "warning"; // 待支付
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
case 4:
|
case 4:
|
||||||
case 5:
|
case 5:
|
||||||
case 6:
|
case 6:
|
||||||
return 'info'; // 进行中
|
return "info"; // 进行中
|
||||||
case 8: return 'success'; // 完成
|
case 8:
|
||||||
|
return "success"; // 完成
|
||||||
case -1:
|
case -1:
|
||||||
case -2:
|
case -2:
|
||||||
case -3:
|
case -3:
|
||||||
case -4:
|
case -4:
|
||||||
case -5:
|
case -5:
|
||||||
return 'danger'; // 取消或退款
|
return "danger"; // 取消或退款
|
||||||
default: return 'primary';
|
default:
|
||||||
|
return "primary";
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
viewDetails(row) {
|
viewDetails(row) {
|
||||||
|
|
@ -448,34 +515,34 @@ export default {
|
||||||
},
|
},
|
||||||
getShopStatusText(status) {
|
getShopStatusText(status) {
|
||||||
const shopStatusMap = {
|
const shopStatusMap = {
|
||||||
0: '待备货',
|
0: "待备货",
|
||||||
1: '备货完成 待取货',
|
1: "备货完成 待取货",
|
||||||
2: '已取货(待配送)',
|
2: "已取货(待配送)",
|
||||||
3: '配送中',
|
3: "配送中",
|
||||||
4: '配送完成(待收货)',
|
4: "配送完成(待收货)",
|
||||||
5: '待评价',
|
5: "待评价",
|
||||||
6: '已完成'
|
6: "已完成"
|
||||||
};
|
};
|
||||||
return shopStatusMap[status] || '未知状态';
|
return shopStatusMap[status] || "未知状态";
|
||||||
},
|
},
|
||||||
getShopStatusType(status) {
|
getShopStatusType(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 0: // 待备货
|
case 0: // 待备货
|
||||||
case 1: // 备货完成 待取货
|
case 1: // 备货完成 待取货
|
||||||
return 'warning';
|
return "warning";
|
||||||
case 2: // 已取货(待配送)
|
case 2: // 已取货(待配送)
|
||||||
case 3: // 配送中
|
case 3: // 配送中
|
||||||
case 4: // 配送完成(待收货)
|
case 4: // 配送完成(待收货)
|
||||||
return 'info';
|
return "info";
|
||||||
case 5: // 待评价
|
case 5: // 待评价
|
||||||
return 'primary';
|
return "primary";
|
||||||
case 6: // 已完成
|
case 6: // 已完成
|
||||||
return 'success';
|
return "success";
|
||||||
default:
|
default:
|
||||||
return 'danger';
|
return "danger";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
@ -502,7 +569,7 @@ export default {
|
||||||
.stat-value {
|
.stat-value {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #409EFF;
|
color: #409eff;
|
||||||
}
|
}
|
||||||
.search-form .el-form-item {
|
.search-form .el-form-item {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@
|
||||||
>
|
>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="下单时间:">
|
<el-form-item label="下单时间:">
|
||||||
<span>{{ruleForm.createTime}}</span>
|
<span>{{ ruleForm.createTime }}</span>
|
||||||
</el-form-item></el-col
|
</el-form-item></el-col
|
||||||
>
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -219,11 +219,11 @@ export default {
|
||||||
title: "订单详情",
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: "1200px",
|
width: "1200px",
|
||||||
fullscreen: true,
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: [],
|
tableData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -255,7 +255,7 @@ export default {
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = "订单详情";
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
|
|
@ -264,24 +264,7 @@ export default {
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
}
|
||||||
getRefundStatus(val) {
|
|
||||||
if (val == 0) {
|
|
||||||
return "正常";
|
|
||||||
} else if (val == 1) {
|
|
||||||
return "退款中";
|
|
||||||
} else if (val == 2) {
|
|
||||||
return "完全退款";
|
|
||||||
} else if (val == 3) {
|
|
||||||
return "部分退款";
|
|
||||||
} else if (val == 4) {
|
|
||||||
return "拒绝用户退款";
|
|
||||||
} else if (val == -1) {
|
|
||||||
return "退款失败";
|
|
||||||
} else if (val == -2) {
|
|
||||||
return "用户申请退款中";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
|
|
@ -290,8 +273,8 @@ export default {
|
||||||
label: "关闭",
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// label: "确认",
|
// label: "确认",
|
||||||
// type: "primary",
|
// type: "primary",
|
||||||
|
|
@ -300,10 +283,9 @@ export default {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {},
|
asyncComputed: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -111,8 +111,10 @@
|
||||||
</el-form-item></el-col
|
</el-form-item></el-col
|
||||||
>
|
>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="订单退款状态:">
|
<el-form-item label="原始业务状态:">
|
||||||
<span>{{ getRefundStatus(ruleForm.refundStatus) }}</span>
|
<span>{{
|
||||||
|
getBusinessStatus(ruleForm.unitOrderOriginStatus)
|
||||||
|
}}</span>
|
||||||
</el-form-item></el-col
|
</el-form-item></el-col
|
||||||
>
|
>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
@ -219,11 +221,11 @@ export default {
|
||||||
title: "订单详情",
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: "1200px",
|
width: "1200px",
|
||||||
fullscreen: true,
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: [],
|
tableData: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
@ -255,7 +257,7 @@ export default {
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = "订单详情";
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = false;
|
this.isAdd = false;
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
|
|
@ -265,23 +267,24 @@ export default {
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
},
|
},
|
||||||
getRefundStatus(val) {
|
getBusinessStatus(val) {
|
||||||
if (val == 0) {
|
const statusMap = {
|
||||||
return "正常";
|
0: "待支付",
|
||||||
} else if (val == 1) {
|
1: "待接单",
|
||||||
return "退款中";
|
2: "待备货",
|
||||||
} else if (val == 2) {
|
3: "待取货",
|
||||||
return "完全退款";
|
4: "已取货(待配送)",
|
||||||
} else if (val == 3) {
|
5: "配送中(待送达)",
|
||||||
return "部分退款";
|
6: "已配送(待收货或已送达自提点)",
|
||||||
} else if (val == 4) {
|
8: "完成(待评价或自动完成)",
|
||||||
return "拒绝用户退款";
|
"-1": "未支付订单取消",
|
||||||
} else if (val == -1) {
|
"-2": "申请退款",
|
||||||
return "退款失败";
|
"-3": "同意退款",
|
||||||
} else if (val == -2) {
|
"-4": "整单退款完成",
|
||||||
return "用户申请退款中";
|
"-5": "部分退款完成"
|
||||||
}
|
};
|
||||||
},
|
return statusMap[val] || statusMap[String(val)] || "未知状态";
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
|
|
@ -290,8 +293,8 @@ export default {
|
||||||
label: "关闭",
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle();
|
this.toggle();
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// label: "确认",
|
// label: "确认",
|
||||||
// type: "primary",
|
// type: "primary",
|
||||||
|
|
@ -300,10 +303,9 @@ export default {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
];
|
];
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {},
|
asyncComputed: {}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped></style>
|
||||||
</style>
|
|
||||||
|
|
|
||||||
|
|
@ -20,10 +20,10 @@
|
||||||
<span>
|
<span>
|
||||||
{{
|
{{
|
||||||
ruleForm.preSaleStage === 1
|
ruleForm.preSaleStage === 1
|
||||||
? '已付定金'
|
? "已付定金"
|
||||||
: ruleForm.preSaleStage === 2
|
: ruleForm.preSaleStage === 2
|
||||||
? '已付尾款'
|
? "已付尾款"
|
||||||
: '待付定金'
|
: "待付定金"
|
||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</el-form-item></el-col
|
</el-form-item></el-col
|
||||||
|
|
@ -220,7 +220,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { debounce, cloneDeep } from 'lodash'
|
import { debounce, cloneDeep } from "lodash";
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
props: {},
|
props: {},
|
||||||
|
|
@ -229,15 +229,15 @@ export default {
|
||||||
isAdd: true,
|
isAdd: true,
|
||||||
//表格属性
|
//表格属性
|
||||||
modalConfig: {
|
modalConfig: {
|
||||||
title: '订单详情',
|
title: "订单详情",
|
||||||
show: false,
|
show: false,
|
||||||
width: '1200px',
|
width: "1200px",
|
||||||
fullscreen: true
|
fullscreen: true
|
||||||
},
|
},
|
||||||
modalData: {},
|
modalData: {},
|
||||||
ruleForm: {},
|
ruleForm: {},
|
||||||
tableData: []
|
tableData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
// "modalConfig.show"(newVal) {
|
// "modalConfig.show"(newVal) {
|
||||||
|
|
@ -253,56 +253,39 @@ export default {
|
||||||
queryTableData(pageNo, pageSize) {},
|
queryTableData(pageNo, pageSize) {},
|
||||||
toggle(e) {
|
toggle(e) {
|
||||||
if (this.modalConfig.show == false) {
|
if (this.modalConfig.show == false) {
|
||||||
this.modalConfig.show = true
|
this.modalConfig.show = true;
|
||||||
} else {
|
} else {
|
||||||
this.modalConfig.show = false
|
this.modalConfig.show = false;
|
||||||
}
|
}
|
||||||
if (e) {
|
if (e) {
|
||||||
this.init(cloneDeep(e))
|
this.init(cloneDeep(e));
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
add: () => {
|
add: () => {
|
||||||
this.modalConfig.title = '订单详情'
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = true
|
this.isAdd = true;
|
||||||
},
|
},
|
||||||
update: () => {
|
update: () => {
|
||||||
this.modalConfig.title = '订单详情'
|
this.modalConfig.title = "订单详情";
|
||||||
this.isAdd = false
|
this.isAdd = false;
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
init(row) {
|
init(row) {
|
||||||
console.log(row)
|
console.log(row);
|
||||||
this.ruleForm = row
|
this.ruleForm = row;
|
||||||
},
|
},
|
||||||
handleSelectionChange(e) {
|
handleSelectionChange(e) {
|
||||||
console.log(e)
|
console.log(e);
|
||||||
},
|
|
||||||
getRefundStatus(val) {
|
|
||||||
if (val == 0) {
|
|
||||||
return '正常'
|
|
||||||
} else if (val == 1) {
|
|
||||||
return '退款中'
|
|
||||||
} else if (val == 2) {
|
|
||||||
return '完全退款'
|
|
||||||
} else if (val == 3) {
|
|
||||||
return '部分退款'
|
|
||||||
} else if (val == 4) {
|
|
||||||
return '拒绝用户退款'
|
|
||||||
} else if (val == -1) {
|
|
||||||
return '退款失败'
|
|
||||||
} else if (val == -2) {
|
|
||||||
return '用户申请退款中'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalHandles() {
|
modalHandles() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
label: '关闭',
|
label: "关闭",
|
||||||
handle: () => {
|
handle: () => {
|
||||||
this.toggle()
|
this.toggle();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// {
|
// {
|
||||||
|
|
@ -312,10 +295,10 @@ export default {
|
||||||
// handle: () => {
|
// handle: () => {
|
||||||
// },
|
// },
|
||||||
// },
|
// },
|
||||||
]
|
];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
asyncComputed: {}
|
asyncComputed: {}
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue