新增押金充值记录

This commit is contained in:
weipengfei 2023-10-09 13:46:22 +08:00
parent dd27193d0a
commit 48f7c566b7
5 changed files with 297 additions and 5 deletions

View File

@ -3,12 +3,12 @@ ENV = 'development'
# base api
#VUE_APP_BASE_API = 'http://127.0.0.1:8325'
VUE_APP_BASE_API = 'https://shop.lihaink.cn'
# VUE_APP_BASE_API = 'https://crmeb-test.shop.lihaink.cn'
# VUE_APP_BASE_API = 'https://shop.lihaink.cn'
VUE_APP_BASE_API = 'https://crmeb-test.shop.lihaink.cn'
# socket 连接地址
#VUE_APP_WS_URL = 'ws://192.168.3.20:8324'
VUE_APP_WS_URL = 'wss://shop.lihaink.cn'
# VUE_APP_WS_URL = 'wss://crmeb-test.shop.lihaink.cn'
# VUE_APP_WS_URL = 'wss://shop.lihaink.cn'
VUE_APP_WS_URL = 'wss://crmeb-test.shop.lihaink.cn'
# vue-cli uses the VUE_CLI_BABEL_TRANSPILE_MODULES environment variable,
# to control whether the babel-plugin-dynamic-import-node plugin is enabled.

View File

@ -133,3 +133,10 @@ export function downloadFinancialApi(type, data) {
export function getStatisticsApi(data) {
return request.get(`financial_record/count`,data)
}
/**
* @description 保证金充值记录 -- 列表
*/
export function depositListApi(data) {
return request.get(`/bill/deposit`, data)
}

38
src/libs/constants.js Normal file
View File

@ -0,0 +1,38 @@
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
export const switchStatus = [
{ label: '开启', value: 1 },
{ label: '关闭', value: 0 }
]
export const fromList = {
title: '选择时间',
custom: true,
fromTxt: [
{ text: '全部', val: '' },
{ text: '今天', val: 'today' },
{ text: '昨天', val: 'yesterday' },
{ text: '最近7天', val: 'lately7' },
{ text: '最近30天', val: 'lately30' },
{ text: '本月', val: 'month' },
{ text: '本年', val: 'year' }
]
}
export const statusList = {
title: '状态',
custom: true,
fromTxt: [
{ text: '全部', val: '' },
{ text: '待审核', val: '0' },
{ text: '审核已通过', val: '1' },
{ text: '审核未通过', val: '2' }
]
}

View File

@ -75,7 +75,16 @@ const accountsRouter =
noCache: true
},
component: () => import('@/views/accounts/payType')
}
},
{
path: 'deposit',
name: 'AccountsDeposit',
meta: {
title: '押金充值记录',
noCache: true
},
component: () => import('@/views/accounts/deposit/index')
},
]
}
export default accountsRouter

View File

