This commit is contained in:
PQZ 2024-09-23 20:27:39 +08:00
parent 94c0bf5d96
commit bcc9758db3
4 changed files with 31 additions and 20 deletions

View File

@ -18,6 +18,15 @@ export function attendActive(data) {
}) })
} }
// 获得营销活动分页
export function joinActive(params) {
return request({
url: '/base/customer-active/list',
method: 'get',
params
})
}
// 更新营销活动 // 更新营销活动
export function updateActiveMain(data) { export function updateActiveMain(data) {
return request({ return request({

View File

@ -3,7 +3,7 @@
<!-- 会员信息 --> <!-- 会员信息 -->
<el-row> <el-row>
<el-col :span="18"> <el-col :span="18">
<el-card style="height: 165px; overflow: hidden;" > <el-card style="height: 170px; overflow: hidden;" >
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-weight: bold; font-size: 16px;">{{ formData.levelName }}</span> <span style="font-weight: bold; font-size: 16px;">{{ formData.levelName }}</span>
</div> </div>
@ -77,7 +77,7 @@
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-card style="height: 165px; overflow: hidden;" > <el-card style="height: 170px; overflow: hidden;" >
<div slot="header" class="clearfix"> <div slot="header" class="clearfix">
<span style="font-weight: bold; font-size: 16px;">余额/积分</span> <span style="font-weight: bold; font-size: 16px;">余额/积分</span>
</div> </div>
@ -179,15 +179,25 @@
<span>{{ parseTime(scope.row.endTime) }}</span> <span>{{ parseTime(scope.row.endTime) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否可重复参与" align="center" prop="endTime" width="150">
<template v-slot="scope">
<span v-if="scope.row.isParticipate == '1'">可重复参与</span>
<span v-else>不可重复参与</span>
</template>
</el-table-column>
<el-table-column label="参与情况" align="center" prop="endTime" width="150">
<template v-slot="scope">
<span v-if="scope.row.isJoin == '1'">已参与</span>
<span v-else>未参与</span>
</template>
</el-table-column>
<el-table-column width="100" label="操作" align="center" class-name="small-padding fixed-width"> <el-table-column width="100" label="操作" align="center" class-name="small-padding fixed-width">
<template v-slot="scope"> <template v-slot="scope">
<el-button size="mini" type="text" icon="el-icon-present" @click="openActive(scope.row)">参与活动</el-button> <el-button :disabled="scope.row.isParticipate != '1' && scope.row.isJoin == '1'" size="mini" type="text" icon="el-icon-present" @click="openActive(scope.row)">参与活动</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 分页组件 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize"
@pagination="getActiveList"/>
</el-card> </el-card>
<ReceiveCouponForm @success="getById(param.id)" ref="receiveCouponForm"/> <ReceiveCouponForm @success="getById(param.id)" ref="receiveCouponForm"/>
<RuchForm @success="getById(param.id)" ref="RuchFormRef"/> <RuchForm @success="getById(param.id)" ref="RuchFormRef"/>
@ -217,15 +227,15 @@ export default {
total: 0, total: 0,
// //
queryParams: { queryParams: {
pageNo: 1, isNow:'1',
pageSize: 10, cusId:'',
isNow:'1'
}, },
}; };
}, },
created() { created() {
const row = this.$route.query.row const row = this.$route.query.row
this.param = row this.param = row
this.queryParams.cusId = row.id
this.getById(row.id) this.getById(row.id)
this.getActiveList() this.getActiveList()
@ -240,9 +250,8 @@ export default {
async getActiveList() { async getActiveList() {
try { try {
this.loading = true; this.loading = true;
const res = await ActiveMainApi.getActiveMainPage(this.queryParams); const res = await ActiveMainApi.joinActive(this.queryParams);
this.list = res.data.records; this.list = res.data;
this.total = res.data.total;
} finally { } finally {
this.loading = false; this.loading = false;
} }

View File

@ -11,7 +11,6 @@
<CorpCustomer :typeCode="activeName" ref="corpRef" /> <CorpCustomer :typeCode="activeName" ref="corpRef" />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>

View File

@ -26,13 +26,7 @@
<!-- 操作工具栏 --> <!-- 操作工具栏 -->
<el-row :gutter="10" class="mb8"> <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"/>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
:loading="exportLoading"
v-hasPermi="['repair:order-info:export']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true"> <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">