11
This commit is contained in:
@@ -3,47 +3,74 @@
|
||||
<list-layout>
|
||||
<!-- 搜索区域 -->
|
||||
<template #search>
|
||||
<el-form :inline="true" :model="queryParams" label-width="100px">
|
||||
<el-form-item label="礼金Key">
|
||||
<el-input v-model="queryParams.giftCouponKey" placeholder="礼金批次ID" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品SKU">
|
||||
<el-input v-model="queryParams.skuId" placeholder="商品SKU ID" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="queryParams.skuName" placeholder="商品名称" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select v-model="queryParams.owner" placeholder="请选择" clearable size="small">
|
||||
<el-option label="自营" value="g" />
|
||||
<el-option label="POP" value="pop" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期状态">
|
||||
<el-select v-model="queryParams.isExpired" placeholder="请选择" clearable size="small">
|
||||
<el-option label="未过期" :value="0" />
|
||||
<el-option label="已过期" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
range-separator="至"
|
||||
@change="handleDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-plus" @click="handleCreate">创建礼金</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="handleExport" v-hasPermi="['system:giftcoupon:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<mobile-search-form
|
||||
:model="queryParams"
|
||||
@search="handleQuery"
|
||||
@reset="resetQuery"
|
||||
>
|
||||
<template #form="{ expanded }">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
:inline="true"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="礼金Key">
|
||||
<el-input v-model="queryParams.giftCouponKey" placeholder="礼金批次ID" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品SKU">
|
||||
<el-input v-model="queryParams.skuId" placeholder="商品SKU ID" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称">
|
||||
<el-input v-model="queryParams.skuName" placeholder="商品名称" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||
</el-form-item>
|
||||
<el-form-item label="类型">
|
||||
<el-select v-model="queryParams.owner" placeholder="请选择" clearable size="small">
|
||||
<el-option label="自营" value="g" />
|
||||
<el-option label="POP" value="pop" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期状态">
|
||||
<el-select v-model="queryParams.isExpired" placeholder="请选择" clearable size="small">
|
||||
<el-option label="未过期" :value="0" />
|
||||
<el-option label="已过期" :value="1" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
type="daterange"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
size="small"
|
||||
range-separator="至"
|
||||
@change="handleDateRangeChange"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- 桌面端搜索按钮 -->
|
||||
<el-form-item v-if="!expanded">
|
||||
<el-button type="primary" size="small" icon="el-icon-search" @click="handleQuery">搜索</el-button>
|
||||
<el-button size="small" icon="el-icon-refresh" @click="resetQuery">重置</el-button>
|
||||
<el-button type="success" size="small" icon="el-icon-plus" @click="handleCreate">创建礼金</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="handleExport" v-hasPermi="['system:giftcoupon:export']">导出</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
</mobile-search-form>
|
||||
|
||||
<!-- 操作按钮区域(移动端单独显示) -->
|
||||
<div class="action-buttons-section mobile-only">
|
||||
<mobile-button-group
|
||||
:buttons="actionButtons"
|
||||
:primary-count="2"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<!-- 桌面端按钮组 -->
|
||||
<div class="desktop-action-buttons desktop-only">
|
||||
<el-button type="success" size="small" icon="el-icon-plus" @click="handleCreate">创建礼金</el-button>
|
||||
<el-button type="warning" size="small" icon="el-icon-download" @click="handleExport" v-hasPermi="['system:giftcoupon:export']">导出</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 统计信息卡片 -->
|
||||
@@ -262,13 +289,18 @@
|
||||
<script>
|
||||
import { listGiftCoupons, getGiftCoupon, getGiftCouponStatistics, exportGiftCoupons } from '@/api/system/giftcoupon'
|
||||
import { createGiftCoupon, transferWithGift, generatePromotionContent } from '@/api/system/jdorder'
|
||||
import { mapGetters } from 'vuex'
|
||||
import ListLayout from '@/components/ListLayout'
|
||||
import MobileSearchForm from '@/components/MobileSearchForm'
|
||||
import MobileButtonGroup from '@/components/MobileButtonGroup'
|
||||
import { parseTime } from '@/utils/ruoyi'
|
||||
|
||||
export default {
|
||||
name: 'GiftCoupon',
|
||||
components: {
|
||||
ListLayout
|
||||
ListLayout,
|
||||
MobileSearchForm,
|
||||
MobileButtonGroup
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -924,6 +956,42 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* 操作按钮区域 */
|
||||
.action-buttons-section {
|
||||
margin-top: 12px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
/* 移动端和桌面端按钮组显示控制 */
|
||||
@media (max-width: 768px) {
|
||||
.desktop-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.action-buttons-section.mobile-only {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 769px) {
|
||||
.mobile-only {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.desktop-action-buttons.desktop-only {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
.desktop-action-buttons {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
.el-card {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user