|
|
|
<!DOCTYPE html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<!-- import CSS -->
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
|
|
|
|
<title>充值记录</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<div id="app">
|
|
|
|
<el-container>
|
|
|
|
<el-header style="text-align: center;">充值记录</el-header>
|
|
|
|
<el-main>
|
|
|
|
<el-row>
|
|
|
|
<el-form :inline="true" :model="search">
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-input v-model="search.outOrderNo" placeholder="商户订单号" clearable></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-input v-model="search.orderNo" placeholder="支付订单号" clearable></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-input v-model="search.cardNo" placeholder="身份证号" clearable></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-input v-model="search.mobile" placeholder="手机号" clearable></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-input v-model="search.bankCardNo" placeholder="银行卡号" clearable></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-date-picker
|
|
|
|
v-model="search.timeRange"
|
|
|
|
type="daterange"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
range-separator="至"
|
|
|
|
start-placeholder="支付开始日期"
|
|
|
|
end-placeholder="支付结束日期">
|
|
|
|
</el-date-picker>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="">
|
|
|
|
<el-select v-model="search.status" placeholder="支付状态" clearable>
|
|
|
|
<el-option label="支付成功" value="6"></el-option>
|
|
|
|
<el-option label="支付失败" value="9"></el-option>
|
|
|
|
<el-option label="待支付" value="2"></el-option>
|
|
|
|
<el-option label="申请失败" value="3"></el-option>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button type="primary" @click="query">查询</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<div style="line-height: 20px; margin-left: 20px; display: inline-block; margin-top: 10px; font-size: 14px;">充值金额:{{ amount }}</div>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
</el-row>
|
|
|
|
<el-row>
|
|
|
|
<el-col :span="24">
|
|
|
|
<el-table
|
|
|
|
:data="records"
|
|
|
|
style="width: 100%">
|
|
|
|
<el-table-column
|
|
|
|
prop="out_order_no"
|
|
|
|
label="订单号"
|
|
|
|
width="180">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="real_name"
|
|
|
|
label="姓名"
|
|
|
|
width="180">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="card_no"
|
|
|
|
label="身份证号">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="bank_card_no"
|
|
|
|
label="银行卡号">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="mobile"
|
|
|
|
label="手机号">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="amount"
|
|
|
|
label="充值金额">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="payed_at"
|
|
|
|
label="充值时间">
|
|
|
|
</el-table-column>
|
|
|
|
<el-table-column
|
|
|
|
prop="status_text"
|
|
|
|
label="状态">
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<el-pagination
|
|
|
|
background
|
|
|
|
layout="prev, pager, next"
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
:page-size="pageSize"
|
|
|
|
:total="total"
|
|
|
|
style="margin-top: 10px">
|
|
|
|
</el-pagination>
|
|
|
|
</el-col>
|
|
|
|
</el-row>
|
|
|
|
</el-main>
|
|
|
|
</el-container>
|
|
|
|
<el-dialog title="登录" :visible.sync="loginVisible" width="30%">
|
|
|
|
<el-form :model="loginer" label-width="80px">
|
|
|
|
<el-form-item label="账号">
|
|
|
|
<el-input v-model="loginer.username" autocomplete="off"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="密码">
|
|
|
|
<el-input v-model="loginer.password" autocomplete="off"></el-input>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button @click="loginVisible = false">取 消</el-button>
|
|
|
|
<el-button type="primary" @click="login">确 定</el-button>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</body>
|
|
|
|
<!-- import Vue before Element -->
|
|
|
|
<script src="https://unpkg.com/vue@2/dist/vue.js"></script>
|
|
|
|
<!-- import JavaScript -->
|
|
|
|
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
|
|
|
|
<script src="https://unpkg.com/axios@1.1.2/dist/axios.min.js"></script>
|
|
|
|
<script>
|
|
|
|
new Vue({
|
|
|
|
el: '#app',
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
search: {
|
|
|
|
name: '',
|
|
|
|
mobile: '',
|
|
|
|
cardNo: '',
|
|
|
|
bankCardNo: '',
|
|
|
|
orderNo: '',
|
|
|
|
outOrderNo: '',
|
|
|
|
timeRange: null,
|
|
|
|
status: undefined
|
|
|
|
},
|
|
|
|
records: [],
|
|
|
|
total: 0,
|
|
|
|
amount: 0,
|
|
|
|
pageSize: 20,
|
|
|
|
loginVisible: false,
|
|
|
|
loginer: {
|
|
|
|
username: '',
|
|
|
|
password: ''
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
if (!window.sessionStorage.getItem('token')) {
|
|
|
|
this.loginVisible = true;
|
|
|
|
return this.$message.error('请先登录');
|
|
|
|
}
|
|
|
|
this.searchList();
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
searchList(page) {
|
|
|
|
let data = {...this.search}
|
|
|
|
data.token = window.sessionStorage.getItem('token');
|
|
|
|
data.page = page;
|
|
|
|
data.pageSize = this.pageSize;
|
|
|
|
axios.post('/recharge/orders', data)
|
|
|
|
.then( (response) => {
|
|
|
|
console.log(response);
|
|
|
|
let result = response.data
|
|
|
|
if (result.code != 1000) {
|
|
|
|
if (result.code == 2005) {
|
|
|
|
this.loginVisible = true;
|
|
|
|
}
|
|
|
|
return this.$message.error(response.data.message);
|
|
|
|
}
|
|
|
|
this.records = result.data.records;
|
|
|
|
this.total = result.data.total;
|
|
|
|
this.amount = result.data.amount;
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.$message.error('请求错误');
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
console.log('submit!');
|
|
|
|
},
|
|
|
|
query() {
|
|
|
|
this.searchList(1)
|
|
|
|
},
|
|
|
|
handleCurrentChange(val) {
|
|
|
|
this.searchList(val)
|
|
|
|
},
|
|
|
|
login() {
|
|
|
|
axios.post('/recharge/login', this.loginer)
|
|
|
|
.then( (response) => {
|
|
|
|
console.log(response);
|
|
|
|
let result = response.data
|
|
|
|
if (result.code != 1000) {
|
|
|
|
return this.$message.error(response.data.message);
|
|
|
|
}
|
|
|
|
window.sessionStorage.setItem('token', result.data.token)
|
|
|
|
this.loginVisible = false;
|
|
|
|
this.$message.success('登录成功');
|
|
|
|
this.searchList(1);
|
|
|
|
})
|
|
|
|
.catch((error) => {
|
|
|
|
this.$message.error('请求错误');
|
|
|
|
console.log(error);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
</html>
|