Commit 8703cbd3 authored by liwenhong's avatar liwenhong

add:优惠券按分单位传参

parent 8fe4b8a8
......@@ -174,7 +174,7 @@
config: [],
},
hanleDisableTime(time) {
return time.getTime() < Date.now();
return time.getTime() < Date.now() - 24 * 60 * 60 * 1000;
},
};
},
......
......@@ -65,7 +65,7 @@
userList: [],
listParams: {
user_id: 1,
amount: 20,
amount: 1,
},
searchParams: {},
};
......@@ -86,6 +86,7 @@
this.listParams.amount = index + 1;
},
async comCouponSave() {
this.listParams.amount *= 100;
const res = await couponGrant(this.listParams);
this.showConfigDialog = false;
if (res.code !== 0) return this.$message.error(res.reason);
......
......@@ -32,7 +32,18 @@
</template>
</el-table-column>
</el-table>
<div class="pagination-wrapper">
<el-pagination
background
layout="prev, pager, next"
:total="applyPageCount"
:page-size="10"
v-model:currentPage="currentApplyPage"
@current-change="handleCurrentApplyChange"
></el-pagination>
</div>
</div>
<el-dialog title="团长审核" v-model="dialogFormVisible">
您确认通过{{ applyItem.contact_name }}的团长申请吗
<template #footer>
......@@ -127,6 +138,16 @@
<el-table-column label="未结算收益" prop="no_settlement_income" align="center"></el-table-column>
<el-table-column label="累计结算收益" prop="total_income" align="center"></el-table-column>
</el-table>
<div class="pagination-wrapper">
<el-pagination
background
layout="prev, pager, next"
:total="pageCount"
:page-size="10"
v-model:currentPage="currentPage"
@current-change="handleCurrentChange"
></el-pagination>
</div>
</div>
</layout>
</template>
......@@ -148,6 +169,10 @@
data() {
return {
searchKey: "",
currentApplyPage: "",
currentPage: "",
pageCount: 0, // 总条数
applyPageCount: 0, // 总条数
coloneList: [],
coloneApplyList: [],
params: {
......@@ -174,6 +199,14 @@
await this.getColoneApplyList();
},
methods: {
handleCurrentApplyChange(val) {
this.currentApplyPage = val;
this.getColoneApplyList();
},
handleCurrentChange(val) {
this.currentPage = val;
this.getColoneList();
},
handleSearch() {
if (this.searchKey) {
this.placeSearch.search(this.searchKey);
......@@ -213,6 +246,7 @@
async getColoneList() {
try {
const res = await ColoneList(this.params);
this.pageCount = res.count;
if (res.code !== 0) return this.$message.error(res.reason);
this.coloneList = res.result;
} catch (error) {
......@@ -222,6 +256,7 @@
async getColoneApplyList() {
try {
const res = await ColoneApplyList(this.params);
this.applyPageCount = res.count;
if (res.code !== 0) return this.$message.error(res.reason);
this.coloneApplyList = res.result;
} catch (error) {
......@@ -355,11 +390,15 @@
<style lang="less" scoped>
.marketing {
padding: 30px;
text-align: center;
.header {
display: flex;
justify-content: space-between;
padding: 10px;
}
.pagination-wrapper {
margin-top: 30px;
}
}
.mapContainer {
position: relative;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment