```feat(money): 添加详情表格和充值说明更新
- 在money/detail组件中添加表格显示功能,含日期、姓名和操作列。 - 调整pay组件中充值说明,增加支付金额显示。 - 更新user组件以开启余额预警功能,修改输入字段标签。- 新增userPayinfo API支持用户充值记录查询。 ```master
parent
c14e2e9709
commit
62843ef35c
|
@ -12,6 +12,15 @@ export function listUser(query) {
|
|||
|
||||
|
||||
|
||||
//充值用户记录
|
||||
export function userPayinfo(query) {
|
||||
return request({
|
||||
url: '/system/user/userPayinfo',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 充值用户余额
|
||||
export function userRecharge(data) {
|
||||
return request({
|
||||
|
|
|
@ -1,13 +1,74 @@
|
|||
<script>
|
||||
export default {
|
||||
name: "index"
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
<div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
label="日期"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<i class="el-icon-time"></i>
|
||||
<span style="margin-left: 10px">{{ scope.row.date }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-popover trigger="hover" placement="top">
|
||||
<p>姓名: {{ scope.row.name }}</p>
|
||||
<p>住址: {{ scope.row.address }}</p>
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium">{{ scope.row.name }}</el-tag>
|
||||
</div>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="danger"
|
||||
@click="handleDelete(scope.$index, scope.row)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tableData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1517 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1519 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1516 弄'
|
||||
}]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleEdit(index, row) {
|
||||
console.log(index, row);
|
||||
},
|
||||
handleDelete(index, row) {
|
||||
console.log(index, row);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
<h1 style="margin-bottom: 15px;">充值说明</h1>
|
||||
<h4>你敢充钱,我就敢让你没钱</h4>
|
||||
<h4>子龙说你得有个小目标</h4>
|
||||
<h4>什么小目标,得一个亿</h4>
|
||||
</li>
|
||||
<li>
|
||||
<h4 style="margin-bottom: 15px;">支付金额</h4>
|
||||
|
@ -37,8 +36,7 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import {addUserMoney, userRecharge} from "@/api/system/user";
|
||||
|
||||
import { addUserMoney, userRecharge ,createRechargeRecord} from "@/api/system/user";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
@ -46,7 +44,7 @@ export default {
|
|||
addSysUser: {},
|
||||
disabled: false,
|
||||
// 同步跳转页面地址
|
||||
returnUrl: 'http://172.13.1.1/money/money',
|
||||
returnUrl:'http://localhost/money/money',
|
||||
//充值参数
|
||||
rechargeParams: {
|
||||
"totalAmt": '', //金额
|
||||
|
@ -86,7 +84,7 @@ export default {
|
|||
// 传递同步跳转地址
|
||||
returnUrl: this.returnUrl,
|
||||
// 商品名称
|
||||
subject: '充值金额',
|
||||
subject: '支付金额',
|
||||
// 支付类型
|
||||
productCode: 'FAST_INSTANT_TRADE_PAY'
|
||||
}
|
||||
|
@ -109,6 +107,7 @@ export default {
|
|||
let userId = localStorage.getItem('userId');
|
||||
this.addSysUser.userId = userId;
|
||||
addUserMoney(this.addSysUser).then(res => {
|
||||
createRechargeRecord(praem);
|
||||
}).catch(error => {
|
||||
console.error('Error updating user balance:', error);
|
||||
});
|
||||
|
|
|
@ -12,17 +12,17 @@
|
|||
<h1>余额预警</h1>
|
||||
<el-button type="text" @click="dialogFormVisible = true">开启</el-button>
|
||||
<el-dialog title="添加预警号码" :visible.sync="dialogFormVisible">
|
||||
<el-divider style="color: #00afff">
|
||||
<el-divider style="border-color: #00afff;">
|
||||
<el-tag content-position="right" type="warning">
|
||||
账户可用余额小于该值时,每天短信通知一次(最多连续提醒5天)
|
||||
</el-tag>
|
||||
</el-divider>
|
||||
<el-form :model="form">
|
||||
<el-form-item label="预警阈值:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.name" autocomplete="off"></el-input>
|
||||
<el-input v-model="form.userBalance" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="预警号码:" :label-width="formLabelWidth">
|
||||
<el-input v-model="form.phone" autocomplete="off"></el-input>
|
||||
<el-input v-model="form.phonenumber" autocomplete="off"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
|
|
Loading…
Reference in New Issue