feat: 退款状态调整

This commit is contained in:
lzhizhao 2025-11-04 01:34:39 +08:00
parent 02ba78a6a9
commit bb694d86c5
9 changed files with 452 additions and 496 deletions

View File

@ -15,8 +15,8 @@
*/
export function paidFilter(status) {
const statusMap = {
true: '已支付',
false: '未支付',
true: "已支付",
false: "未支付"
};
return statusMap[status];
}
@ -27,46 +27,38 @@ export function paidFilter(status) {
*/
export function orderStatusFilter(status) {
const statusMap = {
0: '待付款',
1: '待发货',
2: '部分发货',
3: '待核销',
4: '待收货',
5: '已收货',
6: '已完成',
9: '已取消',
0: "待付款",
1: "待发货",
2: "部分发货",
3: "待核销",
4: "待收货",
5: "已收货",
6: "已完成",
9: "已取消"
};
return statusMap[status];
}
/**
* @description 订单中的退款状态
* @description 订单业务状态
*/
export function orderRefundStatusFilter(status) {
export function orderBusinessStatusFilter(status) {
const statusMap = {
0: '未退款',
1: '申请退款中',
2: '部分退款',
3: '已退款',
0: "待支付",
1: "待接单",
2: "待备货",
3: "待取货",
4: "已取货(待配送)",
5: "配送中(待送达)",
6: "已配送(待收货或已送达自提点)",
8: "完成(待评价或自动完成)",
"-1": "未支付订单取消",
"-2": "申请退款",
"-3": "同意退款",
"-4": "整单退款完成",
"-5": "部分退款完成"
};
return statusMap[status];
}
/**
* @description 退款单退款状态
*
*/
export function refundStatusFilter(status) {
const statusMap = {
0: '待审核',
1: '商家拒绝',
2: '退款中',
3: '退款成功',
4: '用户退货',
5: '商家待收货',
6: '已撤销',
};
return statusMap[status];
return statusMap[status] || statusMap[String(status)] || "未知状态";
}
/**
@ -74,9 +66,9 @@ export function refundStatusFilter(status) {
*/
export function payTypeFilter(status) {
const statusMap = {
weixin: '微信',
alipay: '支付宝',
yue: '余额',
weixin: "微信",
alipay: "支付宝",
yue: "余额"
};
return statusMap[status];
}
@ -86,11 +78,11 @@ export function payTypeFilter(status) {
*/
export function orderTypeFilter(status) {
const statusMap = {
0: '普通订单',
1: '视频号订单',
2: '秒杀订单',
5: '云盘订单',
6: '卡密订单',
0: "普通订单",
1: "视频号订单",
2: "秒杀订单",
5: "云盘订单",
6: "卡密订单"
};
return statusMap[status];
}

View File

@ -20,10 +20,10 @@
<span>
{{
ruleForm.preSaleStage === 1
? '已付定金'
? "已付定金"
: ruleForm.preSaleStage === 2
? '已付尾款'
: '待付定金'
? "已付尾款"
: "待付定金"
}}
</span>
</el-form-item></el-col
@ -220,7 +220,7 @@
</div>
</template>
<script>
import { debounce, cloneDeep } from 'lodash'
import { debounce, cloneDeep } from "lodash";
export default {
components: {},
props: {},
@ -229,15 +229,15 @@ export default {
isAdd: true,
//
modalConfig: {
title: '订单详情',
title: "订单详情",
show: false,
width: '1200px',
width: "1200px",
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: []
}
};
},
watch: {
// "modalConfig.show"(newVal) {
@ -253,56 +253,39 @@ export default {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true
this.modalConfig.show = true;
} else {
this.modalConfig.show = false
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e))
this.init(cloneDeep(e));
}
return {
add: () => {
this.modalConfig.title = '订单详情'
this.isAdd = true
this.modalConfig.title = "订单详情";
this.isAdd = true;
},
update: () => {
this.modalConfig.title = '订单详情'
this.isAdd = false
}
this.modalConfig.title = "订单详情";
this.isAdd = false;
}
};
},
init(row) {
console.log(row)
this.ruleForm = row
console.log(row);
this.ruleForm = row;
},
handleSelectionChange(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 '用户申请退款中'
}
console.log(e);
}
},
computed: {
modalHandles() {
return [
{
label: '关闭',
label: "关闭",
handle: () => {
this.toggle()
this.toggle();
}
}
// {
@ -312,10 +295,10 @@ export default {
// handle: () => {
// },
// },
]
];
}
},
asyncComputed: {}
}
};
</script>
<style lang="scss" scoped></style>

