From 8c3fe58c2e0afbd60cb8e197bbdf7a7ef295e77f Mon Sep 17 00:00:00 2001
From: dcc <dcc@163.com>
Date: Tue, 11 Jun 2024 16:24:56 +0800
Subject: [PATCH] 123
---
src/views/capital/rechargelist.vue | 132 ++++++++++++++++++++++++--------------------
1 files changed, 72 insertions(+), 60 deletions(-)
diff --git a/src/views/capital/rechargelist.vue b/src/views/capital/rechargelist.vue
index 774b9c9..0cb4fab 100644
--- a/src/views/capital/rechargelist.vue
+++ b/src/views/capital/rechargelist.vue
@@ -63,13 +63,21 @@
icon="search"
style="margin-left: 8px"
@click=";(queryParam.pageNum = 1), getlist()"
- >查询
+ >查询
</a-button>
- <a-button type="primary" icon="plus" style="margin-left: 8px" @click="addOrderdialog = true"
- >创建充值订单
+ <a-button
+ type="primary"
+ icon="plus"
+ style="margin-left: 8px"
+ @click="addOrderdialog = true"
+ >创建充值订单
</a-button>
- <a-button type="primary" icon="vertical-align-bottom" style="margin-left: 8px" @click="getexport"
- >导出搜索数据
+ <a-button
+ type="primary"
+ icon="vertical-align-bottom"
+ style="margin-left: 8px"
+ @click="getexport"
+ >导出搜索数据
</a-button>
</span>
</a-form-item>
@@ -104,20 +112,20 @@
record.orderStatus == 0
? 'blue'
: record.orderStatus == 1
- ? 'green'
- : record.orderStatus == 2
- ? 'red'
- : 'orange'
+ ? 'green'
+ : record.orderStatus == 2
+ ? 'red'
+ : 'orange'
"
>
{{
record.orderStatus == 0
? '审核中'
: record.orderStatus == 1
- ? '充值成功'
- : record.orderStatus == 2
- ? '充值失败'
- : '订单取消'
+ ? '充值成功'
+ : record.orderStatus == 2
+ ? '充值失败'
+ : '订单取消'
}}
</a-tag>
</div>
@@ -128,8 +136,12 @@
<el-image style="width: 140px; height: 70px" :src="record.img" :preview-src-list="[record.img]"> </el-image>
</template>
<template slot="action" slot-scope="text, record">
- <a slot="action" href="javascript:;" @click="getEditorder(record.id)" v-if="record.orderStatus == 0"
- >修改状态</a
+ <a
+ slot="action"
+ href="javascript:;"
+ @click="getEditorder(record.id)"
+ v-if="record.orderStatus == 0"
+ >修改状态</a
>
<a-divider type="vertical" v-if="record.orderStatus == 0" />
<a slot="action" href="javascript:;" @click="getDelorder(record.id)">删除订单</a>
@@ -216,7 +228,7 @@
import moment from 'moment'
export default {
name: 'Rechargelist',
- data() {
+ data () {
return {
columns: [
{
@@ -226,22 +238,22 @@
width: 180,
customRender: (text, row, index) => {
return `${row.nickName}(${row.userId})`
- },
+ }
},
{
title: '订单ID',
dataIndex: 'id',
- align: 'center',
+ align: 'center'
},
{
title: '代理id',
dataIndex: 'agentId',
- align: 'center',
+ align: 'center'
},
{
title: '订单号',
dataIndex: 'orderSn',
- align: 'center',
+ align: 'center'
},
{
title: '账户类型',
@@ -256,19 +268,19 @@
default:
return '未知账户'
}
- },
+ }
},
{
title: '上传凭证',
dataIndex: 'img',
align: 'center',
width: 180,
- scopedSlots: { customRender: 'img' },
+ scopedSlots: { customRender: 'img' }
},
{
title: '客户电话',
dataIndex: 'userPhone',
- align: 'center',
+ align: 'center'
},
// {
// title: '充值渠道',
@@ -279,7 +291,7 @@
{
title: '充值金额',
dataIndex: 'payAmt',
- align: 'center',
+ align: 'center'
},
{
title: '申请时间',
@@ -288,7 +300,7 @@
width: 180,
customRender: (text, row, index) => {
return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
- },
+ }
},
{
title: '支付时间',
@@ -297,13 +309,13 @@
width: 180,
customRender: (text, row, index) => {
return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : ''
- },
+ }
},
{
title: '状态',
dataIndex: 'orderStatus',
align: 'center',
- scopedSlots: { customRender: 'orderStatus' },
+ scopedSlots: { customRender: 'orderStatus' }
},
{
title: '操作',
@@ -311,8 +323,8 @@
align: 'center',
fixed: 'right',
width: 180,
- scopedSlots: { customRender: 'action' },
- },
+ scopedSlots: { customRender: 'action' }
+ }
],
// 表头
pagination: {
@@ -322,7 +334,7 @@
pageSizeOptions: ['10', '20', '50', '100'], // 每页中显示的数据
onShowSizeChange: (current, pageSize) => this.onSizeChange(current, pageSize), // 改变每页数量时更新显示
onChange: (page, pageSize) => this.onPageChange(page, pageSize), // 点击页码事件
- showTotal: (total) => `共有 ${total} 条数据`, // 分页中显示总的数据
+ showTotal: (total) => `共有 ${total} 条数据` // 分页中显示总的数据
},
loading: false,
queryParam: {
@@ -333,7 +345,7 @@
userId: '',
realName: '',
beginTime: '',
- endTime: '',
+ endTime: ''
},
datalist: [],
agentlist: [],
@@ -349,27 +361,27 @@
addOrderDialogloading: false,
agentqueryParam: {
pageNum: 1,
- pageSize: 100,
- },
+ pageSize: 100
+ }
}
},
- created() {
+ created () {
this.getlist()
},
methods: {
- getexport() {
+ getexport () {
rechargeexport(this.queryParam).then((res) => {
fileDownload(res, '充值列表.xls')
})
},
// 新增充值订单弹窗
- CanceladdOrderdialog() {
+ CanceladdOrderdialog () {
this.addOrderdialog = false
const form = this.$refs.addOrderform.form
form.resetFields()
},
// 新增充值订单
- OkaddOrderdialog() {
+ OkaddOrderdialog () {
const form = this.$refs.addOrderform.form
form.validateFields((errors, values) => {
if (!errors) {
@@ -378,11 +390,11 @@
.then((res) => {
if (res.status == 0) {
this.addOrderdialog = false
- this.$message.success({ content: res.msg, duration: 2 })
+ this.$message.success(res.msg)
form.resetFields()
this.getlist()
} else {
- this.$message.error({ content: res.msg })
+ this.$message.error(res.msg)
}
this.addOrderDialogloading = false
})
@@ -393,13 +405,13 @@
})
},
// 点击修改充值状态
- getEditorder(val) {
+ getEditorder (val) {
this.editOrderdialog = true
this.fields.forEach((v) => this.editOrderform.getFieldDecorator(v))
this.editOrderform.setFieldsValue(pick({ chargeId: val }, this.fields))
},
// 开始更改充值状态
- OkeditOrderdialog() {
+ OkeditOrderdialog () {
const form = this.$refs.editOrderform.form
form.validateFields((errors, values) => {
if (!errors) {
@@ -408,11 +420,11 @@
.then((res) => {
if (res.status == 0) {
this.editOrderdialog = false
- this.$message.success({ content: res.msg, duration: 2 })
+ this.$message.success(res.msg)
form.resetFields()
this.getlist()
} else {
- this.$message.error({ content: res.msg })
+ this.$message.error(res.msg)
}
this.editOrderDialogloading = false
})
@@ -423,40 +435,40 @@
})
},
// 取消充值状态修改
- CanceleditOrderdialog() {
+ CanceleditOrderdialog () {
this.editOrderdialog = false
const form = this.$refs.editOrderform.form
form.resetFields()
},
// 删除充值订单
- getDelorder(val) {
+ getDelorder (val) {
var that = this
this.$confirm({
title: '提示',
content: '确认删除充值订单吗?此操作不可恢复',
- onOk() {
+ onOk () {
var data = {
- cId: val,
+ cId: val
}
rechargedel(data).then((res) => {
if (res.status == 0) {
- that.$message.success({ content: res.msg, duration: 2 })
+ that.$message.success(res.msg)
that.getlist()
} else {
- that.$message.error({ content: res.msg })
+ that.$message.error(res.msg)
}
})
},
- onCancel() {
+ onCancel () {
console.log('Cancel')
- },
+ }
})
},
- onChangeRangeDate(value, dateString) {
+ onChangeRangeDate (value, dateString) {
this.queryParam.beginTime = dateString[0]
this.queryParam.endTime = dateString[1]
},
- getqueryParam() {
+ getqueryParam () {
this.queryParam = {
pageNum: 1,
pageSize: 10,
@@ -465,11 +477,11 @@
userId: '',
realName: '',
beginTime: '',
- endTime: '',
+ endTime: ''
}
this.times = []
},
- getagentlist() {
+ getagentlist () {
var that = this
this.agentloading = true
nextagent(this.agentqueryParam).then((res) => {
@@ -479,7 +491,7 @@
}, 500)
})
},
- getlist() {
+ getlist () {
var that = this
this.loading = true
rechargelist(this.queryParam).then((res) => {
@@ -490,16 +502,16 @@
}, 500)
})
},
- onPageChange(page, pageSize) {
+ onPageChange (page, pageSize) {
this.queryParam.pageNum = page
this.getlist()
},
- onSizeChange(current, pageSize) {
+ onSizeChange (current, pageSize) {
this.queryParam.pageNum = current
this.queryParam.pageSize = pageSize
this.getlist()
- },
- },
+ }
+ }
}
</script>
<style scoped>
--
Gitblit v1.9.3