Commit 8703cbd3 authored by liwenhong's avatar liwenhong

add:优惠券按分单位传参

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