View File

@ -109,11 +109,11 @@ export default {
title: "订单详情",
show: false,
width: "1200px",
fullscreen: true,
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: [],
tableData: []
};
},
watch: {
@ -145,7 +145,7 @@ export default {
update: () => {
this.modalConfig.title = "店铺详情";
this.isAdd = false;
},
}
};
},
init(row) {
@ -154,25 +154,8 @@ export default {
},
handleSelectionChange(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: {
modalHandles() {
return [
@ -180,8 +163,8 @@ export default {
label: "关闭",
handle: () => {
this.toggle();
},
},
}
}
// {
// label: "",
// type: "primary",
@ -190,10 +173,9 @@ export default {
// },
// },
];
}
},
},
asyncComputed: {},
asyncComputed: {}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -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-tabs>
<el-table :data="tableData" height="70%" border style="width: 100%">
<el-table-column type="expand">
@ -179,9 +179,9 @@
{{ filterUnitStatus(scope.row.status) }}
</template>
</el-table-column>
<el-table-column label="订单退款状态" prop="refundStatus">
<el-table-column label="原始业务状态" prop="unitOrderOriginStatus">
<template slot-scope="scope">
{{ filterUnitRefundStatus(scope.row.refundStatus) }}
{{ filterUnitStatus(scope.row.unitOrderOriginStatus) }}
</template>
</el-table-column>
<el-table-column label="订单结算状态" prop="settleStatus">
@ -218,20 +218,20 @@ export default {
pageNumber: 1,
pageSize: 10,
brandId: "",
agentId: "",
agentId: ""
},
form: {
name: "",
orderNo: "",
startTime: "",
endTime: "",
endTime: ""
},
total: 0,
state: "",
tableData: [],
time: "",
overviewList: {},
isBrand: false,
isBrand: false
};
},
created() {
@ -257,9 +257,9 @@ export default {
.distributorOrBrandOrderPage({
...this.formInline,
state: this.state,
...this.form,
...this.form
})
.then((res) => {
.then(res => {
console.log(res);
this.tableData = res.data.data.data;
this.total = Number(res.data.data.total);
@ -267,7 +267,7 @@ export default {
this.$api.mer_admin
.orderOverview({ ...this.formInline, ...this.form })
.then()
.then((res) => {
.then(res => {
this.overviewList = res.data.data;
console.log(res);
});
@ -277,7 +277,7 @@ export default {
name: "",
orderNo: "",
startTime: "",
endTime: "",
endTime: ""
};
this.getList();
},
@ -313,16 +313,16 @@ export default {
case "未支付订单取消":
this.state = -1;
break;
case "用户申请退款":
case "申请退款":
this.state = -2;
break;
case "用户申请已退款":
case "同意退款":
this.state = -3;
break;
case "商家取消订单":
case "整单退款完成":
this.state = -4;
break;
case "平台取消订单":
case "部分退款完成":
this.state = -5;
break;
}
@ -370,30 +370,13 @@ export default {
} else if (val == -1) {
return "未支付订单取消";
} else if (val == -2) {
return "用户申请退款";
return "申请退款";
} else if (val == -3) {
return "用户申请已退款";
return "同意退款";
} else if (val == -4) {
return "商家取消订单";
return "整单退款完成";
} else if (val == -5) {
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 "用户申请退款中";
return "部分退款完成";
}
},
changeTime(e) {
@ -404,8 +387,8 @@ export default {
this.form.startTime = "";
this.form.endTime = "";
}
},
},
}
}
};
</script>

View File

@ -153,11 +153,11 @@ export default {
title: "订单详情",
show: false,
width: "1200px",
fullscreen: true,
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: [],
tableData: []
};
},
watch: {
@ -189,7 +189,7 @@ export default {
update: () => {
this.modalConfig.title = "店铺详情";
this.isAdd = false;
},
}
};
},
init(row) {
@ -198,25 +198,8 @@ export default {
},
handleSelectionChange(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: {
modalHandles() {
return [
@ -224,8 +207,8 @@ export default {
label: "关闭",
handle: () => {
this.toggle();
},
},
}
}
// {
// label: "",
// type: "primary",
@ -234,10 +217,9 @@ export default {
// },
// },
];
}
},
},
asyncComputed: {},
asyncComputed: {}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -64,8 +64,19 @@
</el-row>
<el-row>
<el-col :span="24" class="search-buttons">
<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-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-row>
</el-form>
@ -110,8 +121,8 @@
size="small"
:expand-row-keys="expandedRows"
@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">
@ -122,8 +133,11 @@
style="width: 100%;"
row-key="shopOrderNo"
:expand-row-keys="expandedShopRows[props.row.unitOrderNo] || []"
@expand-change="(row, expanded) => handleShopExpandChange(props.row, expanded)"
:show-header="true">
@expand-change="
(row, expanded) => handleShopExpandChange(props.row, expanded)
"
:show-header="true"
>
<el-table-column type="expand">
<template slot-scope="shopScope">
<!-- 三级子列表: 商品信息 -->
@ -131,35 +145,55 @@
:data="shopScope.row.productOrderList"
size="small"
style="width: 100%"
:show-header="true">
:show-header="true"
>
<el-table-column prop="productName" label="商品名称">
<template slot-scope="productScope">{{ productScope.row.productName || '-' }}</template>
<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>
<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' }}
¥
{{
(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' }}
¥
{{
(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' }}
¥
{{
(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"
<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>
:preview-src-list="[productScope.row.productImg]"
></el-image>
<span v-else>-</span>
</template>
</el-table-column>
@ -172,7 +206,9 @@
</template>
</el-table-column>
<el-table-column prop="shopOrderNo" label="店铺订单号">
<template slot-scope="shopScope">{{ shopScope.row.shopOrderNo || '-' }}</template>
<template slot-scope="shopScope">{{
shopScope.row.shopOrderNo || "-"
}}</template>
</el-table-column>
<el-table-column prop="shopName" label="店铺名称">
<template slot-scope="shopScope">
@ -181,8 +217,11 @@
</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
:type="getShopStatusType(shopScope.row.status)"
size="small"
>
{{ getShopStatusText(shopScope.row.status) || "-" }}
</el-tag>
</template>
</el-table-column>
@ -194,23 +233,33 @@
<!-- 一级列表字段 -->
<el-table-column label="序号" width="50">
<template slot-scope="scope">
{{ (pagination.pageNumber - 1) * pagination.pageSize + scope.$index + 1 }}
{{
(pagination.pageNumber - 1) * pagination.pageSize + scope.$index + 1
}}
</template>
</el-table-column>
<el-table-column prop="unitOrderNo" label="结算订单号" min-width="120">
<template slot-scope="scope">{{ scope.row.unitOrderNo || '-' }}</template>
<template slot-scope="scope">{{
scope.row.unitOrderNo || "-"
}}</template>
</el-table-column>
<el-table-column prop="createTime" label="下单时间" width="90">
<template slot-scope="scope">{{ scope.row.createTime || '-' }}</template>
<template slot-scope="scope">{{
scope.row.createTime || "-"
}}</template>
</el-table-column>
<el-table-column prop="receiverName" label="收货人姓名" width="80">
<template slot-scope="scope">{{ scope.row.receiverName || '-' }}</template>
<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>
<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>
<template slot-scope="scope">{{ scope.row.poi || "-" }}</template>
</el-table-column>
<el-table-column label="市场订单金额" min-width="100">
<template slot-scope="scope">
@ -240,18 +289,22 @@
<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) || '-' }}
{{ 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>
<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>
<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>
<template slot-scope="scope">{{
scope.row.refundReason || "-"
}}</template>
</el-table-column>
</el-table>
@ -280,13 +333,13 @@ export default {
receiverName: "",
unitOrderNo: "",
statusList: [],
dateRange: [],
dateRange: []
},
stats: {
totalCount: 0,
totalMoney: 0,
completeRate: 0,
agentCommission: 0,
agentCommission: 0
},
orderStatusOptions: [
{ label: "待支付", value: 0 },
@ -298,20 +351,20 @@ export default {
{ label: "已配送(待收货)", value: 6 },
{ label: "完成", value: 8 },
{ label: "未支付订单取消", value: -1 },
{ label: "用户申请退款", value: -2 },
{ label: "用户申请已退款", value: -3 },
{ label: "商家取消订单", value: -4 },
{ label: "平台取消订单", value: -5 },
{ label: "申请退款", value: -2 },
{ label: "同意退款", value: -3 },
{ label: "整单退款完成", value: -4 },
{ label: "部分退款完成", value: -5 }
],
tableData: [],
pagination: {
pageNumber: 1,
pageSize: 10,
total: 0,
total: 0
},
loading: false,
expandedRows: [],
expandedShopRows: {},
expandedShopRows: {}
};
},
watch: {
@ -319,8 +372,8 @@ export default {
handler(query) {
this.applyQueryParamsAndSearch(query);
},
immediate: true,
},
immediate: true
}
},
methods: {
applyQueryParamsAndSearch(query) {
@ -342,9 +395,11 @@ export default {
const params = {
receiverName: this.searchForm.receiverName || 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,
endTime: null,
endTime: null
};
if (this.searchForm.dateRange && this.searchForm.dateRange.length === 2) {
params.startTime = this.searchForm.dateRange[0];
@ -357,10 +412,12 @@ export default {
const params = {
...this.getCommonParams(),
pageNumber: this.pagination.pageNumber,
pageSize: this.pagination.pageSize,
pageSize: this.pagination.pageSize
};
mer_admin.orderV2Page(params).then(res => {
mer_admin
.orderV2Page(params)
.then(res => {
if (res.data && res.data.data) {
this.tableData = res.data.data.data;
this.pagination.total = parseInt(res.data.data.total) || 0;
@ -368,17 +425,21 @@ export default {
this.tableData = [];
this.pagination.total = 0;
}
}).catch(err => {
})
.catch(err => {
console.error("Error fetching order data:", err);
this.tableData = [];
this.pagination.total = 0;
}).finally(() => {
})
.finally(() => {
this.loading = false;
});
},
fetchOverview() {
const params = this.getCommonParams();
mer_admin.orderV2Overview(params).then(res => {
mer_admin
.orderV2Overview(params)
.then(res => {
if (res.data && res.data.data) {
this.stats = res.data.data;
} else {
@ -386,10 +447,11 @@ export default {
totalCount: 0,
totalMoney: 0,
completeRate: 0,
agentCommission: 0,
agentCommission: 0
};
}
}).catch(err => {
})
.catch(err => {
console.error("Error fetching overview data:", err);
});
},
@ -415,27 +477,32 @@ export default {
if (status === undefined || status === null) {
return "未知状态";
}
const statusOption = this.orderStatusOptions.find(opt => opt.value === status);
const statusOption = this.orderStatusOptions.find(
opt => opt.value === status
);
return statusOption ? statusOption.label : "未知状态";
},
getStatusTagType(status) {
switch (status) {
case 0: return 'warning'; //
case 0:
return "warning"; //
case 1:
case 2:
case 3:
case 4:
case 5:
case 6:
return 'info'; //
case 8: return 'success'; //
return "info"; //
case 8:
return "success"; //
case -1:
case -2:
case -3:
case -4:
case -5:
return 'danger'; // 退
default: return 'primary';
return "danger"; // 退
default:
return "primary";
}
},
viewDetails(row) {
@ -448,34 +515,34 @@ export default {
},
getShopStatusText(status) {
const shopStatusMap = {
0: '待备货',
1: '备货完成 待取货',
2: '已取货(待配送)',
3: '配送中',
4: '配送完成(待收货)',
5: '待评价',
6: '已完成'
0: "待备货",
1: "备货完成 待取货",
2: "已取货(待配送)",
3: "配送中",
4: "配送完成(待收货)",
5: "待评价",
6: "已完成"
};
return shopStatusMap[status] || '未知状态';
return shopStatusMap[status] || "未知状态";
},
getShopStatusType(status) {
switch (status) {
case 0: //
case 1: //
return 'warning';
return "warning";
case 2: //
case 3: //
case 4: // ()
return 'info';
return "info";
case 5: //
return 'primary';
return "primary";
case 6: //
return 'success';
return "success";
default:
return 'danger';
return "danger";
}
}
}
},
};
</script>
@ -502,7 +569,7 @@ export default {
.stat-value {
font-size: 20px;
font-weight: bold;
color: #409EFF;
color: #409eff;
}
.search-form .el-form-item {
margin-bottom: 10px;

View File

@ -219,11 +219,11 @@ export default {
title: "订单详情",
show: false,
width: "1200px",
fullscreen: true,
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: [],
tableData: []
};
},
watch: {
@ -255,7 +255,7 @@ export default {
update: () => {
this.modalConfig.title = "订单详情";
this.isAdd = false;
},
}
};
},
init(row) {
@ -264,25 +264,8 @@ export default {
},
handleSelectionChange(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: {
modalHandles() {
return [
@ -290,8 +273,8 @@ export default {
label: "关闭",
handle: () => {
this.toggle();
},
},
}
}
// {
// label: "",
// type: "primary",
@ -300,10 +283,9 @@ export default {
// },
// },
];
}
},
},
asyncComputed: {},
asyncComputed: {}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -111,8 +111,10 @@
</el-form-item></el-col
>
<el-col :span="8">
<el-form-item label="订单退款状态:">
<span>{{ getRefundStatus(ruleForm.refundStatus) }}</span>
<el-form-item label="原始业务状态:">
<span>{{
getBusinessStatus(ruleForm.unitOrderOriginStatus)
}}</span>
</el-form-item></el-col
>
</el-row>
@ -219,11 +221,11 @@ export default {
title: "订单详情",
show: false,
width: "1200px",
fullscreen: true,
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: [],
tableData: []
};
},
watch: {
@ -255,7 +257,7 @@ export default {
update: () => {
this.modalConfig.title = "订单详情";
this.isAdd = false;
},
}
};
},
init(row) {
@ -265,24 +267,25 @@ export default {
handleSelectionChange(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 "用户申请退款中";
getBusinessStatus(val) {
const statusMap = {
0: "待支付",
1: "待接单",
2: "待备货",
3: "待取货",
4: "已取货(待配送)",
5: "配送中(待送达)",
6: "已配送(待收货或已送达自提点)",
8: "完成(待评价或自动完成)",
"-1": "未支付订单取消",
"-2": "申请退款",
"-3": "同意退款",
"-4": "整单退款完成",
"-5": "部分退款完成"
};
return statusMap[val] || statusMap[String(val)] || "未知状态";
}
},
},
computed: {
modalHandles() {
return [
@ -290,8 +293,8 @@ export default {
label: "关闭",
handle: () => {
this.toggle();
},
},
}
}
// {
// label: "",
// type: "primary",
@ -300,10 +303,9 @@ export default {
// },
// },
];
}
},
},
asyncComputed: {},
asyncComputed: {}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

View File

@ -20,10 +20,10 @@
<span>
{{
ruleForm.preSaleStage === 1
? '已付定金'
? "已付定金"
: ruleForm.preSaleStage === 2
? '已付尾款'
: '待付定金'
? "已付尾款"
: "待付定金"
}}
</span>
</el-form-item></el-col
@ -220,7 +220,7 @@
</div>
</template>
<script>
import { debounce, cloneDeep } from 'lodash'
import { debounce, cloneDeep } from "lodash";
export default {
components: {},
props: {},
@ -229,15 +229,15 @@ export default {
isAdd: true,
//
modalConfig: {
title: '订单详情',
title: "订单详情",
show: false,
width: '1200px',
width: "1200px",
fullscreen: true
},
modalData: {},
ruleForm: {},
tableData: []
}
};
},
watch: {
// "modalConfig.show"(newVal) {
@ -253,56 +253,39 @@ export default {
queryTableData(pageNo, pageSize) {},
toggle(e) {
if (this.modalConfig.show == false) {
this.modalConfig.show = true
this.modalConfig.show = true;
} else {
this.modalConfig.show = false
this.modalConfig.show = false;
}
if (e) {
this.init(cloneDeep(e))
this.init(cloneDeep(e));
}
return {
add: () => {
this.modalConfig.title = '订单详情'
this.isAdd = true
this.modalConfig.title = "订单详情";
this.isAdd = true;
},
update: () => {
this.modalConfig.title = '订单详情'
this.isAdd = false
}
this.modalConfig.title = "订单详情";
this.isAdd = false;
}
};
},
init(row) {
console.log(row)
this.ruleForm = row
console.log(row);
this.ruleForm = row;
},
handleSelectionChange(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 '用户申请退款中'
}
console.log(e);
}
},
computed: {
modalHandles() {
return [
{
label: '关闭',
label: "关闭",
handle: () => {
this.toggle()
this.toggle();
}
}
// {
@ -312,10 +295,10 @@ export default {
// handle: () => {
// },
// },
]
];
}
},
asyncComputed: {}
}
};
</script>
<style lang="scss" scoped></style>