mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-21 17:40:25 +08:00
feat(促销管理): 添加限时直降和第N件优惠功能
This commit is contained in:
@@ -283,6 +283,12 @@ export const getCouponReceiveList = (params) => {
|
||||
return getRequest("/promotion/coupon/received", params);
|
||||
};
|
||||
|
||||
export const getFlashDiscountList = (params) => getRequest("/promotion/flashDiscount", params);
|
||||
export const getFlashDiscountDetail = (id) => getRequest(`/promotion/flashDiscount/${id}`);
|
||||
export const updateFlashDiscountStatus = (id, params) => putRequest(`/promotion/flashDiscount/status/${id}`, params);
|
||||
export const deleteFlashDiscount = (id) => deleteRequest(`/promotion/flashDiscount/${id}`);
|
||||
export const getNthItemDiscountList = (params) => getRequest("/promotion/nthItemDiscount", params);
|
||||
|
||||
// 现金礼品卡活动分页
|
||||
export const getGiftCardCashActivityPage = (params) => {
|
||||
return getRequest("/promotion/giftCardCash/activity", params);
|
||||
|
||||
@@ -313,6 +313,18 @@ export const otherRouter = {
|
||||
name: "full-discount-detail",
|
||||
component: () => import("@/views/promotions/full-discount/full-discount-detail.vue")
|
||||
},
|
||||
{
|
||||
path: "promotions/flash-discount",
|
||||
title: "限时直降",
|
||||
name: "flash-discount",
|
||||
component: () => import("@/views/promotions/flash-discount/flash-discount.vue")
|
||||
},
|
||||
{
|
||||
path: "promotions/nth-item-discount",
|
||||
title: "第N件优惠",
|
||||
name: "nth-item-discount",
|
||||
component: () => import("@/views/promotions/nth-item-discount/nth-item-discount.vue")
|
||||
},
|
||||
{
|
||||
path: "promotions/seckill/manager-seckill-add",
|
||||
title: "编辑秒杀活动",
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form inline @keyup.enter="load">
|
||||
<el-form-item label="活动名称"><el-input v-model="query.promotionName" clearable /></el-form-item>
|
||||
<el-form-item><el-button type="primary" @click="load">搜索</el-button></el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="mt_10">
|
||||
<el-table v-loading="loading" :data="rows" border>
|
||||
<el-table-column prop="promotionName" label="活动名称" />
|
||||
<el-table-column prop="storeName" label="店铺" />
|
||||
<el-table-column prop="startTime" label="开始" width="170" />
|
||||
<el-table-column prop="endTime" label="结束" width="170" />
|
||||
<el-table-column prop="promotionStatus" label="状态" width="100" />
|
||||
</el-table>
|
||||
<el-pagination class="mt_10" v-model:current-page="query.pageNumber" :total="total" @current-change="load" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getFlashDiscountList } from "@/api/promotion.js";
|
||||
export default {
|
||||
data() { return { loading: false, rows: [], total: 0, query: { pageNumber: 1, pageSize: 20 } }; },
|
||||
mounted() { this.load(); },
|
||||
methods: {
|
||||
load() {
|
||||
this.loading = true;
|
||||
getFlashDiscountList(this.query).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) { this.rows = res.result.records; this.total = res.result.total; }
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form inline @keyup.enter="load">
|
||||
<el-form-item label="活动名称"><el-input v-model="query.promotionName" clearable /></el-form-item>
|
||||
<el-form-item><el-button type="primary" @click="load">搜索</el-button></el-form-item>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card class="mt_10">
|
||||
<el-table v-loading="loading" :data="rows" border>
|
||||
<el-table-column prop="promotionName" label="活动名称" />
|
||||
<el-table-column prop="storeName" label="店铺" />
|
||||
<el-table-column prop="nthNum" label="第N件" width="80" />
|
||||
<el-table-column prop="discountType" label="优惠方式" width="100" />
|
||||
<el-table-column prop="startTime" label="开始" width="170" />
|
||||
<el-table-column prop="endTime" label="结束" width="170" />
|
||||
<el-table-column prop="promotionStatus" label="状态" width="100" />
|
||||
</el-table>
|
||||
<el-pagination class="mt_10" v-model:current-page="query.pageNumber" :total="total" @current-change="load" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { getNthItemDiscountList } from "@/api/promotion.js";
|
||||
export default {
|
||||
data() { return { loading: false, rows: [], total: 0, query: { pageNumber: 1, pageSize: 20 } }; },
|
||||
mounted() { this.load(); },
|
||||
methods: {
|
||||
load() {
|
||||
this.loading = true;
|
||||
getNthItemDiscountList(this.query).then((res) => {
|
||||
this.loading = false;
|
||||
if (res.success) { this.rows = res.result.records; this.total = res.result.total; }
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
Reference in New Issue
Block a user