You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
payment/public/orders.html

178 lines
7.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<!-- import CSS -->
<link rel="stylesheet" href="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.14/theme-chalk/index.min.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.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-input v-model="search.cardUserName" 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="FINISH"></el-option>
<el-option label="转账成功,待入账" value="SUCCESS"></el-option>
<el-option label="转账成功,入账失败" value="CONFIRM_FAILED"></el-option>
<el-option label="转账失败" value="FAILED"></el-option>
<el-option label="待转账" value="PROCESS"></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="card_user_name"
label="姓名"
width="180">
</el-table-column>
<el-table-column
prop="certificate_no"
label="身份证号">
</el-table-column>
<el-table-column
prop="last_card_no"
label="银行卡号(后四位)">
</el-table-column>
<el-table-column
prop="bank_mobile"
label="手机号(后四位)">
</el-table-column>
<el-table-column
prop="amount"
label="充值金额">
</el-table-column>
<el-table-column
prop="created_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>
</div>
</body>
<!-- import Vue before Element -->
<script src="https://cdn.bootcdn.net/ajax/libs/vue/2.7.9/vue.min.js"></script>
<!-- import JavaScript -->
<script src="https://cdn.bootcdn.net/ajax/libs/element-ui/2.15.14/index.min.js"></script>
<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.5.0/axios.min.js"></script>
<script>
new Vue({
el: '#app',
data() {
return {
search: {
mobile: '',
cardNo: '',
bankCardNo: '',
orderNo: '',
outOrderNo: '',
cardUserName: '',
timeRange: null,
status: undefined
},
records: [],
total: 0,
amount: 0,
pageSize: 20
}
},
created() {
if (!window.sessionStorage.getItem('token')) {
window.location.href = '/login.html'
return;
} else {
this.searchList();
}
},
methods: {
searchList(page) {
let data = {...this.search}
data.token = window.sessionStorage.getItem('token');
data.page = page;
data.pageSize = this.pageSize;
axios.post('/account/get-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)
}
}
})
</script>
</html>