@ -0,0 +1,238 @@
<template>
<div class="divBox">
<el-card class="box-card">
<div slot="header" class="clearfix">
<div class="container">
<el-form size="small" label-width="100px">
<el-form-item label="时间选择:" class="width100">
<!-- <el-radio-group
v-model="tableFrom.date"
type="button"
class="mr20"
size="small"
@change="selectChange(tableFrom.date)"
>
<el-radio-button
v-for="(item, i) in fromList.fromTxt"
:key="i"
:label="item.val"
>{{ item.text }}</el-radio-button
>
</el-radio-group> -->
<el-date-picker
v-model="timeVal"
value-format="yyyy-MM-dd"
format="yyyy-MM-dd"
size="small"
type="daterange"
placement="bottom-end"
placeholder="自定义时间"
style="width: 250px"
@change="onchangeTime"
/>
</el-form-item>
<!-- <el-form-item label="是否支付:">
<el-radio-group
v-model="tableFrom.paid"
type="button"
size="small"
@change="getList(1)"
>
<el-radio-button label="">全部</el-radio-button>
<el-radio-button label="1">已支付</el-radio-button>
<el-radio-button label="0">未支付</el-radio-button>
</el-radio-group>
</el-form-item> -->
<el-form-item label="关键字:" class="width100">
<el-input
v-model="tableFrom.keyword"
@keyup.enter.native="getList(1)"
placeholder="请输入商户名称"
class="selWidth"
size="small"
clearable
@clear="getList(1)"
>
<el-button
slot="append"
icon="el-icon-search"
size="small"
class="el-button-solt"
@click="getList(1)"
/>
</el-input>
</el-form-item>
</el-form>
</div>
<cards-data :card-lists="cardLists" />
</div>
<el-table
v-loading="listLoading"
:data="tableData.data"
style="width: 100%"
size="mini"
class="table"
highlight-current-row
>
<el-table-column prop="order_id" label="ID" width="60" />
<el-table-column label="头像" min-width="80">
<template slot-scope="scope">
<div v-if="scope.row.avatar" class="demo-image__preview">
<el-image
:src="scope.row.avatar"
:preview-src-list="[scope.row.avatar]"
/>
</div>
<img
v-else
src="../../../assets/images/f.png"
alt=""
style="width: 36px; height: 36px; vertical-align: top"
/>
</template>
</el-table-column>
<el-table-column prop="nickname" label="用户昵称" min-width="130">
<template slot-scope="scope">
<span class="spBlock">{{
scope.row.nickname + " / " + scope.row.mer_name
}}</span>
</template>
</el-table-column>
<el-table-column prop="order_sn" label="订单号" min-width="180" />
<el-table-column
sortable
label="支付金额"
min-width="120"
prop="total_price"
/>
<el-table-column label="是否支付" min-width="80">
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.paid | payStatusFilter }}</span>
</template>
</el-table-column>
<el-table-column label="支付时间" min-width="150">
<template slot-scope="scope">
<span class="spBlock">{{ scope.row.pay_time || "无" }}</span>
</template>
</el-table-column>
</el-table>
<div class="block">
<el-pagination
:page-sizes="[20, 40, 60, 80]"
:page-size="tableFrom.limit"
:current-page="tableFrom.page"
layout="total, sizes, prev, pager, next, jumper"
:total="tableData.total"
@size-change="handleSizeChange"
@current-change="pageChange"
/>
</div>
</el-card>
</div>
</template>
<script>
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEBCRMEB
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import { depositListApi, rechargeTotalApi } from '@/api/accounts'
import cardsData from '@/components/cards/index'
import { fromList } from '@/libs/constants.js'
export default {
name: 'AccountsDeposit',
components: { cardsData },
data () {
return {
cardLists: [],
timeVal: [],
tableData: {
data: [],
total: 0
},
listLoading: true,
tableFrom: {
paid: '',
date: '',
keyword: '',
mer_id: '',
page: 1,
limit: 20,
},
fromList: fromList
}
},
mounted () {
// console.log('ss', this.$store.state.user);
this.getList()
this.getStatistics()
},
methods: {
//
selectChange (tab) {
this.tableFrom.date = tab
this.timeVal = []
this.tableFrom.page = 1;
this.getList()
},
//
onchangeTime (e) {
this.timeVal = e
// this.tableFrom.date = e ? [...this.timeVal] : [];
this.tableFrom.date = e ? this.timeVal.join(' ') : '';
this.tableFrom.page = 1;
this.getList()
},
//
getList (num) {
this.listLoading = true
this.tableFrom.page = num ? num : this.tableFrom.page;
depositListApi(this.tableFrom).then(res => {
console.log(res);
this.tableData.data = res.data.list
this.tableData.total = res.data.count
this.listLoading = false
}).catch((res) => {
this.$message.error(res.message)
this.listLoading = false
})
},
pageChange (page) {
this.tableFrom.page = page
this.getList()
},
handleSizeChange (val) {
this.tableFrom.limit = val
this.getList()
},
//
getStatistics () {
this.StatisticsLoading = true
rechargeTotalApi().then(res => {
const stat = res.data
this.cardLists = [
// { name: '', count: stat.totalPayPrice, className: 'el-icon-s-goods' },
// { name: '退', count: stat.totalRefundPrice, className: 'el-icon-s-order' },
// { name: '', count: stat.totalRoutinePrice, className: 'el-icon-s-cooperation' },
// { name: '', count: stat.totalWxPrice, className: 'el-icon-s-finance' }
]
this.StatisticsLoading = false
}).catch((res) => {
this.$message.error(res.message)
this.StatisticsLoading = false
})
}
}
}
</script>
<style scoped>
.selWidth {
width: 500px;
}
</style>