This commit is contained in:
admin-lmm
2023-07-07 14:39:16 +08:00
parent d95a9f10be
commit ec2d6ff7cd
4 changed files with 200 additions and 140 deletions

View File

@@ -172,7 +172,7 @@ export const constantRoutes = [
hidden: true, hidden: true,
children: [ children: [
{ {
path: "merchantVirtual/:id", path: "merchantVirtual",
component: () => import("@/views/financial/components/virtualFinance"), component: () => import("@/views/financial/components/virtualFinance"),
name: "merchantVirtual", name: "merchantVirtual",
meta: { title: "虚拟财务",activeMenu: "/financial/merchant"}, meta: { title: "虚拟财务",activeMenu: "/financial/merchant"},

View File

@@ -1,27 +1,48 @@
<template> <template>
<div> <div class="app-container">
<div class="app-container"> <h2>钱包汇总</h2>
<h2>营收总报</h2> <div class="main">
<!-- <el-card shadow="hover" style="margin-bottom:10px;padding:10px">--> <div class="left"></div>
<!-- <el-descriptions>--> <div class="right"></div>
<!-- <el-descriptions-item label="用电度数">{{ merchantOrderReport.useElectricity }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="充电次数">{{ merchantOrderReport.chargeNum }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="充电时长">{{ merchantOrderReport.chargeTime }}分钟</el-descriptions-item>-->
<!-- <el-descriptions-item label="电费金额">{{-->
<!-- merchantOrderReport.electricityAmount-->
<!-- }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item label="服务费金额">{{ merchantOrderReport.serviceAmount }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="收入金额">{{ merchantOrderReport.totalAmount }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="交易金额">{{ merchantOrderReport.tradeAmount }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="交易手续费">{{ merchantOrderReport.tradeFee }}</el-descriptions-item>-->
<!-- <el-descriptions-item label="虚拟金额">{{ merchantOrderReport.virtualAmount }}</el-descriptions-item>-->
<!-- </el-descriptions>-->
<!-- </el-card>-->
</div> </div>
<h2>营收总报</h2>
<div> <el-form
<el-table :model="queryParams"
ref="queryForm"
size="small"
inline
label-width="68px"
>
<el-form-item label="日期" prop="tradeDate">
<el-date-picker
v-model="createTimeRange"
style="width: 240px"
value-format="yyyy-MM-dd"
:default-time="['00:00:00', '23:59:59']"
type="daterange"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
:clearable="false"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table
:data="merchantOrderList" :data="merchantOrderList"
stripe stripe
border border
@@ -71,36 +92,14 @@
label="订单结算时间" label="订单结算时间"
align="center" align="center"
/> />
<!-- <el-table-column-->
<!-- prop="address"-->
<!-- label="操作"-->
<!-- align="center">-->
<!-- <template slot-scope="scope">-->
<!-- &lt;!&ndash; :to="'/merchant/detail/index/' + scope.row.id" &ndash;&gt;-->
<!-- <router-link-->
<!-- to="/financial/merchant/merchantVirtual"-->
<!-- class="link-type"-->
<!-- >-->
<!-- <span>虚拟财务</span>-->
<!-- </router-link>-->
<!-- <router-link-->
<!-- to="/financial/merchant/cleanFinancical"-->
<!-- class="link-type"-->
<!-- >-->
<!-- <span style="margin-left:10px;color: darkblue;">清分财务</span>-->
<!-- </router-link>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
<pagination <pagination
v-show="total > 0" v-show="total > 0"
:total="total" :total="total"
:page.sync="queryParams.pageNum" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getMerchantOrderList" @pagination="getOrderList"
/> />
</div>
</div> </div>
</template> </template>
@@ -110,7 +109,7 @@
import {getMerchantOrderReport} from "@/api/adapayMember/adapayMember"; import {getMerchantOrderReport} from "@/api/adapayMember/adapayMember";
import Template from "@/views/billing/template"; import Template from "@/views/billing/template";
import {getMerchantOrderList} from "@/api/order/order"; import {getMerchantOrderList} from "@/api/order/order";
import { getDay } from "@/utils/common";
export default { export default {
dicts: ["order_status"], dicts: ["order_status"],
components: {Template}, components: {Template},
@@ -125,7 +124,7 @@ export default {
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
merchantId: '', merchantId: this.$route.query.merchantId,
startTime: '', startTime: '',
endTime: '', endTime: '',
orderCode: null, orderCode: null,
@@ -137,11 +136,9 @@ export default {
}; };
}, },
async created() { async created() {
console.log("this.$route", this.$route); await this.defaultDate()
this.merchantId = this.$route.query.merchantId;
console.log("merchantId", this.merchantId)
this.getList(); this.getList();
this.getMerchantOrderList(); this.getOrderList();
}, },
methods: { methods: {
getList() { getList() {
@@ -162,22 +159,51 @@ export default {
); );
}, },
getMerchantOrderList() { getOrderList() {
const param = { const param = {
merchantId: this.merchantId, merchantId: this.merchantId,
startTime: "2023-01-01" startTime: "2023-01-01",
pageNum: this.queryParams.pageNum,
pageSize: this.queryParams.pageSize,
} }
console.log("param", param) console.log("param", param)
getMerchantOrderList(param).then((response) => { getMerchantOrderList(this.queryParams).then((response) => {
console.log("getMerchantOrderList", response) console.log("getMerchantOrderList", response)
this.merchantOrderList = response.rows; this.merchantOrderList = response.rows;
this.total = response.total; this.total = response.total;
}) })
} },
handleQuery() {
let arr = this.createTimeRange[0]
let str = this.createTimeRange[1]
this.queryParams.startTime = arr
this.queryParams.endTime = str
this.queryParams.pageNum = 1;
this.getList();
this.getOrderList();
},
defaultDate() {
//字符串拼接,开始时间,结束时间
let beg = getDay(-7); //当月第一天
let end = getDay(0); //当天
this.createTimeRange = [beg, end]; //将值设置给插件绑定的数据
// return this.createTimeRange;
this.queryParams.startTime = beg
this.queryParams.endTime = end
},
} }
} }
</script> </script>
<style> <style lang="scss" scoped>
.main{
.left{
}
.right{
}
}
</style> </style>

View File

@@ -1,7 +1,7 @@
<template> <template>
<div class="app-container"> <div class="app-container">
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="12"> <el-col :span="24">
<div class="public"> <div class="public">
<div class="bgc headTitle">虚拟充值用户充电收入</div> <div class="bgc headTitle">虚拟充值用户充电收入</div>
<div class="headBox"> <div class="headBox">
@@ -15,7 +15,8 @@
</div> </div>
</div> </div>
</el-col> </el-col>
<el-col :span="12"> <!-- 右侧充电收入汇总 -->
<!-- <el-col :span="12">
<div class="public"> <div class="public">
<div class="bgc1 headTitle">充电收入汇总</div> <div class="bgc1 headTitle">充电收入汇总</div>
<div class="headBox"> <div class="headBox">
@@ -27,68 +28,121 @@
</div> </div>
</div> </div>
</div> </div>
</el-col> </el-col> -->
</el-row> </el-row>
<div></div>
<div class="search"> <div class="search">
<el-form :inline="true" :model="formInline" class="demo-form-inline"> <el-form :inline="true" :model="queryParams" class="demo-form-inline">
<el-row :gutter="20"> <el-form-item label="日期" prop="tradeDate">
<el-col :span="6"> <el-date-picker
<el-form-item label="流水单号"> v-model="createTimeRange"
<el-input v-model="formInline.user" placeholder="请输入流水单号"></el-input> style="width: 240px"
</el-form-item> value-format="yyyy-MM-dd"
</el-col> :default-time="['00:00:00', '23:59:59']"
<el-col :span="6"> type="daterange"
<el-form-item label="充电单号"> range-separator=""
<el-input v-model="formInline.user" placeholder="请输入充电单号"></el-input> start-placeholder="开始日期"
</el-form-item> end-placeholder="结束日期"
</el-col> :clearable="false"
<el-col :span="6"> ></el-date-picker>
<el-form-item label="充电用户"> </el-form-item>
<el-input v-model="formInline.user" placeholder="请输入充电用户"></el-input> <el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item> <!-- <div v-if="buttonBoolean">
</el-col> </div> -->
<el-col :span="6">
<el-form-item>
<el-button type="primary" @click="onSubmit">查询</el-button>
</el-form-item>
</el-col>
</el-row>
<div v-if="buttonBoolean">
<el-form-item label="流水时间">
<el-input v-model="formInline.user" placeholder="请输入流水单号"></el-input>
</el-form-item>
</div>
</el-form> </el-form>
<div class="search-arrow" <!-- <div class="search-arrow" @click="showOrHide()">
@click="showOrHide()" <span>{{ showOrHideText }}</span>
<i :class="icon"></i>
</div> -->
</div>
<div>
<el-table
:data="merchantList"
stripe
border
style="width: 100%">
<el-table-column
prop="orderCode"
label="订单号"
align="center"
/>
<el-table-column
prop="transactionCode"
label="交易流水号"
align="center"
width="300"
/>
<el-table-column
prop="stationName"
label="站点名称"
align="center"
width="130"
/>
<el-table-column
prop="orderAmount"
label="订单金额"
align="center"
/>
<el-table-column
prop="orderSettleTime"
label="订单结算时间"
align="center"
/>
</el-table>
<pagination
> v-show="total > 0"
<span>{{ showOrHideText }}</span> :total="total"
<i :class="icon"></i></div> :page.sync="queryParams.pageNum"
</div> :limit.sync="queryParams.pageSize"
@pagination="getOrderList"
/>
</div>
</div> </div>
</div>
</template> </template>
<script> <script>
import {getMerchantOrderList} from "@/api/order/order";
import { getDay } from "@/utils/common";
export default { export default {
data() { data() {
return { return {
createTimeRange:[],
merchantList:[],
showOrHideText: "显示更多查询条件", showOrHideText: "显示更多查询条件",
buttonBoolean: false, buttonBoolean: false,
//图标,可根据自己的需求匹配 //图标,可根据自己的需求匹配
icon: "el-icon-caret-bottom", icon: "el-icon-caret-bottom",
formInline: { total: 0,
user: '', queryParams: {
region: '' pageNum: 1,
} pageSize: 10,
merchantId: this.$route.query.merchantId,
startTime: '',
endTime: '',
orderCode: null,
transactionCode: null,
mobileNumber: null,
orderStatus: null,
stationId: null,
},
} }
}, },
methods: { methods: {
defaultDate() {
let beg = getDay(-30); //当月第一天
let end = getDay(0); //当天
this.createTimeRange = [beg, end]; //将值设置给插件绑定的数据
this.queryParams.startTime = beg
this.queryParams.endTime = end
},
// 搜索0
onSubmit() { onSubmit() {
console.log('submit!'); let arr = this.createTimeRange[0]
let str = this.createTimeRange[1]
this.queryParams.startTime = arr
this.queryParams.endTime = str
this.queryParams.pageNum = 1;
this.getOrderList();
}, },
showOrHide() { showOrHide() {
if (this.buttonBoolean) { if (this.buttonBoolean) {
@@ -101,6 +155,17 @@ export default {
this.buttonBoolean = !this.buttonBoolean; this.buttonBoolean = !this.buttonBoolean;
} }
}, },
getOrderList() {
getMerchantOrderList(this.queryParams).then((response) => {
this.merchantList = response.rows;
console.log('虚拟财务',this.merchantList)
this.total = response.total;
})
},
},
async created () {
await this.defaultDate()
this.getOrderList()
} }
} }
</script> </script>

View File

@@ -153,7 +153,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<!-- :to="'/merchant/detail/index/' + scope.row.id" --> <!-- :to="'/merchant/detail/index/' + scope.row.id" -->
<router-link <router-link
to="/financial/merchant/merchantVirtual" :to="{path:'/financial/merchant/merchantVirtual', query: {merchantId: scope.row.id}} "
class="link-type" class="link-type"
> >
<span>虚拟财务</span> <span>虚拟财务</span>
@@ -197,33 +197,8 @@ export default {
total: 0, total: 0,
queryParams: { queryParams: {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10
merchantName: null, }
address: null,
status: null,
organizationCode: null,
managerName: null,
managerPhone: null,
servicePhone: null,
logoUrl: null,
},
tableData: [{
date: '2016-05-02',
name: '王小虎',
address: '上海市普陀区金沙江路 1518 弄'
}, {
date: '2016-05-04',
name: '王小虎',
address: '上海市普陀区金沙江路 1517 弄'
}, {
date: '2016-05-01',
name: '王小虎',
address: '上海市普陀区金沙江路 1519 弄'
}, {
date: '2016-05-03',
name: '王小虎',
address: '上海市普陀区金沙江路 1516 弄'
}]
}; };
}, },
created() { created() {
@@ -243,14 +218,8 @@ export default {
}, },
// 获取运营商列表 // 获取运营商列表
getFinancialMerchantList() { getFinancialMerchantList() {
const params = { getFinancialMerchantList(this.queryParams).then((response) => {
pageNum:1,
pageSize:2
}
getFinancialMerchantList(params).then((response) => {
console.log("response", response)
this.merchantList = response.rows; this.merchantList = response.rows;
console.log("response.total", response.total)
this.total = response.total; this.total = response.total;
}) })
}, },