Commit f7e43382 by wuqian

Merge branch 'dev' of http://47.99.244.21:9999/chehuidong/saas-manage into wq

parents 10cf3145 aac76b48
import axios from '../axios'
export function getUserRechargeRecordListApi(params) {
return axios.post('/pay/businessPayRecord/list_page', params)
}
......@@ -85,12 +85,18 @@ const routes = [
meta: { title: '州省简称' }
},
{
path: '/saas/management',
component: () => import('@/views/system/management.vue'),
path: '/saas/user/management',
component: () => import('@/views/user/management.vue'),
name: 'system_management',
meta: { title: '客户管理' }
},
{
path: '/saas/user/recharge-record',
component: () => import('@/views/user/rechargeRecord.vue'),
name: 'user_recharge_record',
meta: { title: '充值记录' }
},
{
path: '/saas/logistics/transporters',
component: () => import('@/views/system/transporters.vue'),
name: 'system_transporters',
......@@ -173,4 +179,10 @@ router.beforeEach((to, from, next) => {
next()
}
})
// 修改 Vue Router 的 push 方法,使其在发生异常时不会抛出错误,而是返回一个包含错误信息的 Promise
const VueRouterPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(to) {
return VueRouterPush.call(this, to).catch((err) => err)
}
export default router
......@@ -256,8 +256,8 @@ export default {
id: 5,
path: '',
label: '功能管理',
icon: '',
index: '',
icon: 'el-icon-setting',
index: '/setting',
children: [
{
id: 1,
......@@ -283,14 +283,7 @@ export default {
index: '/saas/abbreviation',
children: []
},
{
id: 6,
path: '',
label: '客户管理',
icon: 'el-icon-s-custom',
index: '/saas/management',
children: []
},
{
id: 7,
path: '',
......@@ -375,6 +368,31 @@ export default {
// children: []
// },
{
id: 7,
path: '',
label: '客户管理',
icon: 'el-icon-user',
index: '/user',
children: [
{
id: 1,
path: '',
label: '客户管理',
icon: 'el-icon-s-custom',
index: '/saas/user/management',
children: []
},
{
id: 2,
path: '',
label: '充值记录',
icon: 'el-icon-user',
index: '/saas/user/recharge-record',
children: []
}
]
},
{
id: 8,
path: '',
label: '应用版本管理',
......@@ -489,6 +507,7 @@ export default {
})
}
},
async submitOm() {
if (!this.editForm.content) {
return this.$message.warning('请输入内容')
......
......@@ -5,15 +5,14 @@
:key="t.id"
class="page-tag"
:class="{ active: activeTag === t.name }"
@click="switchTag(t)"
>
@click="switchTag(t)">
<span class="page-tag-title">{{ t.title }}</span>
<span
v-if="t.name !== DEFAULT_DASHBOARD"
class="page-tag-close"
@click.stop="closeTag(t)"
><i class="el-icon-close"></i
></span>
@click.stop="closeTag(t)">
<i class="el-icon-close"></i>
</span>
</div>
</div>
</template>
......@@ -25,15 +24,16 @@ export default {
name: 'pageTags',
data() {
return {
DEFAULT_DASHBOARD,
DEFAULT_DASHBOARD
}
},
computed: {
...mapState('tags', ['tags', 'activeTag']),
...mapGetters('tags', ['currentTag']),
...mapGetters('tags', ['currentTag'])
},
methods: {
switchTag(t) {
if (this.$route.path === t.path) return
this.$store.commit('tags/setActive', t.name)
this.$router.push(t.path)
},
......@@ -43,12 +43,12 @@ export default {
// 切换到前一个标签页
if (this.$route.fullPath !== this.currentTag.path) {
this.$router.push({
path: this.currentTag.path,
path: this.currentTag.path
})
}
}
},
},
}
}
}
</script>
<style lang="scss" scoped>
......@@ -87,9 +87,9 @@ export default {
}
&.active {
background-color: #1565C0;
background-color: #1565c0;
color: #fff;
border: 1px solid #1565C0;
border: 1px solid #1565c0;
}
}
......
<template>
<div class="recharge-record card">
<div class="search">
<el-form :model="searchForm" size="small" :inline="true">
<el-form-item label="客户">
<el-input
v-model="searchForm.namespace"
placeholder="请输入客户"
clearable></el-input>
</el-form-item>
<el-form-item label="套餐版本">
<el-input
v-model="searchForm.subject"
placeholder="请输入客户"
clearable></el-input>
</el-form-item>
<el-form-item label="交易号">
<el-input
v-model="searchForm.tradeNo"
placeholder="请输入交易号"
clearable></el-input>
</el-form-item>
<el-form-item label="订单号">
<el-input
v-model="searchForm.outTradeNo"
placeholder="请输入订单号"
clearable></el-input>
</el-form-item>
<el-form-item label="业务类型">
<el-input
v-model="searchForm.businessType"
placeholder="请输入业务类型"
clearable></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
size="small"
icon="el-icon-search"
@click="search">
查询
</el-button>
</el-form-item>
</el-form>
</div>
<div class="table-wrap" v-loading="loading">
<el-table
ref="table"
:data="rechargeRecordList"
border
width="100%"
height="100%"
:highlight-current-row="true"
header-row-class-name="header-row-class-name">
<el-table-column
label="序号"
type="index"
width="50"
align="center"
fixed="left"
header-align="center"></el-table-column>
<el-table-column
label="客户"
prop="namespace"
header-align="center"
align="center"
width="80"
fixed="left"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="套餐版本"
prop="subject"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="交易号"
prop="tradeNo"
header-align="center"
align="center"
min-width="120"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="购买数量"
prop="month"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="交易金额"
prop="totalAmount"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="支付方式"
prop="payType"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="业务类型"
prop="businessType"
header-align="center"
align="left"
min-width="120"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="订单号"
prop="outTradeNo"
min-width="180"
:show-overflow-tooltip="true"
align="center"
header-align="center"></el-table-column>
<el-table-column
label="商户原始订单号"
prop="merchantOrderNo"
header-align="center"
align="center"
width="130"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="订单标题"
prop="subject"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="订单附加信息"
prop="body"
header-align="center"
align="center"
min-width="130"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="产品码"
prop="productCode"
header-align="center"
align="center"
min-width="220"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="付款时间"
prop="clientTime"
header-align="center"
align="center"
width="160"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="下单时间"
prop="createTime"
header-align="center"
align="center"
width="160"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="订单过期时间"
prop="expirationTime"
header-align="center"
align="center"
width="160"
:show-overflow-tooltip="true"></el-table-column>
</el-table>
</div>
<div class="pagination">
<el-pagination
layout="sizes, total, prev, pager, next, jumper"
background
:total="total"
:page-size="pageSize"
:current-page="currentPage"
@size-change="sizeChange"
@current-change="onCurrentChange"></el-pagination>
</div>
</div>
</template>
<script>
import { getUserRechargeRecordListApi } from '@/common/api/user/user'
export default {
name: 'rechargeRecord',
data() {
return {
period: [],
searchForm: {},
total: 0,
pageSize: 50,
currentPage: 1,
loading: false,
rechargeRecordList: []
}
},
async created() {
this.loadData()
},
methods: {
async loadData() {
const data = {
...this.searchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}
this.loading = true
try {
const res = await getUserRechargeRecordListApi(data)
if (res.code !== 200) return
this.rechargeRecordList = res.data.records
this.total = res.data.total
} catch (e) {
console.error(e)
} finally {
this.loading = false
}
},
search() {
this.currentPage = 1
this.loadData()
},
onCurrentChange(currentPage) {
this.currentPage = currentPage
this.loadData()
},
sizeChange(pageSize) {
this.pageSize = pageSize
this.loadData()
}
}
}
</script>
<style lang="scss" scoped>
.recharge-record {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
&::v-deep {
.el-table .el-table__cell {
padding: 6px 0;
}
.el-input__inner {
padding: 0 4px;
}
.el-input--small .el-input__inner {
height: 30px;
line-height: 30px;
}
.el-icon-time:before {
content: '';
}
.el-dialog__footer {
text-align: center;
.el-button--small {
padding: 9px 50px;
}
}
.el-dialog__body {
padding: 10px 20px;
}
.el-icon-edit:before {
color: #ff9800;
font-weight: bold;
}
.el-range-editor--small .el-range-separator {
line-height: 31px;
}
.header-row-class-name th {
background-color: #f8f8f9;
}
.el-input-group__append {
padding-left: 0;
}
}
}
.search {
background: #fff;
}
.table-wrap {
background: #fff;
flex: 1;
overflow: hidden;
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment