优化买家端订单详情页,优化卖家端、平台端优惠券显示。优化结算页无效商品提示。

This commit is contained in:
paulGao
2022-08-12 18:40:32 +08:00
parent aaf1c172de
commit 8ff6c0414a
4 changed files with 291 additions and 112 deletions

View File

@@ -39,7 +39,11 @@
style="width: 200px"
></DatePicker>
</Form-item>
<Button @click="handleSearch" type="primary" icon="ios-search" class="search-btn"
<Button
@click="handleSearch"
type="primary"
icon="ios-search"
class="search-btn"
>搜索</Button
>
</Form>
@@ -59,18 +63,26 @@
>
<template slot-scope="{ row }" slot="action">
<Button
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
v-if="
row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'
"
type="info"
size="small"
@click="see(row)"
>编辑
</Button>
<Button v-else type="default" size="small" @click="see(row, 'onlyView')"
<Button
v-else
type="default"
size="small"
@click="see(row, 'onlyView')"
>查看
</Button>
<Button
class="ml_5"
v-if="row.promotionStatus === 'START' || row.promotionStatus === 'NEW'"
v-if="
row.promotionStatus === 'START' || row.promotionStatus === 'NEW'
"
type="error"
size="small"
@click="close(row)"
@@ -78,7 +90,9 @@
</Button>
<Button
class="ml_5"
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'"
v-if="
row.promotionStatus === 'CLOSE' || row.promotionStatus === 'END'
"
type="error"
size="small"
@click="remove(row)"
@@ -109,7 +123,10 @@ import {
updatePlatformCouponStatus,
deletePlatformCoupon,
} from "@/api/promotion";
import { promotionsStatusRender, promotionsScopeTypeRender } from "@/utils/promotions";
import {
promotionsStatusRender,
promotionsScopeTypeRender,
} from "@/utils/promotions";
export default {
name: "coupon",
@@ -152,7 +169,10 @@ export default {
width: 100,
render: (h, params) => {
if (params.row.price) {
return h("div", this.$options.filters.unitPrice(params.row.price, "¥"));
return h(
"div",
this.$options.filters.unitPrice(params.row.price, "¥")
);
} else {
return h("div", params.row.couponDiscount + "折");
}
@@ -172,6 +192,14 @@ export default {
);
},
},
{
title: "已被使用的数量/已领取数量",
key: "publishNum",
render: (h, params) => {
return h("div", params.row.usedNum + "/" + params.row.receivedNum);
},
},
{
title: "优惠券类型",
key: "couponType",
@@ -207,7 +235,8 @@ export default {
} else if (params?.row?.startTime && params?.row?.endTime) {
return h("div", {
domProps: {
innerHTML: params.row.startTime + "<br/>" + params.row.endTime,
innerHTML:
params.row.startTime + "<br/>" + params.row.endTime,
},
});
}
@@ -349,7 +378,7 @@ export default {
getPlatformCouponList(this.searchForm).then((res) => {
this.loading = false;
if (res.success) {
console.log(res)
console.log(res);
this.data = res.result.records;
this.total = res.result.total;
}