mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-11-14 04:49:00 +08:00
- 重构统计报表(销售订单明细、商品销售汇总、店铺业绩)列表页为 useTable - 重构营销活动(秒杀、第N件优惠、积分商品)列表页为 useTable - 重构财务流水(钱包日志)、服务工单、分销导入、店铺审核、商品参数、订单投诉列表页 - 消除约 210+ 行分页/防抖/竞态重复样板代码,统一加载与查询状态规范
32 lines
1.3 KiB
Vue
32 lines
1.3 KiB
Vue
<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 setup>
|
|
import { useTable } from "@/utils/useTable";
|
|
import { getNthItemDiscountList } from "@/api/promotion.js";
|
|
|
|
const { loading, data: rows, total, searchForm: query, getDataList: load } = useTable(
|
|
getNthItemDiscountList,
|
|
{ pageSize: 20, form: { promotionName: "" } }
|
|
);
|
|
</script>
|