| | |
| | | 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> |
| | |
| | | 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> |
| | |
| | | <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> |
| | |
| | | import moment from 'moment' |
| | | export default { |
| | | name: 'Rechargelist', |
| | | data() { |
| | | data () { |
| | | return { |
| | | columns: [ |
| | | { |
| | |
| | | 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: '账户类型', |
| | |
| | | default: |
| | | return '未知账户' |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '上传凭证', |
| | | dataIndex: 'img', |
| | | align: 'center', |
| | | width: 180, |
| | | scopedSlots: { customRender: 'img' }, |
| | | scopedSlots: { customRender: 'img' } |
| | | }, |
| | | { |
| | | title: '客户电话', |
| | | dataIndex: 'userPhone', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | // { |
| | | // title: '充值渠道', |
| | |
| | | { |
| | | title: '充值金额', |
| | | dataIndex: 'payAmt', |
| | | align: 'center', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '申请时间', |
| | |
| | | width: 180, |
| | | customRender: (text, row, index) => { |
| | | return text ? moment(text).format('YYYY-MM-DD HH:mm:ss') : '' |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | title: '支付时间', |
| | |
| | | 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: '操作', |
| | |
| | | align: 'center', |
| | | fixed: 'right', |
| | | width: 180, |
| | | scopedSlots: { customRender: 'action' }, |
| | | }, |
| | | scopedSlots: { customRender: 'action' } |
| | | } |
| | | ], |
| | | // 表头 |
| | | pagination: { |
| | |
| | | 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: { |
| | |
| | | userId: '', |
| | | realName: '', |
| | | beginTime: '', |
| | | endTime: '', |
| | | endTime: '' |
| | | }, |
| | | datalist: [], |
| | | agentlist: [], |
| | |
| | | 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) { |
| | |
| | | .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 |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | // 点击修改充值状态 |
| | | 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) { |
| | |
| | | .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 |
| | | }) |
| | |
| | | }) |
| | | }, |
| | | // 取消充值状态修改 |
| | | 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, |
| | |
| | | userId: '', |
| | | realName: '', |
| | | beginTime: '', |
| | | endTime: '', |
| | | endTime: '' |
| | | } |
| | | this.times = [] |
| | | }, |
| | | getagentlist() { |
| | | getagentlist () { |
| | | var that = this |
| | | this.agentloading = true |
| | | nextagent(this.agentqueryParam).then((res) => { |
| | |
| | | }, 500) |
| | | }) |
| | | }, |
| | | getlist() { |
| | | getlist () { |
| | | var that = this |
| | | this.loading = true |
| | | rechargelist(this.queryParam).then((res) => { |
| | |
| | | }, 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> |