|
|
@ -12,7 +12,7 @@ const detailVo = ref({}); |
|
|
|
// 搜索对象 |
|
|
|
const getObj = ref({ |
|
|
|
pageNum: 1, |
|
|
|
pageSize: 5, |
|
|
|
pageSize: 10, |
|
|
|
}); |
|
|
|
//分页总条目 |
|
|
|
const total = ref(100); |
|
|
@ -28,35 +28,36 @@ const area = ref([]); |
|
|
|
//标签页默认高亮选项 |
|
|
|
const activeName = ref("all"); |
|
|
|
|
|
|
|
// 支付方式选项 |
|
|
|
const payWay = [ |
|
|
|
// 消费平台选项 |
|
|
|
const consumePlatform = [ |
|
|
|
{ |
|
|
|
value: "微信", |
|
|
|
label: "微信", |
|
|
|
value: "HomilyLink", |
|
|
|
label: "HomilyLink", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: "支付宝", |
|
|
|
label: "支付宝", |
|
|
|
value: "金币系统", |
|
|
|
label: "金币系统", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: "银联", |
|
|
|
label: "银联", |
|
|
|
value: "ERP系统", |
|
|
|
label: "ERP系统", |
|
|
|
}, |
|
|
|
{ |
|
|
|
value: "信用卡", |
|
|
|
label: "信用卡", |
|
|
|
value: "金币系统", |
|
|
|
label: "金币系统", |
|
|
|
}, |
|
|
|
]; |
|
|
|
const consumeType = [ |
|
|
|
{ |
|
|
|
value: "借记卡", |
|
|
|
label: "借记卡", |
|
|
|
value: "购买商品", |
|
|
|
label: "购买商品", |
|
|
|
}, |
|
|
|
]; |
|
|
|
|
|
|
|
//表格高度 |
|
|
|
const tableHeight = computed(function () { |
|
|
|
return (getObj.value.pageSize + 2) * 60 + "px"; |
|
|
|
return (getObj.value.pageSize + 1) * 41 + "px"; |
|
|
|
}); |
|
|
|
|
|
|
|
// 方法 |
|
|
|
// 搜索============================================================== |
|
|
|
// 搜索方法 |
|
|
@ -98,12 +99,11 @@ const get = async function (val) { |
|
|
|
}; |
|
|
|
// 重置 |
|
|
|
const reset = function () { |
|
|
|
detailVo.value.activityId = ""; |
|
|
|
detailVo.value.payWay = ""; |
|
|
|
detailVo.value.area = ""; |
|
|
|
detailVo.value.goods = ""; |
|
|
|
detailVo.value.consumePlatform = ""; |
|
|
|
detailVo.value.consumeType = ""; |
|
|
|
detailVo.value.startDate = ""; |
|
|
|
detailVo.value.endDate = ""; |
|
|
|
get(); |
|
|
|
}; |
|
|
|
// 今天 |
|
|
|
const getToday = function () { |
|
|
@ -157,30 +157,6 @@ const get7Days = function () { |
|
|
|
console.log("getTime", getTime.value); |
|
|
|
get(); |
|
|
|
}; |
|
|
|
//全部充值明细 |
|
|
|
const adminAll = function () { |
|
|
|
console.log("adminAll"); |
|
|
|
detailVo.value.status = ""; |
|
|
|
get(); |
|
|
|
}; |
|
|
|
//待审核充值明细 |
|
|
|
const adminWait = function () { |
|
|
|
detailVo.value.status = 0; |
|
|
|
get(); |
|
|
|
console.log("adminWait"); |
|
|
|
}; |
|
|
|
//已通过充值明细 |
|
|
|
const adminPass = function () { |
|
|
|
detailVo.value.status = 1; |
|
|
|
get(); |
|
|
|
console.log("adminPass"); |
|
|
|
}; |
|
|
|
//已驳回充值明细 |
|
|
|
const adminReject = function () { |
|
|
|
detailVo.value.status = 2; |
|
|
|
get(); |
|
|
|
console.log("adminReject"); |
|
|
|
}; |
|
|
|
//点击标签页 |
|
|
|
const handleClick = function (tab, event) { |
|
|
|
if (tab.props.name === "all") { |
|
|
@ -193,52 +169,41 @@ const handleClick = function (tab, event) { |
|
|
|
adminReject(); |
|
|
|
} |
|
|
|
}; |
|
|
|
// 获取活动名称 |
|
|
|
const getActivity = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await axios.post( |
|
|
|
"http://192.168.8.93:10010/recharge/activity/select", |
|
|
|
{} |
|
|
|
); |
|
|
|
|
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log("请求成功", result); |
|
|
|
// 存储表格数据 |
|
|
|
activity.value = result.data.data; |
|
|
|
console.log("activity", activity.value); |
|
|
|
} catch (error) { |
|
|
|
console.log("请求失败", error); |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
}; |
|
|
|
// 获取地区 |
|
|
|
const getArea = async function () { |
|
|
|
try { |
|
|
|
// 发送POST请求 |
|
|
|
const result = await axios.post( |
|
|
|
"http://192.168.8.93:10010/recharge/recharge", |
|
|
|
{} |
|
|
|
); |
|
|
|
// 将响应结果存储到响应式数据中 |
|
|
|
console.log("请求成功", result); |
|
|
|
// 存储全部数据 |
|
|
|
allData.value = result.data.data; |
|
|
|
console.log("allData", allData.value); |
|
|
|
// 分离并去重地区列表 |
|
|
|
area.value = [...new Set(allData.value.map((item) => item.area))]; |
|
|
|
console.log("地区", area.value); |
|
|
|
} catch (error) { |
|
|
|
console.log("请求失败", error); |
|
|
|
// 在这里可以处理错误逻辑,比如显示错误提示等 |
|
|
|
} |
|
|
|
}; |
|
|
|
// 挂载 |
|
|
|
onMounted(async function () { |
|
|
|
await get(); |
|
|
|
getActivity(); |
|
|
|
await getArea(); |
|
|
|
}); |
|
|
|
|
|
|
|
// 验证跳转输入框的数字是否合法 |
|
|
|
const checkNumber = function () { |
|
|
|
if (typeof parseInt(getObj.value.pageNum) === "number") { |
|
|
|
console.log( |
|
|
|
"总共有多少页" + Math.ceil(total.value / getObj.value.pageSize) |
|
|
|
); |
|
|
|
if ( |
|
|
|
getObj.value.pageNum > 0 && |
|
|
|
getObj.value.pageNum <= Math.ceil(total.value / getObj.value.pageSize) |
|
|
|
) { |
|
|
|
console.log("输入的数字合法"); |
|
|
|
get(); |
|
|
|
} else { |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
|
type: "error", |
|
|
|
message: "请检查输入内容", |
|
|
|
}); |
|
|
|
} |
|
|
|
} else { |
|
|
|
//提示 |
|
|
|
ElMessage({ |
|
|
|
type: "error", |
|
|
|
message: "请检查输入内容", |
|
|
|
}); |
|
|
|
} |
|
|
|
}; |
|
|
|
</script> |
|
|
|
|
|
|
|
<template> |
|
|
@ -250,7 +215,7 @@ onMounted(async function () { |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">商品名称:</el-text> |
|
|
|
<el-select |
|
|
|
v-model="detailVo.activityId" |
|
|
|
v-model="detailVo.goods" |
|
|
|
placeholder="请选择活动名称" |
|
|
|
size="large" |
|
|
|
style="width: 240px" |
|
|
@ -268,13 +233,13 @@ onMounted(async function () { |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">消费平台:</el-text> |
|
|
|
<el-select |
|
|
|
v-model="detailVo.payWay" |
|
|
|
v-model="detailVo.consumePlatform" |
|
|
|
placeholder="请选择支付方式" |
|
|
|
size="large" |
|
|
|
style="width: 240px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in payWay" |
|
|
|
v-for="item in consumePlatform" |
|
|
|
:key="item.value" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
@ -286,16 +251,16 @@ onMounted(async function () { |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">消费类型:</el-text> |
|
|
|
<el-select |
|
|
|
v-model="detailVo.area" |
|
|
|
placeholder="请选择所属地区" |
|
|
|
v-model="detailVo.consumeType" |
|
|
|
placeholder="请选择消费类型" |
|
|
|
size="large" |
|
|
|
style="width: 240px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in area" |
|
|
|
v-for="item in consumeType" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item" |
|
|
|
:label="item.label" |
|
|
|
:value="item.value" |
|
|
|
/> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
@ -304,7 +269,7 @@ onMounted(async function () { |
|
|
|
<el-row> |
|
|
|
<el-col :span="21"> |
|
|
|
<div class="head-card-element"> |
|
|
|
<el-text class="mx-1" size="large">充值时间:</el-text> |
|
|
|
<el-text class="mx-1" size="large">消费时间:</el-text> |
|
|
|
<el-date-picker |
|
|
|
v-model="getTime" |
|
|
|
type="datetimerange" |
|
|
@ -334,12 +299,16 @@ onMounted(async function () { |
|
|
|
<el-card> |
|
|
|
<div> |
|
|
|
<el-table :data="tableData" :height="tableHeight" style="width: 100%"> |
|
|
|
<el-table-column prop="username" label="姓名" width="80px" /> |
|
|
|
<el-table-column prop="homilyId" label="精网号" width="180px" /> |
|
|
|
<el-table-column prop="userName" label="姓名" width="80px" /> |
|
|
|
<el-table-column prop="jwcode" label="精网号" width="180px" /> |
|
|
|
<el-table-column prop="area" label="所属地区" width="120px" /> |
|
|
|
<el-table-column prop="goods" label="商品名称" width="200px" /> |
|
|
|
<el-table-column |
|
|
|
prop="consumPlatform" |
|
|
|
prop="productName" |
|
|
|
label="商品名称" |
|
|
|
width="200px" |
|
|
|
/> |
|
|
|
<el-table-column |
|
|
|
prop="consumePlatform" |
|
|
|
label="消费平台" |
|
|
|
width="120px" |
|
|
|
/> |
|
|
@ -352,7 +321,15 @@ onMounted(async function () { |
|
|
|
prop="rechargeTotal" |
|
|
|
label="消费金币总数" |
|
|
|
width="180px" |
|
|
|
/> |
|
|
|
> |
|
|
|
<template #default="scope"> |
|
|
|
{{ |
|
|
|
scope.row.taskCoin + |
|
|
|
scope.row.freeCoin + |
|
|
|
scope.row.rechargeCoin |
|
|
|
}} |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="taskCoin" label="任务金币" width="120px" /> |
|
|
|
<el-table-column prop="freeCoin" label="免费金币" width="120px" /> |
|
|
|
<el-table-column |
|
|
@ -366,40 +343,52 @@ onMounted(async function () { |
|
|
|
width="200px" |
|
|
|
show-overflow-tooltip |
|
|
|
/> |
|
|
|
<el-table-column prop="conmmitName" label="提交人" width="120px" /> |
|
|
|
<el-table-column prop="adminName" label="提交人" width="120px" /> |
|
|
|
<el-table-column prop="createTime" label="消费时间" width="180px" /> |
|
|
|
<el-table-column prop="operation" label="操作"> |
|
|
|
<template #default="scope"> |
|
|
|
<el-popconfirm |
|
|
|
title="确定将此条活动删除吗?" |
|
|
|
@confirm="delConfirm" |
|
|
|
> |
|
|
|
<template #reference> |
|
|
|
<el-button type="primary" text @click="del(scope.row)"> |
|
|
|
删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
<template #actions="{ confirm, cancel }"> |
|
|
|
<el-button size="small" @click="cancel">取消</el-button> |
|
|
|
<el-button type="primary" size="small" @click="confirm"> |
|
|
|
确定 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-popconfirm> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 分页 --> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
layout="prev, pager, next" |
|
|
|
:total="total" |
|
|
|
:page-size="getObj.pageSize" |
|
|
|
:current-page="getObj.pageNum" |
|
|
|
@current-change="get" |
|
|
|
/> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
:page-size="getObj.pageSize" |
|
|
|
layout="slot" |
|
|
|
:total="total" |
|
|
|
> |
|
|
|
<div>共{{ total }}条,每页</div> |
|
|
|
<el-select |
|
|
|
v-model="getObj.pageSize" |
|
|
|
class="page-size" |
|
|
|
@change="get()" |
|
|
|
style="width: 80px" |
|
|
|
> |
|
|
|
<el-option |
|
|
|
v-for="item in [5, 6, 7, 8, 9, 10]" |
|
|
|
:key="item" |
|
|
|
:label="item" |
|
|
|
:value="item" |
|
|
|
></el-option> |
|
|
|
</el-select> |
|
|
|
<div>条</div> |
|
|
|
</el-pagination> |
|
|
|
<el-pagination |
|
|
|
background |
|
|
|
layout="prev, pager, next, slot" |
|
|
|
:page-size="getObj.pageSize" |
|
|
|
:total="total" |
|
|
|
:current-page="getObj.pageNum" |
|
|
|
@current-change="get" |
|
|
|
> |
|
|
|
<div>跳至</div> |
|
|
|
<el-input |
|
|
|
v-model="getObj.pageNum" |
|
|
|
style="width: 40px" |
|
|
|
@change="checkNumber" |
|
|
|
/> |
|
|
|
<div>页</div> |
|
|
|
</el-pagination> |
|
|
|
</div> |
|
|
|
</el-card> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -421,4 +410,9 @@ onMounted(async function () { |
|
|
|
.head-card-btn { |
|
|
|
margin-left: auto; |
|
|
|
} |
|
|
|
.pagination { |
|
|
|
display: flex; |
|
|
|
margin-top: 20px; |
|
|
|
margin-left: 33%; |
|
|
|
} |
|
|
|
</style> |