|
@@ -144,13 +144,23 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="status" label="操作" width="140" fixed="right">
|
|
|
<template slot-scope="scope">
|
|
|
- <template v-if="scope.row.is_use_discount_code == 'false'">
|
|
|
+ <template
|
|
|
+ v-if="
|
|
|
+ scope.row.is_use_discount_code == 'false' &&
|
|
|
+ scope.row.order_status === 1
|
|
|
+ "
|
|
|
+ >
|
|
|
<a class="apply" @click="handleApply(scope.row, scope.$index)"
|
|
|
>申请退款</a
|
|
|
>
|
|
|
</template>
|
|
|
<template
|
|
|
- v-if="scope.row.order_status === 1 || scope.row.order_status === 2"
|
|
|
+ v-if="
|
|
|
+ scope.row.order_status === 1 ||
|
|
|
+ scope.row.order_status === 2 ||
|
|
|
+ (scope.row.order_status === 3 &&
|
|
|
+ scope.row.order_amount !== scope.row.refund_amount)
|
|
|
+ "
|
|
|
>
|
|
|
<a class="apply" @click="handleToShlef">去查看</a>
|
|
|
</template>
|
|
@@ -225,17 +235,17 @@ export default {
|
|
|
textColor: "#1D2129",
|
|
|
},
|
|
|
4: {
|
|
|
- text: "已撤回",
|
|
|
+ text: "已退款",
|
|
|
textColor: "#0FC6C2",
|
|
|
bg: "#0FC6C2",
|
|
|
},
|
|
|
5: {
|
|
|
- text: "已退款",
|
|
|
+ text: "支付失败",
|
|
|
bg: "#EF21DA",
|
|
|
textColor: "#EF21DA",
|
|
|
},
|
|
|
3: {
|
|
|
- text: "支付失败",
|
|
|
+ text: "已撤回",
|
|
|
bg: "#FF7D00",
|
|
|
textColor: "#1D2129",
|
|
|
},
|
|
@@ -401,21 +411,21 @@ export default {
|
|
|
},
|
|
|
// 申请退款
|
|
|
handleApply(obj, index) {
|
|
|
- this.$confirm("确定申请退款吗?", "提示", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- cancelButtonText: "取消",
|
|
|
- type: "warning",
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- let data = {
|
|
|
- order_id: obj.id,
|
|
|
- };
|
|
|
- getLogin(
|
|
|
- "/ShopServer/Client/OrderManager/CheckOrderIsCanSubmitRefundApply",
|
|
|
- data
|
|
|
- ).then((res) => {
|
|
|
- if (res.status === 1) {
|
|
|
- if (res.is_can_submit_refund_apply === "true") {
|
|
|
+ let data = {
|
|
|
+ order_id: obj.id,
|
|
|
+ };
|
|
|
+ getLogin(
|
|
|
+ "/ShopServer/Client/OrderManager/CheckOrderIsCanSubmitRefundApply",
|
|
|
+ data
|
|
|
+ ).then((res) => {
|
|
|
+ if (res.status === 1) {
|
|
|
+ if (res.is_can_submit_refund_apply === "true") {
|
|
|
+ this.$confirm("确定申请退款吗?", "提示", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning",
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
let Mname =
|
|
|
"/ShopServer/Client/OrderManager/SubmitOrderRefundApply";
|
|
|
|
|
@@ -428,17 +438,17 @@ export default {
|
|
|
this.getList();
|
|
|
}
|
|
|
});
|
|
|
- } else {
|
|
|
- this.$confirm(res.cannot_submit_reason, "不可退款原因", {
|
|
|
- confirmButtonText: "确定",
|
|
|
- showCancelButton: false,
|
|
|
- type: "warning",
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+ })
|
|
|
+ .catch(() => {});
|
|
|
+ } else {
|
|
|
+ this.$confirm(res.cannot_submit_reason, "不可退款原因", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ showCancelButton: false,
|
|
|
+ type: "warning",
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
handleToShlef() {
|
|
|
this.$router.push({ path: "/bookShelf" });
|